fsaris / home-assistant-awox

AwoX mesh light integration for Home Assistant
MIT License
84 stars 23 forks source link

Connot connect to EGLO panel #51

Closed danieldur closed 2 years ago

danieldur commented 2 years ago

Hello,

Because my lamp was no longer active in the AWOX Android app, I decided to delete it and add it back. This also meant resetting the lamp itself.

After this whole ordeal, when I delete and add back the AWOX integration I get the following error in the HA logs:

This error originated from a custom integration.

Logger: custom_components.awox.awox_mesh Source: helpers/update_coordinator.py:219 Integration: AwoX MESH control (documentation, issues) First occurred: 19:05:55 (8 occurrences) Last logged: 20:07:17

Error fetching awox data: No device connected

The lamp works perfectly with the AWOX Android app and with its own hardware Bluetooth remote. I'm using a Pi 4 as the HA host and it hasn't changed its location. The entity becomes unavailable directly after configuring the integration. Restarting the Pi doesn't help.

Any idea why this would happen? Thanks!

fsaris commented 2 years ago

Are you sure that after the reinstall the updated info was loaded from the awox API?

If you enable debug it should tell you if it found the device but couldn't connect due to invalid key

danieldur commented 2 years ago

Here are some logs right after I've reinstalled the integration. I've only kept the relevant parts.

2021-10-23 23:38:26 DEBUG (AwoxMeshCommands-iqmWdagh) [custom_components.awox.awox_mesh] process 0/0 - {'command': 'requestStatus', 'params': {'dest': 65535, 'withResponse': True}, 'callback': <function AwoxMesh._async_add_command_to_queue..command_executed at 0x7f860b39d0>, 'allow_to_fail': False} .... 2021-10-23 23:38:26 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38: xx:xx:xx][EGLOPanel] Trying to connect 2021-10-23 23:38:26 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:26 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:27 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7fa9f72c60> checked out from pool 2021-10-23 23:38:27 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7fa9f72c60> being returned to pool 2021-10-23 23:38:27 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7fa9f72c60> rollback-on-return 2021-10-23 23:38:27 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['stat'], 'state': ['tryconn'], 'dst': ['a4:c1:38: xx:xx:xx'], 'mtu': [0], 'sec': ['low']}] 2021-10-23 23:38:27 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:27 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['stat'], 'state': ['conn'], 'dst': ['a4:c1:38: xx:xx:xx'], 'mtu': [0], 'sec': ['low']}] 2021-10-23 23:38:28 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['find'], 'hnd': [26], 'props': [10], 'vhnd': [27], 'uuid': ['00010203-0405-0607-0809-0a0b0c0d1914']}] 2021-10-23 23:38:28 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] Set fallback time out - wr 2021-10-23 23:38:28 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 10 2021-10-23 23:38:28 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['wr']}] .... 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['find'], 'hnd': [17], 'props': [26], 'vhnd': [18], 'uuid': ['00010203-0405-0607-0809-0a0b0c0d1911']}] 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] Set fallback time out - wr 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 10 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['wr']}] 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['rd'], 'd': [b'\x0e']}] 2021-10-23 23:38:29 INFO (SyncWorker_5) [custom_components.awox.awoxmeshlight] Auth error : check name and password. 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] Disconnecting. 2021-10-23 23:38:29 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['stat'], 'state': ['disc'], 'mtu': [0], 'sec': ['low']}] 2021-10-23 23:38:29 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38: xx:xx:xx][EGLOPanel] Could not connect 2021-10-23 23:38:29 DEBUG (MainThread) [custom_components.awox.awox_mesh] Stop connect call 2021-10-23 23:38:29 DEBUG (SyncWorker_4) [custom_components.awox.awoxmeshlight] force stoppping blue helper 2021-10-23 23:38:29 DEBUG (AwoxMeshCommands-iqmWdagh) [custom_components.awox.awox_mesh] retry calling command 2021-10-23 23:38:29 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38: xx:xx:xx][EGLOPanel] Trying to connect 2021-10-23 23:38:29 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:29 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:29 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['stat'], 'state': ['tryconn'], 'dst': ['a4:c1:38: xx:xx:xx'], 'mtu': [0], 'sec': ['low']}] 2021-10-23 23:38:29 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:29 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['stat'], 'state': ['conn'], 'dst': ['a4:c1:38: xx:xx:xx'], 'mtu': [0], 'sec': ['low']}] 2021-10-23 23:38:30 DEBUG (MainThread) [async_upnp_client.traffic.ssdp] Received packet from ('10.10.10.34', 60913): b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nMAN: "ssdp:discover"\r\nMX: 1\r\nST: urn:dial-multiscreen-org:service:dial:1\r\nUSER-AGENT: Google Chrome/94.0.4606.81 Windows\r\n\r\n' 2021-10-23 23:38:30 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['find'], 'hnd': [26], 'props': [10], 'vhnd': [27], 'uuid': ['00010203-0405-0607-0809-0a0b0c0d1914']}] 2021-10-23 23:38:30 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] Set fallback time out - wr 2021-10-23 23:38:30 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 10 2021-10-23 23:38:30 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['wr']}] ..... 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['find'], 'hnd': [17], 'props': [26], 'vhnd': [18], 'uuid': ['00010203-0405-0607-0809-0a0b0c0d1911']}] 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] Set fallback time out - wr 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 10 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['wr']}] 2021-10-23 23:38:31 DEBUG (MainThread) [denonavr.api] Content for /goform/AppCommand.xml endpoint: b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\nGetAllZonePowerStatusGetAllZoneSourceGetRenameSourceGetDeletedSourceGetSurroundModeStatusGetToneControlGetAllZoneVolumeGetAllZoneMuteStatus' 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['rd'], 'd': [b'\x0e']}] 2021-10-23 23:38:31 INFO (SyncWorker_8) [custom_components.awox.awoxmeshlight] Auth error : check name and password. 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] Disconnecting. 2021-10-23 23:38:31 DEBUG (SyncWorker_8) [custom_components.awox.awoxmeshlight] _waitResp - resp [{'rsp': ['stat'], 'state': ['disc'], 'mtu': [0], 'sec': ['low']}] 2021-10-23 23:38:31 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38: xx:xx:xx][EGLOPanel] Could not connect 2021-10-23 23:38:31 DEBUG (MainThread) [custom_components.awox.awox_mesh] Stop connect call 2021-10-23 23:38:31 DEBUG (SyncWorker_0) [custom_components.awox.awoxmeshlight] force stoppping blue helper 2021-10-23 23:38:31 DEBUG (MainThread) [httpx._client] HTTP Request: POST http://10.10.10.13/goform/AppCommand.xml "HTTP/1.0 200 OK" 2021-10-23 23:38:31 DEBUG (AwoxMeshCommands-iqmWdagh) [custom_components.awox.awox_mesh] retry calling command 2021-10-23 23:38:31 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38: xx:xx:xx][EGLOPanel] Trying to connect .... 2021-10-23 23:38:32 DEBUG (SyncWorker_3) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 2021-10-23 23:38:32 DEBUG (SyncWorker_3) [custom_components.awox.awoxmeshlight] _waitResp - set timeout to 5 ..... 2021-10-23 23:38:37 DEBUG (SyncWorker_3) [custom_components.awox.awoxmeshlight] Select timeout ..... 2021-10-23 23:38:37 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38: xx:xx:xx][EGLOPanel] Failed to connect, trying next device [Timed out while trying to connect to peripheral a4:c1:38: xx:xx:xx, addr type: public] 2021-10-23 23:38:37 DEBUG (MainThread) [custom_components.awox.awox_mesh] Stop connect call 2021-10-23 23:38:37 DEBUG (SyncWorker_5) [custom_components.awox.awoxmeshlight] force stoppping blue helper 2021-10-23 23:38:37 DEBUG (AwoxMeshCommands-iqmWdagh) [custom_components.awox.awox_mesh] get item from queue 2021-10-23 23:38:37 ERROR (MainThread) [custom_components.awox.awox_mesh] Error fetching awox data: No device connected 2021-10-23 23:38:37 DEBUG (MainThread) [custom_components.awox.awox_mesh] Finished fetching awox data in 43.070 seconds (success: False)

fsaris commented 2 years ago

I'm missing the setup config flow ... log entry. That's where it starts.

Are you sure you used the same awox account in HA as in the awox app? Did you reinstall or really delete the integration first?

danieldur commented 2 years ago

I have only one AWOX account, stored in my password manager vault. I deleted the integration from Config -> Integrations, click on the 3 dots menu, press Delete. Then I restarted HA from Config -> Server Controls.

Here are the lines from all the lines containing "awox" from the logs spanning about 2 minutes from the moment I started the installation until I saw the unavailable entity. I hope there are no other interesting lines. (I didn't copied it all here as there were approx. 1000 lines)

https://pastebin.pl/view/6e0bb456

fsaris commented 2 years ago

@danieldur the pastbin doesn't load for me currently

danieldur commented 2 years ago

Here is a new log: https://pastebin.com/AdabXDpq

fsaris commented 2 years ago

logs do not hold that much awox info. Could you set logging to:

logger:
  default: error
  logs:
     custom_components.awox: debug

I'm particular interested in the lines around Search for AwoX devices to find closest (best rssi value) device

And after that the connect attempt

danieldur commented 2 years ago

Here are the requested logs: https://pastebin.com/cswydXcc Thanks for your efforts!

fsaris commented 2 years ago

What I find strange is that your mesh_name doesn't seem to match the name of the light that comes back from the Bluetooth scan (devices ... mac:..., name:..., rssi:...). For others I see a match between those.

Could you maybe again remove the integration and set it up again? I'm curious what the response from Awox is during setup. This should also be written to the log.

danieldur commented 2 years ago

One more log: https://pastebin.com/BUBfW5Qk The one thing I did recently was to set the light up from scratch and add it to the app. I guess something might have gone wrong. Probably I should reset it again tomorrow.

danieldur commented 2 years ago

I've reset the lamp once more and now it works. Thanks for all the help!

fsaris commented 2 years ago

Did the Bluetooth name of the device change?