node-red-contrib-stoptimer-varidelay-plus 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +197 -0
- package/examples/StopTimerVariDelay Examples.json +406 -0
- package/package.json +28 -0
- package/stoptimer-varidelay/cycle.js +182 -0
- package/stoptimer-varidelay/icons/stoptimer.png +0 -0
- package/stoptimer-varidelay/stoptimer-varidelay.html +230 -0
- package/stoptimer-varidelay/stoptimer-varidelay.js +627 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Stop Timer (Variable Delay) Plus for Node-RED #
|
|
2
|
+
|
|
3
|
+
## Why This Fork Exists ##
|
|
4
|
+
The original `node-red-contrib-stoptimer-varidelay` node by hamsando (itself a fork of the original stoptimer node by jbardi) is no longer maintained. This fork picks up where the original left off, adding new features while preserving full backwards compatibility with existing flows. If you are already using `node-red-contrib-stoptimer-varidelay`, you can switch to this package without changing any of your existing flows.
|
|
5
|
+
|
|
6
|
+
## General Usage ##
|
|
7
|
+
Sends the received msg through the first output after the set timer duration. If a new msg is received before the timer has ended, it will replace the existing msg and the timer will be restarted, unless the new msg has a payload of `stop`, `STOP`, `pause`, `PAUSE`, `resume`, or `RESUME`. The second output allows you to send an additional payload of a number, string or boolean when the timer completes. If the timer is stopped, the second and third outputs will automatically send a payload of `stopped`. The third output will send the time remaining as time ticks away.
|
|
8
|
+
|
|
9
|
+
The status below the node as well as the third output can be configured to update at a frequency of:
|
|
10
|
+
* Never (default)
|
|
11
|
+
* Every Second
|
|
12
|
+
* Every Minute, Last minute by seconds
|
|
13
|
+
|
|
14
|
+
The last option works as follows:
|
|
15
|
+
* While there is more than 1 minute remaining, the timer will decrement every minute. At the 1 minute point, it will switch to reporting every second.
|
|
16
|
+
* The exception to this rule is if your duration is not a minute increment. In that case, the first update will be for the partial minute, after which it will operate as noted above. (for example: 2.5 minutes will decrement to 2 minutes, then 1 minute, then every second down to zero)
|
|
17
|
+
|
|
18
|
+
The format of the 3rd output reporting (and status) are defined by the "Reporting Format" option. The default is hh:mm:ss (string), but it can be configured to present that as the total number of remaining seconds, minutes or hours (number).
|
|
19
|
+
|
|
20
|
+
## Message Properties ##
|
|
21
|
+
All output messages include the following additional properties:
|
|
22
|
+
* `msg.timerState` — the current state of the timer: `running`, `paused`, `stopped`, or `expired`
|
|
23
|
+
* `msg.timerDuration` — the original timer duration in milliseconds (outputs 1, 2, and 3)
|
|
24
|
+
* `msg.elapsedTime` — the time elapsed since the timer started in milliseconds (outputs 1, 2, and 3)
|
|
25
|
+
* `msg.remainingTime` — the remaining time in milliseconds (outputs 3 and 4)
|
|
26
|
+
|
|
27
|
+
## Overriding the Node via Incoming Messages ##
|
|
28
|
+
If the input contains `msg.delay`, then the delay will be `msg.delay` units of time, where the units are whatever the units are defaulted to in the node itself. In the absence of a `msg.delay`, or a value in `msg.delay` that cannot be converted to an int, the value configured within the node will be used. If the value of `msg.delay` is less than 0, then 0 is used.
|
|
29
|
+
|
|
30
|
+
If the input contains `msg.units`, with a value of "Milliseconds", "Seconds", "Minutes" or "Hours" then that will override what is defaulted in the node. In the absence of a `msg.units`, or an unknown string in `msg.units`, the units configured within the node will be used. In the case of an unknown string, a warning message will appear in the Debug logs.
|
|
31
|
+
|
|
32
|
+
### Special Note on Milliseconds ###
|
|
33
|
+
While you can set Milliseconds, I would not rely on the accuracy for anything critical. For the purposes of the node status and output 3, except in the case where Reporting is set to None, the milliseconds are not displayed or provided on the 3rd output as it wouldn't make sense based on the available reporting rates.
|
|
34
|
+
|
|
35
|
+
## Pausing and Resuming ##
|
|
36
|
+
The timer can be paused by sending a message with `msg.payload` of `pause` or `PAUSE`. While paused:
|
|
37
|
+
* The countdown is frozen at the remaining time
|
|
38
|
+
* The node status shows `Paused: HH:MM:SS` with a yellow indicator
|
|
39
|
+
* Outputs 2 and 3 will send a payload of `paused`
|
|
40
|
+
* Any incoming message other than `resume`, `RESUME`, `stop`, or `STOP` will be routed to output 4
|
|
41
|
+
* Sending another `pause` message while already paused will also be routed to output 4
|
|
42
|
+
|
|
43
|
+
The timer can be resumed by sending a message with `msg.payload` of `resume` or `RESUME`. On resume:
|
|
44
|
+
* The countdown restarts from where it was frozen
|
|
45
|
+
* Outputs 2 and 3 will send a payload of `resumed`
|
|
46
|
+
|
|
47
|
+
If the *Resume timer on deploy/restart* option is enabled and the timer is paused when Node-RED restarts or the flow is redeployed, the timer will restore as paused at the same remaining time.
|
|
48
|
+
|
|
49
|
+
## Do Not Reset Timer on Subsequent Incoming Message ##
|
|
50
|
+
This option is **DISABLED** by default. If you **ENABLE** it (check the checkbox) then while the timer is running, any subsequent incoming messages (other than `stop`, `STOP`, `pause`, `PAUSE`, `resume`, or `RESUME`) will be ignored and the timer will continue running undisturbed. The first message always starts the timer normally.
|
|
51
|
+
|
|
52
|
+
When a message is ignored, it will be sent to the 4th output with the original message content intact plus:
|
|
53
|
+
* `msg.remainingTime` — remaining time in milliseconds
|
|
54
|
+
* `msg.timerState` — current timer state
|
|
55
|
+
|
|
56
|
+
When this option is enabled, the node status will show:
|
|
57
|
+
`Remaining: 00:04:32 | Ignored: 3, Last: Jun 27 14:22:05`
|
|
58
|
+
|
|
59
|
+
The ignored count and last ignored datetime will reset each time a new message starts the timer. They will remain visible on the status after the timer expires or is stopped, so you can see how many messages were ignored during that timer run.
|
|
60
|
+
|
|
61
|
+
## Resume Timer on Deploy/Restart ##
|
|
62
|
+
This option is **DISABLED** by default. If you **ENABLE** it (check the checkbox) then if the stoptimer is running and you re-Deploy the flow, or restart Node-RED, then the timer will automatically restart itself where it should be. What does that mean? A couple of examples will help here.
|
|
63
|
+
* If you had a 10 minute stoptimer running, with 6 minutes elapsed (ie: 4 minutes left) and you hit Deploy, normally the stoptimer would no longer be running, but if you have this feature enabled, the timer will continue running from the 6 minute mark (ie: counting down 4 more minutes and then trigger).
|
|
64
|
+
* If you had a 10 minute stoptimer running, with 6 minutes elapsed (ie: 4 minutes left) and you *stopped* Node-RED for 2 minutes and then restarted it, normally the stoptimer would no longer be running, but if you have this feature enabled, the timer will continue running from the 8 minute mark (6 minutes from the original run + 2 minutes of Node-RED downtime) -- counting down 2 more minutes and then trigger.
|
|
65
|
+
* **Special Case** If on restart or re-Deploy, there is less than 3 seconds remaining on the stoptimer (or if the stoptimer should have elapsed already) then the stoptimer is set to a random amount between 3 and 8 seconds. This helps to ensure that anything else that needs to initialize before the stoptimer triggers has a chance to do so. It also helps so that if you happen to have a lot of timers, they don't all trigger at once and flood unsuspecting nodes/devices.
|
|
66
|
+
|
|
67
|
+
This persistence is **not** related to "Persistent Context" (the contextStorage option in `settings.js`). When the "Resume timer" option is enabled in the node, the node will store timer related information in a `stvd-timers` subdirectory of *userDir* (where *userDir* is defined in `settings.js`). If *userDir* is not explicitly defined, it defaults to a directory called `.node-red` in your home user directory. The files in this directory will be created/destroyed as needed by the node.
|
|
68
|
+
|
|
69
|
+
## _timerpass ##
|
|
70
|
+
**What is *_timerpass*?**
|
|
71
|
+
|
|
72
|
+
*_timerpass* is a property added to messages exiting the 1st/top and 2nd/middle outputs of stoptimer.
|
|
73
|
+
*_timerpass* is set to **true** when the timer expires.
|
|
74
|
+
|
|
75
|
+
**What does *_timerpass* do?**
|
|
76
|
+
If stoptimer has at any point been stopped using message.payload=stop (or STOP) AND
|
|
77
|
+
If stoptimer has not received a message with _timerpass not set since that time THEN
|
|
78
|
+
any incoming message that has the _timerpass=true property will die within stoptimer with no output.
|
|
79
|
+
|
|
80
|
+
This can be problematic if you want to chain multiple stoptimers together. It is not insurmountable, but it can be irritating.
|
|
81
|
+
|
|
82
|
+
**Why does this behavior exist?**
|
|
83
|
+
It is a legacy thing, it was part of the original stoptimer whose code I forked. Not sure what exactly the original intent was, but I'm sure there is some rationale.
|
|
84
|
+
|
|
85
|
+
**How does Stoptimer-Varidelay handle this?**
|
|
86
|
+
*Ignore Timerpass* in the node config dialog. If enabled in a given stoptimer-varidelay node, it will ignore the presence of the `_timerpass` property on an incoming message and will process the incoming message as it does every other message.
|
|
87
|
+
|
|
88
|
+
By default, this option is not enabled in order to preserve compatibility with any existing flows. Note that you may need to refresh the web UI after updating the node in order to see the new "ignore timerpass" option.
|
|
89
|
+
|
|
90
|
+
## Attribution ##
|
|
91
|
+
This node is a fork of `node-red-contrib-stoptimer-varidelay` by hamsando, which itself was a fork of the original stoptimer node by jbardi. Both are licensed under the Apache 2.0 License. All original copyright notices have been preserved in the source code.
|
|
92
|
+
|
|
93
|
+
## Release Notes ##
|
|
94
|
+
|
|
95
|
+
0.5.4
|
|
96
|
+
- mchristegh: Forked from node-red-contrib-stoptimer-varidelay (hamsando) and published as node-red-contrib-stoptimer-varidelay-plus
|
|
97
|
+
- mchristegh: Added pause/resume support via msg.payload of `pause`/`PAUSE` and `resume`/`RESUME`
|
|
98
|
+
- mchristegh: Added `msg.timerState` property to all outputs indicating current timer state (`running`, `paused`, `stopped`, `expired`)
|
|
99
|
+
- mchristegh: Added `msg.timerDuration` property to outputs 1, 2, and 3 indicating original timer duration in milliseconds
|
|
100
|
+
- mchristegh: Added `msg.elapsedTime` property to outputs 1, 2, and 3 indicating elapsed time in milliseconds
|
|
101
|
+
- mchristegh: Added `msg.remainingTime` property to output 3 reporting messages and output 4
|
|
102
|
+
- mchristegh: Added "Do Not Reset Timer on Subsequent Incoming Message" option — when enabled, subsequent messages while the timer is running are ignored and routed to output 4
|
|
103
|
+
- mchristegh: Added 4th output for ignored messages, carrying original message content plus `msg.remainingTime` and `msg.timerState`
|
|
104
|
+
- mchristegh: Enhanced node status to show ignored message count and last ignored datetime when "Do Not Reset" option is enabled
|
|
105
|
+
- mchristegh: Pause state is now persisted across restarts/redeploys when "Resume timer on deploy/restart" is enabled
|
|
106
|
+
- mchristegh: Persist now also saves and restores ignored count and last ignored datetime
|
|
107
|
+
- mchristegh: Fixed pre-existing bug where `$("#node-input-reportingformat").value()` was called instead of `.val()` in the HTML
|
|
108
|
+
|
|
109
|
+
0.5.3
|
|
110
|
+
- putch: Added a drop-down to indicate what format you want the countdown (3rd output and node status) to be in. Default is HH:MM:SS.
|
|
111
|
+
- putch: Added some example flows.
|
|
112
|
+
|
|
113
|
+
0.5.2
|
|
114
|
+
- putch: Fixed issue where if the node was in a subflow of a subflow (ie: more than just in a flow or single level deep subflow) the restart/redeploy functionality would not work. This fix breaks the solution in 0.5.0. Upon initial restart after upgrading to 0.5.2, nodes within subflows won't restart if there were in progress (and you will have orphan node state files). Solution as suggested by tobi-bo.
|
|
115
|
+
|
|
116
|
+
0.5.1
|
|
117
|
+
- putch: Corrected documentation omission.
|
|
118
|
+
|
|
119
|
+
0.5.0
|
|
120
|
+
- putch: Fixed an issue where if the node was in a subflow, it was exceedingly unlikely that it would successfully resume after restart/redeploy.
|
|
121
|
+
- putch: Fixed an issue where if the node status was "stopped" and a new message came in with _timerpass=true, the node status was cleared (but the node was still in "stopped" state so it could be unclear why it may ignore a new message. Now the status "stopped" remains.
|
|
122
|
+
- putch: Added an optional feature to ignore incoming _timerpass=true flags. See README or Node help for details.
|
|
123
|
+
- putch: Added a node status (expired) for when the timer expires.
|
|
124
|
+
|
|
125
|
+
0.4.7
|
|
126
|
+
- putch: Fixed issue where if the node was directly configured to a delay of 0 (regardless of units) in the dialog box, then the node would actually delay 5 (whatever units).
|
|
127
|
+
- putch: Fixed issue where if the node was directly configured to a value with a decimal (for example 10.5) in the dialog box, then the node would actually truncate the fractional part (10.5 becomes 10).
|
|
128
|
+
|
|
129
|
+
0.4.6
|
|
130
|
+
- putch: Fixed an issue where the 2nd output would always output True when set to boolean
|
|
131
|
+
|
|
132
|
+
0.4.5
|
|
133
|
+
- putch: Fixed issue where the restarting of the timer after NR restart broke in NR 1.2.x.
|
|
134
|
+
|
|
135
|
+
0.4.4
|
|
136
|
+
- putch: Fixed an issue where if the delay was longer than 24 days, the timer would fire immediately
|
|
137
|
+
|
|
138
|
+
0.4.3
|
|
139
|
+
- putch: Fixed a logging issue if there is an issue reading the persistent data on restart
|
|
140
|
+
- putch: Switched from parse/stringify to decycle/retrocycle to handle JSON with cyclical data
|
|
141
|
+
|
|
142
|
+
0.4.2
|
|
143
|
+
- putch: Move location of saved persistent data to a subdir of userDir
|
|
144
|
+
- putch: Added additional documentation clarifying no relation to persistent context configuration.
|
|
145
|
+
|
|
146
|
+
0.4.1
|
|
147
|
+
- putch: Changed location of saved persistent data
|
|
148
|
+
- putch: Remove persistent data for node if node is deleted
|
|
149
|
+
|
|
150
|
+
0.4.0
|
|
151
|
+
- putch: Optimized code which displays the countdown
|
|
152
|
+
- putch: Fixed missing 'Units' label in node config screen.
|
|
153
|
+
- putch: Added stoptimer countdown persistence across Deploy/Restart
|
|
154
|
+
|
|
155
|
+
0.3.2
|
|
156
|
+
- putch: Fixed time output when time is greater/equal 24 hours
|
|
157
|
+
|
|
158
|
+
0.3.1
|
|
159
|
+
- putch: Fixed, 3rd output should output 'stopped' if the stoptimer is sent 'stop' command
|
|
160
|
+
|
|
161
|
+
0.3.0
|
|
162
|
+
- putch: Changed the way that time is shown in the node status (from text Seconds/Minutes/Hours to HH:MM:SS)
|
|
163
|
+
- putch: Added support for 3rd output indicating time remaining
|
|
164
|
+
- putch: Added option to define the rate of updates.
|
|
165
|
+
- putch: Cleaned up internal references of node name
|
|
166
|
+
- putch: Fixed milliseconds timer setting
|
|
167
|
+
- putch: Fixed icon
|
|
168
|
+
|
|
169
|
+
0.2.0
|
|
170
|
+
- putch: Added support for msg.units field to over-ride the units set in the node.
|
|
171
|
+
|
|
172
|
+
0.1.1
|
|
173
|
+
- putch: Simple support for msg.delay field to set the delay duration
|
|
174
|
+
|
|
175
|
+
0.1.0
|
|
176
|
+
- merc1031: Simple support for setting time from environment to allow parametrized use in subflows
|
|
177
|
+
|
|
178
|
+
0.0.7
|
|
179
|
+
- Clarified the instructions with respect to what happens to the existing message when a new message arrives.
|
|
180
|
+
|
|
181
|
+
0.0.6
|
|
182
|
+
- Forgot to update the "info" panel instructions inside of node-red to include the new features.
|
|
183
|
+
|
|
184
|
+
0.0.5
|
|
185
|
+
- As per request, included a second output. You can set the payload for the second output to a number, string or boolean, however, if the timer is stopped with an incoming msg, the second output will send the payload of "stopped".
|
|
186
|
+
|
|
187
|
+
0.0.4
|
|
188
|
+
- Updated icon for less confusion with other nodes
|
|
189
|
+
|
|
190
|
+
0.0.3
|
|
191
|
+
- README.md update
|
|
192
|
+
|
|
193
|
+
0.0.2
|
|
194
|
+
- Fixed an issue with using the timer in a repeating flow which caused it to either send an additional msg after being stopped, or, in some cases, not allowing a new msg to pass through after the node had been previously stopped.
|
|
195
|
+
|
|
196
|
+
0.0.1
|
|
197
|
+
- Initial Release
|