akx / hass-ruuvitag

Hass.io addon for Ruuvitag Weather Stations
MIT License
24 stars 7 forks source link

Problems with re-installing hass-ruuvitag #39

Open ojalaj opened 3 years ago

ojalaj commented 3 years ago

@akx Due to SD card failure I had to re-install HASS from backup. After that I have had some issues with hass-ruuvitag and now I try to completely remove it and upgrade from 0.2.0 to 0.3.0.

However, I'm stuck with with this after removing old directories from add-ons and git cloning the new:

21-06-05 06:41:42 ERROR (SyncWorker_5) [supervisor.docker.addon] Can't build local/aarch64-addon-ruuvitag:0.2.0: The command '/bin/ash -o pipefail -c apk add --no-cache python build-base yarn git' returned a non-zero code: 1
21-06-05 06:41:42 ERROR (SyncWorker_5) [supervisor.docker.addon] Build log: 
Step 1/22 : ARG BUILD_FROM
Step 2/22 : FROM $BUILD_FROM as build
 ---> b9ff7dc42dac
Step 3/22 : ENV LANG C.UTF-8
 ---> Using cache
 ---> e28112e8b740
Step 4/22 : RUN apk add --no-cache nodejs libusb-dev bluez-dev linux-headers eudev-dev
 ---> Using cache
 ---> 26a0b41d0ea8
Step 5/22 : RUN apk add --no-cache python build-base yarn git
 ---> Running in 6f88a6bf6ee2
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/APKINDEX.tar.gz
ERROR: unable to select packages:

  python (no such package):
    required by: world[python]
Removing intermediate container 6f88a6bf6ee2

21-06-05 06:41:55 ERROR (SyncWorker_1) [supervisor.docker] Image local/aarch64-addon-ruuvitag not exists for addon_local_ruuvitag
21-06-05 06:41:55 ERROR (MainThread) [supervisor.utils] Can't execute run while a task is in progress
akx commented 3 years ago

Hi, sorry for the delay in replying. Kesäloma and all that, you know? 😎

This should be fixed by updating to the current master which includes #27 – Alpine's (which is the base image for Hass) package repos changed python to python3.

EDIT: I just promoted master to version 0.3.1, so moving there should fix things for you.

ojalaj commented 3 years ago

@akx Thanks for the reply!

OK - to "vääntää rautalangasta", what should I do next in which order? I didn't dare to upgrade my HASS OS from 5.13 to 6.1 and core from core-2021.5.5 to core-2021.5.5 to core-2021.7.0 yet, until I get this solved. Or should I?

How to update smoothly to the current hass-ruuvitag? Using git and/or removing old directory? Through command-line or GUI?

akx commented 3 years ago

So the core issue is that the underlying base images had changed "underneath us", and rebuilding the old version was doomed to fail since the package required to do so is no longer a thing.

The simplest, smallest upgrade is to git pull in the addon directory so you get to the current master, then have Hass rebuild the addon container. I unfortunately can't remember whether there's a button for that, and I don't personally use HASS OS anymore.

I don't think the order in which you upgrade components here really matters; if you want to go all in, maybe pull the new version but don't rebuild yet, then upgrade the OS and core – with any luck, it should also rebuild in the same flow :)

ojalaj commented 3 years ago

Hi @akx. This morning I had gathered enough courage to "git pull" in the addon directory and then upgraded the OS and Core.

The addon seems to work - I get for example "This is hassio-ruuvitag 0.3.0, terrrrrrrve" in the log, but for some reason in the Info tab it says "Current version: 0.2.0". Do you everything is correct?