...
Tip |
---|
doc_tap_packetparser_scripts_link; |
Info |
---|
Definition of error states from scriptsService attributes and actionsScripts and auxiliary variables on the moduleScripts and helper variables on the deviceSee more info on [Modbus documentation page](https://taphome.com/support/15597569). doc_tap_packetparser_moreinfo; |
...
Code Block |
---|
MQTTPUBLISH(“shellies/deviceid/relay/0/command”, “off”) |
Listener script
doc_tap_pp_listener_script_description;
doc_tap_pp_listener_script_improvements_heading;
doc_tap_pp_listener_script_instead_of;
Code Block |
---|
VAR jsonResponse := TOSTRING(RECEIVEDBYTES);
if parsejson(jsonResponse, "Topic") = "my-topic"
Va := todouble(parsejson(jsonResponse, "Payload"));
end |
doc_tap_pp_listener_script_new_way;
Code Block |
---|
if RECEIVEDMSG.TOPIC = "my-topic"
Va := todouble(TOSTRING(RECEIVEDMSG.PAYLOAD));
end |
doc_tap_pp_listener_script_new_way_description;
doc_tap_pp_listener_script_packet_analysis_heading;
doc_tap_pp_listener_script_packet_analysis_description;