npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-configurable-interval

v0.9.1

Published

A simple node-red node that sends a message at regular intervals

Downloads

70

Readme

node-red-contrib-interval

A simple node-red node that sends a message at regular intervals.

Options

interval: the duration between calls

unit: the duration unit

name: simply rename your node

msg: the text to be sent as payload

onstart: Wether or not to send a message on start

showstatus: show the last and next trigger times

statusformat: A momentjs date format used to display status

Message

{
  "payload": "<config.msg>"
}

Testing flow

You can import the following flow and use it to test and experiment with the node.

[{"id":"3c4d92e1.2b913e","type":"interval","z":"1e902005.2bfcf","name":"interval","interval":"3","onstart":false,"do_enable":false,"msg":"ping","showstatus":true,"unit":"seconds","statusformat":"YYYY-MM-D HH:mm:ss","x":620,"y":420,"wires":[["b13a469a.cd0a18"]]},{"id":"b13a469a.cd0a18","type":"function","z":"1e902005.2bfcf","name":"ModifyOutput","func":"\nvar mssInitial = flow.get(\"dbgtimer\");\nvar mss = Date.now() / 1000.0;\n\nmsg.payload = mss - mssInitial;\n\nreturn msg;","outputs":1,"noerr":0,"x":890,"y":540,"wires":[["e9501edb.945e9"]]},{"id":"253f6afd.115846","type":"inject","z":"1e902005.2bfcf","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":270,"y":340,"wires":[["9f75b47a.c24c08"]]},{"id":"9f75b47a.c24c08","type":"function","z":"1e902005.2bfcf","name":"InitialSeconds","func":"msg.payload = msg.payload / 1000.0;\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":280,"wires":[["1856674b.d09889"]]},{"id":"1856674b.d09889","type":"change","z":"1e902005.2bfcf","name":"SetFlowInitial","rules":[{"t":"set","p":"dbgtimer","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"enabled","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":220,"wires":[["3c4d92e1.2b913e"]]},{"id":"e9501edb.945e9","type":"debug","z":"1e902005.2bfcf","name":"FireTime","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":900,"y":660,"wires":[]},{"id":"d02524b4.f14068","type":"change","z":"1e902005.2bfcf","name":"_18s","rules":[{"t":"set","p":"payload","pt":"msg","to":"interval","tot":"str"},{"t":"set","p":"interval_value","pt":"msg","to":"18","tot":"str"},{"t":"set","p":"interval_unit","pt":"msg","to":"seconds","tot":"str"},{"t":"set","p":"interval_activeInstantly","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"interval_fireInstantly","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":500,"wires":[["3c4d92e1.2b913e"]]},{"id":"10104ccc.afcce3","type":"inject","z":"1e902005.2bfcf","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":540,"wires":[["d02524b4.f14068"]]},{"id":"50196a4a.00a204","type":"inject","z":"1e902005.2bfcf","name":"stahp","topic":"","payload":"disabled","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":680,"wires":[["3c4d92e1.2b913e"]]},{"id":"50497b91.4d1584","type":"inject","z":"1e902005.2bfcf","name":"power","topic":"","payload":"enabled","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":760,"wires":[["3c4d92e1.2b913e"]]},{"id":"969bcc2a.8f903","type":"change","z":"1e902005.2bfcf","name":"override_1.2s_insta","rules":[{"t":"set","p":"payload","pt":"msg","to":"interval","tot":"str"},{"t":"set","p":"interval_value","pt":"msg","to":"1150","tot":"str"},{"t":"set","p":"interval_unit","pt":"msg","to":"ms","tot":"str"},{"t":"set","p":"interval_activeInstantly","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"interval_fireInstantly","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":560,"wires":[["3c4d92e1.2b913e"]]},{"id":"c3f5f5db.e912f8","type":"inject","z":"1e902005.2bfcf","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":620,"wires":[["969bcc2a.8f903"]]},{"id":"2e5d8028.72c97","type":"change","z":"1e902005.2bfcf","name":"FIRE_set_3s","rules":[{"t":"set","p":"payload","pt":"msg","to":"interval","tot":"str"},{"t":"set","p":"interval_value","pt":"msg","to":"3","tot":"str"},{"t":"set","p":"interval_unit","pt":"msg","to":"s","tot":"str"},{"t":"set","p":"interval_activeInstantly","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"interval_fireInstantly","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":860,"wires":[["3c4d92e1.2b913e"]]},{"id":"4cd99549.3c5adc","type":"inject","z":"1e902005.2bfcf","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":900,"wires":[["2e5d8028.72c97"]]}]