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

@hoobs/shelly

v0.12.0

Published

Shelly plugin for HOOBS

Downloads

39

Readme

homebridge-shelly

NPM Version Build Status

Shelly plugin for Homebridge, enabling HomeKit support for Shelly devices.

Supported devices

Currently the following devices are supported:

Notes

1 To use Shelly 2 or Shelly 2.5 in roller shutter mode the device must have been calibrated and be running firmware version 1.4.9 or later.

2 Requires firmware version 1.5.1 or later.

Installation

  1. Install homebridge by following the instructions.
  2. Install this plugin by running npm install -g homebridge-shelly.
  3. Add the configuration to your homebridge config.json.

Configuration

In most cases, simply adding this plugin to the homebridge config.json will be enough:

"platforms": [
  {
    "platform": "Shelly",
    "name": "Shelly"
  }
]

Your Shelly devices will then be automatically discovered, as long as they are on the same network and subnet as the device running homebridge.

To see a list of all discovered devices, visit the administration page by going to http://<IP-ADDRESS>:<PORT>/, where IP-ADDRESS is the IP address of the device that you are running homebridge on, and PORT is the configured port number (8080 by default, see below).

Network interface

Sometimes setting the "networkInterface" option to the local IP address of your device will help when your devices aren't automatically discovered, or you see error messages like addMembership EADDRNOTAVAIL or addMembership EADDRINUSE.

Authentication

Set the "username" and "password" options if you have restricted the web interface with a username and password. Note that this configuration applies to all Shelly devices.

Request timeout

The "requestTimeout" option can be used to configure the timeout for HTTP requests to the Shelly devices. Specify in milliseconds. Default is 10 seconds.

Stale timeout

Use the "staleTimeout" option to configure how long a device can be offline before it is regarded as stale and unregistered from HomeKit. Specify in milliseconds. Set to 0 or false to disable. Disabled by default.

Administration interface

By default, this plugin will launch an HTTP server on port 8080 to serve an administration interface. You can disable this by setting "admin"."enabled" to false. You can also change the port number using "admin"."port".

Device specific configurations

Configurations for specific Shelly devices can be set using the "devices" array. Each object in the array must contain an "id" property with the ID of the Shelly device that you want to target. IDs are always made up of 6 hexadecimal characters and can be found in the Shelly Cloud app or the web interface of a device, under Settings -> Device info -> Device ID.

General configurations

  • "exclude" - set to true to exclude the device from Homebridge.
  • "username" and "password" - set these if you have restricted the web interface of the device with a username and password. This will override the global "username" and "password" options.
  • "name" - sets a custom name for the device.

Shelly switch configurations

Applies to Shelly 1, 1PM, 2 and 2.5 in relay mode, 4Pro, EM, Plug and Plug S.

  • "type" - sets the type of accessory the device is identified as. Available types are "contactSensor", "motionSensor", "occupancySensor", "outlet", "switch" (default) and "valve".

Shelly 2.5 configurations

  • "type" - in roller mode, the device can be identified as either "door", "garageDoorOpener", "window" or "windowCovering" (default).

Shelly RGBW2 configurations

  • "colorMode" - set to "rgbw" (default) to have HomeKit control all four channels of the device (R, G, B, and W), or to "rgb" to omit the W channel.

Example configuration

"platforms": [
  {
    "platform": "Shelly",
    "name": "Shelly",
    "username": "admin",
    "password": "pa$$word",
    "devices": [
      { "id": "74B5A3", "exclude": true },
      { "id": "A612F0", "username": "admin", "password": "pa$$word2" },
      { "id": "6A78BB", "colorMode": "rgb" },
      { "id": "AD2214", "name": "My Device" },
      { "id": "1D56AF", "type": "outlet" }
    ],
    "admin": {
      "enabled": true,
      "port": 8181
    }
  }
]

Unsupported devices

If you have a Shelly device that is not yet supported by this plugin you can help adding support for it by following these steps:

  1. Run $ homebridge-shelly describe <ip-address> with the IP address of the Shelly device.
  2. Create a new issue and post the output from the previous command.

Donations

I develop this plugin in my spare time. If you like it and you find it useful, please consider donating a small amount by clicking the button below. That will allow me to buy new Shelly devices so that I can add support for them.