-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Groups are always displayed as online + Color is not updated #104
Comments
The state of the lights is updated, bit the group isn't? What would you expect that the behaviour of the group would be of only one light in the group would be adjusted?
Though this was already the case, but need to check this |
If possible, I would change the state of the group if both lights have been changed with the same values. If only one lights has been changed, the status remains as before. In my case, however, the group status is not changed at all, even if all the lights have the same values.
Unfortunately, this is not the case for me. Can I provide logs? The lights are correctly recognized as offline. However, the group is not marked as offline. |
Just tested and currently the group is shown online if one of the devices is online and offline if all devices are offline. Same for on/off. Can you test current For reference b692585 |
Thank you very much for your quick reply - and that you've even already provided an update! I have tested it, but now I have the following problem: My groups no longer have any color at all. The brightness is set to I also have the following error messages in the log:
|
If possible and if you think this makes sense, I would like the following: If the lights from a group have different settings, the setting of (any) light (for example the last changed one?) should be used for the display of the group. In my opinion, it is not intuitive if the group has a setting that does not correspond to any state of a light in this group. |
okay, was a little bit to fast yesterday with my changes :) Did some more testing today and now I see the group updating when the values are equal for each light. Updating the group to the value of the latest change in the group is not that great IMO. Not sure how this is handled in other extensions, zigbee2mqtt for instance or in HA when creating own groups? For reference: 42a4cea |
Many thanks for the quick implementation! :) Unfortunately my groups are still without values ... I have reflashed the ESP32 and use the main repo. Should I provide you with any logs? Unfortunately I don't see anything with a group in the logs ... |
Are you sure you installed the latest version? By default the external$component is only refetched once a day (https://esphome.io/components/external_components.html#external-components-refresh). If that doesn't work enable debug logging (if possible in verbose). It should show what values are not equal. |
Perfect! You were right. I don't have the latest version. It works superbly now! Now the groups are also shown as offline when all luminaires in the group are offline. Have you optimized anything in this respect? Before, the groups were always displayed online, even if all the lights were offline. I will buy you several beers for your support. Thanks and cheers! :) |
I have (unfortunately) discovered a small (visual) problem: The groups are displayed as “Online” in HA every few seconds. Then they are displayed as “Offline” again for a few seconds. This only happens with the groups, lights are not affected. I'm not sure whether this is an MQTT, HA or ESP32 problem ... In any case, the logs show that no devices were found: EDIT: At that time, I did not supply a single Awox Light with power. |
Yes, found a small issue there during testing.
👍🏻
Can you check the esphome logs?
And also in this case the group was shown as online? |
I can't find anything about a group in the logs ... Enclosed you will find my logs. |
This is when all the devices are offline? |
Yes, correct. All devices are offline. Nevertheless, the groups are displayed as online every few seconds (for a few seconds). |
What is also interesting is that when I switch on a particular light, group 8 is displayed as online. However, the activated light is not in group 8 - and nothing happens when I want to control group 8. I will try to get logs tomorrow. |
@blueJack92 looks that the groups are not correctly set offline when no devices are connected. Need to do some more testing. Logs would help to identify what exactly happens in your situation. |
Yes, I think there is still a problem somewhere. I don't know exactly how the mesh network is/will be set up. In my case, when I de-energize a specific group of lights (Group 8), all devices are suddenly offline. As if the meshnet was set up from these devices. However, no new way is then sought to reconnect to other devices. I am now testing with two ESP32 devices, as I have two floors. Perhaps it is also due to the connection between the individual lights being too weak. Unfortunately I don't see anything in the logs regarding groups ... :( |
These are two lights from a group that is displayed as online, although both lights are not supplied with power.
You can find the entire log in the appendix. As soon as I disconnect the group containing the light with the mesh id 12173 from the power supply, none of the lights can be controlled any more. I suspect that this id is causing the problems. The ESP is not looking for any other connection to other lights. |
Unfortunately, I still have the problem that a light is often not available. I don't know what the problem is. The ESP is 3 m away. As soon as I supply group 8 with power, the light appears as available. I have already increased the max_connections to 3 to rule out the possibility that the mesh is not being set up optimally. Incidentally, the groups are now displayed correctly. Where there is a problem is the display in HA (when a light is switched off, it appears again shortly afterwards as “on”, only to appear again as “off” in a few seconds) - but this has nothing to do with this component.
This is the problematic light. It is supplied with power and can be controlled via the AwoX app. |
I have a hunch what the problem might be. Group 8 consists of 6 Eglo bulbs (this is a pendant light with 6 bulbs - https://www.eglo.com/media/wysiwyg/t/i/titelbild-1_32916.jpg), and I also have 4 ceiling lights on the lower floor. Could this cause problems if the mesh network is set up from there? It might also be useful to have an option to exclude a certain group/lights from being able to set up a mesh from there. I have no idea whether this is the cause, but this is the (only) difference to the upper floor, where everything works perfectly. |
Do the groups show online even when there is no active connection at all?
Yes, when a some devices in a mesh are turned off it could be that some of the old messages are still published by the devices that are online and have the wrong value. If the mesh is broken into 2 sub meshed that are not linked together anymore because a light in the middle is offline device updates of one part of the mesh are not communicated anymore with the other part. And the ESP will not be able to tell correctly what the status is.
you can use the Possible solution could be to position the ESP in the middle of the mesh so it could setup multiple connections (config: Or break you mesh into multiple parts, use multiple ESP devices and configure each one to only connect to a specific set of devices |
From your logs:
So all your devices are offline or out-of-range. It knows 6 address, so 6 devices were at one point in range. And it found in total 10 devices in the mesh. When this situation happens ( |
Did I understand that correctly? allowed_mac_addresses is there to prevent a DIRECT connection to the ESP? A connection via mesh is still possible? allowed_mesh_ids is there to define who is allowed into the mesh. In other words, who is allowed to connect to the ESP via detours (via another light)? I am currently already using the two settings. However, I have specified all mesh IDs and all MAC addresses of the lights to be connected in the yaml (I use two ESPs - upper and lower floor). Would it therefore make sense to allow only 1 of the 6 bulbs to connect directly to the ESP? All 6 are always turned on at the same time anyway, so a single direct connection would be enough. One last question: Does it make sense to increase the max_connections to 3? My ESPs are located relatively centrally in the apartment. |
Yes,
Yes So if you split your mesh over 2 ESP32 devices also split the
If they ar all in reach of the esp I would assign indeed only 1 of the addresses to keep the traffic and connection attempts to a minimum.
Only if the devices are not in reach of each other, and you need more active connections to control all the devices in the mesh. Because the esp will try to connect to a device until all the mesh id's are connected (the once defined in the config or if no config for each it once received a message on the mesh). Once the ESP is connected to the first device it checks if all mesh ids are connected. If not, it tries to connect to the next device to find more devices. |
Thank you! I have now implemented this accordingly and will keep an eye on it. However, I now have the problem again that a group is displayed as online, although all lights are displayed as "Not available". Can you take a look at the code for this? Can you perhaps optimize something here? Thanks for your support! |
The two lights (ending with 8E and 53) are displayed as "Not available" in HA but the groups are displayed as "Available". The logs are displayed the devices as "Available", but the lights are offline with no power. |
So the devices are offline in HA but the group is shown online. All devices of the group are offline? Are all the devices of the group linked to the same ESP32?
So the devices are offline but HA shows them as online? For both situations, Is there any active connection on that moment? Did you check the diagnosis info of the esp32 in HA? Number of connections and what mesh_ids are online |
The affected lights are connected to the same ESP. They may only connect to this ESP. Yes, all lights in both groups are displayed as offline. However, both groups are displayed as online.
Both are the same situation. Yeah, one light was online - same ESP.
max_connections = 2 |
Same problem with the other ESP. Two lights are supplied with power. All lights from one group are de-energized. Nevertheless, the group is displayed as online. The individual lights in the group are all correctly displayed as offline. Meaning: The online detection of the lights works, the online detection of the groups does not. |
Can you provide some more logs from the ESP? From the time around bringing the devices online and offline. I'm interested in the processed commands and messages. Preferably from both esp devices |
Do I have to increase the sensitivity of the logs for this? I will try to get logs of it today. |
Debug logging should be enough. The debug and info messages should tell enough |
@blueJack92 with the current version it's probably easier to check the log messages for the group online/offline commands. I decreased the log level of some messages to verbose. No you should get a better view of the online/offline messages that are send. |
Now I have the logs. I don't quite understand them ...
This light was online the whole time. And also controllable. Nevertheless, it is claimed that it was not found. In the next lines it also appears again with an RSSI value. The groups are still displayed as online. Although according to MQTT in HA all lights are displayed as offline or “not available”. |
If I have switched the lights of a group on and off once, it is correctly displayed as “Not available”. However, all groups are first displayed as online when a light is turned on and not a single light was turned on before. Perhaps it would be possible to mark all groups as offline by default. When they become online, they are marked correctly anyway. |
Think that I found the issue. With the latest version the group availability should be correct after restart |
Unfortunately, the problem still exists. If Lights is de-energized, the group remains online. However, the problem has now arisen that the light is sometimes displayed as "unavailable", even though the light can be controlled via the associated group. This shows the correct status of the light. |
What I have observed and can also reproduce: Some of my lights are supplied with continuous current, others are switched on or off by a switch. If one of the switch-controlled lights is switched on, the status of some specific lights (which are of course supplied with power) is set to "unavailable". However, this is obviously not correct, as I can still control the lights via the associated group. A general question: Do the individual lights try to connect to other lights independently? Or do they stick to my specified Mesh IDs and Mac addresses? Second question: Lights become unavailable for a few seconds. After about 10 seconds they are back again. Could it be that a new "mesh path" has been searched for and found? Would it be possible to set that the lights are only displayed as unavailable after a certain period of time? With Zigbee, devices in HA are only set as "unavailable" after 6 hours by default. |
Having some of the devices offline, and missing some of the message in the mesh that other devices are online/offline can give strange values in HA. You probably see the same in the official AwoX app (at least that is my experience). If you would monitor the logs closely you will probably see messages of devices that would be offline even that you know that they are online.
Yes, the lights do not know of the ESP config. So they try to connect to all lights in the mesh.
There is a loop that tries to fetch the device state of all devices that are currently marked as offline in the mesh every 5 seconds.
This is now by intention a very short time. When you "power down" a light you want to see this (almost) immediately in HA. There is small timeout when a device goes offline (could maybe be made configurable) to check if there isn't a message again that a light/device is online.
If you could provide more logs then maybe we can pinpoint what's going on and if extending the timeout would help in your case. |
My problem is that my current solution is very unreliable. I use Shelly in Detatched Mode and switch the Eglo/AwoX lights via the light switches in the room. If a light becomes unavailable, I can no longer switch the light. So it becomes a frustrating experience when the lights can't be turned on or off several times a day. :( |
I get the frustrations :) I first had the situation that some lights were only "online" (powered) when in use. But I changed that due to reasons you describe to be always online. And I have now a Shelly i3 behind the switch that controls the light through HA. Please share some logs so we can pinpoint the origin of your issues. Maybe a solution could be to split your devices in 2 separate mesh networks. But that would make it harder to use the official AwoX app. |
:)) I already use two ESP32s - one upstairs and one downstairs. The upper one causes almost no problems. But the lower one is constantly causing problems. Lights go offline and stay offline for hours - until I restart the ESP. However, other lights in this mesh can be operated via HA. I have now ordered another ESP32, which is supposed to have a particularly long Bluetooth range (up to 80m). |
is this the part of the mesh with the devices that aren't always online? And you are sure the connection is lost and not that the ESP reboots? You see in the logs that the connection is broken? |
No, the lights are located in the mesh where all the lights are supplied with continuous current (Shelly with Detatched). However, it is the part that is regularly affected by failures. This mesh hub also has much worse RSSI values than the other (upper) mesh hub. I am now using this config for my esp32. I will try this out. Do you find anything I could improve?
|
First of all, a big thank you to you for developing this component! I'm thrilled with how great the solution works in conjunction with Home Assistant. :)
Regarding my problem: The groups are recognized correctly and listed in MQTT. If the lights are supplied with power, the control of the group works without any problems. However, the color of the light of the group is not adjusted if the color has been changed in the Awox app. It would be desirable to check the color of the luminaire and transfer it to the group.
The second problem, which is more annoying, is that all groups are reported as online, even if the lamps are offline. It would be necessary to check here that if all the lamps in the group are offline, the group must also be marked as offline.
Or do I have a configuration error somewhere here? Thanks for your help!
The text was updated successfully, but these errors were encountered: