Homegear Add-on for Hassio

I’ve been working to get Homegear working on Hassio. Here’s the repo:

Feedback welcome!

1 Like

Hi,

Tried to install your add-on on a fresh hassio installation but unfortunately didn’t work.

The log record shows this:

17-12-10 14:35:28 INFO (SyncWorker_19) [hassio.dock.addon] Start build 89330960/armhf-addon-rpi-homegear:0.1
17-12-10 14:35:43 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 416, in start
resp = yield from self._request_handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web.py”, line 323, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.6/site-packages/hassio/api/util.py”, line 31, in wrap_api
answer = await method(api, *args, **kwargs)
File “/usr/lib/python3.6/site-packages/hassio/addons/addon.py”, line 474, 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 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/hassio/dock/addon.py”, line 219, in _install
return self._build(tag)
File “/usr/lib/python3.6/site-packages/hassio/dock/addon.py”, line 232, 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: The command ‘/bin/sh -c apt-get update && apt-get -y install homegear homegear-nodes-core homegear-nodes-extra homegear-homematicbidcos homegear-homematicwired homegear-insteon homegear-max homegear-philipshue homegear-sonos homegear-kodi homegear-ipcam homegear-beckhoff homegear-knx homegear-enocean homegear-intertechno homegear-influxdb vim less htop’ returned a non-zero code: 100

What’s your hardware platform? It only works on Raspberry Pi so far.

Raspberry pi 3

Hm. It looks like apt-get install is failing. Maybe a bad internet connection or a full disk?

Let me know once you’ve found it. Maybe we can add some better error handling.

If you want to help debug this, please follow these steps:

  1. Start the installation of the add-on via the Hassio UI
  2. SSH into your Hassio host
  3. Run ps a few times until you see that apt-get install homegear ... has started
  4. Run a docker container list, note the generic name (last column) for the container where the image name is just hexadecimal random and which is running for only a short time. Here’s an example output:
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS                NAMES
15f2e9ba6a14        39c8f99b1cd8                               "/bin/sh -c 'apt-g..."   3 minutes ago       Up 3 minutes                             ecstatic_cray
edf94cb84908        homeassistant/armhf-hassio-supervisor      "/usr/bin/entry.sh..."   2 weeks ago         Up 2 weeks                               resin_supervisor
1aa94d4042fa        homeassistant/raspberrypi3-homeassistant   "/usr/bin/entry.sh..."   2 weeks ago         Up 2 weeks                               homeassistant
3650d994de9d        homeassistant/armhf-addon-samba            "/usr/bin/entry.sh..."   2 weeks ago         Up 2 weeks                               addon_core_samba
6652640caded        homeassistant/armhf-addon-ssh              "/usr/bin/entry.sh..."   2 weeks ago         Up 2 weeks          0.0.0.0:22->22/tcp   addon_core_ssh

In the above example, ecstatic_cray is the generic container name.

  1. Run a docker attach ecstatic_cray
  2. Your terminal will be attached to the apt-get install process and you will be able to see the actual error message

Let me know what you get.

Hi,
I have MAX! eq3 Cube which I reflashed with aculfw 1.21 to remove original firmware and to use it as CUL

I managed to install your add-on for Homegear and have a tone of questions but main ones are:

  1. What next? because HASSio did not detect any of my MAX devices.
  2. Do I need to configure it somehow or something? Homegear config document is not that helpful.
  3. Homegear addon log is full of this message:

02/03/18 15:45:40.813 Module Sonos: Error in file SonosCentral.cpp line 143 in function void Sonos::SonosCentral::deleteOldTempFiles(): Could not open directory “/var/lib/homegear/tmp//sonos/”

Any pro tips how to proceed?
Thanks in advance

Hi all, I’ve discontinued work on this add-on, mainly because I’m now using Homematic devices and an external CCU2/3 for my own projects.

Also, there’s now an official Homematic Add-on you can install without adding my repo. It’s based on OCCU.

The main remaining use case for my Homegear Add-on would be non-Homematic devices like eQ-3 MAX! but I won’t be able to support this any longer nor will I release any new versions.

Hi, your addon is not working on a ubuntu-NUC machine, any guidance on how to fix this? Will try myself since you discontinued. Below the error

18-10-26 10:03:55 INFO (SyncWorker_19) [hassio.docker.addon] Start build 89330960/amd64-addon-rpi-homegear:0.2 18-10-26 10:03:58 ERROR (SyncWorker_19) [hassio.docker.addon] Can't build 89330960/amd64-addon-rpi-homegear:0.2: The command '/bin/sh -c apt-get update && apt-get -y install apt-transport-https wget ca-certificates apt-utils gnupg' returned a non-zero code: 1

Hi folks,

first of all, thank you @jansh for your work so far. Unfortunately the add-on doesn’t seem to work anymore. I’ve been working the last two weeks on creating a working add-on. The resultme is that I created an add-on with Debian and the current Nightly from Homegear. So you can install it on hass.io on an RaspberryPi.

Installing:

  • Add the Repository to hass.io
  • Install homegear for hass.io. That can take up to 20 minutes depending on your hardware and network.
  • Start the add-on, that can also take about 10 minutes while the container is creating keys.
  • Restart the Container after the first run.

Known Issues:

  • At the moment you need to change some rights on the folder after the first start. After restart the rights are correct.

Hi @Klagio, do you still need help? The Add-On is actually only for RaspberryPi. I have not test it on other systems right now and of course, there are differences between the architecture. Actually i figure out how to build homegear on alpine linux to get one Add-On for different platforms. Please let me know if you need further help.

Yes, I am not flashing because I am waiting to have a working addon for ubuntu/NUC.

The other day the Cube lost all configuration ggrrrr.

But didn’t want the hassle of putting an extra raspberry for hosting only this addon

I have add a add-on for other platforms as raspberry-pi, not tested now. Can you test the installation of this add-on and give me feedback pleas? There are actually some problems to install homegear on alpine linux, thats why i use debian for the container. I search for a solution to make one add-on for all architectures.

managed to add the repository (it didn’t because I had 2 repository with the same name, once deleted one, now I can), but recieving this error

8-11-19 15:34:47 INFO (SyncWorker_8) [hassio.docker.addon] Start build 441b9bcc/amd64-addon-homegear:0.70.3
18-11-19 15:35:01 ERROR (SyncWorker_8) [hassio.docker.addon] Can’t build 441b9bcc/amd64-addon-homegear:0.70.3: The command ‘/bin/sh -c apt-get update && apt-get -y install apt-transport-https wget ca-certificates apt-utils gnupg libzip4 libavahi-client3 libavahi-client-dev insserv’ returned a non-zero code: 1

Sorry my mistake, i forgot to switch the docker repository to the normal debian package. now it should be worked fine. On my system i can build the docker container without any problems. Pleas try again, thank you!

Also error (I am installing the non rpi

hassio.docker.addon] Start Docker add-on andbobsyouruncle/amd64-google-assistant-webserver with version None
18-11-19 18:38:10 INFO (SyncWorker_0) [hassio.docker.addon] Start build 441b9bcc/amd64-addon-homegear:0.70.3
18-11-19 18:38:13 ERROR (SyncWorker_0) [hassio.docker.addon] Can’t build 441b9bcc/amd64-addon-homegear:0.70.3: The command ‘/bin/sh -c apt-get update && apt-get -y install apt-transport-https wget ca-certificates apt-utils gnupg libzip4 libavahi-client3 libavahi-client-dev insserv’ returned a non-zero code: 1
18-11-19 18:38:17 INFO (SyncWorker_11) [hassio.docker.addon] Start build 441b9bcc/amd64-addon-homegear:0.70.3
18-11-19 18:38:20 ERROR (SyncWorker_11) [hassio.docker.addon] Can’t build

Sorry but i don’t have a intel nuc so i can only test it in the hassio VM. I think you have problems with cached files. Pleas remove the repository, restart your system and add the repository again. On the hass.io VM it works like a charm.

most preobably, today it installed. Thanks a lot

The web ui does not load, do I need to put something in config?

http://192.168.1.11:2001 gives

 Not Found

The requested URL was not found on this server.

Homegear 0.8.0-2378 at Port 2001

There is an issue with the folder rights currently. You need to connect via ssh to you hass.io and set the rights manually for the first time:

ssh root@<hassio ip> -p 22222

after the connection you must type ‘‘login’’ to get access to host system. Now you can enter to the homegear container with the following commant:

docker exec -it addon_441b9bcc_homegear /bin/bash

and execute the following lines

chown -R root:root /etc/homegear
find /etc/homegear -type d -exec chmod 755 {} \;
chown -R homegear:homegear /var/log/homegear
chown -R homegear:homegear /var/lib/homegear
find /var/log/homegear -type d -exec chmod 750 {} \;
find /var/log/homegear -type f -exec chmod 640 {} \;
find /var/lib/homegear -type d -exec chmod 750 {} \;
find /var/lib/homegear -type f -exec chmod 640 {} \;

I don’t know why this happens! After my exam on saturday, i will have a further look at this problem again.

take your time, its not urgent for me, thasnks for the help

admin@ubuntu:~$ docker exec -it addon_441b9bcc_homegear                      
"docker exec" requires at least 2 arguments.
See 'docker exec --help'.

Usage:  docker exec [OPTIONS] CONTAINER COMMAND [ARG...] [flags]

Run a command in a running container
admin@ubuntu:~$