Android TV playback status driver?

Hello everyone, is it possible to have a driver that show the playback status for all apps on the nvidia shield (play, pause stop). I want to dim light when something is playing and turn light when paused or stopped. Like the plex communicator driver/app. I searched and I did not find an answer. Is it because I'm the only one who wants to do this? I can try to help if anyone else is volunteer.

I hope you will consider my request.

Thank you!

2 Likes

I second this... Assume there's no solution in detecting the state of an Android tv device, other than using tasker on Android tv to detect and then change the state of a switch device by the maker api.

Seconded again (third-ed? :wink: ) - all of our TVs are driven by a Shield TV, and I would love to integrate their status into lighting automations.

If any developers are listening and interested, I think it would be cool to be able to bring not only the current status of any playing apps on the TV (playing, paused, stopped, etc.) but also the app(s) that is/are currently playing media...an automation might be different depending on if someone's watching a movie vs. a YT video vs. music...

Happy to help test if anyone's interested!

I think they can't do anything, After some search, it look like it's on the google side we have to try to get help.. look my another thread for the latest news.

Hey, I have the same issue with the idle status. What helps is setting the chromecast polling to on. 5 seconds for example. This would ensure that a signal is constantly sent and checked between HE and the chromecast device. I have tried setting my media source (which in events, is the only thing that changes) and formulate automation rules around that. I'm still testing but hopefully it provides another perspective.

Also note that some media sources like Netflix, show (media source change) as soon as you open the app. But others, example tubi, only change when you actually have something playing. So test around a bit and see what works.

Update. It works perfectly and very responsively for me. My only aim is to identify when the source changed from none (meaning an app like Netflix or some media is playing). Changes and dims my lights instantly, pauses by bedroom lights rule and only changes back to media source none when I press the home button. Good enough for me.

Unfortunately I have had better luck myself using Home Assistant's Chromecast Integration and Node RED to detect the status of my Chromecast. I use it to turn my TV and speakers off if I stop casting for 10 seconds. My NR flow does suffer from an issue when power is restored to the chromecast and my speakers toggle power and put them into the wrong state.

One very "hacky" solution I have tried in the past to get media that is being played on GH devices is with Tasker on an Android device. Not the most reliable of solutions, but others may choose to try and refine it if they want...

1 Like

I'm lost with your suggestion, I installed the Generic Attribute Driver but after that I don't know what to do...

Actually, let me just check, can you see details of the media being played in a notification on your phone / tablet?

Sorry, should have left the notes I wrote in the comment...

I'll just mention again, I did not have great success with this solution, so only proceed if you are willing to troubleshoot / fix some of the issues I encountered and did not resolve. That said, happy to help you in trying to use it.

There are also (I think) some more options provided by HE that are likely to remove the need for this virtual device, namely Hub Variables, but I have never looked at it in detail.

Right, caveats out of the way.... :slight_smile:

The next steps (not all of them) is to

  • Create a Virtual Device using the attribute driver you installed
  • If you haven't already, you need to install the Built-in Maker API App on HE
  • In Maker API you need to add the new Virtual Device to the list of devices available through Maker API
  • Copy the send command URL from the list of URLs in the Maker API App configuration page

Setting up Tasker and picking up the media titles on an Android device can come later...