How to use WiZ lights with Domoticz

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
lassehifi
Posts: 4
Joined: Thursday 28 December 2017 11:03
Target OS: Windows
Domoticz version:
Contact:

How to use WiZ lights with Domoticz

Post by lassehifi »

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
Domoticz_Wiz_Setup.jpg
Domoticz_Wiz_Setup.jpg (34.97 KiB) Viewed 17985 times

- 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}}
Turn OFF

Code: Select all

sfk udpsend xx.xx.xx.xx:38899 -listen {\"id\":1,\"method\":\"setState\",\"params\":{\"state\":false}}
Good luck with your WiZ lights and units!
Menno
Posts: 35
Joined: Wednesday 24 July 2019 13:23
Target OS: Linux
Domoticz version:
Contact:

Re: How to use WiZ lights with Domoticz

Post by Menno »

Thanks for this!
Is just found one of these lights 50% discounted for €7, so decided to pick it up.
Used the app to connect it to wifi.
Decided not to use the plugin, it depends on python3-scapy which wants to pull in 193 additional packages and take up 866 MB of disk space.
Instead I perused the site you referred to to make two small scripts:

wiz-on:
#!/bin/bash
echo '{"id":1,"method":"setState","params":{"state":true}}' | nc -u -w 1 192.168.178.93 38899 > /dev/null 2>&1

wiz-off:
#!/bin/bash
echo '{"id":1,"method":"setState","params":{"state":false}}' | nc -u -w 1 192.168.178.93 38899 > /dev/null 2>&1

And made the dummy hardware, new switch and have those scripts executed.
I noted giving the full path like in your example does not work (anymore?), so for me it looks even more simple:

On action: script://wiz-on
Off action: script://wiz-off
domo67
Posts: 5
Joined: Monday 04 December 2023 14:48
Target OS: -
Domoticz version:
Contact:

Re: How to use WiZ lights with Domoticz

Post by domo67 »

lassehifi wrote: 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:
was looking for this, glad to find it. Thanks for this mate
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: How to use WiZ lights with Domoticz

Post by Derik »

Dear...

I am looking for wiz working with domoticz.
Love a home script or directly...

Is there no api of this type
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
waltervl
Posts: 5842
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to use WiZ lights with Domoticz

Post by waltervl »

Derik wrote: Thursday 11 April 2024 12:43 Dear...

I am looking for wiz working with domoticz.
Love a home script or directly...

Is there no api of this type
In the first topic of this discussion a Domoticz plugin is mentioned.....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest