Noob and learning a lot about Hassio. Trying to understand what it takes, or even if it’s possible, to get X10 using a CM15A working on Hassio. From everything I’ve read it looks like using Mochad is required. I’ve followed the limited information on Home Assistant web page that discusses Mochad and have modified my configuration.yaml file to include:
X-10 Support via Mochad
mochad:
host: localhost
port: 1099
…and
light:
- platform: mochad
devices:- address: a1
- address: a9
After making these changes I successfully used the Configuration validation tool. Now I’m not sure where to go from here. Is Mochad support native to Hassio or does it require a custom Add-on? It’s a huge challenge, but if a custom Add-on is what it takes, I’m up for a challenge, Linux is not my strong suite, so it will be exactly that but a good learning experience. I just don’t want to waste a lot of time if I am barking up the wrong tree. Any resources available besides " Tutorial: Making your first add-on" ( https://developers.home-assistant.io/docs/en/hassio_addon_tutorial.html ) that can give me a better understanding of Add-ons? I’m not finding much in the forums about X10 and Machad, and nothing that is recent.
UPDATE 5/21/19:
I’ve spent a bit of time over the last several days devouring whatever I could find in various forums. Still not making much progress, but here is where things stand.
Looks like I should be using a Dockerized version of Mochad in a custom add-on. I found such a resource on GitHub and have tried following the directions in the readme file. My Dockerfile contains the following:
FROM alpine
MAINTAINER Jay Shridharani <[[email protected]](mailto:[email protected])>
RUN apk add --update --no-cache gcc g++ cmake make wget libusb-dev && \
mkdir /build && cd /build && \
wget -O mochad.tgz http://sourceforge.net/projects/mochad/files/latest/download && \
tar -xzvf mochad*.t* && \
cd mochad* && ./configure && make && make install && \
apk --purge del gcc g++ cmake make wget && \
rm -rf /var/cache/apk/* /lib/apk/db/*
CMD ["mochad", "-d"]
When I try and run my Dockerfile I get the following error:
mochad.c:611:failed to initialise libusb -99
My OS is HASSOS running on an a Raspberry Pi 3 b+, so I only have limited access to the OS. I am able to run lsusb which informs me that my device is seen by the OS and is on bus 1:
Bus 001 Device 007: ID 0bc7:0001
The Dockerized version of my application (https://github.com/jshridha/docker-mochad/blob/master/README.md ) has a readme file that states to run the following command:
docker run -d --name=mochad --device "/dev/bus/usb/001" jshridha/mochad:latest
I can see that the container is built but won’t run and I get the libusb initialization error indicated above. Any ideas how to get past this impasse?