Cathwyler / MagicRemoteService

Use your LG Magic Remote as a Windows mouse and control your PC with the LG Magic Remote from your LG WebOS TV
GNU General Public License v3.0
48 stars 2 forks source link

Automatic start solution #31

Open dellas60 opened 3 months ago

dellas60 commented 3 months ago

Can you use this https://github.com/JPersson77/LGTVCompanion for create a script in windows to auto start app in overlay mode? thanks.

Cathwyler commented 3 months ago

With the latest release the overlay should now start automatically after a TV reboot and if your TV is starting on the HDMI input but with a 10s-30s delay. If it's not properly starting can you send a screenshoot of your TV version ? Sans titre

dellas60 commented 3 months ago
Capture d'écran 2024-03-30 214243
Cathwyler commented 3 months ago

The overlay should already start and stop automatically depending on the selected video input even after a TV reboot. I fixed several bugs recently that concerned version 4.x of webOS on the service. I now need to confirm if the API used by the service works or not on webOS 4.x

Can you please try these CLI commands lines in a Windows prompt and send me back the returned JSON text?

ares-novacom -d YOURTVNAME -r "luna-send-pub -n 1 'luna://com.webos.service.videooutput/getStatus' '{}'"

ares-novacom -d YOURTVNAME -r "luna-send-pub -n 1 'luna://com.webos.service.avoutput/video/getStatus' '{}'"

dellas60 commented 3 months ago
Capture d'écran 2024-04-01 144410 Capture d'écran 2024-04-01 144613jj
Cathwyler commented 3 months ago

Maybe they are under palm group. Can you try again with palm instead of webos?

ares-novacom -d TV2 -r "luna-send-pub -n 1 'luna://com.palm.service.videooutput/getStatus' '{}'"

ares-novacom -d TV2 -r "luna-send-pub -n 1 'luna://com.palm.service.avoutput/video/getStatus' '{}'"

Cathwyler commented 3 months ago

Can you take a look at the latest release ? I changed the way the service get the foreground app. He is now using ssap. You need to accept the external device the first time you launch the app. Can you test if the app is closing and starting when you switch to another app and come back to hdmi? Can you test if the app is strating after reboot if the hdmi is selected ?

dellas60 commented 3 months ago

I'm going to test it today when I get home thank you for your efforts.

dellas60 commented 3 months ago

Can you take a look at the latest release ? I changed the way the service get the foreground app. He is now using ssap. You need to accept the external device the first time you launch the app. Can you test if the app is closing and starting when you switch to another app and come back to hdmi? Can you test if the app is strating after reboot if the hdmi is selected ?

First there is no prompt to accept external device second the app is not start when close app or reboot

Cathwyler commented 3 months ago

To be sure, can you confirm you reinstalled the TV app with the new version before testing it ?

dellas60 commented 3 months ago

To be sure, can you confirm you reinstalled the TV app with the new version before testing it ?

Yes, I removed the previous app from the TV and installed the new one from version 1.2.4.8.

Cathwyler commented 2 months ago

I fixed one bug that can explain why you don't have any external prompt.

Can you give a new try with the latest. If it's not working again, can you use this debug version and send me the inspector log.

Btw you need to reinstall TV app each time you update the exe but it seems your are already doing it well.

dellas60 commented 2 months ago

I fixed one bug that can explain why you don't have any external prompt.

Can you give a new try with the latest. If it's not working again, can you use this debug version and send me the inspector log.

Btw you need to reinstall TV app each time you update the exe but it seems your are already doing it well.

Can you show me how to get the inspector log

Cathwyler commented 2 months ago

Click on Inspect button in TV tab in the PC app. A web browser should open. The access to log depend of webOS version. on 3.x (emulator) Sans titre

on 6.x (real TV) Sans titre

The 4.x (emulator) inspector is buggy. i have a blank page. I hope it's not the same with real TV.

dellas60 commented 2 months ago

photo_2024-04-10_19-49-46 I GET THIS ERROR IN 1.2.4.9

dellas60 commented 2 months ago

i have a blank page

Same i have a blank page and error message failed to close

Cathwyler commented 2 months ago

That's so strange i had the same error message as you with the emulator while doing the screenshot. I just get it for the first time and i'm not able to reproduce it. Do this message appear every time your reinstall the TV app? or once you restart the TV? Do this message hapen only with the release version or the debug one ?

I think the webOS inspector is buggy with the 4.x. I will add a better solution to get the log message.

dellas60 commented 2 months ago

Do this message appear every time your reinstall the TV app? YES or once you restart the TV? YES

Do this message happen only with the release version or the debug one ? release version and debug one

Cathwyler commented 2 months ago

Can you test this two html file. SsapTest.zip

Open on your PC and enter your TV Ip Adress then run it. You should have a prompt on your TV to accept an external device. Then you should see something like that Sans titre

This test will give me a good information on what to debug next.

dellas60 commented 2 months ago

After enter ip adress and click run nothing happen,version 1.2.4.7 WORKS PERFECT WITHOUT AUTORUN, AND RUN MANUALLY THIS IS NOT A PROBLEM FOR ME IF YOU CANNOT FIX THIS PROBLEM THERE IS NO PROBLEM YOU MAKE A GREAT TOOL THANK YOU

dellas60 commented 2 months ago

CAN YOU WORK WITH AUTO ACTIVATION KEYBOARD WHEN FOCUSING IN TEXT AREA