Delay message until a specific time

I am trying to delay a message in my sequence until a certain time of day. I thought i would be a bale to use the delay node to have it hold the message payload it receives until a certain time is reached, but i don't see an option to put in a specific time. Is this the right node? So for example don't send the message any further until 8 am and when 8 am happens the message is then sent on to the next node.

Thanks
Tim

You could probably achieve this using a join node set up without a count or timeout defined. Have an inject node set to fire off a message with the msg.complete property set to true and the join node will fire off a merged payload of all it's received since the last msg.complete. If you want discrete messages, you could probably merge the messages into an array in the join node, but then pass the resulting array through a split node.

Another way to think about the delaying until specific time problem

2 Likes

You could possibly use node-red-contrib-queue-gate with an inject node and a trigger node to open the gate at the appropriate time and close it again a short while later. Then any messages queued between openings will be released at that time.

Thanks for the suggestions. I will look in to the queue gate node and see what i can do. I am really surprised that the delay node was not able to do what i wanted and think it should be something they should look at adding. Not sure if that is feasible or not but i think it would be useful.

Thanks
Tim

You can also check the other side: trigger the message at a specific time (if feasible).

The trigger is coming from a home assistant event node that lets me know when certain appliances are finished. (Washer, Dry, Dishwasher etc..) Its setup to let me know over my google minis when it is completed but only between the hours of 0700 and 2230. What i want to do is if it finishes outside those hours have it wait till 0800 and then announce the messages. I also looked at wait until node but it also does not have a time feature but would be another node i could see having this feature.

So i figured this out. It is the wait until node that i needed. I had to add a sensor in home assistant set to the current time and then i was able to compare that state (time) to the time i wanted it to pass data. Now it works like i wanted.

[{"id":"cd5efc38.c7345","type":"time-range-switch","z":"42d0008f.7b00a","name":"","lat":"38.3007","lon":"-76.50496","startTime":"07:00","endTime":"22:30","startOffset":0,"endOffset":0,"x":379,"y":123,"wires":[,["1e038743.170c19","85ae0be0.a7aaa8"]]}]

Thanks again.