Republishing modified flow 'triggers' flow?

[{"id":"809bca59.f5d928","type":"mqtt in","z":"b79cd752.8c43d8","name":"","topic":"callpad","qos":"2","datatype":"auto","broker":"af7f0536.34c678","x":120,"y":1460,"wires":[["4cb92a1d.f102c4","eef30cfd.b2231"]],"outputLabels":["das"]},{"id":"4cb92a1d.f102c4","type":"switch","z":"b79cd752.8c43d8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"comfort","vt":"str"},{"t":"eq","v":"refill","vt":"str"},{"t":"eq","v":"watch","vt":"str"},{"t":"eq","v":"key","vt":"str"},{"t":"eq","v":"shoplifter","vt":"str"},{"t":"eq","v":"abandoning","vt":"str"},{"t":"eq","v":"OK","vt":"str"},{"t":"eq","v":"supervisor","vt":"str"},{"t":"eq","v":"rescue","vt":"str"}],"checkall":"true","repair":false,"outputs":9,"x":310,"y":1460,"wires":[["e3f9a26e.5c165"],["f8f69def.d49cf"],["2c2f522c.a4c10e"],["233f0189.00e80e"],["1af8377f.63a159"],["fdd556ef.9d5e58"],["58127f83.bb953"],["d20af5aa.738778","21e1fb70.895304"],["4b911510.1b957c"]]},{"id":"4b911510.1b957c","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/rescue.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"rescue","x":550,"y":1800,"wires":[[],[],[]]},{"id":"d20af5aa.738778","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/supervisor.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"supervisor","x":570,"y":1740,"wires":[["e1ff3a3f.c18968"],["e1ff3a3f.c18968"],["e1ff3a3f.c18968"]]},{"id":"58127f83.bb953","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/OK.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"OK","x":550,"y":1680,"wires":[[],[],[]]},{"id":"fdd556ef.9d5e58","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/abandoning.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"abandoning","x":570,"y":1620,"wires":[[],[],[]]},{"id":"1af8377f.63a159","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/shoplifter.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"shoplifter","x":560,"y":1560,"wires":[[],[],[]]},{"id":"233f0189.00e80e","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/key.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"key","x":550,"y":1500,"wires":[[],[],[]]},{"id":"2c2f522c.a4c10e","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/watch.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"watch","x":550,"y":1440,"wires":[[],[],[]]},{"id":"f8f69def.d49cf","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/refill.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"refill","x":550,"y":1380,"wires":[[],[],[]]},{"id":"e3f9a26e.5c165","type":"exec","z":"b79cd752.8c43d8","command":"bash  /var/spool/asterisk/tmp/comfort.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"comfort","x":560,"y":1320,"wires":[[],[],[]]},{"id":"eef30cfd.b2231","type":"debug","z":"b79cd752.8c43d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":240,"y":1660,"wires":[]},{"id":"21e1fb70.895304","type":"debug","z":"b79cd752.8c43d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":290,"y":1580,"wires":[]},{"id":"af7f0536.34c678","type":"mqtt-broker","z":"","name":"hass","broker":"x.x.x.x","port":"1883","clientid":"node-red","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

I am using the above flow to trigger shell scripts. When I republish OTHER unrelated flows, the 'shoplifter' script is always triggered. It's the least convenient script for it to erroneously trigger! :rofl: any ideas why it does it?

Cheers

When you deploy how do you deploy? Full deploy, modified flows or modified nodes?

Sorry! Modified flows only. I sort of alluded to it in the title of the OP but very obliquely...!

On my ohone now but I notice this flow starts with an MQTT-in node. Does the other flow you are using use an MQTT node (in or out)?

That might trigger an MQTT disconnect/connect and a saved msg might be received again. Stick a debug on the MQTT-in and try the deploy twice and see what shows up from the MQTT-in

ahhh interesting. So it might be a retained topic...

cheers

That was it!! Thank you!! Ruddy retained topic. Now begins the purge...

1 Like

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