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

v0.12.2

Published

create virtual devices for homee and access api with node-red

Downloads

132

Readme

node-red-contrib-homee

Access the homee api with node-red and create virtual devices for homee.

Installation

cd ~/.node-red
npm install node-red-contrib-homee

Usage

This plugin provides three nodes (and two configuration nodes). The homeeApi node is used to address the API of an existing homee. With the homeeDevice node you can create virtual devices for your homee. The homeeLog node is used to query the logfile from your homee.

homeeAPI

Receiving messages

When the connection is successfully established, all messages from homee, e.g. status updates and user interactions, are passed on to the payload.

Sending messages

homee accepts various messages in a particular format. Send the message as payload to the homee node. Below are a few examples of common messages.

Get all nodes
GET:nodes
Get all homeegrams
GET:homeegrams
Get all groups
GET:groups
Get all relationsships
GET:relationships

homeeDevice

First a virtualHomee-node (like an virtual homee) must be configured. Afterwards any device that homee knows can be created. The devices can then be taught-in using the homee in homee function. Every homeeDevice-node provides one input and one output.

Input from flow

You can change attribute values by sending a JSON object as payload to the homeeDevice-node. The example sets the attribute with the ID 10 to the value 1.

{
  "attribute": {
      "id": 10,
      "value": 1
  }
}

Hint: The old syntax {"id": 10, "value": 1} still works but is deprecated and will be removed in one of the next versions.

It's also possible to update the state of the node. The following example sets the state of the virtual device to unavailable.

{ "state": 2 }

Flow output

Every attribute change from homee sends a json payload to the output of the node.

{ "attributeId": 10, "targetValue": 0 }

Sample flows

The homeean project provides a collection of sample flows, including fully-configured virtualDevice-node's that can serve as a starting point for your own flows.

Profile and Attribute type values

Each virtualDevice-node needs a specific profile value and each of the node's attributes a type. Known values can be found in the homee-api project's enum.js.

Persist attribute data

By default, Node-RED does not save changes to nodes that are executed in the background. This includes changes to the current value of an attribute.

With version 0.5.0 an optional storage possibility of attribute values is introduced. In order to use the storage option, the local file storage must be enabled in settings.js.

contextStorage: {
  default: {
        module: "memory",
      },
   homeeStore: {
       module: "localfilesystem",
   }
},

homeeLog

Send any message to the homeeLog node to start querying the log file. Since the log file can only be queried as a whole, the query will take a few seconds.

The output format can be selected in the settings. In addition to the output of the raw log data, the log file can be transformed to an array or a collection. The selection can be overwritten with msg.output. Valid values are raw, array and collection.

About

This plugin is not an official plugin. The homee device simulation is based on the work of @tobiasgraf and his homeejs and would not have been possible without him.