BRmesh app bluetooth lights

I have two IP66 bluetooth RGB lights that uses the following app to control them.

Is there any way to add them to home assistant bluetooth directly?

3 Likes

Hey i’m in the same problem as you, do you find a way to use it ?

No, not yet.

Same! Looking for a way to control these that doesn’t require the app.

Same issue here … Maybe we bought the wrong device for HA. Is Anybody knows wich exterior Bluetooth Spotlight can be use whit HA?

Not a huge amount of help though. I used an iPhone app to try to identify which BLE devices were the lights (an app called BLE Hero, but there are plenty more with better reviews) and the app found just under 100 BLE devices around me, so not very helpful. Downside of living in an apartment complex.

If I get a chance, I’ll take a battery into a garage with hopefully no bluetooth signals and see if I can figure out the communication protocol that they use so that we can control them.

(I’m looking for the same thing.)
Another question about the BRmesh Smartlight:
Can you somehow get it to use the white and RGB LEDs at the same time?

2 Likes

Anyone get anywhere with this? Can’t get any of the Bluetooth HA apps to pick up the bulbs at all?

+1
I’m looking to do the same thing. I’m happy to try to develop a solution, but unsure on the approach. Is this something that I could use an esp32 to pair with and control?

So I’ve been doing some research on these and they are based on the Broadlink BLE FastCon protocol. I tried to do some reverse engineering but no one seems to be supporting the Bluetooth side of things so far (The Broadcom integration only allows WiFi and is based off of mjg59/python-broadlink ) We could probably apply all the same code from the integration but would need to figure out how to use Bluetooth instead. What you can do right now is order a Broadlink GW4C Hub which will bridge the BLE to WiFi and bind to Google Assistant or Alexa. For $15 I just purchased one and am planning on testing it out.

2 Likes

Thank you so much for looking into this @Tdubs3 - great to hear that some of the heavy lifting has already been done. I will look into the Broadlink GW4C Hub but would prefer to not have to round-trip through Google or Alexa

Cheers :slight_smile:

@teskanoo my pleasure. The hub arrived last night and works almost flawlessly via the Alexa skill. It will change the color of the lights but won’t go back to white. There is a Xiaomi plugin so I’m hoping I can figure out how to connect that locally and not rely on a cloud service. As part of the setup I get a long device authentication code so it looks semi promising.

1 Like

is this the start of work that could enable support for the Broadlink bulb and switches here?? : https://www.amazon.co.uk/BroadLink-FastCon-BLE-Lighting-Control/dp/B0B82FF58Q

Very excited if so!

1 Like

@slashgob Yes these bulbs would work with the hub I mentioned above and although you would need to rely on a cloud provider at the moment the integration is possible. Hopefully at some point I can spend some time figuring out a local integration of the hub or reverse engineering of the protocol

I emailed Broadlink support to ask about any open API information they may be able to share and got the response…

“Hi Customer,
There are also don’t have a open API, thanks!”

@Tdubs3 I have the hub, smart switches and bulbs all working great with the Broadlink app and Google, no problems there. I would just love to be able to address them from within HA.

If there is anything I can do to help, please let me know.

@slashgob Thanks for the support, if I can think of anything I’ll let you know.

I had a quick chance the other night to try and get Xiaomi paired with the GW4C and while I could get it to connect with the china server it does not add the devices to your account but let’s you control them using AI voice commands which is not helpful. Hopefully I can get some more technical assistance on GitHub to try and port the protocol to Bluetooth

hey guys… not sure if this the right thread or not but it is the best match I could find. I have a couple LED floodlights that connect through the BRmesh app (so communicating via bluetooth). Do you know any way to integrate those type of devices to HA? I was thinking there should be a way to connect via bluetooth directly to the devices but can seem to sort out how…

I have spent my evening on analyzing the things, and here are some points:

  1. BRmesh is basically a facelifted version of Broadlink BLE Light App, original app works too!
    BroadLink BLE App
  2. Apps really use BT Mesh to talk with the lights, so iOS bluetooth tracing would not work, requires h/w analyzer, if anyone wants to go this path No, it is a fake “mesh”.
  3. As a possible approach to understanding the protocol one can try reverse engineering these 2 Android apps (think JADX, produces nice, clear code)

I guess some kind of SDK exists, as the package inside both apps is called “cn.com.broadlink.blelight”

TLDR: Integration is very doable, app contains all the required structures and code, easy reversable. Someone, who is good in bluez mesh coding should take a look.

Android log of BRmesh adding new light:

jyq_helper: getPayloadWithInnerRetry---> payload:000000000000000000000000,  key: 
jyq_helper: getPayloadWithInnerRetry---> mSendCnt:13,  sSendSeq:61,  seq:61
jyq_jni : redmi--000
jyq_jni : redmi--111
jyq_jni : redmi--222
jyq_jni : package forward_flag: 0 
jyq_jni : package header: 003dff3c 
jyq_jni : package payload: 000000000000000000000000 
jyq_jni : redmi--333
jyq_jni : redmi--444
BluetoothAdapter: STATE_ON
BluetoothLeAdvertiser: Stop AdvertingSet
jyq_helper: onLeScan: null - 62
BtGatt.GattService: [GSIM LOG]: gsimLogHandler, msg: MESSAGE_ADV_SET_STOP, appName: com.brgd.brblmesh, id: 0, isLegacy: true
jyq_helper: send---> payload:5e0b84f85e367bc45e367bc45e367bc4, calculatedPayload:6db64368931d0d385c42c63e5f0f65ca0a67aa63130b271e, len:24
BtGatt.GattService: onScanResult to scannerId: 10- eventType=0x10, addressType=1, address=112233_6, primaryPhy=1, secondaryPhy=0, advertisingSid=0xff, txPower=127, rssi=-79, periodicAdvInt=0x0
jyq_helper: onLeScan: [null - 11:22:33:44:55:66] old protocol: len: 16, data: 4e6c7a5cec0bf1198888a1a85e367bc4
jyq_add_dev: init: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254]
jyq_helper: onLeScan: null - 62
jyq_add_dev: poll: [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254]
jyq_helper: getPayloadWithInnerRetry---> payload:ec0bf1198888010137343034,  key: 5e367bc4
jyq_helper: getPayloadWithInnerRetry---> mSendCnt:10,  sSendSeq:58,  seq:58
jyq_helper: onLeScan: [null - 11:22:33:44:55:66] old protocol: len: 16, data: 6e6d7a934335303033013a3b37343034
jyq_jni : BLE_FASTCON_CONTROL_HEADER_TYPE_HEARTBEAT: short_add(1), group_add(0), version(4.4.0.3850.53)
jyq_helper: onHeartBeat: 1, 0, 4.4.0.3850.53
jyq_helper: onHeartBeat.mOnHearBeatCallback: com.brgd.brblmesh.Main.Activity.ScanDeviceActivity

Someone even done native code analysis:

And Rust implementation:

1 Like

Fastcon BLE is not compatible with mentioned BT mesh implementations.
BLE scanner app won’t even see my lights, as they do not broadcast any services.

Broadlink Fastcon is something completly different and it uses “advertisment” frames for comms, no fancy UUID based stuff at all. I guess it is not a “bluetooth mesh” in classic understanding (and I have no idea if devices retransmit frames)

As we have (presumably) working Rust code, can re-implement it with something else, may be MQTT connectable.

ADDED:

It seems a quick dirty hack might be possible:

  1. Use Android phone to setup your “mesh”
  2. Use adb logcat to see which key was generated for it (key btw is just 4 bytes, not very secure imho)
  3. Use Moody’s code (or rewrite it) to build BLE advertisment packets
  4. Send them using system(), invoking btmgmt add-adv -d hexdatahexdata...... 1

I would try that on the weekend.

I can confirm that sending commands to the light using btmgmt works.
I was able to replay a packet, changing LED’s color.

1 Like