This is kind of a question AND an idea for a contrib (if it doesn't exist). There are a tonne of scheduling nodes and I've tried quite a few of them. Here's a good list. Perhaps I've missed this as I haven't tried them all, in which case would love to know.
Here's what I am looking for:
Imagine the Inject node, which has an ADD button at the bottom:
... except each line you add is an event. You could then edit the details of that event. Within the details to edit, you could set name (to easily identify it from the list), and any number of message properties (again using a little ADD button, which creates multiple lines). The latter would be the same as the inject node, which allows you to e.g. set msg.topic, msg.payload, and if you like, msg.blah
Final two things: you could set the event start time, and a recurrence pattern like this:
Optionally it might allow setting a duration or end time, with different selection of message properties, the latter would be fired at the end time
A bonus would be the ability to set dynamic start times, e.g. sunrise, sunrise plus offset in seconds/minutes/hours, and even have these form the recurrence patterns, i.e. every day at sunrise.
I know what I'm asking for is simple, everyone does it, and there are tonnes of contribs that can do this functionality. But I simply haven't been able to find the ability to set multiple "timers" or events per single inject node, without a whole load of additional bells and whistles that confuse me a lot.
Here are some examples of what I have tried, but they don't work for me:
node-red-contrib-light-scheduler:
assumes I want to set an OFF payload
requires an end time
recurrence is only weekly and the visual thing is annoying
inflexible message properties: only allows setting topic and payload, and topic has to be same for ON and OFF
I've no doubt this is the ultimate timer, but it doesn't have the simplicity. Maybe I just need to try harder to understand it. But I have stared at it for ages trying to work out how to send a simple message with configurable properties.
No different message topics for different timers, or for ON vs OFF
IT says "MQTT payload" but I don't want to use MQTT...
Can anyone help me find something similar to what I need?
You can have 1 or hundreds of, schedules, each with own topic and unique payload, from one output pin or many. It is 100% dynamically programmable, has solar schedules with offset and pretty much everything the OP asked for.
Fan out mode permits many outputs. Did you read the readme?
Ps, it also has built in demos and a Cron builder for anyone not familiar with the powerful syntax of Cron.
Hmm it could be a teeny bit easier if the two fields you have filled with "name" and "topic" were not both initialised to "schedule1"
Or, to be fair, if I'd noticed the tooltips or RTFM.
Okay cronplus is really cool, really like the cronplus object it adds into the msg.
If I need msg.foo = bar, I can set msg.payload to a JSON message {"foo": "bar"}, then just use a change / function node to basically overwrite the msg object with whatever comes in from msg.payload.
Also the expression builder is very cool.
I would also add that the pre-filled text "schedule1" and "schedule1" completely confused me at first and I would have uninstalled it thinking "I have no idea what that is". Yes, I can RTFM - but after having RTFM multiple times for multiple different contribs - some of which are really badly written and take ages to get your head around, I sometimes get lazy and thing "if it isn't obvious from the UI then I don't want to invest the time". I know it's lazy but hopefully have justified why people get lazy sometimes. I usually gravitate to things that explain themselves, then dig deeper into manuals if I need to later...
You can do that too. The payload (or whatever you want to call it) can be set to whatever. What you can't do is set multiple properties of msg (but you can set multiple properties of msg.xxx)
That likely would have avoided my confusion and it will be much appreciated. Cronplus is the best scheduler I tried and that's why I've stuck with it. Now that this topic has shown me "the rest of the story" it's even better and I can clean up some of the kludges I've done.