LUA Problems since 2023.1
Posted: Monday 06 March 2023 16:52
I am having problems getting a LUA script to work since upgrading to 2023.1, which works fine on previous releases.
The code accesses a LightwaveRF Link controller with an IP 198.168.1.127 but it does not change state (eg switch lights on/off) when issued with the (extracted) LUA code below;
The log output below shows no errors and with the correct command being sent. I have added 192.168.1.127 to my "Local Network" under security and also tried "Allow Basic Authentication over plain HTTP", nothing has worked though. Any suggestions please? (BTW I have rolled back to 2022.2 and it works, its just something to do with 2023.1?).
2023-03-06 15:40:13.075 Status: LUA: Command sent to 192.168.1.127 is 284,\!R8D3F0
The code accesses a LightwaveRF Link controller with an IP 198.168.1.127 but it does not change state (eg switch lights on/off) when issued with the (extracted) LUA code below;
Code: Select all
--send complete command to LightwaveRF Link
UDPSend(IPaddress,LWCmd)
print ( "Command sent to " .. IPaddress .. " is " .. LWCmd)
function UDPSend(ip, message)
local port = 9760
udpcall = "echo -n " .. message .. "| nc -4u -w1 " .. ip .. " " .. port .. " &"
os.execute(udpcall)
return
2023-03-06 15:40:13.075 Status: LUA: Command sent to 192.168.1.127 is 284,\!R8D3F0