Trigger an alarm at a certain time off day a couple of times at a certain time interval


I need a timer to trigger an alarm at a certain time off day a couple of times at a certain time interval. i need to be able to change the time and interval with function node or a message.

I have tried ezitmer but have been unable to change the settings with a function node. Can some one send me an example on how to change the settings in ezitmer with function node.

Or alternatively if there is a better way of doing the above mentioned that will also help.

Many thanks.

There are several timing nodes that allow overriding the schedule via message.

Have you tried any of these?


I understand that. My problem is not what to use but rather how to change the settings with a function node. I have been unable to get it working.

You can modify the times with messages.

1 Like

Hi, I had a comparable situation, had to modify and repeat an incoming topic from an rfx-lights node.

In my function node I have the following code:

signal_repeat = 5

if (msg.topic == initial_switchID) {
    msg.topic = final_switchID
    msg.iteration = 1
    return msg;
} else if (msg.topic == final_switchID ) {
    if (msg.iteration<=signal_repeat) {
     msg.iteration +=1
     return msg;

It defines the number of repeats as a local variable and the incoming- and outgoing topic for the rfx-devices. At first entry the rfx-topic is changed to the desired rfx-topic and the output is fired. The node outputs the signal to the rfx-device and it is also fed into a delay-node (in this example 500ms). Then the messages is forwarded into the function again, where it detects that the topic does not equal the initial topic so it just increases the iteration number and fires the msg again. This is repeated until the msg.iteration is larger than the repeat variable. Then the loop ends.

I would trigger the input with a crontab node, as the trigger needs to be fired at fixed point in time.

Not sure if this is the best and most safe solution, but it works for me.

Off-topic, but do you realise you can configure the rfx-lights node to repeat the command (once) after a delay, or to repeat it (indefinitely) at regular intervals?

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