Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Listening to music - To be able to set "screen off", "screen on" or otherwise toggle display panel on/off #71

Closed
old-square-eyes opened this issue Jun 12, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@old-square-eyes
Copy link

Describe the solution you'd like
To be able to set "screen off", "screen on" or otherwise toggle.

This is a setting in my quick settings menu for turning off the panel (but not the TV), for example when you are listening to music.

I have this setting on my 65PUT6703 GUI

@old-square-eyes old-square-eyes added the enhancement New feature or request label Jun 12, 2020
@eslavnov
Copy link
Owner

I've actually looked into this functionality some time ago: I also have this option in the menu, but I was unable to make it work through the API, unfortunately.

If somebody manages to make it work, please share your solution!

@begner
Copy link

begner commented Jan 16, 2021

"unable to make it work" - same here.
Also decompiled the settings app and digged depper into this functionality...
Its the action "org.droidtv.settings.GREEN_MUTE" (ScreenOffService) - but i cant manage to start ist from adb-shell as well

It should be possible - but i didnt find the trick :D

@begner
Copy link

begner commented Jan 17, 2021

ok - finally understand the settings apk from philips...

So - in one call - you can execute screen mute with:

adb shell "am start -n org.droidtv.settings/.setupmenu.SetupMenuActivity --es LAUNCH screen_off && input keyevent 23"

this will launch the Settings Menu, directly jumps to the „screen_off“ context, and then press „ok“.

note: the context you need to launch is the one we get from "menuitems/settings/current".

so - for example - if you want to open the "audio output format" settings node simply launch:

`adb shell "am start -n org.droidtv.settings/.setupmenu.SetupMenuActivity --es LAUNCH digital_output_format'

maybe this helps

@eslavnov
Copy link
Owner

Hi @begner, thanks for sharing, this is great news! Based on your adb commands here is how to do it with Pylips:

python3 pylips.py --command launch_app --body '{ "intent": { "extras": { "LAUNCH": "screen_off" }, "action": "Intent {}", "component": { "packageName": "org.droidtv.settings", "className": "org.droidtv.settings.setupmenu.SetupMenuActivity" } } }'

python3 pylips.py --command confirm

@elupus
Copy link
Contributor

elupus commented Feb 21, 2021

There is also a screenstate endpoint.

@begner
Copy link

begner commented Feb 25, 2021

There is also a screenstate endpoint.

can you give an example how to use it?

@nullEuro
Copy link

nullEuro commented Mar 29, 2023

Screenstate can be used like this:

python3 pylips.py --command post --path screenstate --body '{"screenstate":"Off"}'

Works on my TV and turns off the screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants