13.02.2017, 16:53
Hello,
Does anybody have a script to control LG smart TV over IP?
Does anybody have a script to control LG smart TV over IP?
LG smart TV
|
13.02.2017, 16:53
Hello,
Does anybody have a script to control LG smart TV over IP?
26.12.2017, 18:47
(13.02.2017, 16:53)Desislav Wrote: Hello, Hello, Yes is it possible to change this python script to lua ? see : https://github.com/ubaransel/lgcommander This is a script to control a LG smart TV.
14.05.2018, 09:49
Hi,
anybody was try to control from LUA ?
14.05.2018, 10:01
Here is websocket script. I've tried, but something did wrong. If anyone could use it and make LG TV control, it would be great.
https://forum.logicmachine.net/showthrea...=websocket
13.07.2020, 17:54
(This post was last modified: 13.07.2020, 17:55 by ro_ki@tut.by.)
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", "")
31.10.2020, 13:02
thanks a lot!! for your contribution, it works perfect on my system
05.11.2020, 18:55
Hi,
what it could be? See such errors in log: * arg: 1 * string: Connection close result: * arg: 2 * bool: true * arg: 3 * number: 1000 * arg: 4 * string: * string: {"type":"error","id":"4102853981","error":"401 insufficient permissions (not registered)","payload":{}} * string: Connection timeout Alex
Finally all is OK. When I tried send command (from other room) TV showed info should we accept new connection? (This active some seconds..). Just today found out this
![]() ![]() A little instruction how to start TV work with LM (Thanks to Jose_dli user): You have to create 3 things, the first is the object type "250 byte string" without any value stored in it. It is for store the handshake/key in the first connection, in my system '32/7/0' Second load in Scripting-->User libraries-->add new library the one that you can find in https://forum.logicmachine.net/showthrea...=websocket. before load library rename it from websocket.lua to websocket_client_sync.lua And third, copy-paste script "lgtv.lua" at the end of Scripting-->common functions I execute lg_execute_command("192.168.0.20", '32/7/0', "", "request", "ssap://system/turnOff, "") instead of lg_execute_command(LGTV65_IP, LGTV65_KEY, "", "request", "ssap://system/turnOff", "")
22.03.2021, 09:23
(06.11.2020, 21:29)AlexLV Wrote: Finally all is OK. When I tried send command (from other room) TV showed info should we accept new connection? (This active some seconds..). Just today found out this this link didn't work: https://forum.logicmachine.net/showthrea...=websocket. could you post a working link or the LUA user script for the websoket @ admin regards,
Best Regards,
22.03.2021, 09:24
Correct link: https://forum.logicmachine.net/showthread.php?tid=1294
(13.07.2020, 17:54)ro_ki@tut.by Wrote: Attached you can find the library to control LG TV with Web OS. 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,
22.03.2021, 12:17
You need to encode the payload using JSON:
Code: payload = json.encode({ message = "hello" })
22.03.2021, 12:26
(22.03.2021, 12:17)admin Wrote: You need to encode the payload using JSON: great thanks Admin
Best Regards,
02.06.2021, 19:33
Thank you!!! Everything works!!!
21.06.2021, 17:24
Hello again!
Is there a way to turn TV on?? I believe TV keeps LAN connection open, because Android application can turn it on. Regards, Alex
22.06.2021, 04:53
You can try sending Wake on LAN packet to it. See this: https://forum.logicmachine.net/showthread.php?tid=849
Some additional settings on the TV side might be required: https://lgcommunity.us.com/discussion/89...ake-on-lan
23.06.2021, 16:29
Thank you!!
27.06.2021, 15:23
Best Regards,
28.06.2021, 06:37
Yes this is for LG TVs. It's not guaranteed to work for all models though.
(28.06.2021, 06:37)admin Wrote: Yes this is for LG TVs. It's not guaranteed to work for all models though. thank you, admin Is there a way to know which modules are supported? I have this setting on my tv https://lgcommunity.us.com/discussion/89...ake-on-lan ,so does this mean it's supported?
Best Regards,
|
« Next Oldest | Next Newest »
|