Publish changed in the State of the Digital IN or OUT to a MQTT Broker. Please us it with the rigger "sdk-startup" /* desc: this script will publish router canges of the Digital in or Out * to a mqtt Broker. * * for details about status infos check api documentation about nb_status(); * copyright (c) 2020 netmodule ag, switzerlan */ host = "mz.mqttbroker.io"; port = 1883; username = "test"; password = "test"; topic = "switch/location/"; /* qos values */ /* 0 = publish at most one (fire & forget) */ /* 1 = publish at least once */ /* 2 = publish exactly once */ qos = 0; /* retain values */ /* 0 = the message will not be stored */ /* 1 = the message will be stored and sent to a new subscriber of that topic */ retain = 0; message = ""; uinterval=500; lst=nb_status("dio"); while (true) { st=nb_status("dio"); st_fields=struct_fields(st); // only update last field if we had a diff st_diff=false; for (i=0;i