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
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.