24.06.2022, 10:21
(22.06.2022, 09:27)admin Wrote: Add logging to ON_MESSAGE to check that you are getting the data. Also do a full script restart the script via disable/enable.nothing different is logged..
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
Code:
* arg: 1
* string: mqtt connect status
* arg: 2
* bool: true
* arg: 3
* number: 0
* arg: 4
* string: connection accepted
* arg: 5
* number: 0
* arg: 6
* nil