node-red-contrib-looptimer-advanced 0.0.12 → 1.1.0

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 ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,56 +1,194 @@
1
- Advanced Looptimer for node-red
2
-
3
-
4
-
5
- ----------------------------
6
-
7
-
8
-
9
- This project is based on **node-red-contrib-looptimer** and **node-red-contrib-looptimer2** with the need of overwrite properties via messages.
10
-
11
-
12
-
13
- **Installation:**
14
-
15
- > npm install node-red-contrib-looptimer-advanced
16
-
17
-
18
-
19
- The main functionality is not changed (for now), however fix from looptimer2 has been implemented, because it did not work with other timers for example **node-red-contrib-stoptimer** and I've did some code rework for better functionality and cleaner code.
20
-
21
-
22
-
23
- Sends the `msg` through the first output, then continues to do so in a loop, once per the timer duration specified, until a payload of `stop` or `STOP` is received, at which time the second output will automatically send a payload of `stopped`.
24
-
25
- You can also stop the loop by specifying a maximum number of loops, which when reached, will stop the loop and timer, as well as sending a payload of `max loops reached` through the second output. Keep in mind, the first `msg` simply passes through, and is therefore not part of the loop. So if you set the max loops to `5`, you will get `6 messages`, which is 1 original message, and 5 messages from the loop.
26
-
27
- Finally, to ensure you do not end up with an infinite loop, you can set a maximum timeout in seconds, minutes or hours, and when that time is reached, the loop and timer will also be stopped.
28
-
29
- The properties can be overridden via `msg.loop` messages supplemented with property name. Accepted messages for loop are `msg.loop.duration` and `msg.loop.units`, for timeout are `msg.loop.maxtimeout` and `msg.loop.maxtimeoutunits`.
30
-
31
-
32
-
33
-
34
- You can define maximum number of loops with `msg.loop.maxloops`
35
-
36
-
37
-
38
- Setting the Max Loops and Max Timeout settings to high values can, for all intents, ensure that the loop can only be stopped by an incoming `stop` payload, however, the stability of the loop has not been tested over an extended number of hours.
39
-
40
-
41
- **0.0.12** - Update README.md
42
- **0.0.11** - Add Type Check for Stop condition to avoid type error on non string payload converting to LowerCase
43
- **0.0.10** - Update README.md
44
- **0.0.9** - Bugfix for Minutes, and minor improvements to code quality
45
- **0.0.8** - Fix Until Node-Red Does Not Get Fixed on issue #3867
46
- **0.0.7** - Update Loop Dependency version as older version is not compatible with higher version Node.JS
47
- **0.0.6** - Added Example Flow and updated dependencies
48
- **0.0.5** - Re-added line removed accidentally
49
- **0.0.4** - Issue #4 -> Added message when timeout reached
50
- **0.0.1** - Initial Release
51
-
52
- **To Do:**
53
-
54
- - [ ] Mustache Template Support
55
-
56
- - [x] Example Flows
1
+ <div align="center">
2
+
3
+ # ⏱️ Advanced Looptimer for Node-RED
4
+
5
+ **A message loop with brains: repeat a `msg` on an interval, then stop, pause or resume it, and reconfigure everything per message.**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/node-red-contrib-looptimer-advanced?logo=npm)](https://www.npmjs.com/package/node-red-contrib-looptimer-advanced)
8
+ [![npm downloads](https://img.shields.io/npm/dm/node-red-contrib-looptimer-advanced)](https://www.npmjs.com/package/node-red-contrib-looptimer-advanced)
9
+ [![CI](https://github.com/Haxiboy/node-red-contrib-looptimer-advanced/actions/workflows/ci.yml/badge.svg)](https://github.com/Haxiboy/node-red-contrib-looptimer-advanced/actions/workflows/ci.yml)
10
+ [![Node-RED](https://img.shields.io/badge/Node--RED-%E2%89%A5%203.0-red?logo=nodered)](https://flows.nodered.org/node/node-red-contrib-looptimer-advanced)
11
+ [![License](https://img.shields.io/npm/l/node-red-contrib-looptimer-advanced)](LICENSE)
12
+
13
+ </div>
14
+
15
+ ---
16
+
17
+ ## Highlights
18
+
19
+ - 🔁 **Repeat a message** once per interval (milliseconds to days) with an optional maximum loop count and maximum run time.
20
+ - 🛑 **Stop** with a payload, **⏸ pause and ▶ resume** without losing the loop counter or the timeout budget.
21
+ - 🧩 **Reconfigure per message** with `msg.loop`: interval, limits and commands, no redeploy needed.
22
+ - 🎯 **Exact counts**: optionally make *Max Loops* mean the total number of messages, including a single call, and optionally skip the immediate first message.
23
+ - 📊 **Loop counters**: `msg.loopstate` with the count, the remaining loops and the elapsed time, and a `status` command to ask for them.
24
+ - 🧵 **One loop per topic**: run a separate loop for every `msg.topic` in one node, or ignore new messages while a loop runs.
25
+ - ⏲️ **Pause timeout**: resume or stop automatically when a pause lasts too long.
26
+ - 🔌 **Typed settings**: read the interval and the limits from `msg.`, `flow.`, `global.` or `env`.
27
+ - 🎯 **No drift**: every tick is due at a fixed time after the start, also after a pause.
28
+ - 🧪 **Tested and dependency free**: plain timers, an automated test suite and CI on Node.js 18 – 24.
29
+ - 🔒 **Backwards compatible**: flows built with 0.0.x keep working unchanged, every new feature is opt-in.
30
+
31
+ ## Installation
32
+
33
+ Use **Menu → Manage palette → Install** and search for `node-red-contrib-looptimer-advanced`, or:
34
+
35
+ ```bash
36
+ cd ~/.node-red
37
+ npm install node-red-contrib-looptimer-advanced
38
+ ```
39
+
40
+ Requires **Node-RED 3.0+** and **Node.js 18+**. Older runtimes can stay on `0.0.x`.
41
+
42
+ ## Quick start
43
+
44
+ An [example flow](examples/Example%20Flow.json) is included (*Import → Examples* in the editor, or paste the file). In short:
45
+
46
+ 1. Wire an **inject** node into *looptimer-advanced*, set *Loop Every* to `1 Second` and *Max Loops* to `10`.
47
+ 2. Output 1 emits your message immediately and then once per second; output 2 reports `max loops reached`.
48
+ 3. Send a message with payload `stop` to the same node to end the loop early.
49
+
50
+ ```mermaid
51
+ stateDiagram-v2
52
+ [*] --> Running: any message
53
+ Running --> Running: tick (output 1)
54
+ Running --> Paused: pause
55
+ Paused --> Running: resume
56
+ Running --> [*]: stop / max loops / timeout (output 2)
57
+ Paused --> [*]: stop
58
+ Running --> Running: new message restarts the loop
59
+ ```
60
+
61
+ ## Outputs
62
+
63
+ | Output | Sends |
64
+ |---|---|
65
+ | **1** | The original message immediately (unless switched off), then one copy per loop. The first copy after a resume carries `msg.pauseduration` (ms). With *Add the loop counters* every copy carries `msg.loopstate`. |
66
+ | **2** | Status messages with these payloads: `stopped`, `max loops reached`, `timeout`, `paused`, `resumed`, `status`. After an automatic resume or stop `msg.reason` is `pause timeout`. |
67
+
68
+ ## Controlling the loop
69
+
70
+ | How | What it does |
71
+ |---|---|
72
+ | `msg.payload = "stop"` (or `"STOP"`) | Stops the loop |
73
+ | `msg.payload = "pause"` / `"resume"` / `"status"` | Pauses / resumes / reports the state (enable *Pause / resume / status with payload* in the node) |
74
+ | `msg.loop.command = "stop"`, `"pause"`, `"resume"` or `"status"` | Same, but always available and independent of the payload |
75
+ | `msg.loop.all = true` | With a command: applies to all loops of the node (see [one loop per topic](#new-messages-while-a-loop-runs)) |
76
+ | Any other message | Starts the loop, or restarts it (see [New messages while a loop runs](#new-messages-while-a-loop-runs)) |
77
+
78
+ Pausing freezes the remaining time of the current interval, the loop counter and the timeout budget. Resuming continues from exactly there. Stopping while paused works too.
79
+
80
+ ### Pause timeout
81
+
82
+ Set *Pause Timeout* (and *After Timeout*: resume or stop the loop) to get the loop going again, or end it, when a pause lasts too long. Output 2 then sends `resumed` / `stopped` with `msg.reason = "pause timeout"`. Resuming or stopping by hand cancels the timeout.
83
+
84
+ ### Status command
85
+
86
+ A `status` command sends a message with payload `status` and [`msg.loopstate`](#loop-counters-msgloopstate) on output 2, for example to show the progress on a dashboard. When no loop is running `msg.loopstate.state` is `idle`.
87
+
88
+ ## Overriding settings with `msg.loop`
89
+
90
+ | Property | Type | Description |
91
+ |---|---|---|
92
+ | `msg.loop.duration` | number | Loop interval |
93
+ | `msg.loop.units` | string | `Millisecond`, `Second`, `Minute`, `Hour`, `Day` |
94
+ | `msg.loop.maxloops` | number | Maximum number of loops |
95
+ | `msg.loop.totalcount` | boolean | *Max Loops* counts the first message too |
96
+ | `msg.loop.maxtimeout` | number | Maximum run time of the loop |
97
+ | `msg.loop.maxtimeoutunits` | string | Same units as above |
98
+ | `msg.loop.sendfirst` | boolean | Send the first message immediately |
99
+ | `msg.loop.loopstate` | boolean | Add `msg.loopstate` to the messages |
100
+ | `msg.loop.pausetimeout` | number | Pause timeout (with `msg.loop.pausetimeoutunits`) |
101
+ | `msg.loop.pauseaction` | string | `resume` or `stop`, what happens after the pause timeout |
102
+ | `msg.loop.command` | string | `stop`, `pause`, `resume` or `status` |
103
+ | `msg.loop.all` | boolean | Apply a command to all loops |
104
+
105
+ ```js
106
+ // Function node: loop every 30 seconds, at most 10 times
107
+ msg.loop = { duration: 30, units: "Second", maxloops: 10 };
108
+ return msg;
109
+ ```
110
+
111
+ Overrides stay in effect for the following messages (as they always did). In a function node create the object first: `msg.loop = { maxloops: 5 };`, never `msg.loop.maxloops = 5` on its own.
112
+
113
+ ## How loops are counted
114
+
115
+ By default the first message is not part of the loop, so *Max Loops* `5` gives **6** messages: 1 original + 5 loops. This keeps compatibility with `node-red-contrib-looptimer`.
116
+
117
+ Tick **Max Loops counts the first message too** (or send `msg.loop.totalcount = true`) for exact counts:
118
+
119
+ | Max Loops | Default (legacy) | Exact count |
120
+ |---|---|---|
121
+ | `-1` | loops until timeout or stop (the legacy way is `0`) | unlimited |
122
+ | `0` | unlimited | no message at all |
123
+ | `1` | 2 messages | **1 message** (a single call) |
124
+ | `5` | 6 messages | **5 messages** |
125
+
126
+ Without **Send the first message immediately** (or `msg.loop.sendfirst = false`) nothing goes out at the start, the first message follows after the first interval. *Max Loops* `5` then gives **5** messages, and with *counts the first message too* it is the same number.
127
+
128
+ ## Loop counters (`msg.loopstate`)
129
+
130
+ Tick **Add the loop counters as msg.loopstate** (or send `msg.loop.loopstate = true`) and every message carries:
131
+
132
+ | Property | Meaning |
133
+ |---|---|
134
+ | `state` | `running`, `paused`, `stopped`, `finished` or `idle` |
135
+ | `count` | Loop messages sent, the first message not included |
136
+ | `sent` | All messages sent |
137
+ | `max`, `remaining` | Limit and loops left, `null` when unlimited |
138
+ | `elapsed` | Milliseconds the loop has been running, the time paused not included |
139
+ | `interval` | Loop interval in milliseconds |
140
+
141
+ ## New messages while a loop runs
142
+
143
+ The setting **New message** decides what a message does that arrives while a loop is running:
144
+
145
+ | Setting | Behavior |
146
+ |---|---|
147
+ | **restarts the loop** (default) | The loop starts again from the beginning, as it always did |
148
+ | **is ignored while a loop runs** | The message and its `msg.loop` settings are dropped until the loop is over. `stop`, `pause`, `resume` and `status` still work |
149
+ | **starts a separate loop per msg.topic** | Every topic has its own loop, a new message restarts only the loop of its topic. Commands apply to the loop of the topic of the command message, or to all loops with `msg.loop.all = true`. The node status shows the number of loops |
150
+
151
+ ## Typed settings
152
+
153
+ *Loop Every*, *Max Loops* and *Max Timeout* are typed inputs: next to a fixed number they can be read from `msg.`, `flow.`, `global.` or an environment variable (`env`). The value is read for every message that starts a loop, and has to be a number, otherwise the node reports an error and does not start. Overrides in `msg.loop` are applied on top.
154
+
155
+ ## Versioning
156
+
157
+ Since **1.0.0** the package follows [Semantic Versioning](https://semver.org/) and keeps a [changelog](CHANGELOG.md) in the [Keep a Changelog](https://keepachangelog.com/) format.
158
+
159
+ | Bump | Meaning |
160
+ |---|---|
161
+ | **patch** `1.0.x` | Bug fixes only |
162
+ | **minor** `1.x.0` | New, backwards compatible features |
163
+ | **major** `x.0.0` | Breaking changes (including raising the minimum Node-RED / Node.js version), always called out in the changelog |
164
+
165
+ Releases are tagged `vX.Y.Z` on GitHub. The old `0.0.x` numbering was one increment per change and carried no compatibility promise. `1.0.0` marks the first release with a stable, tested public interface: the node's properties, `msg.loop` and the output payloads.
166
+
167
+ ## Upgrading
168
+
169
+ **From 1.0.x to 1.1:** nothing to change, every new setting is off by default and existing nodes keep their behavior. The only visible difference is that the ticks no longer drift: a long loop now sends its messages at fixed times after the start instead of a little later every time.
170
+
171
+ ## Upgrading from 0.0.x
172
+
173
+ Nothing to change in your flows. What is different:
174
+
175
+ - The `loop` dependency is gone and the node runs on plain timers. A `stop` that arrived between two iterations is no longer lost, and no timer is left running after stop or redeploy.
176
+ - A loop that hits its maximum timeout now always reports `timeout` on output 2 (before it sometimes ended silently). The old single-call workaround (`maxloops: 0` with a tiny `maxtimeout`) still works.
177
+ - Invalid `msg.loop` values are reported through normal error handling, so a **Catch** node sees them.
178
+ - Minimum versions: Node-RED 3.0 and Node.js 18.
179
+ - A payload of `pause`, `resume` or `status` is only treated as a command when the option is ticked. Existing nodes have it **off**, so such payloads loop like any other value.
180
+
181
+ ## Contributing
182
+
183
+ Issues and pull requests are welcome.
184
+
185
+ ```bash
186
+ git clone https://github.com/Haxiboy/node-red-contrib-looptimer-advanced.git
187
+ cd node-red-contrib-looptimer-advanced
188
+ npm install
189
+ npm test
190
+ ```
191
+
192
+ ## Credits and license
193
+
194
+ Based on **node-red-contrib-looptimer** and **node-red-contrib-looptimer2**, with the addition of per-message overrides, pause/resume, loop counters, one loop per topic, typed settings and exact counting. Released under the [Apache-2.0 license](LICENSE).