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-controlbomba

v1.0.4

Published

Water pump control with tank level secure function

Downloads

21

Readme

ControlBombaNode for Node-RED

Overview

The ControlBombaNode is a custom Node-RED node designed to manage and control a water pump based on various parameters such as pressure, water level, and user-defined modes (automatic or manual). This node is particularly useful for IoT projects where precise control and monitoring of water pumps are crucial.

Features

  1. Automatic Mode: Controls the pump based on water pressure, adhering to maximum and minimum thresholds.
  2. Manual Mode: Allows manual control over the pump.
  3. Safety Checks: Includes checks for empty water levels, time limits for pump operation, and configurable reset functionality.
  4. State Monitoring: Keeps track of the pump's operational time and other state variables, which are sent back as output for further use or logging.

Input Payload Description

The input payload to the node should include the following fields:

  • presion: The current pressure (float).
  • reset: Boolean to reset the internal state, if needed.
  • estadoBomba: The actual current state of the pump (Boolean).
  • vacio: Boolean indicating whether the water tank is empty.
  • automatico: Boolean to set the system to automatic mode.
  • manual: Boolean to enable manual mode.
  • nivelVacio: Float value indicating the water level at which the pump should stop.
  • nivelActual: Current water level (float).
  • nivelReinicio: Float value indicating the water level needed to restart the pump.

Example Payload:

msg.payload = {
    presion: 2.5,
    reset: false,
    estadoBomba: true,
    vacio: false,
    automatico: true,
    manual: false,
    nivelVacio: 0.2,
    nivelActual: 0.5,
    nivelReinicio: 0.8
};

Example Flow JSON

[
    {
        "id": "1bb46f2f.55fba1",
        "type": "tab",
        "label": "Flujo de prueba para controlBomba",
        "disabled": false,
        "info": ""
    },
    {
        "id": "c74e682d.6c9ab8",
        "type": "inject",
        "z": "1bb46f2f.55fba1",
        "name": "Simulación de presión y niveles",
        "props": [
            {
                "p": "payload",
                "v": "{\"presion\": 2.5, \"reset\": false, \"estadoBomba\": true, \"vacio\": false, \"automatico\": true, \"manual\": false, \"nivelVacio\": 0.2, \"nivelActual\": 0.5, \"nivelReinicio\": 0.8}",
                "vt": "json"
            }
        ],
        "repeat": "3",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 270,
        "y": 120,
        "wires": [
            [
                "a0452b5b.82d7a8"
            ]
        ]
    },
    {
        "id": "a0452b5b.82d7a8",
        "type": "controlBomba",
        "z": "1bb46f2f.55fba1",
        "name": "",
        "x": 550,
        "y": 120,
        "wires": [
            [
                "f1d891fa.2d9ca"
            ]
        ]
    },
    {
        "id": "f1d891fa.2d9ca",
        "type": "debug",
        "z": "1bb46f2f.55fba1",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "statusVal": "",
        "statusType": "auto",
        "x": 770,
        "y": 120,
        "wires": []
    }
]