Honeywell Total Connect in Docker

I am running home assistant in Docker using a docker-compose file and the official Home Assistant image found here. I’m trying to integrate my Honeywell Total Connect alarm panel. It works in my old installation of hassbian on my RPI, but not in Docker. The issue is:

If you have issues running this component, you may require libxml2-dev and libxmlsec1-dev packages. To install these on Hassbian, run the command apt install libxml2-dev libxmlsec1-dev with sudo.

I’m not sure of a way around that except maybe use Hassio if it has an add-on, however I can’t find a good way to setup Hassio in docker-compose. I have about 30 other images using docker-compose and want to keep Home Assistant with it as well.

Bit of extra work during docker image updates because you have to do it every time, but you can connect into the HA docker and execute those commands.

docker exec -it /bin/bash home-assistant

Had to wrap /bin/bash and home-assistant but got into it. However those commands didn’t work in this fashion. I don’t mind running it every time. I think this is the only extra thing I would need to do. Everything else I use integrates just fine.

Yes, that /bin/bash should have been at the end.

I forgot they changed the Docker image from Debian to Alpine Linux. Looks like you have to use apk for the package management, not overly familiar, hope this helps. https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management

Edit:
Looks like you would run the following:

apk update
apk add xmlsec-dev libxml2-dev

I found the libxmlsec-dev package name going here: https://pkgs.alpinelinux.org/contents?file=libxmlsec1*&path=&name=&branch=v3.6&repo=main&arch=x86_64

I ran that and it seemed to install just fine, however it still says the totalconnect component couldn’t be setup. I also went ahead and installed Hassio and got the same outcome. Not sure what I need to do to get this to work at this point.

Edit: I got it working, turns out some of my code was outdated for alarm panels as well. Guess that’s what I get for trying to transfer things from a RPI that hasn’t been touched in over 5 months. Thanks again for that solution. Its working perfectly now!

Glad you got it working, but I think we can do better! This should work to execute the apk commands without you having to manually get into the container and run them which you could put in a bash script.

docker exec home-assistant sh -c 'apk update && apk add xmlsec-dev libxml2-dev'

But it looks like you can add this into your docker-compose.yml which would be end game. Below are some examples.

https://stackoverflow.com/questions/30063907/using-docker-compose-how-to-execute-multiple-commands

https://github.com/cyberkov/home-assistant-config/blob/302551c4ec4965af5a22b83c026f6ccba6915e86/docker-compose.yml.example

I was actually wondering the same thing! I added this to my compose file:

command: /bin/bash -c “apk update && apk add xmlsec-dev libxml2-dev”

While the container seems to create without an error, and Portainer shows it as running, I can’t get into the GUI. This is the first time I’ve tried to run a command in a compose file.

I also tried

command: sh -c “apk update && apk add xmlsec-dev libxml2-dev”