hassio-addons/addon-node-red

Please add d-bus from host for enabling access to bluetooth - otherwise restart loop #772

Gymnae posted onGitHub

Problem/Motivation

I'd like to access the bluetooth stack for using node-red-contrib-generic-ble- This relies on access to D-bus of the host, which right now is not available. bluetoothctl also does not work

Expected behavior

Access to the bluetooth adapter of the host via bluetoothctl or nodes

Actual behavior

Log from the startup:

20 Nov 10:12:27 - [red] Uncaught Exception:
20 Nov 10:12:27 - Error: connect ENOENT /var/run/dbus/system_bus_socket
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! addon-node-red@ start: `node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the addon-node-red@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to reproduce

  1. Enable the install by adjusting your configuration:
    system_packages:
    - musl
    - make
    - g++
    - bluez
    - bluez-dev
    - eudev-dev
    - bluez-libs
    - bluez-firmware
    - libcap
    - bluez-deprecated
    - libusb-dev
    - libusb
    - linux-headers
  2. Start, or restart node-red addon
  3. Install node-red-contrib-generic-ble in node-red
  4. Restart node-red addon
  5. Profit: See a restart loop, you won't manage to enter the webUI

Proposed changes

Add ‘host_dbus’ - true to the config of the add-on for passing it into the container. This might solve the problem.


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests