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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@haydendonald/node-red-contrib-hass-stuff

v1.5.0

Published

A collection of stuff I use on my Node Red + Home Assistant server. This could be of use for others, i don't know..

Readme

node-red-contrib-hass-stuff

A collection of stuff I use on my Node Red + Home Assistant server. This could be of use for others, i don't know..

Nodes

Connections

This node is required by other nodes in this project. It provides the connections required to communicate to HomeAssistant and other stuff.

The following can be imported into NodeRED to provide these:

[
    {
        "id": "80cbc1c2e93f49fa",
        "type": "ha-api",
        "z": "f028d32cd5f8196d",
        "name": "",
        "server": "",
        "version": 1,
        "debugenabled": true,
        "protocol": "websocket",
        "method": "get",
        "path": "",
        "data": "",
        "dataType": "jsonata",
        "responseType": "json",
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "results"
            }
        ],
        "x": 530,
        "y": 700,
        "wires": [
            [
                "3b2abe9fd6ef7ffd"
            ]
        ]
    },
    {
        "id": "3b2abe9fd6ef7ffd",
        "type": "change",
        "z": "f028d32cd5f8196d",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "api",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 675,
        "y": 700,
        "wires": [
            [
                "78f07ee4763a6b14"
            ]
        ],
        "l": false
    },
    {
        "id": "934e731820c17347",
        "type": "api-call-service",
        "z": "f028d32cd5f8196d",
        "name": "",
        "server": "",
        "version": 7,
        "debugenabled": false,
        "action": "",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": false,
        "domain": "",
        "service": "",
        "x": 530,
        "y": 820,
        "wires": [
            [
                "885080cdde7fec06"
            ]
        ]
    },
    {
        "id": "388d419ff40adeae",
        "type": "api-current-state",
        "z": "f028d32cd5f8196d",
        "name": "",
        "server": "",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "",
        "state_type": "str",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "string",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "entity"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 560,
        "y": 740,
        "wires": [
            [
                "a60dbdb2a080de5e"
            ]
        ]
    },
    {
        "id": "1b2a505996e8dd0b",
        "type": "server-events",
        "z": "f028d32cd5f8196d",
        "name": "",
        "server": "",
        "version": 3,
        "exposeAsEntityConfig": "",
        "eventType": "",
        "eventData": "",
        "waitForRunning": true,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "$outputData(\"eventData\").event_type",
                "valueType": "jsonata"
            }
        ],
        "x": 540,
        "y": 660,
        "wires": [
            [
                "194985fca2779f3b"
            ]
        ]
    },
    {
        "id": "170d8627f4d745b0",
        "type": "ha-get-entities",
        "z": "f028d32cd5f8196d",
        "name": "",
        "server": "",
        "version": 1,
        "rules": [
            {
                "condition": "state_object",
                "property": "",
                "logic": "is",
                "value": "",
                "valueType": "str"
            }
        ],
        "outputType": "array",
        "outputEmptyResults": true,
        "outputLocationType": "msg",
        "outputLocation": "payload",
        "outputResultsCount": 1,
        "x": 550,
        "y": 780,
        "wires": [
            [
                "204f99728a048c5f"
            ]
        ]
    },
    {
        "id": "a60dbdb2a080de5e",
        "type": "change",
        "z": "f028d32cd5f8196d",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "state",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 675,
        "y": 740,
        "wires": [
            [
                "78f07ee4763a6b14"
            ]
        ],
        "l": false
    },
    {
        "id": "204f99728a048c5f",
        "type": "change",
        "z": "f028d32cd5f8196d",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "get_entities",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 675,
        "y": 780,
        "wires": [
            [
                "78f07ee4763a6b14"
            ]
        ],
        "l": false
    },
    {
        "id": "885080cdde7fec06",
        "type": "change",
        "z": "f028d32cd5f8196d",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "action",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 675,
        "y": 820,
        "wires": [
            [
                "78f07ee4763a6b14"
            ]
        ],
        "l": false
    },
    {
        "id": "194985fca2779f3b",
        "type": "change",
        "z": "f028d32cd5f8196d",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "event",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 675,
        "y": 660,
        "wires": [
            [
                "78f07ee4763a6b14"
            ]
        ],
        "l": false
    },
    {
        "id": "6b0c6c859f8180ff",
        "type": "switch",
        "z": "f028d32cd5f8196d",
        "name": "",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "api",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 445,
        "y": 700,
        "wires": [
            [
                "80cbc1c2e93f49fa"
            ]
        ],
        "l": false
    },
    {
        "id": "cb6a81f143b93c08",
        "type": "switch",
        "z": "f028d32cd5f8196d",
        "name": "",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "state",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 445,
        "y": 740,
        "wires": [
            [
                "388d419ff40adeae"
            ]
        ],
        "l": false
    },
    {
        "id": "a3de07378d809f30",
        "type": "switch",
        "z": "f028d32cd5f8196d",
        "name": "",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "get_entities",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 445,
        "y": 780,
        "wires": [
            [
                "170d8627f4d745b0"
            ]
        ],
        "l": false
    },
    {
        "id": "e335241f272835a4",
        "type": "switch",
        "z": "f028d32cd5f8196d",
        "name": "",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "action",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 445,
        "y": 820,
        "wires": [
            [
                "934e731820c17347"
            ]
        ],
        "l": false
    },
    {
        "id": "25925d7eacdca45f",
        "type": "connections-node",
        "z": "f028d32cd5f8196d",
        "name": "HASS Stuff Connections",
        "connectionsConfigNode": "ea84f05a857bde72",
        "x": 570,
        "y": 620,
        "wires": [
            [
                "f6240b1dab1143e3"
            ]
        ]
    },
    {
        "id": "5448ec0ff29169e2",
        "type": "comment",
        "z": "f028d32cd5f8196d",
        "name": "Provide connections to HASS stuff",
        "info": "",
        "x": 560,
        "y": 580,
        "wires": []
    },
    {
        "id": "f6240b1dab1143e3",
        "type": "junction",
        "z": "f028d32cd5f8196d",
        "x": 380,
        "y": 660,
        "wires": [
            [
                "6b0c6c859f8180ff",
                "e335241f272835a4",
                "cb6a81f143b93c08",
                "a3de07378d809f30"
            ]
        ]
    },
    {
        "id": "78f07ee4763a6b14",
        "type": "junction",
        "z": "f028d32cd5f8196d",
        "x": 750,
        "y": 640,
        "wires": [
            [
                "25925d7eacdca45f"
            ]
        ]
    },
    {
        "id": "ea84f05a857bde72",
        "type": "connections-config-node",
        "name": "HASS Stuff Connections Config"
    },
    {
        "id": "f947b66dc55502ce",
        "type": "global-config",
        "env": [],
        "modules": {
            "node-red-contrib-home-assistant-websocket": "0.80.3",
            "node-red-contrib-hass-stuff": "0.0.1"
        }
    }
]

Dependencies

It has the following dependencies

  1. HomeAssistant

Light Control

A node that controls lights with general scenes that adjust throughout the day with sleep mode and other features.

Features

  • Adaptive scenes depending on what time of the day it is
  • Adaptive scenes depending on luminance sensor
  • Night mode entity to force the adaptive scene to be in "night mode"
  • Ability to turn off entities in night mode

Dependencies

  1. Hue Scene Presets
  2. HASS Sun

PIR

A node that simplifies control of a PIR

Features

  • Entity to enable/disable the PIR
  • Disable the PIR with luminance sensor value
  • Set timeout before the PIR is triggered to be on/off

Door Sensor

TODO

A node that simplifies control of a door sensor

Features

  • Entity to enable/disable the sensor
  • Disable the sensor with luminance sensor value
  • Set timeout before the PIR is triggered to be on/off

Curtain Control

TODO

A node that provides control of a cover

Features

  • Adds buttons to set the curtain to open/half/closed
  • Have the curtain close on luminance sensor value
  • Have curtain be closed at certain hours
  • Have curtain be half at certain hours

EV Charging Price

A node that keeps track of how much i spend on charging my EV (polestar 2) while at home.

It works by checking if the car started charging while i'm at home. When the car stops charging it will add the price of the session to a sensor. This just estimates the value, useful for if you don't have the ability to monitor the charge rate etc.

Features

  • Calculates how much money per month i spend on charging my EV
  • Detects if the car was charged at home, ignoring fast charging sessions

// MIMO //