fsaris / home-assistant-awox

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

Connection issues with 1.4 beta #66

Closed bioxz closed 1 year ago

bioxz commented 1 year ago

After 1.3 worked great with my lamps, I forgot to disable beta branches and ended up with 1.4b4 -- which isn't working anymore. Downgrading to 1.3 solved my issue, but maybe these error messages can help to avoid bringing new issues into 1.4 stable.

After HA startup, the integration was not showing the lamps. Looking to the logs I found the following messages repeated every 30 seconds:

WARNING (AwoxMeshCommands-U7GFU0NF) [custom_components.awox.awox_mesh] [U7GFU0NF] Command failed, retry 1
WARNING (AwoxMeshCommands-U7GFU0NF) [custom_components.awox.awox_mesh] [U7GFU0NF] Command failed, retry 2
WARNING (AwoxMeshCommands-U7GFU0NF) [custom_components.awox.awox_mesh] [U7GFU0NF] Command failed, retry 3

As downgrading back to 1.3 solved this issue I did not search for the cause of it, but please let me know if you need more information.

fsaris commented 1 year ago

Could you maybe test latest beta? Reverted the use of bleak for now.

wickedgalen commented 1 year ago

Hi,

I would weigh in this discussion (if I can help in any way please let me know, I updated today to the latest version 0.1.4b5 , no difference so far.)

Basically since the major updates of HA earlier this year (when the bluetooth lib changed), I have near permanent connections issues with the AWOX Mesh.

My logs show no errors upon rebooting/reload of HA or reload of AWOX (on RPI), all lights are found at those times and if the mesh is present it works fine. Apart from the "Awox mesh becomes unavailable" (sensor.awox_mesh), I can only notice it when I switch a light on/off and it then can take up to 1min until the light reacts or not at all.

There is no Issue when using the official Awox App on my phone (except loading time, about ~10-15s). Or is the App the culprit ? Although I only use it when HA does not react and I close the App after to avoid probable access fight. (The app shows no firmware updates for any light, so I gather being up to date as best possible)

There are 2 disabled entities (no enabling possible to my knowledge) sensor.awox_mesh_last_connection sensor.awox_mesh_last_rssi_check

I am considering external issues which might impact the general low-power bluetooth connection, but except a 2 older devices which still use 2.4Ghz Wifi there is nothing apparent & unrelated to laundry machine running or alike. All lights I use are max. 3-4m apart. (then again, it worked rather smoothly before the BT lib changes/updates)

I am not excluding user error on my part, but I am puzzled to what else I might do ?

Please let me know what / if I can help out more towards a more stable mesh.

fsaris commented 1 year ago

@wickedgalen

There are 2 disabled entities (no enabling possible to my knowledge) sensor.awox_mesh_last_connection sensor.awox_mesh_last_rssi_check

These are disabled by default and can be enabled on the settings tab of each sensor in the advanced settings area

Regarding the connectivity issues. Do you have the HA Bluetooth integration enabled? That gives my some issues. Should be fixed in latest HA patch release, didn't test yet. I disabled the HA Bluetooth integration and that improved the connection a lot.

Could you post a debug log here maybe there is some info I can get out of it.

bioxz commented 1 year ago

Could you maybe test latest beta? Reverted the use of bleak for now.

Sadly the issue remains with 1.4b5. I tried restarting HA and my Raspberry without success. A rollback to 1.3 made the lights available again directly after the restart of HA.

For me 1.3 is the most stable version I've ever seen with this extension, I haven't had a single issue in the last two weeks.

wickedgalen commented 1 year ago

Thank you for your quick reply.

I started with disabling this + reboot : bad idea, BT completly down. image

Then I notices more updates : Core, Hacs (must have missed them earlier) + reboot.

iBeacon appeared & found a bunch of jpunzadi devices.

Device Tracker (although for all of them) : image & Estimated Distance image FYI: The lights are installed on walls/ceilings and I sat on my desk during the time shown ... If it be off by 1 m I 'd be ok with it ... but it seems the time/space continuum is off here !!?!? The walls did not move ;).

Anyhow need to read up on it, too late for today, I'll get back in a few days when it sunk in and could do some testing.

fsaris commented 1 year ago

I had the same that all Bluetooth devices got a RSSI of 0 when HA was running for a while. It was caused by the HA Bluetooth integration that is constantly running a scan and restarting the Bluetooth controller on failure.

I disabled the HA Bluetooth integration and now the Bluetooth controller is usable again.

wickedgalen commented 1 year ago

Hi back,

probably unrelated but, due to adding another integration and by that, multiple reboots with browser cache clears seem to have fixed all issues / let all updates take propper effect.

Running now: Awox Smart Connect v0.1.4b5 with image

(No settings whatsoever changed after install) image

image

The lights now work ON CLICK =) No changes on my dasboard needed, previous buttons work. I'll be perma-testing it anyhow, but the whole give a very good stability impression.

The distancing has very nice accuracy and reactiveness. image

I'm just unsure about what to read out of this now? sensor.awox_mesh shows either unavailable or the power relay, long before (the power plug use) it seemed to me as the awox network status or is this a misinterpretation of mine ? image

Thanks a lot so far for your great work =) & the HA BT guys too.