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