Switch off automatic triggering after restart or deploy / Nach Neustart oder deploy das automatische triggern ausschalten

Google english...sorry:
Good day
Thank you for reading my question.
I have created a circuit that controls the relay board with MQTT bodies.
Now everything works the way I want it to.
The trigger nodes are only initialized / activated when I restart the computer or deploy the flow.
But I want to prevent that. The trigger nodes are only allowed to respond when the flow is working (MQTT input) and not only when restarting or deploying.
I hope someone can help me here ... think it should be easy to implement ... I hope so: slight_smile:
Thanks for the feedback!
Greetings Bigberg

Original:
Guten Tag
Vielen Dank fĂĽr das lesen meiner Frage.
Ich habe eine Schaltung erstellt, die mir das Relaisboard ansteuert mit MQTT-Bodys.
Nun funktioniert alles so wie ich es möchte.
Nur wenn ich den Rechner neustarte oder den Flow deploye werden die trigger nodes initialisiert/angesteuert.
Das möchte ich aber verhindern. Die trigger-nodes dürfen erst ansprechen wenn der Flow arbeitet (MQTT Eingang) und nicht nur bei einem Neustart oder bei einem deploy.
Ich hoffe mir kann hier jemand helfen...denke es sollte einfach sein umzusetzen...das hoffe ich zumindest :slight_smile:
Danke fĂĽr die RĂĽckmeldungen!
Gruss Bigberg

[{"id":"5a245aa1.510164","type":"tab","label":"Flow 1 MQTT mit Relayboard","disabled":false,"info":""},{"id":"efd394f2.220978","type":"mqtt-broker","z":"","name":"Xesar","broker":"192.168.188.134","port":"1883","tls":"f9959e18.f117b","clientid":"","usetls":true,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"f9959e18.f117b","type":"tls-config","z":"","name":"Xesar_MQTT_Zertifikate","cert":"","key":"","ca":"","certname":"mqtt.pem","keyname":"mqtt.key","caname":"ca.pem","servername":"","verifyservercert":false},{"id":"f38e3d8b.ffd58","type":"mqtt in","z":"5a245aa1.510164","name":"","topic":"xs3/#","qos":"2","datatype":"auto","broker":"efd394f2.220978","x":90,"y":60,"wires":[["22696c3a.96fdb4"]]},{"id":"4759a7de.9fce88","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_06_CH2","pin":"31","set":true,"level":"1","freq":"","out":"out","x":1250,"y":300,"wires":[]},{"id":"a4bfda21.2b7438","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_13_CH3","pin":"33","set":true,"level":"1","freq":"","out":"out","x":1250,"y":380,"wires":[]},{"id":"b860f0b7.55983","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":220,"wires":[["498d88c8.d4eda8"]]},{"id":"c6b2290d.e36ec8","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_16_CH4","pin":"36","set":true,"level":"1","freq":"","out":"out","x":1250,"y":460,"wires":[]},{"id":"22696c3a.96fdb4","type":"switch","z":"5a245aa1.510164","name":"nur spezifischer Wandleser","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"MQTT-WL-Test","vt":"str"}],"checkall":"true","repair":true,"outputs":1,"x":300,"y":120,"wires":[["59aa2d7b.888a24"]]},{"id":"59aa2d7b.888a24","type":"switch","z":"5a245aa1.510164","name":"nur wenn positiv geöffnet","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"NORMAL_OPENING","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":200,"wires":[["fb682623.cafaf8","d8267d70.46839","a4644664.837358","6ca8ec9.87da314","70e3d3d7.a50d2c","7798e1ae.f7137","860896b8.be9818","dcd95276.a01d3"]]},{"id":"b9527d85.68afe","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":300,"wires":[["4759a7de.9fce88"]]},{"id":"fb682623.cafaf8","type":"switch","z":"5a245aa1.510164","name":"Filter R02","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R02","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":300,"wires":[["b9527d85.68afe"]]},{"id":"b676f48.a09d508","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":380,"wires":[["a4bfda21.2b7438"]]},{"id":"d8267d70.46839","type":"switch","z":"5a245aa1.510164","name":"Filter R03","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R03","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":380,"wires":[["b676f48.a09d508"]]},{"id":"bdd3fe1d.b987b","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":460,"wires":[["c6b2290d.e36ec8"]]},{"id":"a4644664.837358","type":"switch","z":"5a245aa1.510164","name":"Filter R04","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R04","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":460,"wires":[["bdd3fe1d.b987b"]]},{"id":"3b3e1f6a.c0ce9","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_19_CH5","pin":"35","set":true,"level":"1","freq":"","out":"out","x":1250,"y":540,"wires":[]},{"id":"3b7b9349.07902c","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":540,"wires":[["3b3e1f6a.c0ce9"]]},{"id":"6ca8ec9.87da314","type":"switch","z":"5a245aa1.510164","name":"Filter R05","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R05","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":540,"wires":[["3b7b9349.07902c"]]},{"id":"a9d0d7ee.2e3f38","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_20_CH6","pin":"38","set":true,"level":"1","freq":"","out":"out","x":1250,"y":620,"wires":[]},{"id":"e107ae9c.5a388","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":620,"wires":[["a9d0d7ee.2e3f38"]]},{"id":"70e3d3d7.a50d2c","type":"switch","z":"5a245aa1.510164","name":"Filter R06","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R06","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":620,"wires":[["e107ae9c.5a388"]]},{"id":"b829f365.91b12","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_21_CH7","pin":"40","set":true,"level":"1","freq":"","out":"out","x":1250,"y":700,"wires":[]},{"id":"284411c1.f4665e","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":700,"wires":[["b829f365.91b12"]]},{"id":"7798e1ae.f7137","type":"switch","z":"5a245aa1.510164","name":"Filter R07","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R07","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":700,"wires":[["284411c1.f4665e"]]},{"id":"df0ab041.14a64","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_26_CH8","pin":"37","set":true,"level":"1","freq":"","out":"out","x":1250,"y":780,"wires":[]},{"id":"4732b9df.fa45d8","type":"trigger","z":"5a245aa1.510164","name":"","op1":"0","op2":"1","op1type":"str","op2type":"str","duration":"2","extend":false,"overrideDelay":true,"units":"s","reset":"1","bytopic":"all","topic":"topic","outputs":1,"x":910,"y":780,"wires":[["df0ab041.14a64"]]},{"id":"860896b8.be9818","type":"switch","z":"5a245aa1.510164","name":"Filter R08","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R08","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":780,"wires":[["4732b9df.fa45d8"]]},{"id":"669f5afb.b90864","type":"inject","z":"5a245aa1.510164","name":"Input CH8","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":840,"wires":[["4732b9df.fa45d8"]]},{"id":"bc3290b9.8e26c","type":"inject","z":"5a245aa1.510164","name":"Input CH7","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":780,"wires":[["284411c1.f4665e"]]},{"id":"99fe4487.0dc928","type":"inject","z":"5a245aa1.510164","name":"Input CH6","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":720,"wires":[["e107ae9c.5a388"]]},{"id":"66d2fe86.d59df","type":"inject","z":"5a245aa1.510164","name":"Input CH5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":660,"wires":[["3b7b9349.07902c"]]},{"id":"db202248.3eaf6","type":"inject","z":"5a245aa1.510164","name":"Input CH4","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":600,"wires":[["bdd3fe1d.b987b"]]},{"id":"737f199d.a7b818","type":"inject","z":"5a245aa1.510164","name":"Input CH3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":540,"wires":[["b676f48.a09d508"]]},{"id":"2213c915.773a16","type":"inject","z":"5a245aa1.510164","name":"Input CH2","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"0","payloadType":"msg","x":120,"y":480,"wires":[["b9527d85.68afe"]]},{"id":"83e871a5.852ab","type":"inject","z":"5a245aa1.510164","name":"Input CH1","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"1","payloadType":"msg","x":120,"y":420,"wires":[["b860f0b7.55983"]]},{"id":"ae6ad21f.740a1","type":"comment","z":"5a245aa1.510164","name":"manuelle Auslösdung","info":"","x":120,"y":360,"wires":[]},{"id":"498d88c8.d4eda8","type":"rpi-gpio out","z":"5a245aa1.510164","name":"Pin_05_CH1","pin":"29","set":true,"level":"1","freq":"","out":"out","x":1250,"y":220,"wires":[]},{"id":"dcd95276.a01d3","type":"switch","z":"5a245aa1.510164","name":"Filter R01","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"R01","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":660,"y":220,"wires":[["b860f0b7.55983","ac053472.f74368"]]},{"id":"ac053472.f74368","type":"debug","z":"5a245aa1.510164","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1250,"y":60,"wires":[]}]

msg object after the mqqt => for CH1 (GPIO 5)
{"topic":"xs3/1/ase/MediumEvents/0001","payload":"{\"id\":\"42da89bc-95da-4bf4-8f41-4ae0b5e1bcee\",\"entryIdentificator\":427,\"timestampComponentLocal\":\"2021-02-12T09:10:26\",\"timestampUtc\":\"2021-02-12T08:10:26\",\"eventType\":\"NORMAL_OPENING\",\"eventValue\":{\"mediumIdentifier\":18,\"accessId\":8,\"officeModeAllowed\":false,\"shopModeActivated\":false,\"fwUpdatePerformed\":false,\"deltablacklistUid\":0,\"doorOpening\":false,\"mediaUpgrade\":false},\"rawValue\":\"0012000800000000\",\"parameterMap\":{\"deltablacklistUid\":\"0\",\"mediaId\":\"18\",\"doorId\":\"8\"},\"identificationMediumId\":\"c89eeb68-4b9f-4642-88bb-4c35cebd7884\",\"installationPointId\":\"e7b34050-ac12-46de-af22-dccd2fad2acf\",\"installationPointName\":\"MQTT-WL-Test\",\"installationPointIdentifier\":\"MQTT-WL-Test\",\"zoneIds\":[\"964e26b7-9b7f-4746-a8d2-a1977e328d85\",\"093bd562-0339-45e0-8a0e-bb5d61982b85\",\"c7e09626-ed1c-4fe7-ad26-0b579177c6ed\"],\"accessId\":8,\"mediumIdentifier\":18,\"groupOfEvent\":\"MediumEvents\",\"identificationMediumLabel\":\"\",\"personId\":\"17e8150a-6de5-4f0d-bcad-ed451c70f372\",\"person\":\"MQTT_01, Nr_01 R01\",\"eventNumber...","qos":0,"retain":false,"_msgid":"7e2db86f.0bcaa8"}

msg object after the mqtt => for CH2 (GPIO 6)
{"topic":"xs3/1/ase/MediumEvents/0001","payload":"{\"id\":\"ed6658dd-cac1-4763-b775-6040b3852948\",\"entryIdentificator\":428,\"timestampComponentLocal\":\"2021-02-12T09:12:40\",\"timestampUtc\":\"2021-02-12T08:12:40\",\"eventType\":\"NORMAL_OPENING\",\"eventValue\":{\"mediumIdentifier\":19,\"accessId\":8,\"officeModeAllowed\":false,\"shopModeActivated\":false,\"fwUpdatePerformed\":false,\"deltablacklistUid\":0,\"doorOpening\":false,\"mediaUpgrade\":false},\"rawValue\":\"0013000800000000\",\"parameterMap\":{\"deltablacklistUid\":\"0\",\"mediaId\":\"19\",\"doorId\":\"8\"},\"identificationMediumId\":\"42cc7ee0-d907-4bd0-99f0-5c87f1c4549c\",\"installationPointId\":\"e7b34050-ac12-46de-af22-dccd2fad2acf\",\"installationPointName\":\"MQTT-WL-Test\",\"installationPointIdentifier\":\"MQTT-WL-Test\",\"zoneIds\":[\"964e26b7-9b7f-4746-a8d2-a1977e328d85\",\"093bd562-0339-45e0-8a0e-bb5d61982b85\",\"c7e09626-ed1c-4fe7-ad26-0b579177c6ed\"],\"accessId\":8,\"mediumIdentifier\":19,\"groupOfEvent\":\"MediumEvents\",\"identificationMediumLabel\":\"\",\"personId\":\"16eb3a41-a374-45ae-a97f-8fb9c04c492b\",\"person\":\"MQTT_02, Nr_02 R02\",\"eventNumber...","qos":0,"retain":false,"_msgid":"8c203e02.9a2c5"}

The first thing I ask is whether it is about the "MQTT-WL test".
Then whether it has a normal opening "NORMAL_OPENING" against.
and then whether there is a R01 to R08 in the string and if so the corresponding pin should be activated.

Not enough info please post your flow or a example of your flow showing the issue.

when posting a flow use the </> button and put the code between the backticks.

[edit]
If you do not want the triggers being started by the injects, then uncheck " Inject once after 2 seconds, then" in all the inject nodes.

Also what is your input topic like, can we see a couple of examples? and the payload. We may be able to get this down to one trigger block and gpio.

1 Like

I added the MQTT input in the topic

can i see the complete msg object after the mqqt in node?

Please paste between backticks
e.g.
```
paste code or debug
```

i hope i did it right

Not quit.

That is not the full mesage object, open debug node and select full message object from dropdown.

second i want to see what 2 different msg from the mqtt node, on for two different gpio nodes.

Third do you have any control over what is inj the mqtt payload?

Forth, the mqtt node can output a parsed json object so you could reference the items in the payload directly, at the moment you have the payload outputted as a string.

fifth, when using backticks make sure they are on their own line. This will compact the code and make things more readable, and easier to copy.

Thank you for your help......
...I tried to implement it.
and here are the remaining answers:

  • No, I have no control was in msg.payload.
  • parsed json object = unfortunately I don't know
  • I also hope that the backticks are set correctly

Look in the config for the MQTT In node, in the drop down select parsed json.

image

[Edit]

No, see post #4

Thank you Colin,
if I change this mqtt setting to "parsed json object", the flow no longer works but when initiating (restarting the computer) the "trigger nodes" are still activated.

Hier der Output nach der Einstellungsänderung für den CH1 (GPIO 5):
12.2.2021, 10:09:35node: ac053472.f74368 xs3/1/ase/MediumEvents/0001 : msg : Object object topic: "xs3/1/ase/MediumEvents/0001" payload: object id: "ccec746a-73a3-4ab0-9aa2-5f1e5cfd488f" entryIdentificator: 432 timestampComponentLocal: "2021-02-12T10:09:32" timestampUtc: "2021-02-12T09:09:32" eventType: "NORMAL_OPENING" eventValue: object rawValue: "0012000800000000" parameterMap: object identificationMediumId: "c89eeb68-4b9f-4642-88bb-4c35cebd7884" installationPointId: "e7b34050-ac12-46de-af22-dccd2fad2acf" installationPointName: "MQTT-WL-Test" installationPointIdentifier: "MQTT-WL-Test" zoneIds: array[3] accessId: 8 mediumIdentifier: 18 groupOfEvent: "MediumEvents" identificationMediumLabel: "" personId: "17e8150a-6de5-4f0d-bcad-ed451c70f372" person: "MQTT_01, Nr_01 R01" eventNumber: 1 qos: 0 retain: false _msgid: "1f3cbf00.fd1dd1"

Ok here is your flow, you can add more pins in the function, i have added 2 examples. I have also edited mqtt, to return an object.Also your switch nodes now reference the object properties. The pin number is set by msg.topic.

[{"id":"22696c3a.96fdb4","type":"switch","z":"5a245aa1.510164","name":"nur spezifischer Wandleser","property":"payload.installationPointName","propertyType":"msg","rules":[{"t":"cont","v":"MQTT-WL-Test","vt":"str"}],"checkall":"true","repair":true,"outputs":1,"x":300,"y":120,"wires":[["59aa2d7b.888a24"]]},{"id":"59aa2d7b.888a24","type":"switch","z":"5a245aa1.510164","name":"nur wenn positiv geöffnet","property":"payload.eventType","propertyType":"msg","rules":[{"t":"cont","v":"NORMAL_OPENING","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":600,"y":120,"wires":[["e4132adf.a2d5"]]},{"id":"64a763a6.c60f44","type":"inject","z":"5a245aa1.510164","name":"test payload add mqtt here","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"id\":\"42da89bc-95da-4bf4-8f41-4ae0b5e1bcee\",\"entryIdentificator\":427,\"timestampComponentLocal\":\"2021-02-12T09:10:26\",\"timestampUtc\":\"2021-02-12T08:10:26\",\"eventType\":\"NORMAL_OPENING\",\"eventValue\":{\"mediumIdentifier\":18,\"accessId\":8,\"officeModeAllowed\":false,\"shopModeActivated\":false,\"fwUpdatePerformed\":false,\"deltablacklistUid\":0,\"doorOpening\":false,\"mediaUpgrade\":false},\"rawValue\":\"0012000800000000\",\"parameterMap\":{\"deltablacklistUid\":\"0\",\"mediaId\":\"18\",\"doorId\":\"8\"},\"identificationMediumId\":\"c89eeb68-4b9f-4642-88bb-4c35cebd7884\",\"installationPointId\":\"e7b34050-ac12-46de-af22-dccd2fad2acf\",\"installationPointName\":\"MQTT-WL-Test\",\"installationPointIdentifier\":\"MQTT-WL-Test\",\"zoneIds\":[\"964e26b7-9b7f-4746-a8d2-a1977e328d85\",\"093bd562-0339-45e0-8a0e-bb5d61982b85\",\"c7e09626-ed1c-4fe7-ad26-0b579177c6ed\"],\"accessId\":8,\"mediumIdentifier\":18,\"groupOfEvent\":\"MediumEvents\",\"identificationMediumLabel\":\"\",\"personId\":\"17e8150a-6de5-4f0d-bcad-ed451c70f372\",\"person\":\"MQTT_01, Nr_01 R01\",\"eventNumber...\":\"\"}","payloadType":"json","x":360,"y":60,"wires":[["22696c3a.96fdb4"]]},{"id":"339c22aa.d77c26","type":"mqtt in","z":"5a245aa1.510164","name":"","topic":"xs3/#","qos":"2","datatype":"json","broker":"e8ba3ef5.22f4a8","x":100,"y":60,"wires":[["22696c3a.96fdb4"]]},{"id":"e4132adf.a2d5","type":"function","z":"5a245aa1.510164","name":"add cases as needed","func":"//set delay can be overriden by msg.delay\nlet delay = msg.delsy || 2000\n// split person to get R01 etc\nlet identifier = msg.payload.person.split(\" \").slice(-1)[0]\n// cases for R01,R02,etc add more as needed\nswitch(identifier) {\n  case \"R01\":\n    msg.topic=38 //pin number\n    break;\n  case \"R02\":\n    msg.topic= 39 //pin number\n    break;\n  default:\n    return null;\n} \n//set payload to 0\nmsg.payload=0;\n// send payload\nnode.send(msg);\n//set payload to 0\nmsg.payload=1;\n//semd payload after 2 seconds\nsetTimeout(function(){ node.send(msg) }, delay);\n//end\nreturn null;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":180,"y":180,"wires":[["ac053472.f74368"]]},{"id":"83e871a5.852ab","type":"inject","z":"5a245aa1.510164","name":"example manual trigger","props":[{"p":"payload.person","v":"R01","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":190,"y":280,"wires":[["e4132adf.a2d5"]]},{"id":"ac053472.f74368","type":"debug","z":"5a245aa1.510164","name":"add gpio here leave settings blank, msg.topic sets pin","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":180,"wires":[]},{"id":"6fe56bfe.d36184","type":"inject","z":"5a245aa1.510164","name":"example no match trigger manual trigger","props":[{"p":"payload.person","v":"non_match","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":250,"y":340,"wires":[["e4132adf.a2d5"]]},{"id":"e8ba3ef5.22f4a8","type":"mqtt-broker","name":"testb","broker":"192.168.1.25","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

notice how the code looks when bacticks are use correctly on thier own line and 3 in a row, adds an easy copy icon/link.
[edit] added default case to switch in function, if no match the flow will stop. Also have unchecked the inject nodes so they only fire if you press the button.
[edit] Added simplefied manual inject, just need "R01" etc.

thank you very much ... that's really nice!
I will try to complement this flow as desired ...
... in any case, I can already say that I no longer have automatic triggering with this flow ... is definitely due to the fact that it no longer has trigger nodes :slight_smile:

Maybe I'll get in touch again ... if I can't completely adjust the specified flow ... currently I have the problem that both channels are always controlled and not yet separated ... but I don't give in to us yet. ... only when I've invested some time.

Thank you again .. great from you guys !!!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.