You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Besides a stray character at line 290 and problems with the payload and socket code, I get this:
/usr/bin/lua: /opt/GIT/LUA-hue2mqtt/hue2mqtt.lua:112: attempt to index global 'storage' (a nil value)
stack traceback:
/opt/GIT/LUA-hue2mqtt/hue2mqtt.lua:112: in main chunk
[C]: ?
I've added to the top :
package.path = "/usr/local/share/lua/5.1/?.lua;" .. package.path
package.cpath = "/usr/local/lib/lua/5.1/?.so;" .. package.cpath
local socket = require('socket')
But no success.. (everything is installed right. This code works on my install (Ubuntu 22.04.5):
local socket = require("socket")
print("Socket module loaded: ", socket)
-- Example of using socket to create a TCP connection
local tcp = socket.tcp()
tcp:settimeout(5)
local success, err = tcp:connect("example.com", 80)
if success then
print("Connected successfully")
else
print("Connection failed: ", err)
end
The text was updated successfully, but these errors were encountered:
Besides a stray character at line 290 and problems with the payload and socket code, I get this:
/usr/bin/lua: /opt/GIT/LUA-hue2mqtt/hue2mqtt.lua:112: attempt to index global 'storage' (a nil value)
stack traceback:
/opt/GIT/LUA-hue2mqtt/hue2mqtt.lua:112: in main chunk
[C]: ?
I've added to the top :
package.path = "/usr/local/share/lua/5.1/?.lua;" .. package.path
package.cpath = "/usr/local/lib/lua/5.1/?.so;" .. package.cpath
local socket = require('socket')
But no success.. (everything is installed right. This code works on my install (Ubuntu 22.04.5):
local socket = require("socket")
print("Socket module loaded: ", socket)
-- Example of using socket to create a TCP connection
local tcp = socket.tcp()
tcp:settimeout(5)
local success, err = tcp:connect("example.com", 80)
if success then
print("Connected successfully")
else
print("Connection failed: ", err)
end
The text was updated successfully, but these errors were encountered: