Closed martinrosenauer closed 4 years ago
Unfortunately I believe that we have to keep the lock on the Bluetooth adapter to keep receiving the scan messages. Currently I see two ways of fixing this:
I agree 1) is worth a try - waiting for one in the mail and will give it a shot.
For 2) - It would be greatly appreciated - this is the device:
and the stuff I'm using to read it and send mqtt message:
Hi mKeRix,
I tried using a second BLE adaptor. I used hci0 for Room Assistant and hci1 for the Mi Flora platform. However, Room Assistant only ran for a couple of minutes then stopped sending data, perhaps due to the other platform getting plant data; logs don't really show anything.
Can I ask, have you proven 2 bluetooth adaptors working okay together and if so, with which other platform did you use at the same time? I don't know whether it's Mi Flora causing the issue or Noble/Room Assistant.
I would try Room Assistant on hci1, however I am running HassIO so I'm guessing this is tricker to do because I don't get easy access to the Docker container to run the sudo command.
I have been using your add-on for about 9 months on 3 Pi Zeros for presence detection and depend on it 100% so thanks for your hard work. (The Wife Approval Factor has been a lot higher with the presence detection than some of my other simpler automations!)
Many Thanks.
Try to don't synchronize them in same time. MiFlora : 20 minutes refresh Room : 3
Hi guys,
I ran into this issue too, so I plug another bluetooth adapter into my raspberry pi, according to :
- Get a USB bluetooth adapter, plug it in and use that one for room-assistant as described here. (cheap & quick fix)
change your home assistant BLE accessories to use HCI1, and add Environment=NOBLE_HCI_DEVICE_ID=0
to your room-assistant systemd service file then restart room-assistant service, works for me.
my room-assistant systemd service file:
[Unit]
Description=Room Assistant service
[Service]
Environment=NODE_VERSION=8.16.2
Environment=NOBLE_HCI_DEVICE_ID=0
ExecStart=/home/pi/.nvm/nvm-exec npm start
WorkingDirectory=/home/pi/room-assistant
Restart=always
RestartSec=10
User=pi
[Install]
WantedBy=multi-user.target
Hi,
@mKeRix: first of all thanks for doing this project.
I am in the situation where I'm also using the same Raspberry Pi Zero W to read a Xioami BLE temperature/humidity sensor. When Room-Assistant is running, it fails reading, but when stopping it, it works. Is there any way to have these running in parallel ?
It's easy to simulate by running 'sudo hcitool lescan' while Room-Assistant is running.