Hello,
I am very new to HA, Hassio, and Docker, so my apologies in advance if this question is off-base. As others have mentioned in the past, I have some x10 components I’d like to use with HA. Because I was getting the familiar FileNotFoundError: [Errno 2] No such file or directory: 'heyu': 'heyu'
, I did some research and found this entry from Nitroedge, so I thought I would try my hand at making a local addon to add Heyu capability.
Based on that thread, I created this Dockerfile:
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
WORKDIR /build
RUN apk -U add curl build-base
&& curl -LsSO http://www.heyu.org/download/heyu-2.11-rc1.tar.gz
&& tar xzf heyu-2.11-rc1.tar.gz
&& cd heyu-2.11-rc1
&& ./configure --sysconfdir=/config
&& make
&& make install
RUN mkdir -p /usr/local/var/tmp/heyu
&& mkdir -p /usr/local/var/lock
&& chmod 777 /usr/local/var/tmp/heyu
&& chmod 777 /usr/local/var/lock
COPY run.sh /
RUN chmod a+x /run.sh
CMD [ “/run.sh” ]
… and this config.json file:
{
“name”: “Heyu x10 CLI”,
“version”: “0.0.1-SNAPSHOT-3”,
“slug”: “heyu”,
“description”: “Heyu add on to work with x10 component”,
“startup”: “application”,
“arch”: [ “armhf” ],
“boot”: “auto”,
“map”: [ “config:rw” ],
“devices”: [ “/dev/ttyUSB0:/dev/ttyUSB0:rwm” ],
“hassio_role”: “default”,
“options”: {},
“schema”: {}
}
…and this run script:
#!/bin/sh
chgrp dialout /dev/ttyUSB0 1>&2
if [ ! -f /config/heyu/x10.conf ]; then
pwd
ls -al 1>&2
echo “x10config.sample and x10.sched.sample have been copied to your config directory.” 1>&2
echo “Please use them to create x10.conf and x10.sched and re-run.” 1>&2
exit;
fi
heyu start 1>&2
heyu engine 1>&2
#heyu upload 1>&2
#heyu setclock 1>&2
echo “Turn on A5” 1>&2
heyu fon a5 1>&2
echo “Turn off A5” 1>&2
heyu foff a5 1>&2
echo “Test complete” 1>&2
#heyu monitor 1>&2
Additionally, I have some x10 component settings in my configuration.yml file.
The issue is that even though the addon does install and start - in fact, it even switches device A5 on and off - the x10 component is still not working. I am still getting the ‘no such file: heyu’ error. I have tried many rounds of uninstalling/reinstalling, restarting, and rebooting, to no avail. It seems that the HA system is not getting access to the heyu command (which should be in /usr/local/bin), for whatever reason. Is there a permissions or configuration issue going on here? Or perhaps Docker misconfiguration?
Thanks in advance for any help you may have to offer -
- Ned