frejos / openhab-wizlighting

Openhab binding for Wiz Lighting based devices
Eclipse Public License 2.0
6 stars 1 forks source link

logo

This binding integrates the WiZ Connected smart devices. These inexpensive devices, typically smart bulbs, are available online and in most Home Depot stores. They come in a variety of bulb shapes and sizes with options of full color with tunable white, tunable white, and dimmable white. This binding has been tested with various bulbs and switchable plugs. They are sold under the Philips brand name. (Wiz is owned by Signify (formerly Philips Lighting).) Note that while both are sold by Philips, WiZ bulbs are not part of the Hue ecosystem.

This binding operates completely within the local network - the discovery, control, and status monitoring is entirely over UDP in the local network. The binding never attempts to contact the WiZ servers in any way but does not stop them from doing so independently. It should not interfer in any way with control of the bulbs via the WiZ app or any other service integrated with the WiZ app (ie: Alexa, IFTTT, SmartThings). Any changes made to the bulb state outside of openHAB should be detected by the binding and vice-versa. Before using the binding, the bulbs must be set up using the WiZ iOS or Android app. Local control must also be enabled with-in the WiZ app in the app settings. (This is the default.)

Supported Things

Note This binding was created for and tested on the full color with tunable white bulbs, however, users have reported success with other bulb types and plugs.

Discovery

New devices can be discovered by scanning and may also be discovered by background discovery. All discovered devices will default to 'Full Color' bulbs if unable to automatically detect the specific device type. You may need to create devices manually if desired.

Devices must first have been set up using the WiZ iOS or Android app. If the binding cannot discover your device, try unplugging it, wait several seconds, and plug it back in.

Binding Configuration

The binding does not require any special configuration. You can optionally manually set the IP and MAC address of the openHAB instance; if you do not set them, the binding will use the system defaults.

Thing Configuration

To create or configure a device manually you need its IP address and MAC address. These can be quickly found in the ios or android app by entering the settings for device in question and clicking on the model name. The refresh interval may also be set; if unset it defaults to 30 seconds. If you desire instant updates, you may also enable "heart-beat" synchronization with the bulbs. Heart-beats are not used by default. When heart-beats are enabled, the binding will continuously re-register with the bulbs to receive sync packets on every state change and on every 5 seconds. Enabling heart-beats causes the refresh-interval to be ignored. If heart-beats are not enabled, the channels are only updated when polled at the set interval and thus will be slightly delayed wrt changes made to the bulb state outside of the binding (ie, via the WiZ app).

NOTE: While the bulb's IP address is needed for initial manual configuration, this binding does not require you to use a static IP for each bulb. After initial discovery or setup, the binding will automatically search for and re-match bulbs with changed IP addresses by MAC address once every hour.

Thing parameters:

Parameter ID Parameter Type Mandatory Description Default
macAddress text true The MAC address of the bulb
ipAddress text true The IP of the bulb
updateInterval integer false Update time interval in seconds to request the status of the bulb. 60
useHeartBeats boolean false Whether to register for continuous 5s heart-beats false
reconnectInterval integer false Interval in minutes between attempts to reconnect with a bulb that is no longer responding to status queries. When the bulb first connects to the network, it should send out a firstBeat message allowing OpenHab to immediately detect it. This is only as a back-up to re-find the bulb. 15

Example Thing:

Thing wizlighting:wizBulb:lamp "My Lamp" @ "Living Room" [ macAddress="accf23343cxx", ipAddress="192.168.0.xx" ]

Channels

The Binding supports the following channels:

Channel Type ID Item Type Description Access
color Color State, intensity, and color of the LEDs R/W
temperature Dimmer Color temperature of the bulb R/W
dimming Dimmer The brightness of the bulb R/W
state Switch Whether the bulb is on or off R/W
lightMode String Preset light mode name to run R/W
speed Dimmer Speed of the color changes in dynamic light modes R/W
signalstrength system Quality of the bulb's WiFi connection R
lastUpdate Time The last time an an update was received from the bulb R

Light Modes

The Binding supports the following Light Modes

ID Scene Name
1 Ocean
2 Romance
3 Sunset
4 Party
5 Fireplace
6 Cozy White
7 Forest
8 Pastel Colors
9 Wakeup
10 Bed Time
11 Warm White
12 Daylight
13 Cool White
14 Night Light
15 Focus
16 Relax
17 True Colors
18 TV Time
19 Plant Growth
20 Spring
21 Summer
22 Fall
23 Deep Dive
24 Jungle
25 Mojito
26 Club
27 Christmas
28 Halloween
29 Candlelight
30 Golden White
31 Pulse
32 Steampunk

Bulb Limitations

Example item linked to a channel

Color LivingRoom_Light_Color "Living Room Lamp" (gLivingroom) {channel="wizlighting:wizColorBulb:accf23343cxx:color"}

Changelog

Version 4.0.0.02

Version 4.0.0.01

Version 3.4.0.01

Version 3.3.0.04

Version 3.3.0.03

History and Credit

I am only the latest in a long line of individuals who have picked this binding up and helped maintain it. I have a large installation of these devices in my home and have recently restructured the code, ported it to newer releases of OH and fixed a few bugs, but all credit goes to those before me that did the heavy lifting. Here I am attempting to make this easier for users to access by including it in the community marketplace.