Trigger node startup question

Hi,

Just wondered if there maybe a better way to do this.

I have two trigger per diagram flow below, one to set of at 7am everyday and one at Midnight.
these basically set some defaults for brightness etc.

so got this

image

which all works fine, However if Node-Red is restarted those default do not get run
until the appropriate time which ever is closes.. so means i have trigger it manually.

now i understand a method to run an inject node on restart is via

image

clicking on INJECT ONCE AFTER option...

the Repeat drop down
image

the Inject option is available for all those EXPECT "for at a specific time" option

I wonder if that just a missed option/undersight ? would have fixed my problem lol.

The Between Times option isnt really what i want to fall back to as it just mean it going to triggering the same values for an hour(min possible)

i've got a way around as seperate inject and node but im sure I can do it better!

ta.

You may wish to look at one of the more comprehensive scheduling nodes such as the cron-plus node.

have to like NR as they always a few ways to do something.. not sure which way I like it :slight_smile:

Tweaked the original one so the Trigger will send either FULL or DIM
and use Switch and then Change node to setup the defaults.
the Startup will just set it to Full

But dont like the criss-cross at the end.

or instead of the Switch and Change node just if/else in a Function

image

which looks cleaner.

I do have Chronos that has a Scheduler so that works too.

Probably stick to the one with the function for now.

Note that they are Inject nodes. Trigger nodes are a different node type.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.