How to use WiZ lights with Domoticz
Posted: Saturday 23 October 2021 17:09
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-Wi ... ted-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.
- In your router, add a static IP to your WiZ lights.
- Add a virtual (dummy) light in Domoticz.
- Download Swiss File Knife and copy just the exe file sfk.exe to a folder, that you will use for your script action below
- In the virtual light you created, have a level for every action you would like, for exemple ”Off” and ”On”.
- Connect the level to a script action, see the screenshot below
- Now you can control your WiZ lights!
The UDP command lines used in the script actions
I got the idea from this site:
https://aleksandr.rogozin.us/blog/2021/ ... mmand-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
Turn OFF
Good luck with your WiZ lights and units!
1. Use the Domoticz plugin
Install this plugin:
https://github.com/sydspost/Domoticz-Wi ... ted-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.
- In your router, add a static IP to your WiZ lights.
- Add a virtual (dummy) light in Domoticz.
- Download Swiss File Knife and copy just the exe file sfk.exe to a folder, that you will use for your script action below
- In the virtual light you created, have a level for every action you would like, for exemple ”Off” and ”On”.
- Connect the level to a script action, see the screenshot below
- Now you can control your WiZ lights!
The UDP command lines used in the script actions
I got the idea from this site:
https://aleksandr.rogozin.us/blog/2021/ ... mmand-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
Code: Select all
sfk udpsend xx.xx.xx.xx:38899 -listen {\"id\":1,\"method\":\"setState\",\"params\":{\"state\":true}}
Code: Select all
sfk udpsend xx.xx.xx.xx:38899 -listen {\"id\":1,\"method\":\"setState\",\"params\":{\"state\":false}}