-
Notifications
You must be signed in to change notification settings - Fork 11
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
State not updating consistently #149
Comments
Could I get a copy of the debug logs? What I have seen in the past is the server side stops sending updates. A "wake up" is needed. Right now this integration does that at the set update interval if is hasn't seen an update. Maybe I need to make that more aggressive. |
What sort of test do I need to do in order to capture the information you are looking for in the debug logs? Your suggestion sounds right -- what is the current update interval? |
Just ensure the symptom of no update happens. The update interval isn't really relevant, since it's pushed from the server in real time. The poll to api is set in your config. I think default is an hour or so. |
There's a lot of info in the log - I'm not sure I want to share it in full here. If that means you aren't able to investigate further at this time, then feel free to close this. However, I do notice messages in the logs once per hour where it looks like Status and Config is retrieved. There are success messages at the end of each block. Even so, I observed that the state of a device that had gone Idle several hours earlier was still reflected in HA as "Playing" until I reloaded the integration at which point the state immediately changed to Off. The last message related to that device, aside from the subsequent hourly polls, refers to inactivityShutdown. Sort of seems to me that messages are being delivered, but the state in not updating in HA until the reload. |
Any Mqtt disconnect messages in the logs? You could try see if dropping the update interval to 30 improves things. Also does opening the native Yoto app "wake it up"? |
The only disconnect message in the logs are when I reload the integration. A couple things I've found:
Opening the native app doesn't change anything in HA. Reloading the integration causes the correct state to be displayed. |
What's your update interval set to? |
30 min |
After other sensors update does it work okay? Does using the native app also solve it? |
Sorry, I'm not sure I understand either of those questions. Please clarify what you'd like me to test and I'll be happy to give it a try! |
Typically I find if the server side stops sending updates for card playing status. 1. Open the app and see content in it. It will also update home assistant. 2. If you see the 30 minute update interval hit. It will "wake up" the server as well as I have code that pings server side. I am trying to confirm if both one and two occur. If so reducing you update interval will improve or remove you issue. |
I just woke up a player and started content. HA continued to show "Off". I then opened the native app and selected the player to see the content that was playing. This action in the native app caused the state in HA to update to "Playing." |
Okay. Assuming it shows playing and the correct content try drop your update interval to 20 minutes and see if that helps. |
Unfortunately, that does not seem to have changed anything. |
Just an update that this continues. Are you seeing the same symptoms? For now I have the integration reloading via an automation every 20 min as a workaround. |
No I don't have this issue. Without logs, screenshots etc not much I can do. |
I also have this issue. It happened this morning. The yoto player was on and playing a card. The home assistant entity showed it as off since the night before. I didn't touch home assistant, I mearly opened the yoto app which shows the yoto playing. Going back to home assistant, it now correctly shows as playing. There is nothing in the logs at this time. This has happened before, so seems like the plugin is asleep. If the 30 minute wake action was working, the sensor would wait for this, and not instantly update when the yoto app is opened This plugin works great most of the time. I get instant updates and use it to alert when it's being playing for over an hour at night and when the battery is low. |
@wardy277 debug logs must be enabled for it to show info that is helpful. What I have experienced in the past is this:
A few things wake up the yoto server:
Right now when the update interval is hit we do two broad things:
I can only assume this is the case but still need logs to confirm we aren't loosing connection or something like that. It does sound like connection is still good though since native app fixes it. I personally haven't experienced it since putting in that update request into the code awhile back however my personal automations currently aren't tied to card insert so may miss this. Logs would be great for this - I want to confirm:
When this occur if you don't open the app does it recover on next scan interval? |
Is this occurring when the device is powered off, you turn it on and insert a card? |
I am seeing situations where the player state is not updating automatically. When the player is on, the state sometimes does not update unless I change the volume using HA, which seems to trigger an immediate update. If the player is off, the state may remain idle or paused in HA and changing the volume does not update. If I reload the integration, however, the state correctly changes to off.
The text was updated successfully, but these errors were encountered: