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

homebridge-shelly-consumption

v1.0.6

Published

Provides the consumption values of Shelly EM and Shelly 3EM to HomeKit.

Downloads

13

Readme

homebridge-shelly-consumption

Plugin description

This homebridge plugin provides the possibility to get the consumption values of Shelly EM and Shelly 3EM in HomeKit. Because HomeKit doesn't support any consumption service, here the values are integrated as LightSensor-Service. So the unit of the value is Lux.

Actually, this only is a beta version and a very new plugin. Should any errors occur, of course you can open an issue in GitHub. Suggestions for improvement are welcome too. Thanks a lot!

Supported devices

  • Shelly EM
  • Shelly 3EM

Installation

For installation of this plugin, follow these instructions:

  1. Install the plugin by using the Homebridge Config UI X or by running npm install -g homebridge-shelly-consumption.
  2. After installation, the plugin must be configured as described below.

Configuration

After installation, the plugin appears on the Homebridge UI X under the tab Plugins looking like shown below:

Image of Plugin in Homebridge UI X

For configuration click on Settings. The following dialog will pop up:

At beginning, the configruation is empty and you have to set it up like described next. An example of configuration is shown here too:

  1. First you have to enter the user and password of your Shelly devices. You don't need to set these if authentication isn't activated on your Shelly devices.
  2. Next you can add devices by using the button ADD SHELLY DEVICE. Here you enter the values for the following attributes:
    • Name: Optional Here you can enter a name for the device. This is the label, the accessory is appearing with in HomeKit later. The value can be changed later (In the plugin settings and also in HomeKit).
    • IP-address: Here you have to enter the IP address of the Shelly device.
    • Device type: Select the device type of your device. Depending on this, the checkboxes below appear or disappear.
    • emeter channels: Here you have to select which channels of the device should be used for this accessory. The selected channels will be summed up and the total consumption value will be provided to HomeKit. So, in HomeKit you will see one single brightness sensor accessory. If you want to have the single channel consumption values separately in HomeKit, you can add a further device selecting the appropriate channels. On this way you also can add further accessories which summ up different channels. This makes it very flexible for you. Important for this: It only is possible to add devices with the same IP address and the same channel selection one time. An example for this is shown below:

Please remind: After saving the configuration once, changes done later maybe won't be taken. In this case, it could be necessary to remove the corresponding device, save the config, restart homebridge, add the device newly, save config and restart homebridge again.

Configuration in JSON-file:

{
   "user": "",
   "password": "",
   "devices": [
      {
         "name": "House consumption (ch1)",
         "ipAddress": "192.168.1.100",
         "deviceType": "Shelly3EM",
         "emeterChannel1": true
      },
      {
         "name": "House consumption (all)",
         "ipAddress": "192.168.1.100",
         "deviceType": "Shelly3EM",
         "emeterChannel1": true,
         "emeterChannel2": true,
         "emeterChannel3": true
      }
   ],
   "platform": "ShellyConsumption"
}

Appearance in HomeKit

Like described above, the accessory appears as a brightness sensor and the consumption value will be provided as Lux value. A photo of appearance / settings in Homekit is shown below (here in german):

Important information for everybody who uses the Shelly devices for measurement of negative values too. For example if you have photovoltaics and you feed in electricity into the power grid: The accessory provides a further indicator named Status: active (in german: Status: Aktiv). This shows if you have a negative or positive consumption value. Unfortunately, it's not possible to provide a negative value in HomeKit at the moment. Yes stands for positive value No stands for negative value

In the future I probably will change this, so that you can recognize this more directly and more obvious. Maybe by adding a further accessory of another accessory type.

Hints

At least I want to tell that this plugin isn't tested in detail. So it's possible that there will be some problems with it. If so, don't hesitate to contact me.

I implemenented this plugin in my free time. If you would like to support me on any ways, feel free to contact me. Further, I would be thankful if you want to help me by donating a small amount, so that I can buy further devices to add support for those. For this, please contact me too.