Determine Media Player State? (workaround found)


(Bill Surowiecki) #1

Is there a way to view the state of a media player on my home network?

I know there are custom apps for PLex and Kodi, but thats a bit too limiting for my needs.
I would like to query the play state of several Android TV boxes I have setup, then use the state to alter lighting scripts.

If you take a look at the work done in Home-Assistant.io it is capable of detecting almost any media player on the network, and providing its playstate (playing, paused, stopped, inactive) along with the media info currently being played.
I can view the state of my Nvidia Shield (device and cast), MiBox(device and cast), Chromecast Audio, Chromecast, Google Home, and Cast Groups.

With this I can check on the play state of the device itself, not just an app. I can also query if its video or audio.
I personally feel the play state of a network device is more useful that the playstate of a specific application. While Plex and Kodi are my normal GO-TO media apps, they are not the only ones.

Considering Home-Assistant is OpenSource, would anyone have any interest in porting these features over to Smartthings?


(Bill Surowiecki) #2

So Im not finding anything to accomplish this directly in Smarthings, so Im using Home-Assistant.io in kind of an overkill manner to accomplish it. HASS is pretty light weight to begin with and since its running on my UnRaid server, I have plenty of cycles to spare.

So I have HASS checking to see if my Nvidia Shield is playing anything be it Music, Movie, or even internet video like Youtube. It can detect it in direct playback or in using it as a cast device.
So if any of the above are playing, I have HASS synced to a virtual switch in ST.
The Virtual Switch in turn handles lighting scenes and other in smartthings.

This works, but it can be a bit sluggish.

Is there really no way to do this directly in Smartthings?