Closed dieu closed 1 month ago
901: Network Error: Unable to Connect
If you cannot solve the fundamental connection problem with your device, there is no point to make a config for it. If it is a battery powered WiFi device, then this is unlikely to be supportable locally, as battery powered devices spend most of their time asleep to save power, and are only available on WiFi during the short periods that they wake to check-in with the cloud.
@make-all Jason thanks for the help; I was able to connect, and it matched to the BLE Orion Lock but it doesn't work well. The device is a BLE Smart Lock connected to BLE/ZBE/Wifi Getaway.
2024-03-06 00:23:55.610 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches ble_orion_lock with quality of 40%. DPS: {"updated_at": 1709713427.7262652, "8": 100, "32": false, "33": false, "68": "function2", "78": false}
2024-03-06 00:23:55.611 WARNING (MainThread) [custom_components.tuya_local.config_flow] Report this to https://github.com/make-all/tuya-local/issues/
2024-03-06 00:24:06.391 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config ble_orion_lock.yaml
2024-03-06 00:24:08.576 INFO (MainThread) [homeassistant.setup] Setting up tuya_local
2024-03-06 00:24:08.576 INFO (MainThread) [homeassistant.setup] Setup of domain tuya_local took 0.0 seconds
2024-03-06 00:24:08.578 DEBUG (MainThread) [custom_components.tuya_local] Setting up entry for device: ecb1b7cddb3ae6e0
2024-03-06 00:24:08.579 INFO (MainThread) [custom_components.tuya_local.device] Creating device: ecb1b7cddb3ae6e0
2024-03-06 00:24:08.585 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config ble_orion_lock.yaml
2024-03-06 00:24:08.602 INFO (MainThread) [homeassistant.components.lock] Setting up tuya_local.lock
2024-03-06 00:24:08.608 INFO (MainThread) [homeassistant.components.sensor] Setting up tuya_local.sensor
2024-03-06 00:24:08.615 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config ble_orion_lock.yaml
2024-03-06 00:24:08.616 DEBUG (MainThread) [custom_components.tuya_local.helpers.config] Adding lock for lock
2024-03-06 00:24:08.622 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config ble_orion_lock.yaml
2024-03-06 00:24:08.622 DEBUG (MainThread) [custom_components.tuya_local.helpers.config] Adding sensor for sensor_battery
2024-03-06 00:24:08.624 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new lock.tuya_local entity: lock.orion_ble_lock
2024-03-06 00:24:08.625 DEBUG (MainThread) [custom_components.tuya_local.device] Starting monitor loop for Orion BLE lock
2024-03-06 00:24:08.627 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:08.627 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.tuya_local entity: sensor.orion_ble_lock_battery
2024-03-06 00:24:08.630 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:08.645 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Orion BLE lock to 3.4
2024-03-06 00:24:08.662 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:08.740 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"8": 100, "32": false, "33": false, "68": "function2", "78": false, "full_poll": true}
2024-03-06 00:24:08.742 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:08.743 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:08.845 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock persistant connection set to True
2024-03-06 00:24:24.836 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock new pending updates: {"33": {"value": true, "updated_at": 1709713464.8356936, "sent": false}}
2024-03-06 00:24:24.843 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock sending dps update: {"33": true}
2024-03-06 00:24:25.802 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"8": 100, "32": false, "33": false, "68": "function2", "78": false, "full_poll": true}
2024-03-06 00:24:25.805 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:25.805 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:26.213 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"33": true, "full_poll": false}
2024-03-06 00:24:26.214 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:26.215 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:27.596 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock new pending updates: {"33": {"value": false, "updated_at": 1709713467.5963268, "sent": false}}
2024-03-06 00:24:27.600 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock sending dps update: {"33": false}
2024-03-06 00:24:27.769 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"8": 100, "32": false, "33": true, "68": "function2", "78": false, "full_poll": true}
2024-03-06 00:24:27.771 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:27.772 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:27.968 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"33": false, "full_poll": false}
2024-03-06 00:24:27.969 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:27.970 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:29.528 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"33": false, "full_poll": false}
2024-03-06 00:24:29.529 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:29.530 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:30.112 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"68": "function2", "full_poll": false}
2024-03-06 00:24:30.114 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:30.114 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:30.316 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"78": false, "full_poll": false}
2024-03-06 00:24:30.317 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:30.317 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:30.433 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"32": false, "full_poll": false}
2024-03-06 00:24:30.435 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:30.435 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:49.662 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock new pending updates: {"33": {"value": true, "updated_at": 1709713489.6625464, "sent": false}}
2024-03-06 00:24:49.664 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock sending dps update: {"33": true}
2024-03-06 00:24:49.875 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"8": 100, "32": false, "33": false, "68": "function2", "78": false, "full_poll": true}
2024-03-06 00:24:49.876 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:49.876 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:50.069 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock received {"33": true, "full_poll": false}
2024-03-06 00:24:50.071 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:50.071 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 8 (sensor), unable to determine valid values
2024-03-06 00:24:52.156 DEBUG (MainThread) [custom_components.tuya_local.device] Orion BLE lock new pending updates: {"33": {"value": false, "updated_at": 1709713492.1562045, "sent": false}}
Hello @make-all, can I do anything to help support the lock?
@make-all, thanks a lot for your work, testing it now and got an error:
2024-04-27 18:41:58.287 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches nice_digi_lock with quality of 100%. DPS: {"updated_at": 1714268511.6983633, "8": 70, "12": 52, "21": "wrong_finger", "32": false, "33": true, "47": true, "68": "function2", "78": false}
2024-04-27 18:41:58.288 WARNING (MainThread) [custom_components.tuya_local.config_flow] Report this to https://github.com/make-all/tuya-local/issues/
2024-04-27 18:42:04.068 INFO (MainThread) [custom_components.tuya_local.device] Creating device: ecb1b7cddb3ae6e0
2024-04-27 18:42:04.112 INFO (MainThread) [homeassistant.components.sensor] Setting up tuya_local.sensor
2024-04-27 18:42:04.126 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.tuya_local entity: sensor.door_lock_battery
2024-04-27 18:42:04.131 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up tuya_local.binary_sensor
2024-04-27 18:42:04.150 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.tuya_local entity: binary_sensor.door_lock_snib
2024-04-27 18:42:04.152 INFO (MainThread) [homeassistant.components.event] Setting up tuya_local.event
2024-04-27 18:42:04.172 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new event.tuya_local entity: event.door_lock_alert
2024-04-27 18:42:04.174 INFO (MainThread) [homeassistant.components.switch] Setting up tuya_local.switch
2024-04-27 18:42:04.190 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.tuya_local entity: switch.door_lock_auto_lock
2024-04-27 18:42:04.192 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.tuya_local entity: switch.door_lock_special_control
2024-04-27 18:42:04.193 INFO (MainThread) [homeassistant.components.number] Setting up tuya_local.number
2024-04-27 18:42:04.217 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new number.tuya_local entity: number.door_lock_auto_lock_delay
2024-04-27 18:42:04.219 INFO (MainThread) [homeassistant.components.lock] Setting up tuya_local.lock
2024-04-27 18:42:04.235 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new lock.tuya_local entity: lock.door_lock
2024-04-27 18:42:04.237 INFO (MainThread) [homeassistant.components.select] Setting up tuya_local.select
2024-04-27 18:42:04.254 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new select.tuya_local entity: select.door_lock_special_function
2024-04-27 18:42:04.259 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Door lock to 3.4
2024-04-27 18:42:04.523 ERROR (MainThread) [custom_components.tuya_local.device] Door lock receive loop terminated by exception Invalid event type wrong_finger for event.door_lock_alert
Traceback (most recent call last):
File "/config/custom_components/tuya_local/device.py", line 212, in receive_loop
entity.on_receive(poll, full_poll)
File "/config/custom_components/tuya_local/event.py", line 80, in on_receive
self._trigger_event(
File "/usr/src/homeassistant/homeassistant/components/event/__init__.py", line 158, in _trigger_event
raise ValueError(f"Invalid event type {event_type} for {self.entity_id}")
ValueError: Invalid event type wrong_finger for event.door_lock_alert
Log Message
{"8": 100, "32": false, "33": false, "68": "function2", "78": false}
``` 2024-03-05 23:59:57.779 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key),, please create a bug report at https://github.com/make-all/tuya-local/issues 2024-03-05 23:59:57.880 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-05 23:59:58.269 WARNING (SyncWorker_0) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:00:10.610 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:00:10.992 WARNING (SyncWorker_20) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:00:13.963 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:00:14.271 WARNING (SyncWorker_21) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:00:17.708 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:00:18.135 WARNING (SyncWorker_19) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:00:19.354 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:00:19.622 WARNING (SyncWorker_18) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:01:23.940 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:01:24.210 WARNING (SyncWorker_23) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:01:27.383 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.5 2024-03-06 00:01:37.401 WARNING (SyncWorker_16) [custom_components.tuya_local.device] Test protocol error 914: Check device key or version 2024-03-06 00:02:38.202 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.4 2024-03-06 00:02:43.355 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.4 2024-03-06 00:02:48.579 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.4 2024-03-06 00:02:53.794 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for Test. 2024-03-06 00:02:53.794 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.4 2024-03-06 00:03:10.402 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.2 2024-03-06 00:03:12.730 WARNING (SyncWorker_2) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:03:16.228 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.1 2024-03-06 00:03:16.523 WARNING (SyncWorker_24) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:03:19.314 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:03:19.608 WARNING (SyncWorker_4) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect 2024-03-06 00:03:21.977 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3 2024-03-06 00:03:22.202 WARNING (SyncWorker_6) [custom_components.tuya_local.device] Test protocol error 901: Network Error: Unable to Connect ```Information about DPS mappings
Product ID
Information about how the device functions
Smart Lock BTE + Getway BTE+ZBE