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-wemo-3way

v1.1.0

Published

Homebridge plugin to turn 2 Wemo switches (1 with load, 1 w/o) into a software 3-way switch

Downloads

3

Readme

homebridge-wemo-3way

Homebridge plugin to turn 2 Wemo switches (1 with load, 1 w/o) into a software 3 way switch. Generally, you need to have a switch that controls a load (ie: lights/fan) and another switch (that may or may not have its load wire connected). This plugin will sync ON/OFF state for both switches, so you can the turn the load ON or OFF from either switch. Usually, there are 2 devices in a 3-way switch set, though 3+ devices (4-way) in a set is supported as well. Also, this plugin avoids loops and mis-syncs through periodic refresh.

Prerequisites

  • This plugin will attempt to discover and control your Wemo devices via your local network (UPnP). No Wemo credentials are required.
  • Please ensure you have Homebridge (at least v1.0.0) installed, with an IP on the same local network or VLAN as your Wemo devices.

Installation

Homebridge UI

Simply go to the Plugins page, search homebridge-wemo-3way and click Install.

Manually

Assuming a global installation of homebridge:

npm i -g --unsafe-perm homebridge-wemo-3way

Homebridge Configuration

For the best experience setting up this plugin, please use Homebridge UI to configure settings and switches.

Required Configuration

Each 3-way switch set should have 2 (or more) switches. The 1st switch in each set is considered the primary (controls load/lights). For example, my Hallway Dimmer (serial number: 241746K1504004) has lights, is specified 1st, then my Hallway Switch (serial number: 2299A029N01D80) has no load connected, is 2nd. You can find the serial numbers of all your Wemo devices during discovery in Homebridge logs.

{
  "switches": [["241746K1504004", "2299A029N01D80"]]
}
  • This example shows a single 3-way switch set with 2 switches. 241746K1504004 has load and is 1st in set (primary).
{
  "switches": [
    ["241746K1504004", "2299A029N01D80"],
    ["XXXXXXXXXXXXXX", "XXXXXXXXXXXXXX"], // another 3-way switch set
    ...
  ]
}
  • Each additional array is another 3-way switch set

Optional Configuration

Option | Type | Default | Explanation --- | --- | --- | --- discoverInitialAttempts | integer | 6 | Wemo discovery needs to be on a more frequent interval at startup to ensure all devices are discovered. discoverInitialInterval | interger | 15000 | By default, attempt 6 times at 15s each then fallback to every 120s. discoverInterval | integer | 120000 | Regular discovery interval (in ms) after initial attempts refreshEnabled | bool | true | Enabled by default. Sometimes light switches fail to report updated state, this'll manually poll each device to ensure state is correct. refreshInterval | integer | 60000 | Interval (in ms) to manually poll each device's state ignoredDevices | array | [] | Some devices such as the v4 socket plug frequently disconnect/reconnect. If they're not a part of a 3-way switch set, you can ignore them here to avoid log spam. switchesOnly | bool | false | Disabled by default, which shows ON/OFF activity for all Wemo devices in Homebridge logs (may be useful for debugging or just general logging of Wemo activity in your house). Enable this to only monitor devices belonging to a 3-way switch set. raceTimeout | integer | 5000 | When you turn on a switch in a 3-way switch set, it'll turn on the other switch, which normally will trigger the original switch. This timeout (in ms) prevents that loop from occurring. By default, this plugin will ignore ON/OFF from the other switch for 5s. If this results in a mis-sync, the refresh interval will sync all switches in a set to the primary again within 60s (default value). syncTimeout | integer | 5000 | When you turn on a switch in a 3-way switch set, it'll turn on the other switch. This timeout (in ms) ensures the other switch responds in time. By default, this plugin will mark the other switch as dead if it doesn't respond for 5s, which causes new discovery and will resubscribe to events.

TODO

  • Allows multiple dimmers in a 3-way set and sync brightness across each set

License

MIT