icanos / hassio-plejd

Hass.io add-on for Plejd home automation devices
Apache License 2.0
126 stars 36 forks source link

Error building #3

Closed mattiasjonsson closed 4 years ago

mattiasjonsson commented 4 years ago

Thank you for your efforts. Great work! I get this error when I'm trying to build the addon. Any idea what might be causing it?

19-12-11 09:58:54 INFO (SyncWorker_2) [hassio.docker.addon] Start build local/armv7-addon-plejd:3 19-12-11 10:00:11 ERROR (SyncWorker_2) [hassio.docker.addon] Can't build local/armv7-addon-plejd:3: The command '/bin/bash -o pipefail -c apk add --no-cache --virtual .build-dependencies g++=8.3.0-r0 gcc=8.3.0-r0 libc-dev=0.7.1-r0 linux-headers=4.19.36-r0 make=4.2.1-r2 python=2.7.16-r1 bluez=5.50-r3 eudev-dev=3.2.8-r0 && apk add --no-cache git=2.22.0-r0 nodejs=10.16.3-r0 npm=10.16.3-r0 && npm config set unsafe-perm true' returned a non-zero code: 1 19-12-11 10:00:11 ERROR (MainThread) [asyncio] Task exception was never retrieved future: <Task finished coro=<AddonManager.install() done, defined at /usr/src/hassio/hassio/addons/init.py:106> exception=AddonsError()> Traceback (most recent call last): File "/usr/src/hassio/hassio/addons/init.py", line 135, in install raise AddonsError() from None hassio.exceptions.AddonsError

icanos commented 4 years ago

Interesting, could you please share the platform you're running? Are you using an RPi 3 or 4, which version of Hass.io/HA?

I rebuilt the add-on on my RPi 4 yesterday without issues.

Also, are you using 32-bit or 64-bit Hass.io?

mattiasjonsson commented 4 years ago

RPi 3, Hass.io 32-bit (HassOS 3.5), Home Assistant 0.102.3 , Hass.io supervisor 192

I managed to build version 2 without any issues. But I can't build version 3 (DIM-2 version).

icanos commented 4 years ago

Interesting, I'm not aware of any changes to any packages that could affect building the add-on between v 2 and 3. I'll have a look and see if I can find anything.

axlthorell commented 4 years ago

I removed my add-on and cloned the latest one from git and now when I try to install I get this:

19-12-11 17:42:11 ERROR (SyncWorker_10) [hassio.docker.addon] Can't build local/armv7-addon-plejd:2: The command '/bin/bash -o pipefail -c apk add --no-cache --virtual .build-dependencies g++=8.3.0-r0 gcc=8.3.0-r0 libc-dev=0.7.1-r0 linux-headers=4.19.36-r0 make=4.2.1-r2 python=2.7.16-r1 bluez=5.50-r3 eudev-dev=3.2.8-r0 && apk add --no-cache git=2.22.0-r0 nodejs=10.16.3-r0 npm=10.16.3-r0 && npm config set unsafe-perm true' returned a non-zero code: 1

icanos commented 4 years ago

Could you please try to remove the package-lock.json file and try again?

axlthorell commented 4 years ago

Same error.

19-12-11 17:59:54 INFO (SyncWorker_18) [hassio.docker.addon] Start build local/armv7-addon-plejd:2
19-12-11 18:00:12 ERROR (SyncWorker_18) [hassio.docker.addon] Can't build local/armv7-addon-plejd:2: The command '/bin/bash -o pipefail -c apk add --no-cache --virtual .build-dependencies   g++=8.3.0-r0   gcc=8.3.0-r0   libc-dev=0.7.1-r0   linux-headers=4.19.36-r0   make=4.2.1-r2   python=2.7.16-r1   bluez=5.50-r3   eudev-dev=3.2.8-r0     && apk add --no-cache   git=2.22.0-r0   nodejs=10.16.3-r0   npm=10.16.3-r0     && npm config set unsafe-perm true' returned a non-zero code: 1

I did try to restore a snapshot from yesterday and it didn't work. The error persists.

icanos commented 4 years ago

I’ll have a go at it, give me a few minutes :)

icanos commented 4 years ago

Could you download the Dockerfile from the master branch and try again? I noticed a weird error trying to build the container which is resolved now.

axlthorell commented 4 years ago

The build is successful! I had some issues with me forgetting that after I had restored a snapshot from yesterday the password for my mqtt user also got changed...

It also seems as if the error with error: not connected is back. I'll see if some restarting might help. This might be as a result of my snapshot restore.

icanos commented 4 years ago

The 'error: not connected' will be written to the log if you try to turn on/off a light before it has actually been able to connect to the Plejd system through BLE. Just give it between 10-20 seconds at boot time before trying to switch a light.

You can see in the log when the connection is established since I always write which BLE mac the add-on connects to.

axlthorell commented 4 years ago

Looks like it's working now. It takes a couple of minutes for the status to be updated for the lights. Great work!

icanos commented 4 years ago

Yes, that's right. I'm looking into it, but currently it takes a few minutes :) glad to hear it works now. @mattiasjonsson can you also try the latest code in the master branch?

mattiasjonsson commented 4 years ago

It builds correctly now. Thank you! You can close this issue.

icanos commented 4 years ago

Perfect :)