Coder Social home page Coder Social logo

homebridge-wiz-net's Introduction

homebridge-wiz-net

Control Wiz products over network.

Based of

Currently supports

  • Wiz Plugs/Outlets (ESP10_SOCKET_06, ESP25_SOCKET_01)

Installation

Make sure your bulbs are already set up via the Wiz app and you have "Allow Local Communication" set to ON in your settings.

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-wiz-net
  3. Update your configuration file. See the sample below.

Configuration

Simple Configuration:

{
	"platform": "WizSmartHome",
	"name": "WizSmartHome",
}

Full configuration options:

{
	"platform": "WizSmartHome",
	"name": "Wiz",

	// [Optional] Port for bulbs to connect to your server
	// Default: 38900
	"port": 38900,

	// [Optional] Enable scenes support for your bulbs
	// Default: false
	"enableScenes": false,

	// [Optional] UDP Broadcast address for bulb discovery
	// Default: 255.255.255.255
	"broadcast": "255.255.255.255",

	// [Optional] Your server's IP address
	// Default: Autodiscovered
	"address": "192.168.0.1",

	// [Optional] Manual list of IP addresses of bulbs
	// Useful if UDP broadcast doesn't work for some reason
	// Default: None
	"devices": [
		{ "host": "192.168.0.2" },
		{ "host": "192.168.0.3" },
		{ "host": "192.168.0.4" },
		// ...
	]
}

Some Notes

Color

The Wiz bulbs strongly distinguish between RGB color modes and Kelvin color modes, the latter being significantly brighter. Unfortunately, HomeKit is not very good at handling both at the same time, yielding weird errors if you try to add both characteristics.

Luckily, even if we only enable the color mode, we still get a nice temperature picker. Problem is, the color temperature is given in standard HSV. As such, this app will try to guess which one to best use given a color, and you will notice some significant brightness variance switching between a "temp" hue and a "color" hue.

In particular, since the Wiz bulbs only support up to 6500K, this means that only the top-ish half of the temperature picker is actually bright

Development

Ideas from http://blog.dammitly.net/2019/10/cheap-hackable-wifi-light-bulbs-or-iot.html?m=1

Contributing

Mostly built for my own personal use - so no active development. Feel free to fork and contribute.

How bulbs are discovered

Make a UDP broadcast to port 38899 with the following content:

{"method":"registration","params":{"phoneMac":"<my_mac_address>","register":false,"phoneIp":"<my_ip_address>"}}

You will get a response on port 38900 with the following content:

{"method":"registration","env":"pro","result":{"mac":"<light_address>","success":true}}

License

See LICENSE file

homebridge-wiz-net's People

Contributors

nischcodes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

mobidick1112

homebridge-wiz-net's Issues

Update Plugin to new architecture

Reading the documentation of homebridge shows, the current implementation isn’t up to date or best practices, so a rewrite should be necessary.

Bulbs are not identified

Wiz bulbs are not identified, when with the version "Wiz Lan" from "kpsuperplane" they are. The plugs ESP25 are well identified with your version, but that is not the cas for version "Wiz Lan". A mix of both would be great, but I don't know how to do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.