node-red-contrib-chronos 1.24 #171
jensrossbach
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Welcome to the new release 1.24 of node-red-contrib-chronos! Besides some bug fixes and small improvements, it contains the following highlights:
Temporarily suspend automatic state changes
With the new input message commands "pause" and "repeat", it is possible to temporarily suspend automatic state changes. This can for instance be used in combination with manual states to avoid that the state node automatically switches away from such a state.
Example
Let's assume you want to model an alarm system and have the three states
HOME
,NIGHT
andAWAY
. The statesHOME
andNIGHT
are activated at specific times (e.g., 6 o' clock in the morning for theHOME
state and 11 o'clock in the evening for theNIGHT
state) and the stateAWAY
is a manual state that you only activate on demand when you leave your house. Now, in order to prevent that theAWAY
state is deactivated automatically in the evening (or morning, depending on when you activated it), you can send the "pause" command right after the "set" command that activated theAWAY
state. Once you arrive back at your home, you can send the "resume" command to continue with automatic state changes and the "reset" command to restore the appropriate time-based state.Enhanced external input
Now, more nodes, in particular the scheduler, state and repeat nodes support the basic and extended external input formats (limited to time-only values for scheduler and state node, however) to simplify providing date/time values from external sources like environment variables, context variables or message properties. Repeat and delay nodes now support arbitrary message properties as additional external source for custom repetition data, until time and custom delay data.
Change time zone
The time change node now provides the possibility to change the time zone or the offset to the universal time for the target's local time as part of the convert rule. This is of course optional and if not used, as before, the time zone configured in the associated configuration node is applied.
Scheduler node optimizations
The scheduler node has been optimized concerning resource usage by reducing the number of concurrently running timers. Now, only a single timer for the next upcoming event is started instead of one timer per enabled event. If there are multiple events with the same trigger time, all those events will be triggered by the single timer instance.
Additionally, the usage of the Node-RED event
flows:started
for delaying next event messages after node start until flows have been set up has been removed and replaced by a fixed delay that is customizable and by default 0.1 seconds. Reason is that this event is an undocumented internal Node-RED event that shouldn't be used by nodes as it can be removed/changed at any time and also has some restrictions related to maximum number of concurrently allowed event listeners. The fixed delay is optional and is used for any message being sent directly after start of the node.Beta Was this translation helpful? Give feedback.
All reactions