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

v0.0.3

Published

A Node-RED node to read data from Smart Meter Gateways (SMGWs) via the HAN interface

Downloads

22

Readme

node-red-contrib-smgw

license npm version

A Node-RED node to read data from Smart Meter Gateways (SMGWs) via the HAN interface.

Supported Smart Meter Gateways

Due to a non-standardised interface over the HAN connection, adaptation is necessary for each gateway manufacturer. Currently only the following gateways are supported:

  • PPC Smart Meter Gateway (tested with FW 31416-31435)

Getting started

Use 'Manage Palette' in the Node RED Webinterface or install via cli:

$ cd ~/.node-red
$ npm install node-red-contrib-smgw

Gateway credentials/ip and default ip

Westnetz:

  • PPC Smart Meter Gateway with default ip 192.168.1.200

  • Password editable on https://medaco.westnetz.de/web2_wn/sethanpassword

  • Username is the last part of the HAN-Profile field (e.g. 921908|ECPR0000064191| 6149436). In this example 6149436 is the username.

  • HAN Webinterface on https://192.168.1.200/cgi-bin/hanservice.cgi

smgw-read node

With the help of the node 'smgw-read', meter readings can be read via a gateway. The following example message is returned:

{
    "payload":1061.9932,
    "time":1622041200000,
    "unit":"kWh",
    "isvalid":true,
    "time_raw":"2021-05-26 17:00:00",
    "meterid":"1itr0015451709.sm",
    "updateinterval":900,
    "gwfirmware":"31416-31435",
    "obis":"1-0:1.8.0",
}

Flow Examples

Log meter value with influx

Sending meter value with timestamp to influx database. Screenshot Influx smart meter gateway example

[{"id":"5dcd50ec.d6a738","type":"influxdb out","z":"e30de6ff.bf75c","influxdb":"1264afb5.fabe2","name":"","measurement":"P001_grid_electricity_meter","precision":"ms","retentionPolicy":"","x":756,"y":148,"wires":[]},{"id":"a68b7d66.a65e68","type":"change","z":"e30de6ff.bf75c","name":"format for influx","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"},{"t":"move","p":"time","pt":"msg","to":"payload.time","tot":"msg"},{"t":"move","p":"isvalid","pt":"msg","to":"payload.isvalid","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":424,"y":148,"wires":[["5dcd50ec.d6a738"]]},{"id":"c42db596.e8992","type":"smgw-read","z":"e30de6ff.bf75c","name":"Zähler Netz","smgw":"8c0360b0.6e64b","meterid":"1itr0034452109","interval":"2","x":255,"y":148,"wires":[["a68b7d66.a65e68"]]},{"id":"1264afb5.fabe2","type":"influxdb","z":"","hostname":"192.168.178.10","port":"8080","protocol":"http","database":"exampledb","name":"","usetls":false,"tls":""},{"id":"8c0360b0.6e64b","type":"smart-meter-gateway","z":"","ip":"192.168.1.200","model":"ppc"}]

Contribution

Thank you for considering contributing to this project! Feel free to report bugs or submit pull requests. It would be great to support more than one gateway manufacturer in the future. Through a modular design, adapters for additional gateways can be easily added. If you are interested please contact me for assistance.