tuya-home-assistant
tuya-home-assistant copied to clipboard
Add full support for Doorbell Cameras
Device normal info
- Brand: BCom
- Model: Wifi Intercom
Device info (please complete the following information, which can be found in log): { "name": "Security Camera", "model": "86706", "category": "sp", "product_id": "obtloc9hkl46jjgg", "product_name": "Security Camera", "online": true, "sub": false, "time_zone": "+10:30", "active_time": "2022-04-01T04:17:40+00:00", "create_time": "2022-04-01T04:17:40+00:00", "update_time": "2022-04-01T04:17:51+00:00", "function": { "basic_nightvision": { "type": "Enum", "value": { "range": [ "0", "1", "2" ] } }, "sd_format": { "type": "Boolean", "value": {} }, "ipc_smart_action": { "type": "Enum", "value": { "range": [ "0", "1", "2", "3" ] } } }, "status_range": { "basic_nightvision": { "type": "Enum", "value": { "range": [ "0", "1", "2" ] } }, "sd_storge": { "type": "String", "value": { "maxlen": 255 } }, "sd_status": { "type": "Integer", "value": { "unit": "", "min": 1, "max": 5, "scale": 1, "step": 1 } }, "sd_format": { "type": "Boolean", "value": {} }, "movement_detect_pic": { "type": "Raw", "value": {} }, "sd_format_state": { "type": "Integer", "value": { "unit": "", "min": -20000, "max": 20000, "scale": 1, "step": 1 } }, "doorbell_active": { "type": "String", "value": { "maxlen": 255 } }, "doorbell_pic": { "type": "Raw", "value": {} }, "alarm_message": { "type": "String", "value": {} } }, "status": { "basic_nightvision": 0, "sd_storge": "0|0|0", "sd_status": 5, "sd_format": false, "movement_detect_pic": "REDACTED", "sd_format_state": 0, "doorbell_active": "", "doorbell_pic": "", "alarm_message": "REDACTED" }, "home_assistant": { "name": "Security Camera", "name_by_user": "Doorbell Camera", "disabled": false, "disabled_by": null, "entities": [ { "disabled": false, "disabled_by": null, "entity_category": null, "device_class": null, "original_device_class": null, "icon": null, "original_icon": null, "unit_of_measurement": null, "state": { "entity_id": "camera.doorbell_camera", "state": "idle", "attributes": { "access_token": "97fbf5ae68217aebbe1e3e65dfc1b3e5668168e24061a9f73ac4cbac90a501d5", "model_name": "Security Camera", "brand": "Tuya", "frontend_stream_type": "hls", "entity_picture": "REDACTED", "friendly_name": "Doorbell Camera", "supported_features": 2 }, "last_changed": "2022-04-21T11:26:20.056044+00:00", "last_updated": "2022-04-21T12:31:16.170050+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": "tuya__basic_nightvision", "icon": null, "original_icon": "mdi:theme-light-dark", "unit_of_measurement": null, "state": { "entity_id": "select.doorbell_camera_night_vision", "state": "0", "attributes": { "options": [ "0", "1", "2" ], "device_class": "tuya__basic_nightvision", "icon": "mdi:theme-light-dark", "friendly_name": "Doorbell Camera Night Vision" }, "last_changed": "2022-04-21T11:26:20.058852+00:00", "last_updated": "2022-04-21T11:26:20.058852+00:00" } } ] } }
Issues The camera feed from this camera only works intermittently.
Feature Requests
This "sp" class camera supports providing a notification when the doorbell is pressed. This isn't recorded in any way in HA.
This "sp" class camera also supports unlocking a door as part of the doorbell. This function isn't recorded in HA.
+1
upvote
This please!
+1 If not full support, then at least the ability to receive notifications and view the most recent snapshot the camera took. This would make these doorbells very usable in HASS. This info is obviously available in some form in the api response (movement_detect_pic & alarm_message), but it's unclear how to construct the full url and extract the image.
+1
@lokster status.doorbell_pic should contain a base64-encoded URL which will give you the image for a limited time period after the doorbell event - that's how mine behaves. I guess that movement_detect_pic would behave similarly if your doorbell has motion detection.
See also https://community.home-assistant.io/t/make-the-picture-taken-from-tuya-smart-video-doorbell-available-in-ha/362848 - I don't know where's the right place to get attention for this issue. I'll probably have a go at this at some point once I figure out all the APIs and get some time.
+1
Related: https://github.com/tuya/tuya-home-assistant/issues/870
@lokster status.doorbell_pic should contain a base64-encoded URL which will give you the image for a limited time period after the doorbell event - that's how mine behaves. I guess that movement_detect_pic would behave similarly if your doorbell has motion detection.
See also https://community.home-assistant.io/t/make-the-picture-taken-from-tuya-smart-video-doorbell-available-in-ha/362848 - I don't know where's the right place to get attention for this issue. I'll probably have a go at this at some point once I figure out all the APIs and get some time.
i threw a link from another issue into a base64 decoder and got this out of it looks like there is a bit of data in here
{"files":[{"data":"d4a8c6c6c6acba10cafde547033a0650f292de62f2c389546f43b01b66978e0bcb4945baf62a43617c271fbd921ee2796b6252e054781853260fe0c435e6aeb9b38156aa1101f634cea0fbad3180d0ed5c811f422360afaaaa6d22ca7f3c26d598533b1eebde352c8de20bd7ca662dfc","keyId":"default","iv":"364fd568199ccb666e058387975bf6ee"}],"cmd":"ipc_doorbell","type":"image"}
+1
+1
Yeah this would be great!
+1