I’ve been having the same issues as mentioned here. I have two types of these controllers. I can confirm that the changes suggested work for me on a V3 controller but do not work on a V1 controller. I’m very excited by this progress. One thing I notice on my V3 is when using the slider, it turns off any RGB settings and adjusts the W. If I manually select a color, the white turns off. Is this expected behavior or should the slider adjust the white indipentant of the color and leave the color setting the same?
Thanks Daniel. The V1 controller only turns on and off. Setting color in the frontend or running init.py manually in the console doesn’t work. I only have an RGB strip on the V1 controller at the moment and haven’t tested current on the W channel so I’m not sure what impact the slider has for white. I’ll have to test that later today as I’m headed to work.
I made the pull request, and made the change to the 3 lines and submitted it. In doing that, I actually realized that at line 664, I had an extra 0x00. So I removed it. But that broke my installation. When I put it back in, it works, but I still have that issue with the slider.
And I just figured out one more thing about the slider issue. It seems that it only happens the first time after it has been about 3 seconds since it happened.
For example, if I start up HA, and move the slider, it will move to 100, even though it correctly set the brightness. Then, I can keep moving the slider around, without issue, for 3 more seconds. After those 3 seconds are up, the next time I move the slider, it will go to 100.
And in addition to that, if I were to wait around 12 seconds, it doesn’t happen. So it appears to happen between about 3 and 12 seconds after the last time it happened.
The changes you made definitely did something. I’m seeing almost the same issue, except instead of it going to 100%, it going to almost zero. Some it seems to go right on zero, but sometimes it’s probably around 3% or somewhere in between. And in addition, around 15 seconds later, it seems to drop down there on it’s own.
@Danielhiversen can confirm changes for V3 are working, except the brightness slider. I was not able to test your new slider (I’m not home at the moment).
To take a packet capture, I just installed Handy Andy Android emulator on my Windows computer, and set it to bridged mode for the networking. Then I ran wireshark on the windows machine.
And just to confirm, does your device show as V1 in the MagicHome app?
It might be worth trying the V3 patch as well. Also, make sure you are restarting HA after making any changes, and confirm that your changes are staying after restarting. There was a bug at some point in the flux_led component that cause all those files to be redownloaded and overwritten every time HA was restarted.
@outrun
Did you set the mode to rgb in the yaml config?
@Kbeesnees
I just saw your post in the other thread. Although my V1 is an XCSource ‘brand’, it looks exactly like the one you linked, so I’m thinking we have the exact same one. That V1 file that Daniel posted is the exact way that I did it. In addition, I set the mode to RGB. And it works for me, other than a minor aesthetic bug with the slider.
I agree. I assume they’re the same as well. I didn’t have much time to test last night and I’m currently at work (shhhh) so I’ll likely be testing it tomorrow or late tonight. I’ll be using a RGBW strip with it which works in the app but I’ll give RGB mode a try to see what it does. Nevertheless, I’m encouraged by the progress and attention this is getting. I also won’t have access to a windows machine this weekend but I’ll try to find a Debian alternative to packet capturing if I’m still having trouble after trying your suggestion.
[[edit]] I did try both mods on both controllers. One shows V1 and the other is V3 in the app. Only the V3 mods worked with the V3 controller. Haven’t tried the RGB mode yet. Also noticed the RGB mode got pushed to production today so I’ll update HA first before testing.
@Danielhiversen
Not sure how easily it could be implemented but similar to setting mode RGB, I was thinking a version option could be manually set to differentiate the different byte signals each need. I’m not sure if that would break it for other bulbs and controllers that it currently supports but it was just a thought.
@Danielhiversen - I can confirm v1 changes are effective here.
(edited to add) > I am using the same XCSOURCE controller simpat1zq mentioned in the first post. Magic Home app reports my lights are v1. I have six controllers, (all the same sku), they all work with this patch.
I do seem to have an issue where they get “stuck” and stop responding to packets occasionally. A power cycle fixes it. This causes exceptions in the HASS log. I didn’t notice this behavior before trying this fix, but I can’t say for sure that they are related. These controllers can be unreliable.
@Zen
That’s encouraging Zen. Thank you for the second confirmation. Curious which controller you have. Not sure if there is a difference between the LEDENET and XCSource. I’ll be testing my LEDENET in about 3 hours.