BLE Issues Anyone got BLE working?

Does the lack of topics related to BLE since 2022 (with one exception I can find) mean that people are not having problems with BLE related nodes or have people given up trying to get it to work?
I suspect the latter.

I cant get any BLE nodes to work. the best I have achieved is nodes getting stuck at 'scanning'. Some nodes dont install properly (get a MODULE NOT FOUND error).

I am trying to integrate some Xiaomi Miflora sensors. I started with the dedicated Xiaomi node (node-red-contrib-xiaomi-ble). It used to work. Now it gets stuck at scanning. I've tried the other BLE nodes without success.

Has anyone got a recipe to get this working or am I just bashing my head against a brick wall (a hobby of mine)

thanks

In recent years, I have used an esp32 to receive BLE and convert to MQTT and then receive MQTT in node-red.

I haven't looked at BLE myself but note that that node is old and the library it uses is even older.

As @Frida suggests it might be easier to use an ESP running something like Tasmota, BLE is well supported in Tasmota.

As recommended above, I use Esp32 boards to bring in BLE using the Open MQTT gateway. Works really well.

Precisely I use these with Openmqtt and run flows that end up sending messages to Alexa to water the plants.

2 Likes

I use Arduino v4 WIFI and MQTT too.
Just today get this one. Hopely have soon time to test
https://bleuio.com/

Thx, I'll have a read of this. I am trying to connect commercial products, Xiaomi MiFlora sensors to my app on a pi.

I made some progress.

  • Started with a clean raspberry and a clean installation of node-red.
  • Installed the Xiaomi BLE node. Very simple flow to see what is returning - nothing. Gets stuck searching. (The behaviour I have been experiencing).
  • Decide to install ble-scan, a single node that scans continuously. Why? Well I wanted to seee if any ble devices could be detected, and the description mentioned the noble library.
  • Yes, it detected lots of BT devices. More surprisingly the Xiaomi BLE started finding devices and returning data!
  • Import this flow into my original project and the Xiaomi BLE gets stuck at the searching phase again.
  • Decided to import each flow in my original project into my new one and checking the BLE code each time. This took a while as there are flows fro db access and various protocols (Z2M, Tasmota, Zigbee (IKEA & Xiaomi).
  • the BLE code worked as expected after each import until everything had been copied over!
  • Added some code to add BLE data to a database and the BLE code still found devices but timed out on the read of the data.
  • Removed flows one by one and tested the BLE code (not working) until I had removed everything and it still didnt work!
  • (I removed the other packages as they were no longer needed by flows. (I couldn't uninstall the tradfri package for some unknown reason. The palette insisted there were node in use, despite the project being empty!).
  • So I stopped bashing my head against the brick wall and had something to eat.
  • What could casue this behaviour? Memory problems? Its running on a pi4-4G.
  • So I'm back to a clean machine with just two BLE nodes installed. Rethinking the implementation. Its nearly winter and the evenings are long!

All the recommendations you have received use an additional hardware.

Yes, I had noticed and I am beginning to understand why!
Had another fruitless evening of adding nodes one by one, then taking them away, rebooting, o power off power on. All to no avail. I have decided to 'push support for BLE to a future release' and in the meantime look at openMQTTgateway as you suggested. Thanks for the tip

I researched the BLE theme for my MiFlora sensors some time back and found the only really convincing solutions used an ESP board, together with Arduino. As this is not a platform that I am proficient in, I was fascinated to discover the Openmqtt gateway, the natural way to use Node-red. If you are interested take a look at

Its worked well for me, with 3 ESP32 boards I cover my house (small, 1 level) and have even changed my Home/Away scene with a Tile tag instead of phone geolocation.

the documentation on openMwtt and TheengsGateway is very good, and it proved very easy to set up theeng gateway on my pi. I was reading the miflora sensors with 10 mins. The only snag I have encountered is the location of the config.json file. Cant find it anywhere (find / -name 'config.json'). tI just want to see if the TheengsDecoder for MiFlora is loaded - I'd like the data from the device in one MQTT message
thanks again, gary

Can't help you there. I run Node-red on a Sonoff iHost, which runs in Docker and I don't usually delve into that very much, maximum the NR settings JS.
Try posting on the Openmqtt forum?