make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.41k stars 542 forks source link

Request support for <productname>doorbel security camera #2387

Closed bazookastas closed 1 month ago

bazookastas commented 1 month ago

Log message

2024-10-11 13:57:22.377 DEBUG (MainThread) [custom_components.tuya_local.device] Camera received {"101": false, "103": true, "104": true, "105": false, "106": "0", "108": "0", "109": "122849280|41547776|81301504", "110": 1, "116": true, "117": 0, "119": "3", "134": false, "150": true, "151": "2", "161": true, "241": "{\"video\":[{\"restype\":\"4\",\"oldres\":\"2880*1620\",\"newres\":\"3840*2160\"},{\"restype\":\"2\",\"oldres\":\"640*720\",\"newres\":\"640*720\"}],\"message\":\"3840*2160\"}", "full_poll": true}
```text 2024-10-11 12:51:46.511 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_miot which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.524 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_cloud_map_extractor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.531 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration yandex_station which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.540 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.563 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration truenas which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.569 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.571 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration webrtc which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.571 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration plex_recently_added which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.572 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration frigate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.573 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration simpleicons which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.574 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration browser_mod which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.574 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration eight_sleep_climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.575 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nodered which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.598 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fontawesome which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.604 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration yandex_smart_home which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.611 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ui_lovelace_minimalist which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 12:51:46.612 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tuya_local which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-10-11 13:57:22.377 DEBUG (MainThread) [custom_components.tuya_local.device] Camera received {"101": false, "103": true, "104": true, "105": false, "106": "0", "108": "0", "109": "122849280|41547776|81301504", "110": 1, "116": true, "117": 0, "119": "3", "134": false, "150": true, "151": "2", "161": true, "241": "{\"video\":[{\"restype\":\"4\",\"oldres\":\"2880*1620\",\"newres\":\"3840*2160\"},{\"restype\":\"2\",\"oldres\":\"640*720\",\"newres\":\"640*720\"}],\"message\":\"3840*2160\"}", "full_poll": true} 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 117 value from 0 to Formatted 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 117 value from 0 to Formatted 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Low', 'Medium', 'High'] 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 106 value from 0 to Low 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 106 value from 0 to Low 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Low', 'Medium', 'High'] 2024-10-11 13:57:22.379 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Auto', 'Off', 'On'] 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 108 value from 0 to Auto 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 108 value from 0 to Auto 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Auto', 'Off', 'On'] 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['up', 'right-up', 'right', 'right-down', 'down', 'left-down', 'left', 'left-up', '(stopped)'] 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 119 value from 3 to right-down 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 119 value from 3 to right-down 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['up', 'right-up', 'right', 'right-down', 'down', 'left-down', 'left', 'left-up', '(stopped)'] 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Event', 'Continuous'] 2024-10-11 13:57:22.380 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 151 value from 2 to Continuous 2024-10-11 13:57:22.381 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 151 value from 2 to Continuous 2024-10-11 13:57:22.381 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Event', 'Continuous'] 2024-10-11 13:57:22.381 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] sensor values: ['Normal', 'Corrupt', 'Full', 'Formatting', 'Missing', 'Normal'] 2024-10-11 13:57:22.381 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 110 value from 1 to Normal 2024-10-11 13:57:22.381 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Camera: Mapped dps 110 value from 1 to Normal 2024-10-11 13:57:22.381 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] sensor values: ['Normal', 'Corrupt', 'Full', 'Formatting', 'Missing', 'Normal'] 2024-10-11 13:57:33.833 DEBUG (MainThread) [custom_components.tuya_local.device] Refreshing device state for Test 2024-10-11 13:57:33.833 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-10-11 13:57:38.972 DEBUG (SyncWorker_9) [custom_components.tuya_local.device] Test refreshed device state: null 2024-10-11 13:57:38.973 DEBUG (MainThread) [custom_components.tuya_local.device] Retrying after exception argument of type 'NoneType' is not iterable (0/11) 2024-10-11 13:57:38.973 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.1 2024-10-11 13:57:39.087 DEBUG (SyncWorker_1) [custom_components.tuya_local.device] Test refreshed device state: {"Error": "Unexpected Payload from Device", "Err": "904", "Payload": ""} 2024-10-11 13:57:39.087 WARNING (SyncWorker_1) [custom_components.tuya_local.device] Test protocol error 904: Unexpected Payload from Device 2024-10-11 13:57:39.088 DEBUG (SyncWorker_1) [custom_components.tuya_local.device] new state (incl pending): {"updated_at": 1728644259.0875797} ```

DPS information

{
  "result": {
    "model": "{\"modelId\":\"0000002qeq\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"basic_nightvision\",\"description\":\"0:自动\\n1:关\\n2:开\",\"name\":\"红外夜视\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"0\",\"1\",\"2\"]}},
{\"abilityId\":109,\"accessMode\":\"ro\",\"code\":\"sd_storge\",\"description\":\"示例:\\n---2017.07.08更新---\\n单位改为kb\\n---\\n3503775744|778977280|2718158848\\n其中第一字符串是总容量,第二个字符串是已使用的容量,第三个是剩余容量\",\"name\":\"获取存储卡容量\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":110,\"accessMode\":\"ro\",\"code\":\"sd_status\",\"description\":\"status:sd卡状态,1-正常,2-异常,3-空间不足,4-正在格式化,5-无SD卡;\",\"name\":\"存储卡状态\",\"typeSpec\":{\"type\":\"value\",\"max\":5,\"min\":1,\"scale\":1,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"sd_format\",\"description\":\"无参数\",\"name\":\"存储卡格式化\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":115,\"accessMode\":\"ro\",\"code\":\"movement_detect_pic\",\"description\":\"该功能实现请参考SDK\\n---------------\\n{\\\"dp_id\\\",\\\"bucket;object;key\\\"}/{\\\"dp_id\\\",\\\"bucket;object;\\\"}\\n\\nbucket:根文件夹;objcet:文件路径;key:加密\",\"name\":\"检测到移动\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":117,\"accessMode\":\"ro\",\"code\":\"sd_format_state\",\"description\":\"返回错误码:\\n-2000:SD卡正在格式化\\n-2001:SD卡格式化异常\\n-2002:无SD卡\\n-2003:SD卡错误\\n\\n//正数为格式化进度\",\"name\":\"格式化状态\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":-20000,\"scale\":1,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":136,\"accessMode\":\"ro\",\"code\":\"doorbell_active\",\"description\":\"\",\"name\":\"门铃-呼叫\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":148,\"accessMode\":\"rw\",\"code\":\"accessory_lock\",\"description\":\"\",\"name\":\"锁1\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":154,\"accessMode\":\"ro\",\"code\":\"doorbell_pic\",\"description\":\"用户按下门铃,抓拍图片并上传\",\"name\":\"门铃-抓拍图片\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":185,\"accessMode\":\"ro\",\"code\":\"alarm_message\",\"description\":\"实现方式参考嵌入式SDK使用文档\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"告警消息上报\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":191,\"accessMode\":\"wr\",\"code\":\"ipc_smart_action\",\"description\":\"用于摄像机智能联动动作创建,需配合平台配置\",\"extensions\":{\"iconName\":\"icon-setting\"},\"name\":\"摄像机联动动作\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"0\",\"1\",\"2\",\"3\"]}},
{\"abilityId\":231,\"accessMode\":\"rw\",\"code\":\"ipc_c_switch_channel\",\"description\":\"博科切换通道\",\"name\":\"切换通道\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":232,\"accessMode\":\"rw\",\"code\":\"ipc_c_lock\",\"description\":\"博科锁2   \",\"name\":\"锁2\",\"typeSpec\":{\"type\":\"bool\"}}]}]}"
  },
  "success": true,
  "t": 1728643162181,
  "tid": "13b8482b87bd11efbc016e7818a0f8a2"
}

Product ID

obtloc9hkl46jjgg

Product Name

博科中性86-X1S室内机

Information about how the device functions

"result": { "active_time": 1717855652, "bind_space_id": "45989329", "category": "sp", "create_time": 1717855652, "custom_name": "", "icon": "smart/icon/ay15507223992875xh7c/e01bb1a9620856a1953683849997f343.png", "id": "bfa07bbfab2690ebf671at", "ip": "79.126.51.199", "is_online": true, "lat": "56.62", "local_key": "s+pRnC(lyIJ[(xsQ", "lon": "43.41", "model": "86706", "name": "Security Camera", "product_id": "obtloc9hkl46jjgg", "product_name": "博科中性86-X1S室内机", "sub": false, "time_zone": "+03:00", "update_time": 1718330555, "uuid": "bkdz74129f581e858386" }, "success": true, "t": 1728643519809, "tid": "e8e15c4687bd11ef88b02ac421ecbce6" }

make-all commented 1 month ago

The log does not seem to match the dps info for this device. I am not sure it can be supported any better than it already is.