winosaure / MilightAPI

PHP implementation of Milight v6 API
11 stars 1 forks source link

The API/HEX doesn't work #2

Closed Versuswaw closed 6 years ago

Versuswaw commented 7 years ago

Hello Wino, I'm trying to use your API on my "WifiBox Model No. 2". The "zone receivers" are FUT039 receivers that handle RGBWW/CTT. I use your script on a Raspberry Pi via an SSH shell (Putty).

I've added an print_r($args); before executing the commands.

It does seem to work (sending the UDP packets) but I don't get any visual confirmation from the lights.

I've used the Mi-light app to link the zones and it all seems to work fine with the app. But as soon as I'm trying to use your script (or other scripts, domoticz isn't working either), they tell me the commands are succesfully sended but I don't seem to get a visual confirmation from my lights themself.

I don't have much time to learn the API but I did manage to get a .pcap file from my cellphone.

Any help would be appreciated. Thanks.

DynaSpan commented 7 years ago

The commands are probably wrong, I had the same problem, see #1

winosaure commented 7 years ago

Hello Versuswaw, DynaSpan,

What do you mean by zone receivers are FUT039? how do you find that? according to limitlessled, zones are from 0x00 to 0x04

I have tested the script on a raspberry with apache php7 and windows10 (Wamp) without any problem.

I have noticed the same operation from the doc that sometimes the command is not same : Command for RGBW (light on) -> 0x31,0,0,0x08,0x04,0x01,0,0,0,zoneID Command for RGBWW (light on) -> 0x31, 0x00, 0x00, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, zoneID

Right now my script implements only RGBWW.

try to change those value in MilightAPI/v6/Command/WWCommand.php. But it seems we are using the same bulbs. This is what I use : Would you tell me whether your bulb is different? 20170912_223345

Which command are you trying to send? Does your bulb already linked through Milight App before using the script?

Are you sure that you are fetching wifibox controller's IP and nothing else? (It can be obvious, but just in case)

Versuswaw commented 7 years ago

I found the hex codes. This can be closed. Thanks for the help :)

winosaure commented 7 years ago

Hello,

Glad to know it's working now. Would you tell me which hex did you use and details about your bulb? Thanks to that I will be able to add a new class to manage this case, it will be helpfull for people who does not use the same bulb.

Thanks

DynaSpan commented 7 years ago

I have the iBox Wifi Bridge with light and RGBW bulbs. Will see if I can do a pull request to add them both and clean up some code.