steve228uk / homebridge-magichome

A Homebridge plugin for Magic Wifi devices
MIT License
82 stars 45 forks source link

Homekit doesn't set correct colors #33

Open silversurfer147 opened 6 years ago

silversurfer147 commented 6 years ago

Hi, I have a problem with colors. When I want to set red or green color through homekit app in my iPhone, I get some strange color e.g. instead red there is something like blue. However with Magic Home app, everything is correct. I use XCSOURCE wifi controller. Could someone help me if it is problem in my setting, or it is bug? Thank you.

Zacknetic commented 6 years ago

Probably green and red are switched. If that’s the case you have three options:

Let me know

silversurfer147 commented 6 years ago

Thank you for your quick reply. I don't think that problem will be in wires, as I said, the magic home app set colors correctly. I noticed now, that if I use siri to set red color, she set me correct red color. But from to color pallet in homekit app, I always get some pink or blue, but not red :( It is very strange...

Maybe this is my problem https://github.com/steve228uk/homebridge-magichome/issues/7 I have a same issue. Any solution for this?

RileyKC8238 commented 6 years ago

Exact same problem for me! Siri works great, magic home app works great, “Home” app... not so much. Very frustrating!

On Dec 21, 2017, at 5:30 PM, silversurfer147 notifications@github.com wrote:

Thank you for your quick reply. I don't think that problem will be in wires, as I said, the magic home app set colors correctly. I noticed now, that if I use siri to set red color, she set me correct red color. But from to color pallet in homekit app, I always get some pink or blue, but not red :( It is very strange...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Zacknetic commented 6 years ago

Make sure you set “pure white” to true and RGBW if you have 5 pins on your controller.

Zacknetic commented 6 years ago

Otherwise set pure white to false and set it to RGB.

silversurfer147 commented 6 years ago

@RileyKC8238 yeah, it is really strange @Lethegrin I use RGBWW setup, and I have only 3 wires on led strip (rgb). I will try to change this setup. I think about that problem is maybe in raspberry pi. I use old raspberry 1 B+ model. I have also about 2 second delay if I change the color or brightness, is it normal? Thank you very much.

Zacknetic commented 6 years ago

Why is it set to RGBWW if you only have 3 wires?

RileyKC8238 commented 6 years ago

I’m running my homebridge server from an old 2007 iMac I had lying around (works great!) Also, Just FYI these are the light strips and WiFi controller that I bought:

LED Strip light kit, MECO Flexible LED Strip Waterproof Full Color Changing Strip Light 5Meter 16.4ft / Reel 300X RGB SMD5050 Lamps with 44 Key IR Remote and 12V 5A 60W Power Supply https://www.amazon.com/dp/B01B75LZNC/ref=cm_sw_r_cp_api_40ipAbEG844QP

XCSOURCE DC 12-24V iOS Android WIFI Remote 5 Channels Controller for RGB LED Strip LD686 https://www.amazon.com/dp/B01AA6221S/ref=cm_sw_r_cp_api_5gjpAbZRY3T8T

Brian

Sent from my iPhone

On Dec 21, 2017, at 7:50 PM, Lethegrin notifications@github.com wrote:

Why is it set to RGBWW if you only have 3 wires?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

silversurfer147 commented 6 years ago

@Lethegrin if I set RGB or RGBW it doesn't work. There isn't any reaction for changing color or brightness. I can only turn off and on LED strip.

alexander-schaller commented 6 years ago

@silversurfer147 I have the same problem, if I set the mode to RGB or RGBW I can only turn them on an off, and when I set it to RGBWW the colors make no sense what so ever. Did you find a solution?

silversurfer147 commented 6 years ago

@AlexJ0h unfortunately not, I don’t have idea where is a problem, but it will be great if somebody come with solution :/

Zacknetic commented 6 years ago

Read the details on the pins of your controller. It probably says “GRB” instead of “RGB”.

It doesn’t matter how many wires are on the light strip you are using. What matters is the controller. How many outputs does it have?

silversurfer147 commented 6 years ago

@Lethegrin It works with magic home app. If the wires were connected to controller incorrect, it should not work with magic home app too. (I checked it, the wires are connected correctly) However, I sometimes get the correct colors from home app, but sometimes not.

Outputs in my controller - V+,R,G,B,WW,CW . My strip is connected to V+, R, G, B.

Zacknetic commented 6 years ago

K, that’s the problem.

Zacknetic commented 6 years ago

It’s not based on what is connected. It’s based on the controller.

As for the magichome app , it automatically knows what kind of controller it is. Homebridge magichome doesn’t have that functionality. So if you set it up as RGB and not RGBWW , the wrong protocol will be sent to the controller.

Set it up as RGBWW and Pure white, try again and report the results.

Zacknetic commented 6 years ago

Be sure to report the exact bug.

For example:

expected red - got green

expected red - got blue

List each color expected results vs actual results.

Zacknetic commented 6 years ago

Lastly, please post your configuration

silversurfer147 commented 6 years ago

@Lethegrin thank you very much for your advice. I will try it next week, I am abroad now.

Zacknetic commented 6 years ago

Sounds good.

silversurfer147 commented 6 years ago

@Lethegrin Hi, so I tried to play with changing colours by Home app. Mostly, it works fine, but for example, I set blue color and I get red. When I set it again, I will get correct color.

Here is my config

"accessories": [ { "accessory": "MagicHome", "name": "LED Strip", "ip": "192.168.1.10", "setup": "RGBWW", "purewhite": true }

Thank you in advance for you advice.

clymetime commented 6 years ago

Hi @Lethegrin . I'm having a similar problem. My HomeKit will see the Homebridge, but will only update and get a no response message. I've tried every configuration of the accessory section of the config.json file here is the wifi controller: img_4773 jpg

and here is the current non working settings: "accessories": [ { "accessory": "MagicHome", "name": "LED Strip", "ip": "192.168.1.111", "setup": "RGBWW", "purewhite": true }

Any help would be greatly appreciated!

Zacknetic commented 6 years ago

That's a GRB controller, not an RGBWW controller.

clymetime commented 6 years ago

Thank you for your response @Lethegrin . I am still having the same issue. All the lights will show up on HomeKit but will only update and then fail to connect with the no response error. Here's the config: "accessories": [ { "accessory": "MagicHome", "name": "LED Strip", "ip": "192.168.1.111", "setup": "GRB", "purewhite": true }, { "accessory": "MagicHome", "name": "LED Strip 2", "ip": "192.168.1.111", "setup": "GRB", "purewhite": true }

], "platforms": [] }

Thank you for your help!

isignedup commented 6 years ago

Your IPs are identical and the same as the example. Try locating your correct IPs via MAC Addresses within your router's DHCP table (or other method).

clymetime commented 6 years ago

Thank you @isignedup ! I appreciate your help. That seemed to do the trick, I can turn on and off. Still can't change color. Any advice?

isignedup commented 6 years ago

I don't have any further advice as I am having issues myself. I have the same GRB WiFi module and it would seem like MagicHome app should function with it OK, but I can't even get mine to turn on/off. I am unsure if GRB is a valid setting for the Setup parameter - perhaps try RGB?

clymetime commented 6 years ago

Ok thank you! I’ll post my working on/off settings to see if that helps you. They function now with HomeKit but won’t change color. Are yours functioning with the magic home app?

isignedup commented 6 years ago

Yes, my 2 LED strips work great with the Magic Home app itself. For homebridge, I think I have a Windows configuration issue related to Python. I think this plugin is calling a Python script and it is not executing correctly. Several times throughout my testing, I have received a Windows file association dialog to associate .py (Python file) to an executable (I have attempted to associate it to the pythonw.exe without any luck).

rextor93 commented 6 years ago

I have this same LED controller, although it is showing V4 in the magic home app. Anyone able to aide the creation of an updated version of flux to support newest hardware? (I have like 8 of these that I'd love to gain full-functionality within HomeKit.) Any help would be appreciated!

toshibochan commented 6 years ago

If your controller is RGB, set on config as RGBW and purewithe to false

And if you have more than one controller the name and IP have to be different in each accessories

"accessory": "MagicHome", "name": "LED Strip", "ip": "192.168.1.111", "setup": "RGBW", "purewhite": false

toshibochan commented 6 years ago

Ask Siri to set to blue, green and red, if all the color match is all ok if ask set to red and come as green is because cable is wrong!

mrkellar commented 6 years ago

I have a GRB Magic Home v4 controller. With the magic home app everything works fine. I've tried every configuration with this homebridge plugin. GRB, GRBW, GRBWW, RGB, RGBW, RGBWW, and tried true and false for pure white for every single combination but nothing works. Using any of those combos will allow the Home app and Siri to turn the LED strip on and off, but regardless of setting, I can't control colour or intensity. Any thoughts or suggestions would be greatly appreciated.

toshibochan commented 6 years ago

Did you connect you controller to you home WiFi? Look if you up address is correct on your config.json. And on the configuration only can use RGB, RGBW, RGBWW. Never change RGB to GRB OR BRG or RBG! Is awas RGB. Send your config!

mrkellar commented 6 years ago

Connected to WiFi. Works fine with magic home app. IP is set to magic home bridge. Here's the config.

    {
        "accessory": "MagicHome",
        "name": "LED Strip",
        "ip": "192.168.1.3",
        "setup": "RGB",
        "purewhite": true
    }

Sent from my iPhone

On 22 Jul 2018, at 4:04 am, toshibochan notifications@github.com wrote:

Did you connect you controller to you home WiFi? Look if you up address is correct on your config.json. And on the configuration only can use RGB, RGBW, RGBWW. Never change RGB to GRB OR BRG or RBG! Is awas RGB. Send your config!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

toshibochan commented 6 years ago

Set to RGBW and false

toshibochan commented 6 years ago

Sorry my bad I make mistake on my previous comment! I type GRBW instead is RGBW.

mrkellar commented 6 years ago

Hmmm. I've tried both RGBW and GRBW with both true and false settings. It'll turn on and off but won't change colour or intensity.

Any other suggestions?

On Sun, Jul 22, 2018 at 4:17 PM toshibochan notifications@github.com wrote:

Sorry my bad I make mistake on my previous comment! I type GRBW instead is RGBW.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/steve228uk/homebridge-magichome/issues/33#issuecomment-406843988, or mute the thread https://github.com/notifications/unsubscribe-auth/AncRfeYEvuXWr9sHk_3N4rnkhGNcmU7sks5uJBjfgaJpZM4RKcgc .

-- Wade Kelly

isignedup commented 6 years ago

What is your python version? Do you have python in your path variable(s) and file associations correctly?

toshibochan commented 6 years ago

what computer you using for homebridge? Mac, pc or raspberry pi? what version of homebridge? what version of node?

toshibochan commented 6 years ago

send picture of your controller. what is the version of your controller?

mrkellar commented 6 years ago

Running Homebridge a Raspberry Pi (installed with Docker) Homebridge, v0.4.44 node.js v8.11.3 Python 2.7.13 is installed. Not sure what you mean by having path variable.

Here's an image of it. img_6632

toshibochan commented 6 years ago

first time I see GRB controller. usually what we have in USA is RGB. maybe is this the problem. sorry I can't help.

mrkellar commented 6 years ago

Hopefully someone out there for figure it out. I'm in Australia. Got it off Alibaba and it works great with the app. Just not with home kit.

toshibochan commented 6 years ago

oh I just look my controller and is the same as yours +VGRB and is working perfect. this is my config. < }, { "accessory": "MagicHome", "name": "Deck LED", "ip": "10.0.1.21", "setup": "RGBW", "purewhite": false }, { "accessory": "MagicHome", "name": "Deck Stair LED", "ip": "10.0.1.78", "setup": "RGBW", "purewhite": false }, {

mrkellar commented 6 years ago

hmm. Sadly, I just get on and off with that config. I wonder if this is needed? https://github.com/steve228uk/homebridge-magichome/blob/master/flux_led.py

toshibochan commented 6 years ago

try uninstall homebridge-magichome and install again.

toshibochan commented 6 years ago

make sure your homebridge is updated to

mrkellar commented 6 years ago

Homebridge was updated to the most recent version, but you totally called it. Uninstalling MagicHome and re-installing it did the trick! Thanks so much for all your assistance.

On Mon, Jul 23, 2018 at 6:24 PM toshibochan notifications@github.com wrote:

make sure your homebridge is updated to

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/steve228uk/homebridge-magichome/issues/33#issuecomment-406979396, or mute the thread https://github.com/notifications/unsubscribe-auth/AncRfaHQKAvmyrO1LsQxHlWO7SpNCuqWks5uJYhEgaJpZM4RKcgc .

-- Wade Kelly