-
Notifications
You must be signed in to change notification settings - Fork 32
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
Status misses when entities change in Home Assistant #8
Comments
I have the same issue though I have noticed that it only seems to affect light domain entities. Entities in the switch domain seem to work fine. I got around this by creating a template switch in home assistant. This still switches the light entity on and off but adding to apps.yaml instead of the original light entity fixes the updating problem on the display for me. |
Yes, you are right. I just tested again to verify and indeed only light entities are effected. Switch works fine. |
Yep, true. Hopefully the bug can be fixed, Odd that it only affects lights and not switches though. |
Indeed. Hopefully @sairon is still willing and able to check this bug. |
Thanks for your findings, folks, I probably have some anecdotal evidence of the same issue as well, yet I haven't done any debugging yet. It's quite strange it only affects lights, so I'll look deeper into it, thanks for the hint. Can't promise any ETA, but it's on my radar. |
Thanks @sairon. Did some more experimenting last night... I think actually that the problem still remains with switch entities after all. Operating the switch from the panel seems to update as it should but if the switch is operated from elsewhere it doesn't update the state on the panel. Light entities don't update at all when operated from either the panel or elsewhere. Not sure if this helps at all... Thanks for all your work on this. Love the Lovelace panel but not keen on Tasmota so this project is a real bonus for my setup. |
On lights the "limit" of how many you can put in 1 gridcard seems to be 4. If I put 1-3 lights in the card the issue does not occur, it starts when adding the 4th light entity. |
Can flash current development version and test with this one?
Edit: wanted to post this on joBr99/nspanel-lovelace-ui#392 lol |
Uploaded the new firmware. The issue is still the same. You should be able to reproduce this with multiple light entities on the same gridcard. I tried this on a totally different HA instance in another network and I am having exactly the same issue. |
Wasn't able to repoduce this with tasmota even with more than 4 entites. Can you update the appdaemon backend to latest main, restart appdaemon and test again? |
not appdaemon, the lovelace app in the hacs store https://docs.nspanel.pky.eu/faq/#how-to-upgrade-from-a-release-to-the-current-development-version |
yeah, you need to update to the development version/main https://docs.nspanel.pky.eu/faq/#how-to-upgrade-from-a-release-to-the-current-development-version click redownload, then restart appdaemon version number should change to the hash of the commit (cc3ed54) |
ok, my theory was that esphome is sending the messages too fast, causing a buffer overflow on nextion with the dev version I implemented a dedub for the mqtt messages so the backend won't send the same messages twice, but apparrently this wasn't the issue, I'm out again no idea |
@sairon is esphome logging unexpected serial output from the panel? in case there is an error on the nextion screen it will return error codes, for example 0x24 for buffer overflows
|
I can reproduce the issue with release 3.4.0 of the backend component and NS Panel screens, but I didn't spotted it on latest dev branch and NS Panel screen from the link in comment (http://nspanel.pky.eu/lui.tft) I was testing with 4 light on one card and alarm icon on screensaver
|
If I remember correctly our latest result was that it only occures with more than 4 lights. |
Aha, I see, so I have a bit different setup with lights Anyway I had a glitch on screensaver with alarm state icon (top left corner) which is now gone, while using dev branch codes |
I was trying to look into this issue tonight but I still don't have an idea why this is happening. I've hooked up a logic analyzer to the TFT pins to see what's going on when this issue happens but I don't see any data corruption on the serial line. Here's a short session when trying to reproduce the issue - toggling the light "houby" from the HA web three times - states should go ON->OFF->ON, but after the last change the icon stayed blue:
The same can be seen on the serial line - notice that both first two and last two rows (change to the ON state) are identical. There is no unexpected output received on the TX line (i.e. from the Nextion FW).
I might revise this issue later, possibly compare Tasmota end ESPHome setups, but for the time being, I've added a workaround that might help getting rid of this annoyance. It exploits the fact that the panel pages are stateless, so transferring all the commands twice should not cause any issues (please correct me if I'm wrong, @joBr99). This workaround is on by default, but can be disabled by setting |
Ok, I will test this later this weekend. Thanks! |
Had a moment of enlightenment today and realized that the root cause might be in the timing. Turns out the ESPHome component is actually too fast when compared with Tasmota 🤓 I confirmed this theory by taking another look at the waveforms on the logic analyzer, finding out that the two messages sent right after another when light status is changed ( @joBr99 It seems that sometimes the Nextion firmware can't cope with messages sent shortly after another (still had some issues with 50 ms delays, 75 ms and more seems to be working), ignoring the first |
Yes, this is something that I also thought of, maybe we are to fast and we are fillig up the serial buffer faster than the stm32 can handle. |
Hi, I have tried this. Made sure the panel has the latest display firmware (http://nspanel.pky.eu/lui-release.tft) the lastet apdeamon version and the lastet version of nspanel lovelace UI. Then I cleaned the build files in esphome and reflashed (OTA) the esphome firmware on the panel using this config;
It responds a little better now, but I am still missing a lot of status updates. |
OK, reopening this ticket so I can gather more feedback. If status misses happen in your setup, please send here the following:
@HA-TB303 Could you please try to reproduce it again and attach the missing logs? Just with the device configuration alone I am not able to reproduce it in my environment. |
There's been no activity for the past two months and I haven't encountered the issue since implementing the workaround either. Closing it as resolved for now. |
Hi,
I have been trying https://github.com/joBr99/nspanel-lovelace-ui with both Tasmota and your esphome component and I am having some issues with status change misses on the nspanel display.
It does not matter of the status changes from home assistant or from the nspanel itself.
Reproduction: Configure a grid panel with external lights from Home Assistant like:
Then turn the light on and off from Home Assistant repeatedly and notice the misses. I have been debugging this with help from joBr99 here, bit no luck sofar: joBr99/nspanel-lovelace-ui#392
This issues does not occur when using tasmota and the exact same config in adddeamon.
My ESPhome config (which is nearly identical to your example config)
Short video that "proves" the issue, Pay attention to the light on the far right (Vanity light)
WhatsApp.Video.2022-08-13.at.12.20.24.PM.mp4
The text was updated successfully, but these errors were encountered: