diff --git a/main.lua b/main.lua index 578de3e..18abe65 100644 --- a/main.lua +++ b/main.lua @@ -175,6 +175,7 @@ function normalOperation() if (startTelnetServer ~= nil) then startTelnetServer() else + displayTime() print("NO Telent found") end setupCounter=setupCounter-1 diff --git a/mqtt.lua b/mqtt.lua index 3d45af7..c2141b8 100644 --- a/mqtt.lua +++ b/mqtt.lua @@ -9,7 +9,7 @@ function handleSingleCommand(client, topic, data) elseif (data == "OFF") then briPercent=0 m:publish(mqttPrefix .. "/clock", "OFF", 0, 0) - elseif (data:sub(1,1) == "#" and data:len() == 7) then + elseif ((data:sub(1,1) == "#" and data:len() == 7) or (string.match(data, "%d+,%d+,%d+"))) then red = tonumber(data:sub(2,3), 16) green = tonumber(data:sub(4,5), 16) blue = tonumber(data:sub(6,7), 16)