23.02.2024, 11:21
(23.02.2024, 11:16)Joep Wrote:(23.02.2024, 11:00)j.martinez@t-ingeniamos.com Wrote: Hi there,
I am in the same situation as Joep.
websocket library working and comunicating with Samsung IP, but each time i send a KEY command the TV send us a new Token string and ask us to confirm the device.
Anyone have improved this?
And the wol packet i tried several scripts to switch ON the TV without success.... any idea about?
Here's a working WOL script. I just tested with my Samsung tv and it works. Also for my pc and i believe many other devices.
Code:function wol(mac)
local m = ''
for w in string.gmatch(mac, "[0-9A-Za-z][0-9A-Za-z]") do
m = m .. string.char(tonumber(w, 16))
end
local udp = require("socket").udp()
udp:settimeout(1)
udp:setoption("broadcast", true)
udp:sendto(string.char(0xff):rep(6) .. m:rep(16) , '255.255.255.255', 9)
end
wol('60:2D:BE:C3:4A:BC') -- MAC address of your device
Thank you very much Joep. I will try it later.