Kategorier
Övrigt

How to use WiZ lights with Domoticz

WiZ Connected is a series of lights and other Wifi connected IoT. The units are cheap and works well. The WiZ app is actually good and easy to use. But, if you have a Domoticz system you would of course like to integrate the WiZ units. Below are two solutions:

1. Use the Domoticz plugin

Install this plugin:
https://github.com/sydspost/Domoticz-WiZ-connected-plugin
If you are lucky everything goes OK and you can control your WiZ units.

2. Use UDP commands

I will describe my solution for a Windows system. If you are running Linux I guess it is almost the same.

  1. In your router, add a static IP to your WiZ lights.
  2. Add a virtual (dummy) light in Domoticz.
  3. Download Swiss File Knife and copy just the exe file sfk.exe to a folder, that you will use in step 5 below
  4. In the virtual light you created, have a level for every action you would like, for exemple ”Off” and ”On”.
  5. Connect the level to a script action, see the screenshot below
  6. Now you can control your WiZ lights!

The UDP command lines

I got the idea from this site:
https://aleksandr.rogozin.us/blog/2021/8/13/hacking-philips-wiz-lights-via-command-line

I noticed for sending from a Windows cmd you need to escape the ” sign. As an exemple the command for a light is like this (replace the IP address xx.xx.xx.xx with your fixed IP-address of your light):

Turn ON

sfk udpsend xx.xx.xx.xx:38899 -listen {\"id\":1,\"method\":\"setState\",\"params\":{\"state\":true}}

Turn Off



sfk udpsend xx.xx.xx.xx:38899 -listen {\"id\":1,\"method\":\"setState\",\"params\":{\"state\":false}}

Good luck with your WiZ lights and units!

Lämna ett svar

Din e-postadress kommer inte publiceras. Obligatoriska fält är märkta *