-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to bluetooth device from Node-RED container. #40
Comments
At the moment the container doesn't have the permission to access host devices. There should be a way to give it access. Which node are you using, I'll give it a go and report back |
I got into an endless restart initially (deleting the flows.json file stopped the endless restart) It looks like by setting the network_mode to host it stopped the endless restart issue. I tried the BLE scan and it doesnt return any results, my phone does however see my watch Could you try editing your docker-compose.yml file and see if it fixes your results:
add the line for network mode, the file indentation is important. after this run The host option has another side effect, you can no longer access containers by name, you would now need to use 127.0.0.1 in stead of the name |
I believe I experienced the same endless restart issue you mentioned. I'm fairly new to this kind of thing but, that's what the logs in portainer seemed to be indicating. Deleting the flows did indeed stop this. I'm looking to use node-red-contrib-xiaomi-ble as the simplest method to poll at the moment one Xiaomi Mijia Bluetooth Temperature Humidity Sensor (hopefully in the future multiple sensors). Editing the docker-compose.yml file to include Having to access other containers by IP instead of name seems like a fair trade in this case to gain the additionally functionally. Thank you. |
Thanks @DeuceCode I will amend the documentation. I appreciate you testing the modified yml file |
Experimental Branch
I'm using a Pi 4, bluetooth is working correctly.
I'm able to use bluetooth dependant nodes from within Node-RED running natively on the Pi, however attempting the same from Node-RED running in the IOTStack container fails and causes the container to restart.
Is it possible to access the bluetooth device from within the container?
The text was updated successfully, but these errors were encountered: