One of the most common requirements in home automation is to schedule an event at a particular time.
For example a light timer to switch on the outdoor lights on and off at a particular time each day.
Node-Red provides a basic node called the inject node which can be used for basic timing requirements.
You can use the inject node to send a messages at set intervals and at specific times.The main timing options are shown in the screen shot below.
The inject node cannot be controlled from a dashboard which means that the timing requirements must really be fixed.
If you need more sophisticated timing then you will need to install other timing nodes.
Other Timing Nodes
Many of these nodes used you latitude and longitude to determine dusk and dawn for controlling events.
node-red-contrib-light-scheduler Is a node to control light based on a schedule and the sun position.
The settings of this node are controlled in the Admin panel and cannot be set from the dashboard.
The timer day/hour selection allows you to configure multiple timers per day.
It accepts basic inputs which allow you to override the schedule by sending in a on/off message.
node-red-contrib-eztimer -Timer that is also based on sun position and can be set to normal schedule. Schedule settings not as flexible as the light schedule node, but this node can be programmatically controlled using a dashboard.
Schedex – Very similar to eztimer as eztimer was based on this node.
Timerswitch – This is an easy to use multi-schedule timer which allows you to add multiple on/off periods for a single output.
It is meant to resemble the functionality of mechanical and digital wall timers.
The built in debug node allows for basic event timing and scheduling and is usually my first choice.
You can install addition nodes for for complicated scheduling needs but most are only settable from within the admin panel.
The eztimer is currently the only timer with comprehensive external control capability allowing it to be configured using a dashboard.
Video- Creating a dashboard for the EZtimer.
- Controlling the Tasmota SonOff Switch with HTTP and Node-Red
- Controlling the Tasmota SonOff Switch with MQTT and Node-Red