It’s not working properly for me. When something is running, media_session_state seems to stay at 3 but wake_lock_size moves between 3, 4 and 5. Pausing Plex (just pause not going “away” from the movie) leaves media_session_state at 3 and sets wake_lock_size down to 2 (but up again randomly, for a few seconds at a time). So there is no absolute way to differentiate, I think.
The following works to have playing always correct. But pause/standby randomly gets set to playing for an instant and then back. For simplicity I removed “paused” altogether.
I think I’ve change some things around since an update to the Plex app shifted the states around again (when they rolled out the new UI). I do remember experiencing the random paused -> play state trigger. But I can’t recall the last time it happened. This is what my config is now.
Did you maintain these state detection rules through the UI or configuration file? I have setup the integration using the UI and it has generated a UI, however depending on the app, I’m getting inaccurate states - hence I would like to lean on the work done in this thread.
My only issue, there is no documentation on how to maintain these in the UI despite the feature being available. If you could provide some guidance, that would be awesome!
Well, I’m no expert, but I did manage using this and the official documentation to get Hulu showing “playing” and “paused” via the below method. I couldn’t get “standby” nor “idle” but I’m using it for an automation that turns off my OLED to avoid burn in. If it notices the interactive sensor on my phone isn’t being used at certain times (30 min intervals) it will pause the firetv, then it will wait 5 minutes, then check to see if the firetv has been paused for 4.5 minutes, if so, it shuts down the whole bedroom and flips my switch made in helpers to track what time I fell asleep.
Anywho:
Add the device via IP in the Android TV integration, IDK if it matters, but I chose firetv specifically instead of auto to try to ensure it would work properly.
After it is added choose configure.
Let me know if you figure out the other states, I don’t really need them, but if I can make something better, then I like to. That and who knows, maybe I’ll find a use in them one day? I originally had it in my config, and removed it on accident. Lost the state detection and couldnt figure out why. I actually switched to Chromecast for 2 weeks before returning them because their functions were pointless. If I asked for a show to play on Hulu, I was still required to press the enter button on the remote to make it play, so I switched back. Finally found this post and decided to try state detection, problems solved.
this is great. i want to automate something by reading which app is opened.
say if netflix is opened i want to turn of lights like that.
is their any way to read which app is being currently opened and implement that in automation?
Is anyone please able to help with the custom state settings for Peacock?
I’m currently watching a stream, using default settings, but my Fire Stick shows as paused.
It would be great if someone can post an up-to-date version of this. As been through this whole thread and tried every solution, unforuntately when using Netflix on Android TV it still responds at “idle” and not showing netflix as an ID.