Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Can't start in Hass.io #4

Closed
VeliV opened this issue Mar 15, 2019 · 30 comments
Closed

Can't start in Hass.io #4

VeliV opened this issue Mar 15, 2019 · 30 comments
Assignees
Labels
bug Something isn't working

Comments

@VeliV
Copy link

VeliV commented Mar 15, 2019

After cloning the package to Hass.IO it installs fine, but then fails to start, giving the following error:

internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'bluetooth-hci-socket'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/app/node_modules/noble/lib/hci-socket/hci.js:6:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

@akx
Copy link
Owner

akx commented Mar 15, 2019

If you can access the build log, there might be additional clues there. What version of Hass.io, etc. are you using?

@maffee
Copy link

maffee commented Mar 15, 2019

And what hardware? Do you have RPi? Any usb devices attached?

@VeliV
Copy link
Author

VeliV commented Mar 15, 2019 via email

@maffee
Copy link

maffee commented Mar 15, 2019

RPi has been known to have issues with Bluetooth in some cases if you have some shield's attached to it. Mainly there have been problems with Raspbee shield.

And in some cases there are problems with USB sticks. You could try without those, just to rule out some causes.

Just my 2 cents, which probably have nothing to do with the actual problem =D

@VeliV
Copy link
Author

VeliV commented Mar 15, 2019 via email

@maffee
Copy link

maffee commented Mar 15, 2019

To clarify: I run this on RPi with Conbee USB stick and Hass.io.

@VeliV
Copy link
Author

VeliV commented Mar 17, 2019

Removed the USB sticks. Problem still persists.

I can' find a build log, aside from this one, which is not that helpful:

19-03-17 17:07:20 INFO (SyncWorker_1) [hassio.docker.interface] Remove Docker local/armv7-addon-ruuvitag with latest and None
19-03-17 17:07:20 INFO (SyncWorker_6) [hassio.docker.addon] Start build local/armv7-addon-ruuvitag:0.1.2
19-03-17 17:13:42 INFO (SyncWorker_6) [hassio.docker.addon] Build local/armv7-addon-ruuvitag:0.1.2 done

Hass.io version 148, HassOS 2.10

@J-Kallunki
Copy link
Contributor

Yeah I'm having the same problem with Hass.io 152.
I'm running the Raspbian Stretch from SSD via USB-adapter (SD-card boot) so cannot remove USB connections.

@wizzor
Copy link

wizzor commented Apr 7, 2019

Same issue with hass.io 152. No shields, only external device is a CC2531 Zigbee stick.

@coccobill1
Copy link

Same issue here with hass.io 163 on an RPI3 B+.

@Zetor77
Copy link

Zetor77 commented Jun 3, 2019

Same issue with hass.io 165. RPI3 B+ with Z-wave.me UZB stick inserted, if that makes any difference.

internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'bluetooth-hci-socket'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/app/node_modules/noble/lib/hci-socket/hci.js:6:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

@itis80
Copy link

itis80 commented Jun 3, 2019

Same error and issue with hass.io 165 and PI3B+. I tried also the RuuviDriver project and it fails to the same error with module bluetooth-hci-socket.

@mmaraa
Copy link

mmaraa commented Jul 8, 2019

Same error with RPI3B+ and hass.io 167. :(

@KPelto
Copy link

KPelto commented Jul 29, 2019

Same error with RPI3B+ and hass.io 170. :(

@itis80
Copy link

itis80 commented Jul 30, 2019

I tried the RuuviDriver-project on another RPI3B+ with raspbian os and with node.js version 8.15.1 it works. I now use it to publish the REST api for the tags and configured the HA sensors to read the tag information from there. I found several discussions where the module 'bluetooth-hci-socket' has caused problems with recent node.js versions so it might be the problem with this addon.

@akx
Copy link
Owner

akx commented Aug 1, 2019

Sorry for my deafening radio silence here 😿

I don't currently have a Hass.io development environment (running Hass on Arch on x64 in an Intel NUC atm since I grew annoyed with how long everything was taking on a Raspi), so I haven't had the inclination or kit to debug this.

Anyway @itis80 is on the right track here – see noble/node-bluetooth-hci-socket#84 and noble/noble#886 etc. I actually bumped into this same issue with the aforementioned x64 setup and just installed a local copy of Node 8 instead, heh.

Anyway, I opened akx/ruuvidriver#1 as a reminder for myself to see if I could get things to work with the https://github.com/abandonware/noble fork of Noble – if that works out, the same fix should work for hass-ruuvitag.

@akx
Copy link
Owner

akx commented Aug 1, 2019

Come to think of it, the other, easier, temporary fix would be to install Node 8 in the Docker container (instead of approx this https://pkgs.alpinelinux.org/package/edge/main/aarch64/nodejs I guess).

@akx akx self-assigned this Aug 1, 2019
@akx akx added the bug Something isn't working label Aug 1, 2019
@akx
Copy link
Owner

akx commented Aug 29, 2019

Things are moving forward! Ruuvidriver 0.2.0 is compatible with Node 12 (which is what the current hass.io base container images ship with), so the next step is to make hass-ruuvitag use it as a library.

akx added a commit that referenced this issue Aug 29, 2019
@akx
Copy link
Owner

akx commented Aug 29, 2019

Okay, so if a Hass.io owner wants to kick the tires a bit,

git clone -b next https://github.com/akx/hass-ruuvitag

into the addons directory and see if things build with that new next branch :)

@hemantkamalakar
Copy link

Doesn't build.
19-08-30 05:50:58 ERROR (SyncWorker_1) [hassio.docker.addon] Can't build local/amd64-addon-ruuvitag:0.1.2: The command '/bin/ash -o pipefail -c yarn' returned a non-zero code: 1 19-08-30 05:51:15 INFO (SyncWorker_19) [hassio.docker.addon] Start build local/amd64-addon-ruuvitag:0.1.2

@akx
Copy link
Owner

akx commented Aug 30, 2019

@hemantkamalakar Thanks for trying. I pushed a commit with a better Dockerfile – can you try again?

@tikkav
Copy link

tikkav commented Aug 30, 2019

@akx Thanks for fix! Now it builds just fine on Home Assistant 0.98.0 / HassOS 2.12 / RPi3. Also finds tags correctly.
19-08-30 09:44:12 INFO (SyncWorker_4) [hassio.docker.addon] Build local/armv7-addon-ruuvitag:0.1.2 done

@hemantkamalakar
Copy link

hemantkamalakar commented Aug 30, 2019

Yes. Thanks a lot for a quick fix. Image builds successfully now. But I am getting following errors in logs.

Found tag f34bfbd9f945 [ { url: 'http://hassio/homeassistant/api/states/sensor.livingroom_temperature', payload: { state: 26.46, attributes: [Object] } }, { url: 'http://hassio/homeassistant/api/states/sensor.livingroom_pressure', payload: { state: 938.98, attributes: [Object] } }, { url: 'http://hassio/homeassistant/api/states/sensor.livingroom_humidity', payload: { state: 81.5, attributes: [Object] } } ] tag f34bfbd9f945: failed 2 http://hassio/homeassistant/api/states/sensor.livingroom_temperature: 502: Bad Gateway tag f34bfbd9f945: failed 2 http://hassio/homeassistant/api/states/sensor.livingroom_pressure: 502: Bad Gateway tag f34bfbd9f945: failed 2 http://hassio/homeassistant/api/states/sensor.livingroom_humidity: 502: Bad Gateway

I also tried setting the hassHost config option but it was not saved after a restart.

@Glenf
Copy link

Glenf commented Aug 31, 2019

@hemantkamalakar I had quite similar issues. Removed hyphens and underscores from name and issues have seem to disappeared.

edit. You didn't seem to have those, so my issue was different.

@KPelto
Copy link

KPelto commented Aug 31, 2019

I got it working easily with board: rpi3-64 and version: "2.12". Big thanks!

@tikkav
Copy link

tikkav commented Aug 31, 2019

Found new issue... If I have hass-ruuvitag running it blocks Mi Flora plant sensor updates.

@Zetor77
Copy link

Zetor77 commented Aug 31, 2019

Great to see this add-on updated! However, things aren't still quite running smooth. I'm runnin Home Assistant 0.98.1 / HassOS 2.12 / RPi3b+ and building seems takes forever. After 1,5 hours of building I decided to reboot. However the add-on seems to have installed, since I'm able to start it and it finds my beacon. After configuring, restart add-on, but no sensors are created in entity registry. After a while I refresh add-on log and it finds my beacon unconfigured again. Cannot find any errors on logs.

edit: My version is 32 bit.

@Zetor77
Copy link

Zetor77 commented Aug 31, 2019

My bad. I entered mac with colons. Works just fine without colons. Thanks!

@akx
Copy link
Owner

akx commented Sep 2, 2019

Since things seem to work for multiple people (yay!), I promoted the next branch to master and tagged v0.2.0.

Closing this issue for now – please open a new one for new problems :)

@akx akx closed this as completed Sep 2, 2019
@akx
Copy link
Owner

akx commented Sep 2, 2019

Yes. Thanks a lot for a quick fix. Image builds successfully now. But I am getting 502: Bad Gateway errors in logs.

That's probably something wrong with Hass, not the addon :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests