X10 Control with Raspberry Pi Notes

Heyu (with CM11A)

aptitude install build-essential
wget http://heyu.tanj.com/download/heyu-2.11-rc1.tar.gz
tar -xzf heyu-2.11-rc1.tar.gz
cd heyu-2.11-rc1
# could do --sysconfdir=/etc -- but it wants to write to this directory during operation, so we'll do symlinks instead
./configure --prefix=/opt/heyu --localstatedir=/var/run --disable-cm17a --disable-ext0 --disable-rfxs --disable-rfxm --disable-dmx --disable-ore --disable-kaku --disable-rfxlan
make
su
make install
exit

mkdir -p /var/run/tmp/heyu
chgrp dialout /var/run/tmp/heyu
chmod g+w /var/run/tmp/heyu
mv /opt/heyu/etc /etc/heyu
mkdir /var/run/tmp/heyu/etc
chgrp dialout /var/run/tmp/heyu/etc
chmod g+w /var/run/tmp/heyu/etc
ln -s /var/run/tmp/heyu/etc /opt/heyu/etc
ln -s /etc/heyu/* /var/run/tmp/heyu/etc/
ln -s /opt/heyu/bin/heyu /usr/local/bin/
mkdir -p /usr/local/share/man/man1/
ln -s /opt/heyu/share/man/man1/* /usr/local/share/man/man1/
mkdir -p /usr/local/share/man/man5/
ln -s /opt/heyu/share/man/man5/x10config.5 /opt/heyu/share/man/man5/x10sched.5 /opt/heyu/share/man/man5/x10scripts.5 /usr/local/share/man/man5/


echo 'D /var/run/tmp/heyu 2775 root dialout' > /etc/tmpfiles.d/heyu.conf
echo 'D /var/run/tmp/heyu/etc 2775 root dialout' >> /etc/tmpfiles.d/heyu.conf
echo 'L /var/run/tmp/heyu/etc/x10.conf - - - - /etc/heyu/x10.conf' >> /etc/tmpfiles.d/heyu.conf
echo 'L /var/run/tmp/heyu/etc/x10.sched - - - - /etc/heyu/x10.sched' >> /etc/tmpfiles.d/heyu.conf

echo '[Unit]' > /etc/systemd/system/heyu.service
echo 'Description=Heyu Engine' >> /etc/systemd/system/heyu.service
echo >> /etc/systemd/system/heyu.service
echo '[Service]' >> /etc/systemd/system/heyu.service
echo 'ExecStart=/opt/heyu/bin/heyu engine' >> /etc/systemd/system/heyu.service
echo 'Type=forking' >> /etc/systemd/system/heyu.service
echo 'User=nobody' >> /etc/systemd/system/heyu.service
echo 'Group=dialout' >> /etc/systemd/system/heyu.service
echo 'Restart=always' >> /etc/systemd/system/heyu.service
echo 'RestartSec=2' >> /etc/systemd/system/heyu.service
echo >> /etc/systemd/system/heyu.service
echo '[Install]' >> /etc/systemd/system/heyu.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/heyu.service
systemctl enable heyu.service

cp -a /etc/heyu/x10config.sample /etc/heyu/x10.conf
sed -i -e $'s|^TTY\\\t\\\t  /dev/ttyS0|TTY\\\t\\\t  /dev/ttyUSB0|g' /etc/heyu/x10.conf

tar -czf heyu-rpi.tar.gz /etc/heyu /etc/systemd/system/heyu.service /etc/tmpfiles.d/heyu.conf /opt/heyu /usr/local/bin/heyu /usr/local/share/man/man1/heyu.1 /usr/local/share/man/man5/x10config.5 /usr/local/share/man/man5/x10sched.5 /usr/local/share/man/man5/x10scripts.5

Precompiled binary

heyu-rpi.tar.gz

wget http://wiki.mcpstars.org/_media/computer/heyu-rpi.tar.gz
su
cd /
tar -xzf ~tdobes/heyu-rpi.tar.gz && rm ~tdobes/heyu-rpi.tar.gz

systemd-tmpfiles --create /etc/tmpfiles.d/heyu.conf
systemctl enable heyu.service
systemctl start heyu.service

adduser tdobes dialout

MisterHouse

wget https://api.github.com/repos/hollie/misterhouse/zipball/v3.1
unzip v3.1
mv hollie-misterhouse-* misterhouse
computer/raspberry_pi_x10_notes.txt · Last modified: 2014/06/21 22:37 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS