fsaris / home-assistant-awox

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

Only one light is working #52

Closed OkOtChA666 closed 2 years ago

OkOtChA666 commented 2 years ago

Error

Any idea why this is happening? Same model, same FW. I can controll through the app though, so I imagine everything is OK regarding hardware! Thanks

fsaris commented 2 years ago

Can you provide some logs https://github.com/fsaris/home-assistant-awox#troubleshooting

Especially the first few minutes after start up

OkOtChA666 commented 2 years ago

This error originated from a custom integration.

Logger: custom_components.awox.awox_mesh Source: custom_components/awox/awox_mesh.py:272 Integration: AwoX Mesh lights (documentation, issues) First occurred: 12:46:36 PM (1 occurrences) Last logged: 12:46:36 PM

Timeout executing command, probably Bluetooth connection is lost/frozen, re-connecting

fsaris commented 2 years ago

This is just a warning and can seen as a notice that the integration is trying to re-connect to one of the Bluetooth devices.

The full log will probably tell more about why the other devices are not available

OkOtChA666 commented 2 years ago

Im kinda noob, Can you please tell me where I can find that log. Thanks

fsaris commented 2 years ago

You find the log file in the config folder (/config/home-assistant.log). The folder where you also find the configuration.yaml file.

OkOtChA666 commented 2 years ago

Its a big file... Arround 500KB, Should I post the hole file?

EDIT: Grammar

fsaris commented 2 years ago

Yes, or you can use https://pastebin.com/

500KB isn't that big for the log file ;)

OkOtChA666 commented 2 years ago

https://pastebin.com/57n1CLhY

Thank you for your help

fsaris commented 2 years ago

Are the rest of the lights and the plug working correctly?

I see more awox lights in the log

OkOtChA666 commented 2 years ago

Yes... All of the lights (and the smart outlet) are working great. The ones that are not working proprely are the ceiling mounted spotlights (one of them is working though)

fsaris commented 2 years ago

Are the other ceiling lights in reach of each other?

In the logs you can find the result of the scan:

...][Desk Lamp] Bluetooth scan returns RSSI value = -44
...][Hallway] Bluetooth scan returns RSSI value = -76
...][Floor 1] Bluetooth scan returns no RSSI value
...][Wall Light 1] Device NOT found during Bluetooth scan
...][Wall Light 2] Device NOT found during Bluetooth scan
...][Hall] Bluetooth scan returns no RSSI value
...][Ceiling Light 2] Device NOT found during Bluetooth scan
...][Ceiling Light 1] Device NOT found during Bluetooth scan
...][Desk LED] Device NOT found during Bluetooth scan
...][Floor 2] Bluetooth scan returns no RSSI value
...][Ceiling Light 3] Device NOT found during Bluetooth scan
...][Ceiling Light 4] Device NOT found during Bluetooth scan
...][Table Lamp] Device NOT found during Bluetooth scan
...][Floor 3] Bluetooth scan returns no RSSI value
...][Smart Outlet] Bluetooth scan returns no RSSI value

Multiple devices are out of reach for you HA system. That doesn't matter as it uses the mesh functionality to send/receive actions by connecting to one device that is in range and that will sent it over the mesh to the others. But then they all need to be in reach of at least 1 other device. When using the app you position your self probably somewhere near one of the ceiling lights and then the app is able to connect.

The Desk light looks the closed by (based on the RSSI value) and that's the first device the system tries to connect to. You can see that also in the logs.

These devices responded once on the mesh and were also disabled after a few minutes.

...][Wall Light 1] mode[rgb] Status callback: {'state': None}
...][Wall Light 2] mode[rgb] Status callback: {'state': None}
...][Ceiling Light 4] mode[color_temp] Status callback: {'state': None}
...][Table Lamp] mode[color_temp] Status callback: {'state': None}

But this is only a few minutes of logging. Could be that after a while the mesh picked them up again and they enabled again in HA. You can see that on the history tab of each of the devices in HA.

so first question. Are all devices in reach of each other?

One other thing that could be the case is that the mesh ID's are not correctly in sync between devices and HA.

I see 3 unknown id's sending messages over the mesh:

2021-11-11 13:23:16 INFO (AwoxMeshCommands-TMJL3MIr) [custom_components.awox.awox_mesh] Status feedback of unknown device - [29924]
2021-11-11 13:23:16 INFO (AwoxMeshCommands-TMJL3MIr) [custom_components.awox.awox_mesh] Status feedback of unknown device - [17671]
2021-11-11 13:23:16 INFO (AwoxMeshCommands-TMJL3MIr) [custom_components.awox.awox_mesh] Status feedback of unknown device - [8039]

Did you maybe re-connect the lights to the app? What you could do is remove the integration and re-add it again so it fetches the latest info/ids from AwoX

OkOtChA666 commented 2 years ago

Hello, and once again thanks for your kind help

Yes the desk lamp is like 1m away from the Pi4.

I've notice on the logs it says "[Wall Light 1] Device NOT found during Bluetooth scan" that is OK because at that time the switch was OFF... but that ones work fine. So, Wall light 1 and 2 are OK

The table lamp is connect to the AWOX smart plug, so at that moment it was OFF as well, so that one works to.

Answer to your first question is yes, they are all very near each other.

I've also have a smart light (All awox of course) in the HALL, named "hall lamp", and is further away from the Pi4 (it is in fact the farthest). So what blows my mind is that HA does in deed detect that bulb but not the other 3 ones in the living room... So that one works to (Hall lamp).

And also... before the "desk lamp" I have the hallway lamp, wich also works fine.

TMJL3MIr are the names that show me on bluetooth devices on my smartphone

I've upload a picture so you can see my living room layout https://ibb.co/bJkpt4y

Do you have any sugestions?

fsaris commented 2 years ago

What you could do is remove the integration and re-add it again so it fetches the latest info/ids from AwoX

Then I suggest to take this step. To be sure the id's in HA are in sync with the AwoX account

OkOtChA666 commented 2 years ago

I will do that and give you some feedback. Thank you.

OkOtChA666 commented 2 years ago

I did what you said, the "problem" continues. It's OK I will do more research in order to see what the problem is. Maybe is something i'm doing wrong. I can't complaint the integration works on all the other lights and I have a few (around 14). Anyway, thank you for your help and for this integration

fsaris commented 2 years ago

What you could try is to update the not working lights in the file config/.storage/core.config_entries with the 3 entries we found in your log. Update the mesh_id of the not working lights with once of the mesh id's below 29924, 17671 and 8039.

2021-11-11 13:23:16 INFO (AwoxMeshCommands-TMJL3MIr) [custom_components.awox.awox_mesh] Status feedback of unknown device - [29924]
2021-11-11 13:23:16 INFO (AwoxMeshCommands-TMJL3MIr) [custom_components.awox.awox_mesh] Status feedback of unknown device - [17671]
2021-11-11 13:23:16 INFO (AwoxMeshCommands-TMJL3MIr) [custom_components.awox.awox_mesh] Status feedback of unknown device - [8039]

After adjusting the file you need to restart the integration

OkOtChA666 commented 2 years ago

Thanks... Will try

OkOtChA666 commented 2 years ago

It worked. THANK YOU

fsaris commented 2 years ago

Any luck?

OkOtChA666 commented 2 years ago

Any luck?

Hey. I did answer, when you suggest changing the names 😜 hehehehe But yes, it worked. Thank you again.

fsaris commented 2 years ago

Ah, just missed the response somehow

But glad it worked out