WizLighting Binding [4.0.0;5.0.0.0)

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

  • WiZ Full Color with Tunable White Bulbs
  • WiZ Tunable White Bulbs
  • WiZ Dimmable single-color bulbs
  • Wiz Smart Plugs

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

  • The dimming channel and state channels duplicate the same values from the color channel. This is due to the way the bulbs physically work, they do not have a concept of three separate things.
  • Full-color bulbs operate in either color mode OR tunable white/color temperature mode. The RGB LEDā€™s are NOT used to control temperature - separate warm and cool white LEDā€™s are used. Sending a command on the color channel or the temperature channel will cause the bulb to switch the relevant mode. Sending a command on either the dimming or state channel should not cause the bulb to switch modes.
  • Dimmable bulbs do not dim below 10%.
  • The binding attempts to immediately retrieve the actual state from the device after each command is acknowledged, sometimes this means your settings donā€™t ā€˜stickā€™ this is because the device itself did not accept the command or setting.
  • Parameters can not be changed while the bulbs are off, sending any commands to change any settings will cause the bulbs to turn on.
  • Power on behavior is configured in the app.
  • Fade in/out times are configured in the app.
  • Sending too many commands to the bulbs too quickly can cause them to stop responding for a period of time.

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

Rebuilt for Openhab 4.0

(See WizLighting Binding [3.2.0;3.5.0) for previous version)

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.

Resources

org.openhab.binding.wizlighting-4.0.0.02.jar

Source Code Repository

1 Like

(reserved)

Hi @frejos,

I upgraded to OH 4 and can confirm that the binding works as expected. I donā€™t do complicated stuff but turning the light on and off, changig color and brightness works flawless.

thank you!

Hello. Iā€™m trying to install this but canā€™t find it in the list of bindings in openHAB. This is the first binding Iā€™ve tried to install. What am I doing wrong?

As above,

Removed the v3 binding and dropped the jar into the addons folder and everything just works - although all I do is simple stuff like turning on / off and not done any color changing, etc. yet.

Thanks

@Warrio,

This is not a ā€˜fully approvedā€™ bnding and therefore cannot be installed form the GUI. You need to download the jar file from the first post and then put this into your addons folder

The binding is available for installation through the Community Marketplace Settings UI by going to settings, selecting Bindings and going to the Community Marketplace section and looking for and selecting the WizLighting Binding entry.

NOTE: If you have previously installed via manually placing the JAR in the addons directory you should first:

  1. remove the JAR from the addons directory,
  2. shutdown openhab,
  3. run openhab-cli clean-cache,
  4. start openhab,
  5. install from Community Marketplace.

Also NOTE: The Community Marketplace does not have an auto update feature for installed bindings, if new versions are released for bindings you have installed through the Community Marketplace you will need to follow these steps to upgrade manually. Please watch the appropriate thread in the Community Marketplace for any updates.

  1. uninstall currently installed version of the binding through Community Marketplace,
  2. install newly updated version from Community Marketplace.

I upgraded to 4.x a couple of months ago, but finally got around to finish up the issues (I had a few)ā€¦

I appreciate all this work as my wiz bulb collection is growing. Especially since Walmart started carrying them too.

My instance is running in a container and I use addon.cfg to install my bindings (I keep some conf files in a git repo). That being said, would ā€˜wizlightingā€™ suffice for the install? (Iā€™m currently running on the above updated jar.)

Also any plans on adding the Wiz Motion Sensor? or the Wiz LED Strips?

Hello Josh,

Thanks a lot for your effort.
I can install many ā€¦ price is good vs hue.

I got my hands on some WIZ full color bulbs and would love to give this binding a try.
Unfortunately any attempt to create a .things file resullts in

No ThingHandlerFactory found for thing wizlighting:wizBulb:light_livingroom (thing-type is wizlighting:wizBulb). Deferring initialization.

Tried both the community marketplace as well as the manual installation with the .jar file. openHAB version is 4.1.1

Anyone has any guesses what I could be doing wrong or could try to debug?
Can anyone confirm that this binding should still be working?

@frejos: is there something youā€™re waiting on to open a PR and get this binding into openHAB proper? I see there have been multiple PRs in the past that never made it, with the most recent (but still quite old) seems like itā€™s saying essentially ā€œready, but needs re-targeted to current openHAB versionā€, and the response was that youā€™re now the one maintaining it.

Hey @holyibis,

This binding is still working just fine. I have a large install of these lights and I generally donā€™t have any issues with loading the binding from the marketplace (which is the preferred installation method). Iā€™m running OpenHab 4.1.2 currently but have ran all the 4.x versions with this binding.

I have not personally tested with manually created .things files, I always create the things in Main UI, most often using auto discovered devices that get added to the inbox once the binding has been installed. Assuming you have the binding loaded correctly, I suspect some issue with the definition of the .things file or something not mapping correctly with that route.

The error message appears to be indicating that the binding was not found (or installed correctly) or the definition in the .things isnā€™t able to match to the correct Handler for the binding.

You should be able to see more logging. You can also turn the logging level up to DEBUG or TRACE for the logger org.openhab.binding.wizlighting by using the OpenHab console in order to get a better idea of what is happening. Assuming the binding is loaded properly, you should see a message in the logs like this:

*************************************************
WiZ Connected Lighting, binding version: v4.0.0.02
*************************************************

Hopefully this helps, if you see an issue in the logs I can try to help further.

Thanks,

@ccutrer There was a long history of different people attempting to get the binding through the pull request approval process before I got involved with the project. No one was ever successful after spending large amounts of time trying to repeatedly refactor based on maintainerā€™s comments.

When I got involved, I also decided that it was much easier to fix up the code and maintain it outside of the very large project structure of the OpenHab bindings project. At least at that time, I was also making frequent changes to fix issues so being able to release new versions on my own schedule worked way better.

Now, that the binding is very mature and stable, the simple answer is I donā€™t think it is worth the effort for me to explore. Having the ability to install the binding via the marketplace gives the ease of installation for all user levels but the flexibility of being able to maintain the code outside of the standard repository and release processes.

Okay, that makes sense for the past. Iā€™m always hesitant that bindings in the community may have been abandoned, whereas if theyā€™re in the main repo I know that they at least compile and are installable with the current version of openHAB. And as much as it might be a pain to get past the review, it also often increases the quality of the binding, and improves its behavior wrt to the rest of the ecosystem. For example, most other bindings that support multiple types of bulbs (on/off, dimming, color, CCT) will not expose a switch channel for dimmable bulbs, or a dimmer (or switch) channel for color bulbs, since you can treat the ā€œricherā€ channel exactly like the simpler channel if you want (you can send ON/OFF to a color channel for example, or cast the HSBType state of a Color channel to OnOffType). I was a bit confused at first seeing all three channels on my Color+CCT bulbs.

If I wanted to make improvements (specifically, adding a color-temperature-abs channel), would you be opposed to trying to get it merged into the main repo first? While your point about being able to release earlier on community (and being easy to install such ā€œpre-releaseā€ versions) is nice, thereā€™s nothing precluding that from also happening. For example, with the jrubyscripting add-on, we have it in the main repository, but we also sometimes release a community version with the latest JRuby dependency, so that you can run it in released versions of openHAB without having to manually install it.

Good afternoon. With the latest update to openHAB 4.2.1 Iā€™m not able to find the binding in the Add-on Store anymore. Under 4.2.0 everything was working fine. Am I doing something wrong?

Thanks!

@mr.airworthy I had not yet updated the version limit in the title of this thread. I just bumped it up to 5.0. Hopefully that allows it to show up for you now.

1 Like

It does. Much appreciated!

Hi all! With the upgrade to 4.2 the light mode is acting strange.

It only displays the word string instead of the light mode it used to.
If i click on it i get the list of Light Modes and it will accept the mode. When i view the raw item it lists the number correctly. However, in the page view it just says string no matter what setting I choose. Any ideas?

image