Cheap Wifi led working from PC how in Domoticz

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

Moderator: leecollings

Post Reply
JelteV
Posts: 19
Joined: Wednesday 04 January 2017 19:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Cheap Wifi led working from PC how in Domoticz

Post by JelteV »

Hi,

I'm wondering how i add a new hardware device in Domoticz.
You might ask why.

Well i bought this WIFI Led light. Which connects to my wifi network.
Right now i can only control it through an app on my smartphone. However i would like to control it through Domoticz.
This is the light https://www.aliexpress.com/item/AC85-24 ... 06339.html

I will try to figure out how to control it directly (without the app). I think i can figure that out.
But how do i add it into Domoticz?
Last edited by JelteV on Saturday 07 January 2017 23:13, edited 1 time in total.
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: wifi led

Post by Derik »

Perhaps search the forum for Yeelight.
The starter did integrated yeelight bulbs to for his first time.

Perhaps buy yeelight works great! like Hue
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
JelteV
Posts: 19
Joined: Wednesday 04 January 2017 19:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: wifi led

Post by JelteV »

Hi,

Yea, i tried the Yeelight, but that didnt work.
Currently trying to figure out with Wireshark if i can controll the lights from my computer.

I just found out that the light lissens on port 53464. How do i change the port of the yeelight?
JelteV
Posts: 19
Joined: Wednesday 04 January 2017 19:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: wifi led

Post by JelteV »

Ok.

I have been playing around with it a bit.
I found out wich UDP package was being send through Wireshark.

I can now switch the light off and change some colors by sending an UDP package to the IP.

The question however remains. How do i add this into Domoticz?

Any help would be welcome! :)

Currently trying to figure out how to set (calculate) the RGB color and turn the light on.
JelteV
Posts: 19
Joined: Wednesday 04 January 2017 19:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: wifi led

Post by JelteV »

The app sends this UDP package when i turn the light on.
However when I manualy send the UDP package it doesn't turn on.

This is the capture from wireshark, it captured my the package send from my iPhone.

Code: Select all

Frame 16: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
Ethernet II, Src: Apple_ad::0b (38:), Dst: HewlettP_4c:f1:25 (98)
    Destination: HewlettP_4c:f1:25 (98:)
        Address: HewlettP_4c:f1:25 (98:)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Source: Apple_ad::0b (38:)
        Address: Apple_ad::0b (38:)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: IPv4 (0x0800)
    Padding: 000000000000000000
    Frame check sequence: 0x00000000 [incorrect, should be 0x13a49e98]
    [FCS Status: Bad]
Internet Protocol Version 4, Src: 192.168.0.111, Dst: 192.168.0.106
User Datagram Protocol, Src Port: 6000, Dst Port: 5000
    Source Port: 6000
    Destination Port: 5000
    Length: 17
    Checksum: 0xe53f [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
Data (9 bytes)
    Data: 7e040164ffffff00ef
    [Length: 9]
Now when i send an UDP package with the same IP/port and data. (HEX : 7e 04 01 64 ff ff ff 00 ef ) it does nothing.
Can anybody see what i'm missing?
JelteV
Posts: 19
Joined: Wednesday 04 January 2017 19:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: wifi led

Post by JelteV »

ok, i got it.

To see which lights are connected to the network you need to send an udp broadcast.
All connected lights will respond with their name if you lissen on UDP port 6000.

Code: Select all

Adress                            data (HEX)                           result
255.255.255.255:5000     7e 07 09 ff ff ff ff ff ef         A response from each connected light with so i have the IP and their name.
LedIP:5000                      7e 04 04 01 00 ff ff 00 ef      Light turns on
LedIP:5000                      7e 04 04 00 00 ff ff 00 ef      Light turns off
LedIp:5000                     7e 07 05 01 fa 1f ff 00 ef       Color: Warm white 100%
LedIp:5000                     7e 07 05 01 0                        Color: Warm white 10% (can't go lower)
LedIp:5000                     7e 07 05 01 2                        Color: Warm white 20% 
LedIp:5000                     7e 07 05 03 fa 1f ff 00 ef       Color: Purple 100% 
LedIp:5000                    7e 07 05 03 fa 1f ff 00 ef      Color: Blue(ish) 100% 
Does anybody see any logic in the color coding?
And how do i add this into Domoticz?
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest