klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
518 stars 99 forks source link

Start browser in full screen mode #64

Closed RiaanLab closed 3 years ago

RiaanLab commented 4 years ago

Hi.

I would like to start the browser in fullscreen mode. This https://github.com/hobbyquaker/lgtv2/issues/23#issuecomment-450331073 defines how to do it but I am not sure how to pass the similar command in LGWebOSRemote. Any pointers in the right direction will be appreciated.

Thanks :-)

DarkCeptor44 commented 4 years ago

Looks like commands are defined on LGTV/remote.py starting at line 157.

I'm not too familiar with it but maybe this method works:

remote.py:

def openBrowserFullscreen(self, callback=None):
        payload = "move\ndx:11\ndy:-8\ndown:0\n\n"
        for i in range(22):
                self.__send_command("request", "ssap://com.webos.service.networkinput/getPointerInputSocket", payload, callback)
        self.__send_command("request", "ssap://com.webos.service.networkinput/getPointerInputSocket", "click", callback)
RiaanLab commented 4 years ago

@DarkCeptor44 Execellent :-) Thanks. I will give it a try.

RiaanLab commented 4 years ago

@DarkCeptor44 Hi,

I replaced the openBrowserFullScreen function but get this error:

Traceback (most recent call last): File "/usr/local/bin/lgtv", line 11, in load_entry_point('LGTV==0.2', 'console_scripts', 'lgtv')() File "/usr/local/lib/python3.6/dist-packages/LGTV-0.2-py3.6.egg/LGTV/init.py", line 160, in main AttributeError: 'KeyError' object has no attribute 'message' Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/LGTV-0.2-py3.6.egg/LGTV/init.py", line 156, in main File "/usr/local/lib/python3.6/dist-packages/LGTV-0.2-py3.6.egg/LGTV/init.py", line 46, in parseargs KeyError: 'openBrowserAt'

DarkCeptor44 commented 4 years ago

Make sure not to replace anything just add, then you should be able to use lgtv TVName openBrowserFullScreen.

RiaanLab commented 3 years ago

@DarkCeptor44 Thank you very much.

RiaanLab commented 3 years ago

@DarkCeptor44 Hi

The code did not work :-( Nonetheless thanks for trying.

If I get it right I will let you know.