Step-by-step guide on how to build an integration for an unsupported Bluetooth device

Hey guys,

I’m sorry if this is not the place to post this - let me know, and I’ll move it somehwere else. I have made a video-guide on my channel on how to reverse engineer the Bluetooth protocol of a studio light, and then to implement a basic Light entity in Home Assistant to control it from automations, scenes, and generally from the Home Assistant dashboard.

I’d really appreciate it if you would watch it, and let me know what did you think.

Here it is - part 1, how to reverse engineer a Bluetooth device:

Part 2 - writing a Home Assistant integration for it

Thank you.


Yeah it’s not the right place. Community guides are a wiki format that anyone can edit to keep them up to date. We can’t edit your videos. So I’ve moved your post to Share Your Projects.

1 Like

This is a timely tutorial for me. I have a fiber optic light engine that is bluetooth and RF only and it’s the only remaining device I have yet to get into HA. I mapped my bluetooth controller today and I’m waiting on the debugging report now. I’ll work on it this week but so far, all your steps have been spot on. Thanks

1 Like

Very good tutorial thanks to you. I have a question. I have mi box s 4k with bluetooth remote control. When device sleep, i cant reach device anymore. Can i use it for open / close mi box ?

Thank you! I was thinking of posting it in the “Share Your Project” section, or “Social”.

love and hate how this is so easy for you…crazy stuck trying to go from gatt to python…

nvm got it with

import pygatt
import time
adapter = pygatt.GATTToolBackend()

device = adapter.connect('34:85:18:6A:52:52')

adapter.sendline('char-write-cmd 0x0030 a500000800536f0e000310010212010aff01209a')


i have been watching your video for past month on a loop tho, Thank you for sharing your knowledge!

Hi David,

I’m having a issue figuring out checksum of the return commands…Using your guides i was able to reverse engineer some new controllers to use in my home assistant. tho i cant figure out the checksum so i can code it into an integration.

Could you provide any guidance with this matter? Thank you for everything you have shared with the community it has progressed my abilities leaps and bounds!



a500000 is common
80 command structure / where it should go
next 8 incrementing values
00310010212010a - commands to device 212 is on / 111 off (end value tells speed
last 8 seem to increment in value as well

@nethunter I sent this in a reddit chat, but in case this is the better platform:

Hello sir! Quick question about your video reverse-engineering bluetooth. When I open btsnooz_hci.log into wireshark, I get the error:

The capture file appears to be damaged or corrupt. (btsnoop: File has 3077636096-byte packet, bigger than maximum of 262144)

When I do a bugreport without the bluetooth sniffer enabled on my Galaxy Tab S7 Plus, Wireshark can open the log just fine, but as soon as I enable it, the resulting bug report has a file that’s “corrupt”.

I tried editcap -s to limit packet size, but get:

editcap: The file "btsnooz_hci.log" appears to be damaged or corrupt.
(btsnoop: File has 3077636096-byte packet, bigger than maximum of 262144)

Any ideas?

thanks for great videos. are these still valid given that home assistant has internal bluetooth support and all the communications should go through shared libraries now?

I’d sure like to know what the correct way to do this now is as well.

I have several Amaran lights I use for my YouTube stuff and I’d LOVE to be able to control them via Home Assistant!