Cathwyler/MagicRemoteService

[solved] Overlay mode: no automatic start + no automatic stop of the service on TV

Closed this issue ยท 13 comments

Hi
further tests with the overlay mode i have experienced two problems:

  1. after shutting down the PC and TV the App is not started automatically on the TV the next time it is turned on. i had to "install on TV" again from the Windows Application. It was probably still installed on the TV just didn't start when powering on

  2. what's worse is that the TV-App didn't "stop": After shutting down the PC i switched to another HDMI channel. Suddenly i got a grey message box informing me that the MagicRemoteService on PC could not be reached and asked whether i wanted to "start" the PC again. There was no other option but to press "start". When that failed i got another message box that the PC/MagicRemote service was unreachable. The problem: this message box was not dismissable. it stayed on screen... i had to turn of the TV to get rid of it.

all of this did not happen with the previous (non-overlay) version of MagicRemoteService

for testing purposes can you tell me the CLI commands to start/stop the App on TV manually?
that would be a temporary workaround because currently i cannot really use it

thanks!

In this overlay mode after a webOS restart you can launch the app from your web app list on the TV.
Once it's launched the app should automaticaly start and stop with the linked HDMI native input but you have to manualy launch it once after a webOS restart.
Unfortunatly there is actually no official way to autostart an app on webOS TV. There is probably a workaround espacially with rooted TV.

If you want to quit the overlay you can perform a long press on the back button. That will force it to close. I will probably add an HMI to manage or quit the overlay or udpate the dialog process with a quit button.

Regards

first of all thanks for the reply

i will check out your suggestions asap

about root and auto-start: the appID is org.cathwyler.magicremoteservice?
then i could luna-send -f -n 1 luna://org.cathwyler.magicremoteservice/start '{}' (and 'stop' respectively) and create a bash script with it

also , thanks for considering to implement a "close" button for the error message that would be helpful ๐Ÿ‘

In your situation the best way is to launch the send service with a bash script.

luna-send -f -n 1 luna://com.cathwyler.magicremoteservice.hdmi1.send/close '{}'
luna-send -f -n 1 luna://com.cathwyler.magicremoteservice.hdmi2.send/close '{}'
luna-send -f -n 1 luna://com.cathwyler.magicremoteservice.hdmi3.send/close '{}'
luna-send -f -n 1 luna://com.cathwyler.magicremoteservice.hdmi4.send/close '{}'

This webOS service is responsible of lauching the overlay when the HDMI input get the video pipe.

awesome thanks but will this command start or stop the app?
just wondering because of the
/close

It will start the magic remote service embded webOS service.
This is a close register event method but you are not listening to it. The goal is to start the embded service.

If it's not working you can try a launch app.

luna-send -f -n 1 luna://com.webos.applicationManager/launch '{ "id": "com.cathwyler.magicremoteservice.hdmi1" }'
luna-send -f -n 1 luna://com.webos.applicationManager/launch '{ "id": "com.cathwyler.magicremoteservice.hdmi2" }'
luna-send -f -n 1 luna://com.webos.applicationManager/launch '{ "id": "com.cathwyler.magicremoteservice.hdmi3" }'
luna-send -f -n 1 luna://com.webos.applicationManager/launch '{ "id": "com.cathwyler.magicremoteservice.hdmi4" }'

ok thanks for the clarification. will check it out once i'm home

and is there a similar command to close/stop the app/service?

yeah mine is rooted. so something like this could work:

luna-send -n 1 luna://com.webos.service.applicationManager/closeByAppId '{ "id": "com.cathwyler.magicremoteservice.hdmi1" }'

starting the app manually from the TV works
quitting/dismissing the error message via longpressing back button when the PC is turned off works as well.

thanks for the clarification. will check tonight if shell scripts like the ones mentioned above work as well

I didnt had time to update the readme with this new feature.

There is two bug left with this overlay option :

  • Service is not running after a webOS restart.
    There for sure a solution with rooted TV but idk if it will be possible with a non rooted one.
  • ScreenSaver is not starting when the PC is not connected
    I'm now thinking to add a quit button or an auto close after x min.

That's why i posted it with an "experimental" status

quick follow-up

running from rooted webOS via ssh shell

this did not work for me:
luna-send -f -n 1 luna://com.cathwyler.magicremoteservice.hdmi1.send/close '{}'

these work just fine:
luna-send -f -n 1 luna://com.webos.applicationManager/launch '{ "id": "com.cathwyler.magicremoteservice.hdmi1" }'
luna-send -n 1 luna://com.webos.service.applicationManager/closeByAppId '{ "id": "com.cathwyler.magicremoteservice.hdmi1" }'

created a shell script that i can call via HomeAssistant. couldn't be happier. thanks again for your awesome work

if i want to change the HDMI channel i just reinstall the app from PC to TV and select a different HDMI, correct?

Yep.

But you need to uninstall the old webapp on the TV... and update your ssh cmd

Regards