raulgbcr / lednetwf_ble

Home Assistant custom integration for LEDnetWF devices
MIT License
24 stars 1 forks source link

LED strip controller working only partially #24

Open lucsansag opened 2 months ago

lucsansag commented 2 months ago

Hello, I have bought a LED strip from Amazon, it comes with a Bluetooth+IR controller that shows up on the Zengge app as a LEDnetWF device. I have tried adding it to Home Assistant with this integration, and I can switch it on and off, but changing the brightness doesn't work (it says on the debug log "Effect Unknown not supported or effect off called") and when changing the color it sets it to ones that are completely different from the ones I choose. Upon initial discovery it says on the debug log that it reports a LED count of 15, but they are actually 177 (they were originally 180 but a section of it became damaged so I cut and re-soldered it). Setting the count manually makes no difference, nor does changing the color mode (it's set to RGB by default, but both the controller and Zengge app say it's GRB). Any specific details I could share to try and pinpoint the issue? Thanks in advance.

8none1 commented 2 months ago

It's possible this is another new type of controller, but it's more likely this is simply a bug in the re-configuration section. I'm going to see if I can work out what's going on.

In the meantime, can you provide a link to the lights you bought?

8none1 commented 2 months ago

I did see some odd behaviours when reconfiguring the color ordering on my test device. The settings got out of sync for a short while, but changing the colours in the colour picker then fixed it.

8none1 commented 2 months ago

Can you provide the device info from this screen:
image

lucsansag commented 2 months ago

Can you provide the device info from this screen: image

Here you go:

Screenshot_2024-07-27-14-49-28-646_io homeassistant companion android-edit

These are the lights: https://www.amazon.es/gp/aw/d/B0CQYMSKNF?psc=1&ref=ppx_pop_mob_b_asin_image

8none1 commented 2 months ago

Wow! OK, so these are indeed a new light that I haven't seen before, and it looks like they have yet another different protocol. I'll get hold of a set and see if I can add support.

This will likely take a while. If you're interested in attempting to add support yourself you will need to capture the bluetooth packets sent from the app. On Android you can enable bt snoop logging to help. It's pretty involved though.

8none1 commented 2 months ago

Found a set on UK Amazon with 50% off :) Ordered.

lucsansag commented 2 months ago

Thanks! I'll share some initial discoveries for now (I've only used your zengge_lednetwf repo's README as a reference, not any actual code):

00 04 80 00 00 0d 0e 0b 3b 23 00 00 00 00 00 00 00 00 00 00 5e 00 52 80 00 00 0d 0e 0b 3b 24 00 00 00 00 00 00 00 00 00 00 5f

The only difference are those zero valued bytes instead of "32" but it's obvious it's not too relevant.

81 08 23 61 23 0D 00 FF 00 00 03 00 F0 2F (green max. brightness)

It seems the second to last byte is always F0 when it's on and 0F when it's off, but that would be redundant considering it's already reporting that in the third byte, wouldn't it?

00 05 80 00 00 08 09 0b 31 00 ff 00 00 00 0f be (green)

Anything you want me to check for the time being?

8none1 commented 2 months ago

That’s a good start, thanks. I’ve got the device now so I will play around and see what I can work out. I’m on vacation for a few weeks so bear with me.

8none1 commented 2 months ago

image

Looks like I got yet another version. Hopefully it speaks the same protocol as yours though.

raulgbcr commented 2 months ago

I'm kinda late to this party, but if there is anything I can do feel free to ping me! 😄

8none1 commented 1 month ago

@lucsansag can you confirm something; are you lights individually addressable?

i.e. can you specify a different colour for each LED? The ones I got (which I finally started looking at today) are NOT addressable.

lucsansag commented 1 month ago

Mine are not addressable either.

8none1 commented 1 month ago

Ok, that explains why setting the LED count doesn't work. For these types of non-addressable LEDs you can't configure the LED count - it's all or nothing. If some of your LEDs aren't working, I suspect that it's due to the damage.

The modes on these are more basic, so I should be able to get that working.

And I think I will be able to get the LED colour ordering working too.

I'll work on it over the coming weeks on my LED strips and hopefully it will work with yours too.