Hi there,
I have a complicated (?) problem with a timer. The situation is as follows:
I use the bigtimer node for a regular job. It sends the message "start". A second node sends the message "0" if my cell phone is not in the wifi, and the message "1" if it's present.
Now, I want the scheduled job to wait until the message "0" of the second node is received.
This is my flow (I replaced the cell phone presence check with two simple input nodes):
[{"id":"24f234dd.7d3a2c","type":"bigtimer","z":"298248ba.274988","outtopic":"","outpayload1":"start","outpayload2":"","name":"Full cleaning","comment":"Scheduled full cleaning","lat":0,"lon":0,"starttime":"930","endtime":"945","starttime2":"0","endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":false,"mon":true,"tue":false,"wed":true,"thu":false,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":267,"y":440,"wires":[["36001bef.415374"],[],[]]},{"id":"3dacfc82.c2ec64","type":"join-wait","z":"298248ba.274988","name":"","paths":"[\"path_1\", \"path_2\"]","pathsToExpire":"","ignoreUnmatched":false,"pathTopic":"paths","pathTopicType":"msg","correlationTopic":"","correlationTopicType":"msg","timeout":"3","timeoutUnits":"60000","exactOrder":"true","firstMsg":"true","mapPayload":"false","disableComplete":false,"x":717,"y":380,"wires":[["ae203bec.0f54d8"],[]]},{"id":"ae203bec.0f54d8","type":"debug","z":"298248ba.274988","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":320,"wires":[]},{"id":"6f1be94f.64b178","type":"change","z":"298248ba.274988","name":"","rules":[{"t":"set","p":"paths","pt":"msg","to":"path_2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":477,"y":380,"wires":[["3dacfc82.c2ec64"]]},{"id":"36001bef.415374","type":"change","z":"298248ba.274988","name":"","rules":[{"t":"set","p":"paths","pt":"msg","to":"path_1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":477,"y":480,"wires":[["3dacfc82.c2ec64"]]},{"id":"503bda12.efcc84","type":"switch","z":"298248ba.274988","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":247,"y":338,"wires":[[],["6f1be94f.64b178"]]},{"id":"585ebaab.052234","type":"inject","z":"298248ba.274988","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"manual on","payloadType":"str","x":97,"y":460,"wires":[["24f234dd.7d3a2c"]]},{"id":"cbbcdce5.304b3","type":"inject","z":"298248ba.274988","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"str","x":107,"y":280,"wires":[["503bda12.efcc84"]]},{"id":"eb4ab13a.65e8e","type":"inject","z":"298248ba.274988","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"str","x":107,"y":360,"wires":[["503bda12.efcc84"]]}]
It works well if I restart the flow and the message "start" comes first and the "0" second. This is due to the "Exact order" option.
Howerver, it does not work if the sequence is "0" - "start" - "0".
If I disable the "Exact order" option, also the sequence "0" - "1" - "start" would start the job immediately and does not wait until the cell phone is not present (i.e. status message is "0").
In order to avoid confusion: I don't want to stop/start the timer. The message should only be delayed until the second conditon becomes true.
Hope my problem is clear and someone has a good advice.