[ANNOUNCE] node-red-contrib-chronos 1.8.0

Hi all,

I just released version 1.8.0 of node-red-contrib-chronos. In this version, the scheduler node, the time switch node and the time filter node support loading parts of their configuration (schedule events in case of scheduler node, conditions in case of switch/filter node) from context variables. This allows to dynamically program the schedule and the conditions which can be useful if you want to provide the configuration data from runtime sources like e.g. a Node-RED dashboard UI.

2 Likes

Hi,
I need your help ....
I have trouble to write a function to set the node scheduler with these parameters:

. enabled
. date
. time

Can you help me?

img2

Hi,

could you explain a bit in more detail what you want to achieve and what your use case is?

With the message that you send from your function node to the scheduler node you can enable the schedule by setting the payload to true (boolean value).

How does the configuration of your scheduler node look like?

Best regards
Jens

Hi,
for every day I have one timestamp that turn-on a light at a specific hour, but if there are some conditions I need to change that hour
Whit node timestamp I cannot change the hour by a function and that's why I found your node.
I'd like to change the hour and if it's possible enable or disable the node ....

Basically it should work as you have shown (with some changes regarding the message that should switch the schedule on/off as described above), but as I don't know how your configuration of the scheduler node looks like, I cannot tell for sure. Maybe you can share your flow as JSON? Also some more details would be helpful:

  • How many different trigger times do you have? Would it maybe be sufficient to configure them statically?
  • What are the conditions to change the trigger time?
  • What are the triggers to enable/disable the schedule?

Ok, we have obvious communication problems,
I'll find another way, have a nice day ....

Well, I'll try again ....

this is my flow:

this is my node scheduler:

and this is my variable:

I think I write all ok, but why when I push Timestamp I have the error
"Invalid input message" ?

What am I doing wrong?

Thank you .....

Hi again,

your configuration of the scheduler node looks okay. The problem of the error message comes from the message that you send to the scheduler node. In your function node you pass through the message received from the inject node. This message has a payload containing a timestamp which is not a valid input for the scheduler node. The scheduler node expects the payload to be either a boolean value or an array of boolean values. So in your function node you have to change the payload to either true (to enable the schedule) or false (to disable the schedule).

Regards, Jens

Hi,
ok, I understand, thank you ....

Regards