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

smithtek-nodered-control

v1.0.0

Published

SmithTek Node-RED Control Nodes

Downloads

6

Readme

smithtek-nodered-control

SmithTek Control

Installation

Install the smithtek-nodered-control using the NodeRED palette manager.

Usage

The smithtek-nodered-control node is designed for controlling pump systems based on tank levels and remote control commands. The node allows for flexible control modes, including local level-based control and remote commands via the global context. It is suitable for use with systems like the SmithTek cloud platform. The node has 2 operation modes "fill" or "Empty" In the fill mode the start setpoint will be a low value the stop setpoint will be a high value. In the empty mode the start setpoint will be a high value and the stop setpoint will be a low value. This works for filling tanks up or emptying tanks or sewage wet water pits. The control command and setpoint values will come from the smithtek in nodes. The smithtek.cloud will publish the values to the NodeRED runtime. The operator can design the control dashboard to allow sending values. Without this node last known values from smithtek.cloud can annoyingly be published to your PassPort on every deployment or restart.

SmithTek Control

Setup smithtek-nodered-control

  1. Drag and drop the node into your Node-RED flow.
  2. Configure the control mode, start level, stop level, and level key in the node properties.
  3. Set the appropriate global context values for start and stop levels.

The node operates in two modes:

  • Local Control Mode (0): Controls the pump based on tank levels by comparing them to the start and stop levels.
  • Remote Start Mode (1): Remotely starts the pump, overriding the local tank levels.
  • Remote Stop Mode (2): Remotely stops the pump, overriding the local tank levels.

Configuration Properties

  • Control Mode Key: Global context key used to determine the control mode (0, 1, or 2).
  • Start Setpoint Key: Global context key for the start level setpoint (used when filling or emptying the tank).
  • Stop Setpoint Key: Global context key for the stop level setpoint.
  • Level Key: The key from the incoming message payload that contains the tank level.
  • Max Level: The maximum allowable tank level to prevent overfilling or over-emptied tanks.
  • Operation Mode: Choose between "fill" (fill the tank) or "empty" (empty the tank).

Control Modes

  1. Local Control (Control Mode 0):

    • In this mode, the node monitors the tank level (from msg.payload.level) and compares it to the configured startLevel and stopLevel.
    • The pump will start when the level is below the startLevel and stop when the level exceeds the stopLevel.
  2. Remote Start (Control Mode 1):

    • This mode bypasses local level monitoring and immediately sends a signal to start the pump (payload: true).
  3. Remote Stop (Control Mode 2):

    • This mode bypasses local level monitoring and immediately sends a signal to stop the pump (payload: false).

SmithTek Control

Example

[{"id":"4bb597c9fa7b1231","type":"smithtek-control","z":"f6e4dcac415570da","name":"Control Node","controlModeKey":"control","startLevelKey":"start","stopLevelKey":"stop","levelKey":"level","maxLevel":3000,"operationMode":"empty","x":470,"y":440,"wires":[["9b16fb2444aa04f6"]]},{"id":"9b16fb2444aa04f6","type":"debug","z":"f6e4dcac415570da","name":"debug 20","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":660,"y":440,"wires":[]},{"id":"0aebbab7ec14e698","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":270,"y":560,"wires":[["e643a806a258a861"]]},{"id":"feed64ed2f0e512d","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":270,"y":600,"wires":[["e643a806a258a861"]]},{"id":"3a695937bd7dc934","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":270,"y":640,"wires":[["e643a806a258a861"]]},{"id":"34d04ccce7337b8f","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"150","payloadType":"num","x":270,"y":720,"wires":[["2b1adde1d9e1a8bd"]]},{"id":"69804e5c23f69846","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"101","payloadType":"num","x":270,"y":780,"wires":[["2b6d2bdfc33d06c6"]]},{"id":"c2a7e8dab4b6b65b","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"level":10}","payloadType":"json","x":260,"y":460,"wires":[["4bb597c9fa7b1231"]]},{"id":"a464f742719e8be7","type":"inject","z":"f6e4dcac415570da","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"level":200}","payloadType":"json","x":250,"y":400,"wires":[["4bb597c9fa7b1231"]]},{"id":"e643a806a258a861","type":"smithtek-nodered-control-sp","z":"f6e4dcac415570da","name":"Control Mode","globalKey":"control","x":480,"y":600,"wires":[[]]},{"id":"2b1adde1d9e1a8bd","type":"smithtek-nodered-control-sp","z":"f6e4dcac415570da","name":"start setpoint","globalKey":"start","x":470,"y":720,"wires":[[]]},{"id":"2b6d2bdfc33d06c6","type":"smithtek-nodered-control-sp","z":"f6e4dcac415570da","name":"stop setpoint","globalKey":"stop","x":470,"y":780,"wires":[[]]}]

License

Copyright (c) 2023 www.smithtek.com.au
Licensed under the terms of the GPLv3

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"... [The rest of your license text]

Acknowledgements

Special thanks to:

  • Nick O'Leary and Dave Conway-Jones for their invaluable contributions to the Node-Red community.

Contact: [email protected]
Website: www.smithtek.com.au