Hello everyone,
I tried multiple nodes to get this idea done, but nothing works (delay, eztimer, timer switch...). I need something like a loop with a start/stop function. One button start and stop, or a toggle switch to activate the loop. The loop should be controlled with sliders. One slider to set the time for each delay. The loop should send MQTT commands. On after x seconds and of after y seconds, again and again until you turn it off. Is there a simple way to make this work? In my example I didn't change msg.payload to msg.delay. I also tried this but it didn't work.
[{"id":"4efd39c4.508638","type":"ui_slider","z":"8f6a5894.b4277","name":"","label":"PAUSE","tooltip":"","group":"5c0aca13.e51a04","order":4,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"30","max":"220","step":1,"x":1060,"y":280,"wires":[["f68e5dc5.1ce718"]]},{"id":"39e2a30.4055cde","type":"ui_slider","z":"8f6a5894.b4277","name":"","label":"ACTIVE","tooltip":"","group":"5c0aca13.e51a04","order":5,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"5","max":"60","step":1,"x":990,"y":580,"wires":[["c733c4be.b6a09"]]},{"id":"f68e5dc5.1ce718","type":"delay","z":"8f6a5894.b4277","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1160,"y":380,"wires":[["c733c4be.b6a09","8530a299.37"]]},{"id":"c733c4be.b6a09","type":"delay","z":"8f6a5894.b4277","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1160,"y":500,"wires":[["5a126c55.3e620c","ce1c2e0e.92332"]]},{"id":"ce1c2e0e.92332","type":"ui_switch","z":"8f6a5894.b4277","name":"","label":"switch","tooltip":"","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":true,"onvalueType":"bool","onicon":"","oncolor":"","offvalue":false,"offvalueType":"bool","officon":"","offcolor":"","x":670,"y":420,"wires":[["8e537ffc.046e68"]]},{"id":"8530a299.37","type":"change","z":"8f6a5894.b4277","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1360,"y":320,"wires":[["7c790ef3.8ac768"]]},{"id":"5a126c55.3e620c","type":"change","z":"8f6a5894.b4277","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":580,"wires":[["7c790ef3.8ac768"]]},{"id":"8e537ffc.046e68","type":"switch","z":"8f6a5894.b4277","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":840,"y":420,"wires":[["5c765e20.1eb06"],["f68e5dc5.1ce718"]]},{"id":"5c765e20.1eb06","type":"change","z":"8f6a5894.b4277","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":440,"wires":[["7c790ef3.8ac768"]]},{"id":"7c790ef3.8ac768","type":"mqtt out","z":"8f6a5894.b4277","name":"","topic":"","qos":"","retain":"","x":1630,"y":440,"wires":[]},{"id":"5c0aca13.e51a04","type":"ui_group","z":"","name":"BONDAGE","tab":"d3d32d16.52e25","order":7,"disp":true,"width":"6","collapse":false},{"id":"d3d32d16.52e25","type":"ui_tab","z":"","name":"DRONE X005","icon":"dashboard","disabled":false,"hidden":false}]