Behaviour of attribute reporting on AppleTV/Plex

Hi,

I’m trying to automate the changing of Hue HDMI Sync mode based on the currently playing media on my Apple TV. I can get the attribute data.attributes.media_content_type and see if it’s reading video or music. But there’s a catch when I’m using Plex, and I’m wondering if this is normal behaviour of the Plex app on Apple TV?

Starting Plex and directly listen to music will give me music as the media_content_type. Similar starting a video will give me video as the media_content_type. But when switching from a video playback to listening to music the data.attributes.media_content_type doesn’t exists at all. If I pause and resume playback the value will again exist and read music. If I switch from music to video the data.attributes.media_content_type is there from the start.

The difference I see is that the payload state goes from paused to idle to playing when switching from video to music, but switching from music to video don’t get the idle state, it goes directly from paused to playing. Could that be the cause for losing the data.attributes.media_content_type on the way?

I should point out that I’m using Node-Red to build my automation, so if this is in the wrong topic please forgive me.

I’m glad for any tips you can give me.

/Björn

Which integration’s media player are you using, Apple TV or Plex?

I’m using the Apple TV integration. So the behavior I describe is all from when I use the Plex app on Apple TV.

Gotcha. I’m unaware of any current limitations of the AppleTV integration. The Plex integration should provide the detail you need, but of course would only provide that when using the Plex app.

Thanks for the tip of Plex integration. I got it working as I intended now.

Since Apple Music and Tidal can also show music videos data.attributes.media_content_type changed and I wanted the music sync mode even if a music video was playing :grinning:. So I actually ended up just checking what app is running on the Apple TV and then setting sync mode on Hue Sync Box to music or video accordingly.

1 Like