New Python3 AppleTV indigo Plugin

Posted on
Sat Dec 03, 2022 9:00 am
donhoffman offline
Posts: 51
Joined: May 26, 2011
Location: Portland, OR and Livingston, MT

Re: New Python3 AppleTV indigo Plugin

Probably Media Remote Protocol. See: https://pyatv.dev/documentation/protoco ... otocol-mrp

durosity wrote:
What is MRP?


Sent from my iPhone using Tapatalk Pro

Posted on
Sat Dec 03, 2022 4:21 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: New Python3 AppleTV indigo Plugin

Ah that makes sense. All my Apple TVs are 4k models so should all have it!


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Sat Dec 03, 2022 4:33 pm
GlennNZ online
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: New Python3 AppleTV indigo Plugin

MRP - is an older control protocol that is being selectivity removed by apple in various OS updates, or incorporated into Airplay I think would be more accurate.

CompanionControl and Airplay are replacements - the issue is reverse engineering these newer protocols hasn’t quite happened, hence support changes depending on what is available.

The newer the appleTV model - probably the worse off. Although the general feeling is as OS moves along all will probably all be affected.

(Although my appleTV with MRP disabled is not super new I don’t think. Haven’t quite looked into the whys….)

Without MRP - On/Off powerstate reporting is more dicey. Remote control (via Companion protocol) works, launch Apps (companion) works - so not all is lost.

Glenn


Sent from my iPad using Tapatalk

Posted on
Wed Dec 28, 2022 10:49 am
acjobim offline
Posts: 8
Joined: Dec 14, 2022

Re: New Python3 AppleTV indigo Plugin

Brilliant Plugin. The app launch function is simply awesome. Thank you much and please let me know what I can do to help. Great work.

Posted on
Thu Dec 29, 2022 1:47 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Python3 AppleTV indigo Plugin

Just installed. It went very smoothly. Great plugin!

I noticed that the Power State and current_playing_title are often blank between shows. For example if an episode ends a new one starts, it blanks until I reload the plugin.

apple-tv.png
apple-tv.png (41.81 KiB) Viewed 1141 times

Posted on
Sat Dec 31, 2022 9:48 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Python3 AppleTV indigo Plugin

After further testing this problem is not happening with Hulu. I'll update this as I continue using:

  • HBO Max - loses power state and the title between shows
  • Hulu - No apparent issues
  • Netflix - required a reload to get the title to show
  • Paramount+ - required a reload to get the currentPlaying_App to show
  • YouTube TV - currentPlaying_App lists as "App: None (com.google.ios.youtubeunplugged)"
  • Disney+ - not yet tested
  • YouTube - currentPlaying_App lists as "App: None (com.google.ios.youtube)"
  • Amazon Prime.Video - required a reload to get the title to show
Last edited by ryanbuckner on Sat Dec 31, 2022 3:23 pm, edited 6 times in total.

Posted on
Sat Dec 31, 2022 11:55 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Python3 AppleTV indigo Plugin

I wanted to share the Control Page I created to use your plugin with 1 TV. I created a variable that splits the currentlyPlaying_App to get rid of the "com.hulu.plus".

AppleTV Control Page.png
AppleTV Control Page.png (161.21 KiB) Viewed 1195 times

Posted on
Sat Dec 31, 2022 5:22 pm
GlennNZ online
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

New Python3 AppleTV indigo Plugin

ryanbuckner wrote:
After further testing this problem is not happening with Hulu. I'll update this as I continue using:

  • HBO Max - loses power state and the title between shows
  • Hulu - No apparent issues
  • Netflix - required a reload to get the title to show
  • Paramount+ - required a reload to get the currentPlaying_App to show
  • YouTube TV - currentPlaying_App lists as "App: None (com.google.ios.youtubeunplugged)"
  • Disney+ - not yet tested
  • YouTube - currentPlaying_App lists as "App: None (com.google.ios.youtube)"
  • Amazon Prime.Video - required a reload to get the title to show
Hi

title:
It would seem it depends how well written the AppleTV Apps are - and whether support current titles or not.
I’ve have a look and see if any issues code wise with this though.

PowerState - however is a different issue.
It’s not that well reported by the appleTV and as they remove protocols becomes less supported. Most other integrations use combination of factors eg. if playing - power must be on, for example. I haven’t gone down this route for various reasons.

It is possible different apps may have different issues - a debug log (just use the file one) should show if there is any exceptions caught impacting the full state update.

Glenn


Sent from my iPad using Tapatalk

Posted on
Sun Jan 01, 2023 3:09 pm
GlennNZ online
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: New Python3 AppleTV indigo Plugin

Ok

Have fixed a few reporting things - mainly the App name in latest code uploaded version >0.1.15

Not sure what is up with your title report of reload changing - that is taken directly from app reporting. A reload of the plugin shouldn’t change that at all….

Glenn


Sent from my iPad using Tapatalk

Posted on
Sun Jan 01, 2023 3:50 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Python3 AppleTV indigo Plugin

Awesome. Just installed, I'll let you know what I see

Posted on
Mon Jan 02, 2023 10:04 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Python3 AppleTV indigo Plugin

Maybe it's something I'm doing wrong or a limitation of my Gen 4 Apple TV . Here's what I'm seeing on the Title reload issue:

1) Turned on AppleTV this AM and started a Netflix show - No Title

pre-reload.png
pre-reload.png (9.52 KiB) Viewed 1104 times
.
pre.png
pre.png (9.94 KiB) Viewed 1104 times


2) After reloading the plugin manually through the Indigo client

post-reload.png
post-reload.png (12.19 KiB) Viewed 1104 times
post.png
post.png (9.61 KiB) Viewed 1104 times

Posted on
Mon Jan 02, 2023 4:23 pm
GlennNZ online
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

New Python3 AppleTV indigo Plugin

Hi

Yep - it is a bit odd. There may be escaping characters or something that happens (even at the library level) with some titles. Nothing should change with restarting Plugin, that doesn’t happen with play status update.

If you pause/play - that is seen straight away? (eg. connection to appleTV working)
Certain titles - perhaps TV shows with quotes and : may be more problematic, try some more simple titles and see if any different?

I’ll add some debug logging of playstatus soon (will update this post) and would turn on file debug logging, and see what it shows us.
(Edit:Try 0.1.16 - adds some logging of Playstates)


Glenn


Sent from my iPad using Tapatalk

Posted on
Mon Jan 02, 2023 9:37 pm
GlennNZ online
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: New Python3 AppleTV indigo Plugin

Added some more logging.

Can confirm - can see that same thing.

Unfortunately seems to be library or indeed appletv thing.

The playstate sent from the appleTv is missing the title, amongst a couple of other aspects.

Below seems to be same problem.

https://github.com/postlund/pyatv/issues/1863


Sent from my iPad using Tapatalk

Posted on
Tue Jan 03, 2023 7:58 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Python3 AppleTV indigo Plugin

Yeah that looks like the same issue. No big deal.

Posted on
Tue Jan 17, 2023 11:56 pm
ukie offline
Posts: 69
Joined: Oct 15, 2010

Re: New Python3 AppleTV indigo Plugin

I also have issue with power state updating after my aTV4K (1st gen) goes to sleep.
When I trigger the OFF command from indigo (while the SecuritySpy app is running on the ATV), the ATV goes to sleep, but the device status in indigo remains ON.

Who is online

Users browsing this forum: No registered users and 3 guests