[OBSOLETE] Magic Home WiFi LED Control

git clone https://github.com/ph4r/tcptunnel
cd tcptunnel
./configure
make

once installed, you run like this [where 10.10.10.103 is the address of your LED Controller:

./tcptunnel --local-port=5577 --remote-port=5577 --remote-host=10.10.10.103 --log --stay-alive

ok. thank you. i use this

Ph4r I sent you a PM. Please check it. Thanks.

1 Like

So, due to the tunnel, it seems this can only control one Wifi Controller at a time? I have multiple controllers controlling multiple LED strips. Do I need to create multiple TCP Tunnels?

Yes, I have a shell script that starts the tunnel app multiple times with
background execution by adding an ampersand & at the end of each line.

I canā€™t wait for smartthings to fix the problem so that we can send full
hex strings natively and we can remove the tunnel.

Ughā€¦ok. I will test it out for one soon.

I saw you commented on the Hex issue, but no response. I was wondering if you had tried attending their by weekly developer call?

iā€™m so confused with this can someone call me or text me i will give you my cell number

You can send a DM Here and I can try and sort you out.

so with a little help from ph4r i got the led to work

1 Like

Iā€™m having trouble getting this to work correctly. The only thing that works is powering the strip on and off. Color changes donā€™t work, nor do brightness changes. Changing the brightness seems to turn the strip off 50% of the time, and the other 50% of the time nothing happens.

I can verify that I see requests in the log of tcptunnel. It seems my LED controller may be using a different command set? I opened the casing when I first got it to check the board number to see if I could reflash it, and it was v2.3 or v2.4. I have the RGBW controller.

Using the official Magic Home app, everything works correctly.

While you are using an RGBW controller, are you using an RGBW or RGB Strip? I would suggest that you try adjusting the controller style behind the gear icon for your device to RGB.

Iā€™m not aware of any implications from a different board number. If you have an Android device and can run some packet capture of what is being sent from the official Magic Home app, I can likely replicate it.

Iā€™m using an RGBW strip (5 pins). I can get a packet capture from wireshark/tcpdump. Are there any commands in particular you want me to test? Or just send you a list of the commands I sent?

Changing it to RGB, some colors work. Magenta works for example, as does purple and cyan. Blue does not (it stays on the previous color) if I use the built in button, but manually selecting a blue color seems to work. Brightness adjustment works, but it sets the color back to white sometimes. Other times it works correctly.

Is it possible that the device somehow thinks itā€™s an RGB controller with an RGB strip instead of RGBW?

Send what you can. Iā€™d suggest setting primary colors like Red, Green, Blue as separate presses at full scale (255), maybe a Cyan and Yellow. And your White Channel at 100 and 50% brightness.

When you say that sometimes it goes back to white, do you mean the three color channels on at full power, or the white channel on alone, or both?

Please provide a link to the controller and strip that you are using.

What controller style are you currently set to behind the gear icon in the device type in SmartThings, and did you get any different results with one of the other settings? Perhaps RGB+WW would work better for your controller if you meant above that sometimes it changes to the white channel.

RGB = does not understand extra byte for White Channel Filters
RGBW = RGBWW = set all 5 channels at once
RGB+WW = Set White channels then set color channels

OK, hereā€™s a packet capture that should pretty much just be traffic between my phone and magic home: https://drive.google.com/open?id=1pLIaNKYqCbLlAtYjtQlFZ-LlTTzJNWK5

I first set red to 255, and green and blue to 0. Then red 0, green 255, blue 0. Then red 0, green 0, blue 255. Then set all to 255 and set white to 100%. Then set white to 0%. Then brightness to 50%. Then brightness back to 100%. I used the scroll bars for these, and from the packet capture it looks like it sent every value in between.

This second capture sets the color at 100% to magenta, then cyan, then orange/yellow. Then I set RGB all to 255 and set white to 50%, then 100%, then 50%, then turned it back off. https://drive.google.com/file/d/18qM-dvRuliiu7NRuS0p9r71n086baRCb/view?usp=sharing

When it switches to white while adjusting the brightness, it sets R, G, and B all to 255. I havenā€™t had this happen more than a few times, usually it seems to work correctly. Using SmartThings, thereā€™s no way I can get the white LED to come on. Only the RGB LED works, which is to be expected with the controller style set to RGB. The white LED only works via the Magic Home app.

Behind the gear in SmartThings, the only style that works is RGB. I tried each of the other settings (RGBW, RGBWW, RGB+WW), and none of them work (only on/off works, nothing else).

1 Like

This is the LED strip Iā€™m using (RGBW version): https://www.aliexpress.com/item/Free-Shipping-SMD5050-12V-flexible-light-60-leds-m-LED-strips-5m-lot-White-Blue-Green/1599651146.html

This is the magic home (RBGW Controller): https://www.aliexpress.com/item/16Million-colors-Wifi-RGB-RGBW-led-controller-smartphone-control-music-and-timer-mode-magic-home-wifi/32755262961.html

I can include photos of the strip and controller if you want.

Can the simple on/off work without the tunnel or that also requires hex commands?

@matrix, I wish the answer was YES, but the last byte of the ON/OFF Commands is above 0x7F so unfortunately no it will not work.

Hey @ph4r sorry Iā€™m new here so Iā€™m not sure if I had to retype your name. Lol

Similar to a previous user, Iā€™m writing in hopes you fully involved in the ā€œBroaden the Compatibility for othersā€ business! I have about 16 feet of Magic home Strip lights down and another 32 feet ready to go. Holding off because, obviously, theyā€™re not compatible.

Would you be interested in doing to dirty work on my sets also? I would greatly appreciate it and Iā€™m sure there is someway I can thank you.

If so, you can reach me at pdevito32@yahoo.com or try to respond here. This is my first message so idk how reply notifications go.

Thank you so much for this! I have my RGBW strip and controller working via the Magic Home Pro app. However, I am running into problems getting the tcptunnel configured. Do you know if there would be any reason I canā€™t run this in a docker container on my synology NAS?

I have the tunnel set up here, but had issues with lag or actions not completing (most likely my own doing). So I looked into using Magic Home through IFTTT (not ideal) but it does work. Using webCoRE and Maker, and creating different applets to almost work as simulated buttons I have a button panel to set different colours or levels. Works quite well.

1 Like