22.06.2022, 09:27
Add logging to ON_MESSAGE to check that you are getting the data. Also do a full script restart the script via disable/enable.
Code:
mclient.ON_MESSAGE = function(mid, topic, payload)
local addr = mqtt_to_object[ topic ]
log('message', topic, payload, addr)
if addr then
local fn = mqtt_to_object_conv[ topic ]
if fn then
payload = fn(payload)
end
log('write', addr, payload)
grp.write(addr, payload)
end
end