Hello, I am having some issues with trying to get Ruuvitag data into Node-Red using Noble bluetooth, just wondering if anyone has any other suggestions or other methods aside from Noble, which appears to be 4+ years old and filled with problems running with recent versions of node.js and ubuntu.
edit: so after some messing about with noble and bluez bluetooth drivers on Ubuntu server 20.04, I managed to get some readings into node-red, but the noble scan ble node is unreliable and will get stuck with either a “Could not start scan, adapter state unknown” or “Could not start scan, adapter state poweredOff”. I’ve confirmed my adapter is still working using hciconfig hci0, which shows the following:
hci0: Type: Primary Bus: USB
BD Address: 5C:F3:70:64:2D:51 ACL MTU: 1021:8 SCO MTU: 64:1
HCI Version: 4.0 (0x6) Revision: 0x1000
LMP Version: 4.0 (0x6) Subversion: 0x220e
Manufacturer: Broadcom Corporation (15)
A little bit of background, I’m running Node-Red version 2.1, Node.JS version 14.X, Ubuntu Server 20.04 VM with ESXi 7.0 p3 operating system. Hardware is an intel NUC10i5 with Asus BT400 USB bluetooth adapter. I’m able to pass my bluetooth adapter to the VM without issues and everything within hciconfig and hcitools looks fine, but noble seems to do all sorts of weird things with the adapters like switch from hci0 to hci1. At this point it seems like an issue with noble so I’m wondering if anyone has other workarounds to get ruuvi measurements into node-red while running on Ubuntu server. Relative noob here when it comes to Linux and I’m using the NUC to learn more about it.
edit2: after discussion with a number of linux programmers and people familiar with node-red/blueooth, I have been steered away from using anything which relies on Noble. I’ll now be trying the following bluetooth to mqtt gateway, which uses the Bluez distribution rather than Noble. Cheers.
Noble or bt-mqtt-gateway? Noble to me seems like a lost cause because it is no longer supported and considered abondonware. I’m kind of baffled it is the goto suggestion for RuuviTag integration into Node-Red. I was able to get it working occasionally, but long term reliability is not there.
bt-mqtt-gateway is working like a charm and was quite easy to set up, I’m using Mosquitto as the MQTT broker. No issues so far, the script uses Bluez bluetooth distribution which is up to date and supported.
Further to this, bt-mqtt-gateway was unreliable after a few days of running. It seems anything that uses hcitool or its associated lescan command doesn’t play nice with new intel hardware or ubuntu 20.04. Random unexplainable issues related to hci0 going down, losing connection but still showing the BT connection as up or I/O errors on lescan. The Asus BT400 usb dongle which uses the BCM20702A1 driver worked, but would randomly fail in a day or so.
When trying to use the NUC10s built in AX201 bluetooth which is a much newer chip, I never got it working for any of the ruuvitag integrations or programs which use hcitool/noble, even though it seemed to work just fine using
bluetoothctl. When using
scan on it always showed the Ruuvitags…
Recently came across a post in the showcase section of these forums about a daemon which publishes MQTT data gbcsdpd. It’s the only thing I’ve been able to get working running ESXi, Ubuntu 20.04 Desktop and the NUCs built-in AX201 chip. I’m guessing because it uses the actively maintained Bluez D-Bus API.
Hopefully this saves someone some bluetooth frustration. Feel free to move to troubleshooting.