benallen-dev / xiaomi-lightbar

Use an arduino nano and RF24 module to control a Xiaomi monitor light bar
MIT License
81 stars 9 forks source link

Light Bar does not respond #1

Open SteveJos opened 1 year ago

SteveJos commented 1 year ago

hey @benallen-dev! I really appreciate your work for this project! I tried to get it working with my LED bar, but unfortunately I do not have had success. What I did was connecting my nRF module to an Arduino Nano and capturing some packets from my remote (was tough tho). What I got was the following data:

`

========================= Light Bar Packet received

------ address

0: 0x67 1: 0x22 2: 0x9B 3: 0xA3 4: 0x89 5: 0x26 6: 0x82 ------ product serial 7: 0x45 8: 0x21 9: 0xAA 10: 0x5F ------ packet ID counter, I think. Avoids duplicate execution 11: 0xF6 12: 0x20 ------ action 13: 0x20 | on/off ------ checksum? parameters? noise? idk 14: 0x1F 15: 0xE3 16: 0xA7 17: 0x0

=========================`

As one can see the only difference was the product serial. I replaced the hex digits in the commands array and fired a lot of loops at my bar but without any response. I am wondering if probably the data format has chaged or if the "checksum? parameters? noise? idk" part is more important or has more bytes after the 17th place. Furthermore how it is working for you? Are you sending all 5 commands in a row to turn the light off or how does that work?

Thank you for your help!!

benallen-dev commented 1 year ago

To be entirely fair, it's super janky. When I try to read from the remote it's 99% noise, and when sending commands I ended up having to just send over and over until it works. I suspect there's some kind of ACK protocol going on that I didn't manage to reverse engineer.

If I'm being entirely honest though, once I managed to send commands from something other than the remote, I had cracked the "can I do this without the remote" puzzle and lost interest :) Maybe I'll pick it back up in the future but I shared what I had so others could use it as a starting point.

SteveJos commented 1 year ago

Aiight thanks for your honest reply:) sometimes I feel the same ^^

frostworx commented 2 months ago

Hey :)

You might like this project I found earlier today: https://github.com/lamperez/xiaomi-lightbar-nrf24

(I'm not affiliated with the project and just want to make it a bit more visible)

Have fun!