make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.31k stars 513 forks source link

Request support for [Ali-express doorbell] #997

Closed rutgervz420 closed 11 months ago

rutgervz420 commented 1 year ago

Log Message

request to add support for my cheap aliexpress doorbell: https://nl.aliexpress.com/item/1005005239576910.html tried to gather as much helpfull information as possible

Please paste logs here Device diagnostics from normal tuya plugin:

"home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.8.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "6.1.21-v8", "supervisor": "2023.07.1", "host_os": "Home Assistant OS 10.4", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true , "custom_components": { "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" , "integration_manifest": { "domain": "tuya", "name": "Tuya", "codeowners": [ "@Tuya", "@zlinoliver", "@frenck" , "config_flow": true, "dependencies": [ "ffmpeg" ], "dhcp": [ { "macaddress": "105A17" }, { "macaddress": "10D561" }, { "macaddress": "1869D8" }, { "macaddress": "381F8D" }, { "macaddress": "508A06" }, { "macaddress": "68572D" }, { "macaddress": "708976" }, { "macaddress": "7CF666" }, { "macaddress": "84E342" }, { "macaddress": "D4A651" }, { "macaddress": "D81F12*" } ], "documentation": "https://www.home-assistant.io/integrations/tuya", "integration_type": "hub", "iot_class": "cloud_push", "loggers": [ "tuya_iot" ], "requirements": [ "tuya-iot-py-sdk==0.6.6" ], "is_built_in": true }, "data": { "endpoint": "https://openapi.tuyaeu.com", "auth_type": 0, "country_code": "31", "app_type": "tuyaSmart", "mqtt_connected": true, "disabled_by": null, "disabled_polling": false, "name": "AC Doorbell", "model": "DDV207-1080P-FH8852-F37P(RS)", "category": "sp", "product_id": "18k9ap0dtnl6bvfk", "product_name": "AC Doorbell", "online": true, "sub": false, "time_zone": "+02:00", "active_time": "2023-07-05T13:22:50+00:00", "create_time": "2023-07-05T13:22:50+00:00", "update_time": "2023-08-07T21:20:52+00:00", "function": { "basic_indicator": { "type": "Boolean", "value": {} }, "basic_flip": { "type": "Boolean", "value": {} }, "basic_osd": { "type": "Boolean", "value": {} }, "motion_sensitivity": { "type": "Enum", "value": { "range": [ "0", "1", "2" ] } }, "sd_format": { "type": "Boolean", "value": {} }, "motion_switch": { "type": "Boolean", "value": {} }, "record_switch": { "type": "Boolean", "value": {} }, "record_mode": { "type": "Enum", "value": { "range": [ "1", "2" ] } }, "siren_switch": { "type": "Boolean", "value": {} }, "basic_device_volume": { "type": "Integer", "value": { "min": 1, "max": 10, "scale": 0, "step": 1 } }, "motion_area_switch": { "type": "Boolean", "value": {} }, "motion_area": { "type": "String", "value": { "maxlen": 255 } }, "humanoid_filter": { "type": "Boolean", "value": {} } }, "status_range": { "basic_indicator": { "type": "Boolean", "value": {} }, "basic_flip": { "type": "Boolean", "value": {} }, "basic_osd": { "type": "Boolean", "value": {} }, "motion_sensitivity": { "type": "Enum", "value": { "range": [ "0", "1", "2" ] } }, "sd_storge": { "type": "String", "value": { "maxlen": 255 } }, "sd_status": { "type": "Integer", "value": { "min": 1, "max": 5, "scale": 0, "step": 1 } }, "sd_format": { "type": "Boolean", "value": {} }, "movement_detect_pic": { "type": "Raw", "value": {} }, "sd_format_state": { "type": "Integer", "value": { "min": -20000, "max": 200000, "scale": 0, "step": 1 } }, "motion_switch": { "type": "Boolean", "value": {} }, "doorbell_active": { "type": "String", "value": { "maxlen": 255 } }, "record_switch": { "type": "Boolean", "value": {} }, "record_mode": { "type": "Enum", "value": { "range": [ "1", "2" ] } }, "doorbell_pic": { "type": "Raw", "value": {} }, "siren_switch": { "type": "Boolean", "value": {} }, "basic_device_volume": { "type": "Integer", "value": { "min": 1, "max": 10, "scale": 0, "step": 1 } }, "motion_area_switch": { "type": "Boolean", "value": {} }, "motion_area": { "type": "String", "value": { "maxlen": 255 } }, "humanoid_filter": { "type": "Boolean", "value": {} }, "alarm_message": { "type": "String", "value": {} } }, "status": { "basic_indicator": false, "basic_flip": false, "basic_osd": false, "motion_sensitivity": 0, "sd_storge": "30514624|29744|30484880", "sd_status": 1, "sd_format": true, "movement_detect_pic": "REDACTED", "sd_format_state": 0, "motion_switch": true, "doorbell_active": "", "record_switch": true, "record_mode": 1, "doorbell_pic": "", "siren_switch": false, "basic_device_volume": 10, "motion_area_switch": false, "motion_area": "", "humanoid_filter": true, "alarm_message": "REDACTED" }, "home_assistant": { "name": "AC Doorbell", "name_by_user": null, "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.ac_doorbell", "state": "recording", "attributes": { "access_token": "56031e5ace3c3259***0a3c0321ef25d", "model_name": "AC Doorbell", "brand": "Tuya", "motion_detection": true, "frontend_stream_type": "hls", "entity_picture": "REDACTED", "friendly_name": "Doorbell", "supported_features": 2 }, "last_changed": "2023-08-08T16:29:05.192357+00:00", "last_updated": "2023-08-08T16:43:05.941852+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": null, "unit_of_measurement": null, "state": { "entity_id": "light.ac_doorbell_indicator_light", "state": "off", "attributes": { "supported_color_modes": [ "onoff" ], "friendly_name": "AC Doorbell Indicator light", "supported_features": 0 }, "last_changed": "2023-08-08T16:29:05.192597+00:00", "last_updated": "2023-08-08T16:29:05.192597+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:volume-high", "unit_of_measurement": null, "state": { "entity_id": "number.ac_doorbell_volume", "state": "10.0", "attributes": { "min": 1.0, "max": 10.0, "step": 1.0, "mode": "auto", "icon": "mdi:volume-high", "friendly_name": "AC Doorbell Volume" }, "last_changed": "2023-08-08T16:29:05.192770+00:00", "last_updated": "2023-08-08T16:29:05.192770+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:record-rec", "unit_of_measurement": null, "state": { "entity_id": "select.ac_doorbell_record_mode", "state": "1", "attributes": { "options": [ "1", "2" ], "icon": "mdi:record-rec", "friendly_name": "AC Doorbell Record mode" }, "last_changed": "2023-08-08T16:29:05.192866+00:00", "last_updated": "2023-08-08T16:29:05.192866+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:motion-sensor", "unit_of_measurement": null, "state": { "entity_id": "select.ac_doorbell_motion_detection_sensitivity", "state": "0", "attributes": { "options": [ "0", "1", "2" ], "icon": "mdi:motion-sensor", "friendly_name": "AC Doorbell Motion detection sensitivity" }, "last_changed": "2023-08-08T16:29:05.192936+00:00", "last_updated": "2023-08-08T16:29:05.192936+00:00" } }, { "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": "siren.ac_doorbell", "state": "off", "attributes": { "friendly_name": "Alarm", "supported_features": 3 }, "last_changed": "2023-08-08T16:29:05.193028+00:00", "last_updated": "2023-08-08T16:29:05.193028+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:record-rec", "unit_of_measurement": null, "state": { "entity_id": "switch.ac_doorbell_video_recording", "state": "on", "attributes": { "icon": "mdi:record-rec", "friendly_name": "AC Doorbell Video recording" }, "last_changed": "2023-08-08T16:29:05.193116+00:00", "last_updated": "2023-08-08T16:29:05.193116+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:flip-horizontal", "unit_of_measurement": null, "state": { "entity_id": "switch.ac_doorbell_flip", "state": "off", "attributes": { "icon": "mdi:flip-horizontal", "friendly_name": "AC Doorbell Flip" }, "last_changed": "2023-08-08T16:29:05.193180+00:00", "last_updated": "2023-08-08T16:29:05.193180+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:watermark", "unit_of_measurement": null, "state": { "entity_id": "switch.ac_doorbell_time_watermark", "state": "off", "attributes": { "icon": "mdi:watermark", "friendly_name": "AC Doorbell Time watermark" }, "last_changed": "2023-08-08T16:29:05.193241+00:00", "last_updated": "2023-08-08T16:29:05.193241+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:motion-sensor", "unit_of_measurement": null, "state": { "entity_id": "switch.ac_doorbell_motion_alarm", "state": "on", "attributes": { "icon": "mdi:motion-sensor", "friendly_name": "AC Doorbell Motion alarm" }, "last_changed": "2023-08-08T16:29:05.193301+00:00", "last_updated": "2023-08-08T16:29:05.193301+00:00"

Information about DPS mappings


Please paste the output here.
"101":"Indicator",
"103":"Vision Flip",
"104":"OSD Watermark",
"106":"Motion Sensitivity",
"109":"Get Memory Card Capacity",
"110":"Memory Card Status",
"111":"Format Memory Card",
"115":"Motion Detected",
"117":"Formatted State",
"134":"Motion Alert",
"136":"Doorbell Aactive",
"150":"Record Switch",
"151":"Recording Mode",
"154":"Doorbell Snapshot",
"159":"Siren Switch",
"160":"Device Volume Control",
"168":"Motion Area Switch"
,"169":"Motion Area",
"170":"Humanoid Filtering",
"185":"Alarm Report"

Product ID

18k9ap0dtnl6bvfk

Information about how the device functions

{ "result": { "active_time": 1688563370, "category": "sp", "create_time": 1688563370, "custom_name": "", "icon": "smart/icon/ay15372371921250HFeV/f59c17fd90477d8c9b41377e2d7ac732.png", "id": "bf41214c7ba9853e37yjo6", "ip": "...", "is_online": true, "lat": "51.9242", "local_key": "*****", "lon": "4.5152", "model": "DDV207-1080P-FH8852-F37P(RS)", "name": "AC Doorbell", "product_id": "18k9ap0dtnl6bvfk", "product_name": "AC智能门铃", "sub": false, "time_zone": "+02:00", "update_time": 1691232113, "uuid": "hwxd6146142a1ef7fb91" }, "success": true, "t": 1691526260502, "tid": "8e527ef7362911ee9a70760d0d3c40d3" }

I tried to make a start:

Ali_doorbell: devices:

make-all commented 1 year ago

Unfortunately the diagnostics from the cloud Tuya integration are not very useful, as often the cloud API is significantly different than the local API. The log message when you try to add your device as a tuya-local device is the single most important piece of information for a new device report.

Making configs from just the iot.tuya.com docs is almost guaranteed not to work first time, and takes a lot more time going backwards and forwards trying to resolve the issues than if the logs are available from the start.

David-Woodthorpe commented 1 year ago

I found this as I was searching for answers myself - I have got most of the options set up and working with localtuya but was wondering if there is any way to capture a text value (trying to get the image link for still pictures on motion or doorbell press) - video would be even better but I've already tried everything I can think of on that front.