-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for V330L-DU4L-VS pet feeder #2105
Conversation
e2equiel
commented
Jul 12, 2024
Can't make work DP 115 (snapshot): {
"result": {
"properties": [
{
"code": "movement_detect_pic",
"custom_name": "",
"dp_id": 115,
"time": 1720804936027,
"type": "raw",
"value": "eyJ2IjoiMy4wIiwiYnVja2V0IjoidHktdXMtc3RvcmFnZTMwLXBpYyIsImZpbGVzIjpbWyIvODc4MTViLTgyMTY5MjQwLWd6ams5ZGFiN2ZlNmEwMDY3MDEyL2RldGVjdC8xNzIwODA0OTI5LmpwZWciLCIzNWUzY2NmMWYwMjAzZmM1Il1dfQ=="
}
]
},
"success": true,
"t": 1720809674649,
"tid": "514e70fd407e11ef8e43562584fc0bdb" When undecode the base64 value, it return another json and I don't know how to use it: {"v":"3.0","bucket":"ty-us-storage30-pic","files":[["/87815b-82169240-gzjk9dab7fe6a0067012/detect/1720804929.jpeg","35e3ccf1f0203fc5"]]} I will appreciate any help |
I'm not sure if this would help, but I just figured how to access via telnet to the pet feeder: telnet xxx.xxx.xxx.xxx
ipc login: root
Password: AK2040jk |
Arbitrary decoding of double encoded base64 image within json within base64 is not feasible, so it may be better to rename that attribute so the base64 decoded value can still be read so the image can be extracted by another more specialised integration or complex template, but it does not give any errors trying to use it as the snapshot directly. |
Camera sensor to generic text sensor
Your latest change seems to have lost the record switch. I was actually meaning to make the image json an attribute of the camera entity named something else (snapshot_data would have worked), and leave the record function in there, but I guess having such a limited camera entity maybe does not make much sense. But a sensor entity for the snapshot data is not really necessary, as I don't think you would want it to show in the UI by default, so maybe keeping the record as a switch and putting the snapshot attribute on there would work. |
Hi @make-all, do you mean something like this? - entity: switch
name: Record
icon: "mdi:record-rec"
category: config
dps:
- id: 113
type: boolean
optional: true
name: record
mapping:
- dps_val: null
value: false
- id: 115
type: base64
name: snapshot_data
optional: true |
yes, except your switch entity needs to have a dp named "switch" (instead of record) |
Only differences in config were product id and name, and original used camera entity, while new one used switch after review feedback because the device is returning a filename in json not the image data. Original report make-all#2027 seems to say that one does too. PR make-all#2105
PR make-all#2105 (reverted and merged with older config for same family device) PR make-all#2119, make-all#2123, make-all#2125