Problem connecting with bluetooth

I am developing an Homey app to connect and control a Lumenetix lamp using bluetooth. I have problems connecting with bluetooth. When I connect with the correct advertisment

this._advertisement = await this.homey.ble.find(this.getData().id);
this._peripheral = await this._advertisement.connect();

I get the following error

Failed to establish connection
at Remote Process
at HomeyClient.emit (/node_modules/@athombv/homey-apps-sdk-v3/lib/HomeyClient.js:44:23)
at Object.emit (/node_modules/@athombv/homey-apps-sdk-v3/manager/ble.js:119:32)
at /node_modules/@athombv/homey-apps-sdk-v3/lib/BlePeripheral.js:107:21
at new Promise ()
at BlePeripheral.connect (/node_modules/@athombv/homey-apps-sdk-v3/lib/BlePeripheral.js:106:12)
at BleAdvertisement.connect (/node_modules/@athombv/homey-apps-sdk-v3/lib/BleAdvertisement.js:99:30)

The same happens when I used the Homey web based developer tool. I get an connection error. So the problem is not code related I guess.

I use the new Homey Pro (Early 2023) version 10.0.4.

This code worked before and most of the time a connection was successfull.

However since a week or so I do not get any connection. Discovery of the advertisment using a servicesUID works great however. I get the correct advertisements (2x lamps).

However when I use my iPad with the nRF app I can connect without any problems to the lumenetix lamp.

What could be the problem? Is there a hardware problem with Homey Pro regarding blue-tooth? Or did a software update generated a regression?
How can I see what the reason is for the not working connect?

It seems that I now can connect with Homey again using bluetooth. I didn’t change anything. Seems that Homey bluetooth is not fully stable, do other developers experience this too? The fact that I could connect with the nRF app (on a iPad) and not with Homey gives an indication that the problem could be related with Homey.

1 Like

I think @Toffe might have something to say about it :stuck_out_tongue:

I’m experiencing exactly the same with my BLE Christmas lights app. My BLE X-mas lights are out of the box. And the app that was working fine last year, isn’t working anymore with the current Homey firmware.
This still seems to work: this.advertisement = await this.homey.ble.find(Uuid)
The advertisement includes: addressType: 'public', connectable: true.
But I get an Error: Failed to establish connection on this line: this.peripheral = await this.advertisement.connect();

So anyone that can give me clue what is going on, and what I can do about it?

Edit: on my HP2016 and HP2019 the app is still working fine. But not on my HP2023 :frowning:

1 Like

I have two identical Lumenetix bluetooth lamps. What I find is that one lamp is working fine while to other keeps having connection problems. Also one lamp keeps the bluetooth connection while the other lamp, when the connection is successfull (which happens sometimes), the lamp is immediate disconnected.

I was not sure if this problem was related to the bluetooth lamps or because of Homey. So I have ordered some cheap bluetooth lamps from aliexpress to see if I can reproduce the same problem.

Another test. When I use the ‎Hive Lighting Antenna on the App Store on iOS both the bluetooth lamp work without problems. So I suspect that the problem is with the Homey.

I have the same problem.

I have the same problem (using Homey 2023) when creating Ember mug app, I can connect Mugs and until Mug is online and not discharged I can connect, but once I power off mug and restore power Homey can’t connect to mug, but when making same actions on iOS with power off all works great! It feels like Homey doesn’t remember the connection and just drop it with disconnect.

Also I found that “unsubscribeFromNotifications” not work at all, even in Web. It always drop this error:

1 Like

Question, does the Homey Bridge extend the bluetooth signal in combination with a Homey 2023 so that there is more coverage?

Nope, no word about bluetooth for the satellite function.

1 Like