daniel-mrd-andersson / hassioaddons

Addons to hass.io (Home Assistant)
5 stars 2 forks source link

Trying to install the addon thru Hass.io home assistant gives me an error when downloading the qt-websockets-5.9.1-r0.apk #1

Open jh83 opened 6 years ago

jh83 commented 6 years ago

Hi,

Im trying to add this addon to my Home Assistant but it seems as if the installation reffers to a file which no longer exists and cannot be downloaded. What to do? 18-01-05 15:46:55 INFO (SyncWorker_8) [hassio.dock.addon] Start build local/armhf-addon-conbee_deconz:1.1 18-01-05 15:46:58 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 410, in start resp = yield from self._request_handler(request) File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 325, in _handle resp = yield from handler(request) File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 93, in impl return (yield from handler(request)) File "/usr/lib/python3.6/site-packages/hassio/api/util.py", line 33, in wrap_api answer = await method(api, *args, kwargs) File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 515, in install if not await self.docker.install(self.last_version): File "/usr/lib/python3.6/site-packages/hassio/dock/util.py", line 18, in wrap_api return await method(api, *args, *kwargs) File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(self.args, self.kwargs) File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 251, in _install return self._build(tag) File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 264, in _build image = self.docker.images.build(**build_env.get_docker_args(tag)) File "/usr/lib/python3.6/site-packages/docker/models/images.py", line 179, in build raise BuildError(chunk['error']) docker.errors.BuildError: ADD failed: failed to GET http://dl-cdn.alpinelinux.org/alpine/edge/testing/armhf/qt5-websockets-5.9.1-r0.apk with status 404 Not Found:

404 Not Found

404 Not Found


nginx

jh83 commented 6 years ago

Okey... i finaly found an updated websockets file. This worked for me:

ARG BUILD_FROM FROM $BUILD_FROM

Add env

ENV LANG C.UTF-8

EXPOSE 80 8080

Change to the edge repositories as this is needed for the qt5-websockets packages to be installed (qt5 deps need to be same version)

RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/main > /etc/apk/repositories

RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories

RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.7/main > /etc/apk/repositories

RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.7/community >> /etc/apk/repositories

Install all needed packages and download the qt5-websockets from testing

RUN apk update RUN apk add qt RUN apk add qt5-qtbase RUN apk add libc6-compat RUN apk add curl RUN apk add qt5-qtserialport RUN apk add mesa-gles RUN apk add binutils RUN apk add qt5-qtbase-x11 ADD http://dl-cdn.alpinelinux.org/alpine/edge/community/armhf/qt5-websockets-5.9.3-r0.apk /tmp RUN apk add /tmp/qt5-websockets-5.9.3-r0.apk

Download deconz packages

RUN wget http://www.dresden-elektronik.de/rpi/gcfflasher/gcfflasher-latest.deb RUN wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.99-qt5.deb

Need to manually extract files as Alpine uses APK and are not able to install Debian packages

RUN ar xv gcfflasher-latest.deb

RUN tar xv -C / -f data.tar.gz

RUN ar xv deconz-2.04.99-qt5.deb RUN tar xv -C / -f data.tar.xz

Clean up som data

RUN rm -rf gcfflasher-latest.deb RUN rm -rf deconz-2.04.99-qt5.deb RUN rm -rf data.tar.gz RUN rm -rf data.tar.xz RUN rm -rf debian-binary RUN rm -rf control.tar.gz

Remove refernce to desktop part of applications

RUN mv ./usr/share/applications/deCONZ.desktop ./usr/share/applications/deCONZ.desktop.old RUN ln -s /data /root/.local

Ensure that configuration data is written outside the docker container

Start deCONZ assigning both HTTP and WS port

#

RUN /usr/bin/deCONZ -platform minimal --http-port=80 --ws-port=8080

Copy data

COPY run.sh /

RUN chmod a+x /run.sh

ENTRYPOINT [ "/run.sh" ]

docker run -p 80:80 -t -i --privileged -v /dev/bus/usb:/dev/bus/usb ubuntu bash

touch /root/.local/share/data/dresden-elektronik/deCONZ/session.default

docker run -v /etc/timezone:/etc/timezone -v /dev/serial0:/dev/serial0 -p 80:80 -p 8080:8080 --privileged -v /dev/bus/usb:/dev/bus/usb daniel/base

"/dev/serial0"

`

martikainen87 commented 6 years ago

Hej @fiskfan could you please set your quotes correctly so that others may be able to copy your edit of the dockerfile, right now the "#" screws up the formation :)