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

hw2energyid

v1.3.19

Published

A tool to synchronize data from HomeWizard to EnergyID

Downloads

290

Readme

HomeWizard to EnergyId

Open in GitHub Codespaces

Package version GitHub last commit Release OpenSSF Scorecard

hw2energyid is small tool to synchronize data from HomeWizard devices to your EnergyID dashboard.

Since HomeWizard devices API are only available within your local network, using an EnergyID App to synchronize the data is not possible.
hw2energyid helps bridge the gap by reading the data from your local network and sending them to EnergyId using the WebHook App

Prerequisites

EnergyID

Before you start, you need to create a webhook in EnergyID to let the tool push the data to your dashboard.

  1. Go to the EnergyId incoming webhook page and click activate.
  2. Pick the record you would like to send readings to (e.g.: Home), and provide a name for your application or device (e.g.: HomeWizard).
  3. Copy the generated Webhook URL.

Node

To run the tool, you will also need to have NodeJS installed

Usage

You can either run the tool in the console using the NPM script or use the Docker image.

NPM Script

Open a terminal/console and run the following script:

npx hw2energyid --energyid=<url of the webhook> <options>

Options

| Option | Alias | Description | | ------------- | ---------------- | -------------------------------------------------------------------------------------- | | --energyid | -e | The URL of the EnergyID Webhook | | --meter | -m -p --p1 | The name or IP address of the Homewizard meter | | --offset | -o | Add an offset to the meter's value (to compensate for consumption before installation) | | --dry-run | -d | Dry run. No data will be sent to EnergyID | | --recurring | -r | Run the tool every hour | | --help | -h | Show help | | --version | -v | Show version number |

Docker

First, you need to retreive the IP address of your Homewizard meter.

Note

The hostname is formatted as -<last 6 characters of serial>, so devices with serial AABBCCDDEEFF the hostname is as following:

| Device | Example hostname | | ------------------------ | ------------------- | | P1 meter | p1meter-DDEEFF | | Energy Socket | energysocket-DDEEFF | | Watermeter | watermeter-DDEEFF | | kWh meter (single phase) | kwhmeter-DDEEFF | | kWh meter (three phase) | kwhmeter-DDEEFF |

Open a terminal/console and run the following script:

ping <product-name>-<last 6 charachter of serial>

Create a docker compose file with the following content:

version: '3'

services:
  hw2energyid:
    image: ghcr.io/Th3S4mur41/hw-hooks
    environment:
      - energyid=<the URL of the EnergyId webhook>
      - meter=<the IP address of the  Meter device>
    network_mode: host
    dns:
      - 1.1.1.1

Note
The dns section is required to resolve the EnergyId webhook URL. If you are using a different DNS server, replace

| Environment Variable | Description | | -------------------- | -------------------------------------- | | energyid | The URL of the EnergyID Webhook | | meter | The IP address of the Homewizard meter |

Examples

Note
hw2energyid currently only supports synchronizing electricity and water readings

P1 Meter

The HomeWizard P1 Meter connects into the P1 port on your smart meter and shows your electricity and gas usage.

The P1 meter can be discoverd on your network using Multicast DNS (mDNS).
The name of the device is 'hw-p1meter-' followed by the last six charachters of its serial number.

Note
To find the serial number, open your HomeWizard Energy App.
Then go to Settings > Meters > P1 meter P1 Serial Number

Now that you have all the data you need. Open a terminal/console and run the following script:

npx hw2energyid --meter=hw-p1meter-<last 6 charachter of serial> --energyid=<url of the webhook>

E.g.: The command with your data should look similar to this:

npx hw2energyid --meter=hw-p1meter-65d8c7 --energyid=https://hooks.energyid.eu/services/WebhookIn/46535693-fe25-48ba-96fa-ea827e987318/OS753GD97A11

Water Meter

The HomeWizard Water Meter reads your analog water meter.

The Water meter can be discoverd on your network using Multicast DNS (mDNS).
The name of the device is 'watermeter-' followed by the last six charachters of its serial number.

Now that you have all the data you need. Open a terminal/console and run the following script:

npx hw2energyid --meter=watermeter-<last 6 charachter of serial> --energyid=<url of the webhook>

E.g.: The command with your data should look similar to this:

npx hw2energyid --meter=watermeter-65d8c7 --offset=22.334 --energyid=https://hooks.energyid.eu/services/WebhookIn/46535693-fe25-48ba-96fa-ea827e987318/OS753GD97A11

Links

homewizard dicovery docs
EnergyId Webhook Docs