Wifi LED binding - problem with white-only LED strip and controller

I have a white-only Wifi LED controller. It fails initial discovery but if I manually create the Thing via file, it’s then shown as “Online” in the Paper UI.

But I can’t get it to turn the LED strip on. I’ve tried all three protocols with no luck.

Here’s pics of the board:

Here’s a Pcap of what happens when I use the MagicHome app to turn the strip on and off:
https://drive.google.com/file/d/1sEhJPnykdwreCrU4S2b2EgjGhdlf98nx/view?usp=sharing

No relevant log entries in openhab.log

Any suggestions gratefully received!

OK, some more developments … I used tcpdump on my OpenHabian Pi to watch the packets that OpenHAB is sending.

Turns out that using the Fading option in the driver meant no packets were sent at all for dimming changes! Switching to Classic fixed this.

I added a Switch on the power channel and now can turn the strip on and off successfully. But dimming still isn’t working correctly.

Any selection on dimming turns the strip on, but no further dimming change makes any difference to it. According to the MagicHome app, the strip is on at 38%, no matter what I select in OpenHAB.

Right, I’ve finally got to the bottom of it with some deep-dive Wireshark work.

This single-channel white WiFi LED controller is using the LD382A protocol, but with a couple of differences:

  1. The single channel, although white, is in the RED byte (the first one sent after 0x31)
  2. The last byte is normally 0x00 - but for this controller it’s 0x01

Looks like it needs a mod to the binding. I’ll post in github accordingly.

2 Likes

Hi @Gooman,

it’s been a while since your last post. Is your single color (white only) controller working properly with the wifi-led binding?

i am facing some problems with this device, maybe you can give me a hint.

Yep, was a while back!

For configuring the Thing, I’m now just using the “WiFi LED” binding with the LD382A protocol and the “Classic” device driver option. The difference in the last byte doesn’t seem to matter.

For configuring the Item, I just have a Dimmer Item that’s linked to the Color channel on the Thing. That dims all colors, so it doesn’t matter that the White and Red channels are cross-wired.

The only issue I still have is that when turned off the WiFi LED binding sets the dimmer to zero - unlike other dimmable devices which retain the dimming value but just set status to Off. I’ve tried to resolve this with a separate UI Item and a device Item and some Rules, but I haven’t had time to get it to work properly yet.

What’s your issue?

Hey Dave, thanks for your fast response!

I’m using the same configuration for my items, Dimmer and Power Switch, and it’s working. I even don’t have your issue with the dimmer set to zero.

But after a short time period, sometimes seconds, sometimes minutes, the device goes offline. I really mean offline, it even doesn’t respond to pings.

When i disable the thing in openhab it stays online for days and works with the MagicHome app as expected.

So i tried to set pollingPeriod to 0 and disconnected all channels. After a short code review i think there should be absolutely zero trafic between openhab and the device now. But after another two hours it was offline again.

Maybe i just got a defective device. Another one is already in delivery. If you have another idea, just let me know.

It’s always possible that there’s a further refinement in the protocol in later devices.

You’d need to get your hands dirty with WireShark while using the MagicHome app to see what that’s sending and whether there are any material differences.

i did another test, while the openhab thing was deactivated an now i’m convinced my controller is malfunctioning.

plugged the controller in, followed by ~15 times opening and closing the MagicHome app. Suddenly the controller didn’t respond anymore…

sorry, should have done more tests before bothering you.

i’ll update this thread when the new controller arrived and i can tell more. maybe there are others facing the same issue.

as assumed… new controller and everything is fine!