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

picogw-plugin-echonet

v1.0.13

Published

ECHONET plugin of picogw

Downloads

348

Readme

node-picogw-plugin-echonet is a mandatory plugin module for PicoGW, a Home Automation and Building Automation devices gateway server, developed by Kanagawa Institute of Technology, Smart House Research Center, released under MIT license. This is automatically installed when you install PicoGW.

ECHONET Lite plugin APIs

GET /v1/echonet

This path is the ECHONET Lite plugin root. The API call returns ECHONET Lite devices ID (internally generated unique ID) with their MAC address and current IP address.

GET /v1/echonet/[DeviceID]

ECHONET Lite device object. [DeviceID] is the unique name of ECHONET Lite device. This call returns ECHONET Lite device's Property IDs (EPC) and its cached value (if exists), and whether the property only exists in the super class (see ECHONET Lite specification). Example call result is :

GET /v1/echonet/[DeviceID]/[PropertyID]

GET access to the ECHONET Lite property. This API will send GET request to a ECHONET Lite device and wait until the result is obtained. The API will return error if preset timeout time has past (30 seconds) If a vaild value is obtained, the value is stored in the device's cache.

PUT /v1/echonet/[DeviceID]/[PropertyID]

This will set a new value (EDT) to the property. Thew new value is specified in the body text as a JSON object:

{"value":NEWVAL}

You can also specify the ECHONET Lite binary array directly.

{"edt":[48]}

This request header must contain "Content-type: application/json".

There are several kinds of NEWVALs specify-able, depending on the definition. For example, operatingstate accepts the string "on" or "off", while air-conditioner's TemperatureSetValue accepts the temperature value as a number directly. The complete list of available values is in v1/plugins/echonet/proc_converter.js (See also all_Body.json to correspond ECHONET ID number to PicoGW name.)

edt field only accepts the array of decimal digit such as [48].

GET /v1/echonet/[REGEXP]/[PropertyID]

ECHONET Lite plugin supports regular expression for device names. For example:

PUT http://192.168.1.10:8080/v1/echonet/.+/operatingstate/

with the body text as {"value":"on"} will set 0x30 to all existing devices's operatingstate.

GET http://192.168.1.10:8080/v1/echonet/(genericillumination_1|airconditioner_1)/operatingstate/

will obtain operatingstate of a light and an airconditioner at once. Note that the response time is dominated by the slowest device.

PropertyID cannot accept regular expression (because it can easily be many!)

DELETE /v1/echonet

Clear all device cache information and reset device ID counter.

DELETE /v1/echonet/[DeviceID]

Clear one device cache information without resetting the device in ID counter. Therefore, if a real device remain exist, it appears again with different device ID.

DELETE /v1/echonet/[DeviceID]/[PropertyID]

Clear one property cache and tries to get a new one.

PubSub

This plugin publishes a property value at device notification. Also publishes when a property cache value is changed.