mKeRix/hassio-repo

Installation on RPi3 with hassio in docker

koles142 opened this issue · 7 comments

Hi, I've RPi with raspbian and Hassio in docker. I tried install room assistant (addon) but I've errors in log:
`Log

@abandonware/bluetooth-hci-socket@0.5.3-1 preinstall /room-assistant/node_modules/@abandonware/bluetooth-hci-socket
npm install node-pre-gyp

npm notice created a lockfile as package-lock.json. You should commit this file.

  • node-pre-gyp@0.12.0
    added 66 packages from 25 contributors and audited 95 packages in 21.702s
    found 0 vulnerabilities

usb@1.6.0 install /room-assistant/node_modules/usb
prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.0
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/31e4e1-usb-v1.6.0-node-v57-linuxmusl-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v57-linuxmusl-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v57-linuxmusl-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.14.0 runtime=node arch=arm libc=musl platform=linux)
make: Entering directory '/room-assistant/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
In file included from ../libusb/libusb/os/linux_usbfs.c:43:0:
../libusb/libusb/os/linux_usbfs.h:24:25: fatal error: linux/types.h: No such file or directory
#include <linux/types.h>
^
compilation terminated.
make: Leaving directory '/room-assistant/node_modules/usb/build'
make: *** [libusb.target.mk:138: Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /room-assistant/node_modules/usb
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

@abandonware/bluetooth-hci-socket@0.5.3-1 install /room-assistant/node_modules/@abandonware/bluetooth-hci-socket
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/0.5.3-1/binding-0.5.3-1-node-v57-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @abandonware/bluetooth-hci-socket@0.5.3-1 and node@8.14.0 (node-v57 ABI, musl) (falling back to source compile with node-gyp)
make: Entering directory '/room-assistant/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::poll()':
../src/BluetoothHciSocket.cpp:252:95: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::emitErrnoError()':
../src/BluetoothHciSocket.cpp:283:93: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/binding.node
COPY Release/binding.node
COPY /room-assistant/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/room-assistant/node_modules/@abandonware/bluetooth-hci-socket/build'
npm WARN moleculer-cron@0.0.2 requires a peer of moleculer@^0.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.0 (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.0 install: prebuild-install --verbose || node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • mqtt@2.18.8
  • @abandonware/noble@1.9.2-1
    added 113 packages from 76 contributors and audited 52 packages in 113.282s
    found 2 high severity vulnerabilities
    run npm audit fix to fix them, or npm audit for details
    [2019-08-25T14:37:43.837Z] INFO 6e66619d-room-assistant-324/BROKER: Moleculer v0.13.4 is starting...
    [2019-08-25T14:37:43.855Z] INFO 6e66619d-room-assistant-324/BROKER: Node ID: 6e66619d-room-assistant-324
    [2019-08-25T14:37:43.857Z] INFO 6e66619d-room-assistant-324/BROKER: Namespace:
    [2019-08-25T14:37:43.862Z] INFO 6e66619d-room-assistant-324/REGISTRY: Strategy: RoundRobinStrategy
    [2019-08-25T14:37:43.882Z] INFO 6e66619d-room-assistant-324/BROKER: Serializer: JSONSerializer
    [2019-08-25T14:37:43.892Z] INFO 6e66619d-room-assistant-324/BROKER: Registered 10 internal middleware(s).
    [2019-08-25T14:37:45.745Z] INFO 6e66619d-room-assistant-324/REGISTRY: '$node' service is registered.
    [2019-08-25T14:37:45.753Z] INFO 6e66619d-room-assistant-324/REGISTRY: 'mqtt' service is registered.
    [2019-08-25T14:37:45.756Z] INFO 6e66619d-room-assistant-324/REGISTRY: 'ble' service is registered.
    [2019-08-25T14:37:45.986Z] INFO 6e66619d-room-assistant-324/REGISTRY: 'shell' service is registered.
    [2019-08-25T14:37:45.988Z] INFO 6e66619d-room-assistant-324/BROKER: ServiceBroker with 4 service(s) is started successfully.
    [2019-08-25T14:37:47.497Z] INFO 6e66619d-room-assistant-324/MQTT: Connected to mqtt://192.168.31.99`

Have you any idea what i've to do?

Which device/platform are you running on? So e.g. Raspberry Pi or Intel NUC, or in more general terms ARM vs i386.

From the error itself it looks like there is an issue with the add-on itself and nothing wrong with your configuration.

I'm using Raspberry Pi 3b+ raspbian stretch + docker + hassio

Hi, I also have the same issue installing this add-on. I am running Home Assistant 0.99.3 on a Raspberry Pi 3B+ using Rasbpian Buster, Docker and Hassio. I had the same issues running the add-on on same hardware, but using HassOS. No matter how many times I restart the add-on, it seems the mqtt@2.18.8,@abandonware/noble@1.9.2-1 packages are never installed properly.

I have installed Room-Assistant as a Docker container on an rPi Zero and that works.

Hass.io add-on log:

> room-assistant@1.1.1 start /room-assistant
> bin/room-assistant-runner.js

Installing dependencies for: mqtt,ble,console
Packages needed: mqtt@2.18.8,@abandonware/noble@1.9.2-1
Already installed: 
Now installing: mqtt@2.18.8,@abandonware/noble@1.9.2-1

> usb@1.6.0 install /room-assistant/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.2
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/31e4e1-usb-v1.6.0-node-v57-linuxmusl-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v57-linuxmusl-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v57-linuxmusl-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.14.0 runtime=node arch=arm libc=musl platform=linux)
make: Entering directory '/room-assistant/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
In file included from ../libusb/libusb/os/linux_usbfs.c:43:0:
../libusb/libusb/os/linux_usbfs.h:24:25: fatal error: linux/types.h: No such file or directory
 #include <linux/types.h>
                         ^
compilation terminated.
make: *** [libusb.target.mk:138: Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o] Error 1
make: Leaving directory '/room-assistant/node_modules/usb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.19.75-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /room-assistant/node_modules/usb
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> @abandonware/bluetooth-hci-socket@0.5.3-3 install /room-assistant/node_modules/@abandonware/bluetooth-hci-socket
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/0.5.3-3/binding-0.5.3-3-node-v57-linux-arm.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for @abandonware/bluetooth-hci-socket@0.5.3-3 and node@8.14.0 (node-v57 ABI, musl) (falling back to source compile with node-gyp) 
make: Entering directory '/room-assistant/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::poll()':
../src/BluetoothHciSocket.cpp:252:95: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                               ^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../../nan/nan.h:1045:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::emitErrnoError()':
../src/BluetoothHciSocket.cpp:274:93: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                             ^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../../nan/nan.h:1045:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/binding.node
  COPY Release/binding.node
  COPY /room-assistant/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/room-assistant/node_modules/@abandonware/bluetooth-hci-socket/build'
npm WARN moleculer-cron@0.0.2 requires a peer of moleculer@^0.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.0 (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.0 install: `prebuild-install --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ @abandonware/noble@1.9.2-1
+ mqtt@2.18.8
added 114 packages from 76 contributors and audited 52 packages in 500.86s
found 2 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
[2019-10-07T01:26:50.502Z] INFO  6e66619d-room-assistant-314/BROKER: Moleculer v0.13.4 is starting...
[2019-10-07T01:26:50.516Z] INFO  6e66619d-room-assistant-314/BROKER: Node ID: 6e66619d-room-assistant-314
[2019-10-07T01:26:50.517Z] INFO  6e66619d-room-assistant-314/BROKER: Namespace: <not defined>
[2019-10-07T01:26:50.520Z] INFO  6e66619d-room-assistant-314/REGISTRY: Strategy: RoundRobinStrategy
[2019-10-07T01:26:50.535Z] INFO  6e66619d-room-assistant-314/BROKER: Serializer: JSONSerializer
[2019-10-07T01:26:50.542Z] INFO  6e66619d-room-assistant-314/BROKER: Registered 10 internal middleware(s).
[2019-10-07T01:26:51.758Z] INFO  6e66619d-room-assistant-314/REGISTRY: '$node' service is registered.
[2019-10-07T01:26:51.767Z] INFO  6e66619d-room-assistant-314/REGISTRY: 'mqtt' service is registered.
[2019-10-07T01:26:51.770Z] INFO  6e66619d-room-assistant-314/REGISTRY: 'ble' service is registered.
[2019-10-07T01:26:51.772Z] INFO  6e66619d-room-assistant-314/REGISTRY: 'console' service is registered.
[2019-10-07T01:26:51.775Z] INFO  6e66619d-room-assistant-314/BROKER: ServiceBroker with 4 service(s) is started successfully.
[2019-10-07T01:26:52.050Z] INFO  6e66619d-room-assistant-314/MQTT: Connected to mqtt://192.168.86.188:1883

Just wanted to add that on the same rPI3B that reports errors in the add-on, I'm able to install room-assistant as a Docker container and it is running without issues. So the issue is likely something to do with the Hass.io add-on and not hardware.

I'm running 0.104.2 on a RPI4 on hassio and I believe I'm getting the same issues, but have started another issue in case it's not.

Fyi: if you want you can switch over to the beta add-on, that should fix the issue above. You will need to upgrade all your room-assistant instances to the new beta version in this case though. That requires the a different installation procedure and a rewritten config - you can see room-assistant.io for more details.

I will put this out as a release version either this or next week.

2.0 is released, so this should not be an issue anymore :)