More debug messages when receiving a temperature
This commit is contained in:
parent
e978e44063
commit
0bc446fc2a
11
mqtt.lua
11
mqtt.lua
@ -117,10 +117,11 @@ function registerMqtt()
|
|||||||
print(data)
|
print(data)
|
||||||
if (topic == (mqttPrefix .. "/cmd/single")) then
|
if (topic == (mqttPrefix .. "/cmd/single")) then
|
||||||
handleSingleCommand(client, topic, data)
|
handleSingleCommand(client, topic, data)
|
||||||
elseif (topic == (mqttPrefix .. "/cmd/temp")) then
|
elseif (topic == (mqttPrefix .. "/cmd/temp")) then
|
||||||
if ( data == "" ) then
|
if (( data == "" ) or (data == nil)) then
|
||||||
tw=nil
|
tw=nil
|
||||||
tcol=nil
|
tcol=nil
|
||||||
|
print("MQTT | wordclock failed")
|
||||||
else
|
else
|
||||||
-- generate the temperatur to display, once as it will not change
|
-- generate the temperatur to display, once as it will not change
|
||||||
local dispTemp = tonumber(data)
|
local dispTemp = tonumber(data)
|
||||||
@ -129,10 +130,10 @@ function registerMqtt()
|
|||||||
if (wc ~= nil) then
|
if (wc ~= nil) then
|
||||||
tw, tcol = wc.temp(dw, rgbBuffer, invertRows)
|
tw, tcol = wc.temp(dw, rgbBuffer, invertRows)
|
||||||
wc = nil
|
wc = nil
|
||||||
|
print("MQTT | generated words for: " + tostring(dispTemp))
|
||||||
else
|
else
|
||||||
print("MQTT | wordclock failed")
|
print("MQTT | wordclock failed")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- Handle here the /cmd/# sublevel
|
-- Handle here the /cmd/# sublevel
|
||||||
|
Loading…
Reference in New Issue
Block a user