Closed pduchnovsky closed 1 week ago
can you post the device diagnostics
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.
So I tried it again, updated version to newest and tried adding the camera again, now it even fails to configure at all.
Began adding the cam, defined manual DPSs, gathered from tuya portal using this guide https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#_8-find-your-data-point:
101,103,104,105,106,108,109,110,111,115,116,117,119,134,136,138,139,140,141,142,143,150,151,154,160,161,167,168,169,185,212,231,232,233,234,235,236,237,238,239,240,253,254,255
After confirming discovery it gets in to error
no device is added and tuyalocal can no longer be started, debug log:
2024-08-11 13:06:36.437 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry localtuya for localtuya
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/__init__.py", line 362, in async_setup_entry
await setup_entities(entry.data[CONF_DEVICES])
File "/config/custom_components/localtuya/__init__.py", line 327, in setup_entities
if check_if_device_disabled(hass, entry, dev_id):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/__init__.py", line 464, in check_if_device_disabled
return dr.async_get(hass).async_get(ha_device_id).disabled
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'disabled'
The device is also not visible (should be 5th device, only shows 4), can not be removed and thus entire tuyalocal becomes stuck,broken
Btw, full list of DP IDs:
{
"101": "Indicator",
"103": "Vision Flip",
"104": "OSD Watermark",
"105": "Private Mode",
"106": "Motion Sensitivity",
"108": "Night Vision",
"109": "Get Memory Card Capacity",
"110": "Memory Card Status",
"111": "Format Memory Card",
"115": "Motion Detected",
"116": "PTZ Stop",
"117": "Formatted State",
"119": "PTZ Direction",
"134": "Motion Alert",
"136": "Doorbell Active",
"138": "Light Switch",
"139": "Sound Detection Switch",
"140": "Sound Sensitivity",
"141": "Sound Detected",
"142": "Temperature",
"143": "Humidity",
"150": "Record Switch",
"151": "Recording Mode",
"154": "Doorbell Snapshot",
"160": "Device Volume Control",
"161": "Motion Tracking Switch",
"167": "Cry Detection Switch",
"168": "Motion Area Switch",
"169": "Motion Area",
"185": "Alarm Report",
"212": "Message",
"231": "摇篮曲",
"232": "摇篮曲模式",
"233": "摇篮曲音量",
"234": "摇篮曲控制",
"235": "music 1",
"236": "摇篮曲播放指令",
"237": "检测到婴儿哭声",
"238": "彩光控制",
"239": "light mode",
"240": "floodlight mode",
"253": "密码修改",
"254": "onvif IP上报",
"255": "onvif switch"
}
Meanwhile I've resolved my problem, took the config from version 2024.5 and just removed all the DPS entries I was not utilizing, leaving only few, seems some of those were causing the problem, now it runs fine with newest version and I can control what I want on the camera via localtuya. (most important for me is enabling onvif and PTZ control)
{
"101": "Indicator",
"104": "OSD Watermark",
"105": "Private Mode",
"108": "Night Vision",
"116": "PTZ Stop",
"119": "PTZ Direction",
"139": "Sound Detection Switch",
"255": "onvif switch"
}
for now you can fix this manually by going to custom_integrations/localtuya/__init__.py
and remove the two lines 327 and 328
This issue was closed because it was resolved on the release: 2024.9.0
LocalTuya Version
2024.7.0
Home Assistant Version
2024.7.3
Environment
What happened?
When this camera is added to localtuya, it goes in to reboot loop it seems, this started happening with version 2024.6.0 but does not happen with version 2024.5.0.
Steps to reproduce.
Add the camera to localtuya via autodiscovery or just use existing camera and upgrade the localtuya from 2024.5.0 to 2024.6.0 or 2024.7.0
Relevant log output
Diagnostics information.
No response