Jump to content

AndroidTV MediaSession, Home Assistant and MediaSession2MQTT


Go to solution Solved by matt_ttam123,

Recommended Posts

matt_ttam123
Posted

Hey team,

I was trying to use android debug bridge with home assistant to get the state of Emby if its currently playing media or not so that my lights can react to the play/pause status, it seems the ADB Bridge integration for home assistant is somewhat broken. I did end up finding another app which seemed to work much better:

https://github.com/cbeyls/MediaSession2MQTT

It seems to work with 90% of the apps I use on my Android TV as they all seem to use the MediaSession thing thats built into Android https://developer.android.com/media/media3 I'm not sure what's involved with integrating this library but is there any chance that it could use that within Emby too so we can properly detect the playing/idle/paused status via the MediaSession attribute 🙏 thanks!

  • Solution
matt_ttam123
Posted

I was testing on the Emby for AndroidTV version I tried the Emby for Android version and it works fine so no need to change that ill just start using the other app

  • Thanks 1
Posted

Hi, thanks for following up.

seanbuff
Posted

hey @matt_ttam123glad you worked it out with the Emby for Android app.

Another, simpler alternative is to use the built-in Webhooks feature of Emby to trigger HA automations. I wrote a tutorial for it here: 


and here to setup the webhook automation:

 

You just need to make the HA Action toggle a light instead of a notification. Hope it helps.

matt_ttam123
Posted
3 minutes ago, seanbuff said:

hey @matt_ttam123glad you worked it out with the Emby for Android app.

Another, simpler alternative is to use the built-in Webhooks feature of Emby to trigger HA automations. I wrote a tutorial for it here: 


and here to setup the webhook automation:

 

You just need to make the HA Action toggle a light instead of a notification. Hope it helps.

The only thing with it is the Emby server isnt on my network so I cant use that. Is there much different between the androidtv version and the android version 🤔

seanbuff
Posted
9 minutes ago, matt_ttam123 said:

The only thing with it is the Emby server isnt on my network so I cant use that.

Emby Server doesn't need to be on your network, as long as Home Assistant can accept remote webhooks it should be fine.


 

10 minutes ago, matt_ttam123 said:

Is there much different between the androidtv version and the android version 🤔

You can have a read through the mega thread:
 

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...