(13.07.2020, 17:54)ro_ki@tut.by Wrote: Attached you can find the library to control LG TV with Web OS.
It uses Lua websocket library from here https://github.com/lipp/lua-websockets. Websocket library is also available in this forum.
Just change the name of the library to yours in the coding ('user.websocket_client_sync')
It was inspired by Node.JS module https://github.com/hobbyquaker/lgtv2, you can also find a list of commands and configuration instructions there.
Coding is published as is , errors are possible
The following command will turn Off the LG TV . 2 constants below are the IP address of the LG TV and the KNX group address to store the handshake key.
Code:lg_execute_command(LGTV65_IP, LGTV65_KEY, "", "request", "ssap://system/turnOff", "")
how to set the payload commands
like If I want to change the volume or send a notification:
Like this one from GitHub
request('ssap://system.notifications/createToast', {message: 'Hello World!'});
Best Regards,