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.
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?