12-27-2022, 02:13 AM
If you want to take the initiative to inquire by every seconds, you can send MQTT query command:
command_topic: ‘COLB/xxxxxxxxxxxxxxxxxxxxxxxx/set’
payload={State=D_FF} read all digital input sensor data
feedback:
{“D1”:{“on”:0},”D2″:{“on”:0},”D3″:{“on”:0},”D4″:{“on”:0},”D5″:{“on”:0},”D6″:{“on”:0},”D7″:{“on”:0},”D8″:{“on”:0},”D9″:{“on”:0},”D10″:{“on”:0},”D11″:{“on”:0},”D12″:{“on”:0},”D13″:{“on”:0},”D14″:{“on”:0},”D15″:{“on”:0},”D16″:{“on”:0}}
payload={State=A_FF} read all analog input sensor data
feedback:
{“A1”:{“value”:0.0},”A2″:{“value”:0.0},”A3″:{“value”:0.0},”A4″:{“value”:0.0},”A5″:{“value”:0.0},”A6″:{“value”:0.0},”A7″:{“value”:0.0},”A8″:{“value”:0.0},”A9″:{“value”:0.0},”A10″:{“value”:0.0},”A11″:{“value”:0.0},”A12″:{“value”:0.0},”A13″:{“value”:0.0},”A14″:{“value”:0.0},”A15″:{“value”:0.0},”A16″:{“value”:0.0}}
payload={State=T_FF} read all DS18B20 temperature sensor data
feedback:
{“T1”:{“value”:22.93},”T2″:{“value”:22.25},”T3″:{“value”:22.31},”T4″:{“value”:22.93},”T5″:{“value”:22.18}}
———–Enable/Disable Auto Report Function—————
payload={Auto_upload=1} Enable auto report function
feedback: {“upload”:{”ON”,1}}
payload={Auto_upload=0} Disable auto report function
feedback: {“upload”:{”ON”,0}}
command_topic: ‘COLB/xxxxxxxxxxxxxxxxxxxxxxxx/set’
payload={State=D_FF} read all digital input sensor data
feedback:
{“D1”:{“on”:0},”D2″:{“on”:0},”D3″:{“on”:0},”D4″:{“on”:0},”D5″:{“on”:0},”D6″:{“on”:0},”D7″:{“on”:0},”D8″:{“on”:0},”D9″:{“on”:0},”D10″:{“on”:0},”D11″:{“on”:0},”D12″:{“on”:0},”D13″:{“on”:0},”D14″:{“on”:0},”D15″:{“on”:0},”D16″:{“on”:0}}
payload={State=A_FF} read all analog input sensor data
feedback:
{“A1”:{“value”:0.0},”A2″:{“value”:0.0},”A3″:{“value”:0.0},”A4″:{“value”:0.0},”A5″:{“value”:0.0},”A6″:{“value”:0.0},”A7″:{“value”:0.0},”A8″:{“value”:0.0},”A9″:{“value”:0.0},”A10″:{“value”:0.0},”A11″:{“value”:0.0},”A12″:{“value”:0.0},”A13″:{“value”:0.0},”A14″:{“value”:0.0},”A15″:{“value”:0.0},”A16″:{“value”:0.0}}
payload={State=T_FF} read all DS18B20 temperature sensor data
feedback:
{“T1”:{“value”:22.93},”T2″:{“value”:22.25},”T3″:{“value”:22.31},”T4″:{“value”:22.93},”T5″:{“value”:22.18}}
———–Enable/Disable Auto Report Function—————
payload={Auto_upload=1} Enable auto report function
feedback: {“upload”:{”ON”,1}}
payload={Auto_upload=0} Disable auto report function
feedback: {“upload”:{”ON”,0}}