Skip to content

Add MENU_PICK command support#67

Open
henrikwidlund wants to merge 2 commits intounfoldedcircle:mainfrom
henrikwidlund:feature/menu_pick
Open

Add MENU_PICK command support#67
henrikwidlund wants to merge 2 commits intounfoldedcircle:mainfrom
henrikwidlund:feature/menu_pick

Conversation

@henrikwidlund
Copy link
Copy Markdown
Contributor

Same as CONSUMER_MENU_PICK in Bluetooth.

Depending on context:

  • Exit screensaver command
  • Play command
  • OK command

Same as CONSUMER_MENU_PICK in Bluetooth. Depending on context:
- Exit screensaver command
- Play command
- OK command
@zehnm zehnm self-requested a review October 28, 2025 21:10
Copy link
Copy Markdown
Contributor

@zehnm zehnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds very promising!
The current used remote_control.select() function has some weird behaviour. I'll test it within the next few days.

@henrikwidlund
Copy link
Copy Markdown
Contributor Author

Do you think we should use this command as the default Play/pause command instead if it works as intended?

Copy link
Copy Markdown
Contributor

@zehnm zehnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MENU_PICK command is missing in the media player options list.
I'll try to add it if I have modify rights for your PR.

The command works, but it doesn't exit the screensaver on tvOS 26.1. It only shows the current time within the screensaver.
I'll have to do some more testing, if it makes sense to remap the default commands.

Comment thread intg-appletv/driver.py
Copy link
Copy Markdown
Contributor

@zehnm zehnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the command to the simple command list. Now it's available in the web-configurator.

@zehnm
Copy link
Copy Markdown
Contributor

zehnm commented Nov 21, 2025

I have the impression that the new tvOS 26 changed things for the worse when the screensaver is active. Only the back key seems to work, which brings up the new account selection screen (but not always, sometimes the home screen is shown). Some commands now even time out when the screensaver is active.
Maybe this only happens with multiple accounts and the new account selection screen?

There's more testing required, and hopefully there is some "dpad enter" command that works the same as the original ATV remote to get a consistent behaviour.
Otherwise, _playpause_in_screensaver has to be enhanced for other commands too, like cursor_enter, menu, etc.

@henrikwidlund do you have other ideas?

@henrikwidlund
Copy link
Copy Markdown
Contributor Author

I've also noticed that with the screensaver and account picking, quite annoying. To me the safest way would probably be to call something similar to _playpause_in_screensaver whenever a button is pressed. Maybe it would be enough to send a back command if the screensaver is active. I don't know what kind of overhead that would add though.

@zehnm
Copy link
Copy Markdown
Contributor

zehnm commented Nov 21, 2025

This is getting interesting: found some old comments in the code that the screensaver state is no longer accessible with tvOS >= 18.4.
Testing with 26.1 while the screensaver is active, the _atv.apps.main_instance.api.fetch_attention_state() call returns SystemStatus.Awake and not Screensaver :-(

@henrikwidlund
Copy link
Copy Markdown
Contributor Author

henrikwidlund commented Nov 21, 2025

Damn, that sucks :( I wonder if they just don't send that info, or if the library used by this integration needs updating.

Edit: Nothing in the postlund repo about it, but it also hasn't been very active since 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants