I started to fiddle around a bit and I believe something like this would work (obviously not deployed and not tested).
The settings on the first switch node look like this (others follow the same, except instead of 301, it’s 302, 303, etc.):
If payload[0].GeneratorNumber is equal to 301, then we follow path 1, which would open the corresponding solenoid valve right away. After a 20 minute delay, the XML data would be obtained and written to the SQL database using an INSERT statement.
If payload[0].GeneratorNumber is NOT equal to 301, then it moves to the next switch node and poses the same 2 questions, but for 302. The sequence keeps going until 305 has been checked.
Assuming the above works in concept, then there are still some open switches (no pun intended):
- How do I close the solenoid after 30 min? I was looking for a stop timer or something but could not find it.
- What do I do with the last switch node if msg.payload[4].GeneratorNumber is NOT equal to 305? Maybe I can just leave it as is?