Difference between revisions of "Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a Home Automation controller with heyu"

From bering-uClibc
Jump to: navigation, search
(Created page with "{| summary="Navigation header" width="100%" ! colspan="3" align="center" | Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a Home Automation controller with he...")
 
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
| width="20%" align="left"  | [[Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a HTTP Anti Virus Proxy|Prev]]
 
| width="20%" align="left"  | [[Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a HTTP Anti Virus Proxy|Prev]]
 
! width="60%" align="center" | [[Bering-uClibc 6.x - User Guide]]
 
! width="60%" align="center" | [[Bering-uClibc 6.x - User Guide]]
| width="20%" align="right"  |  
+
| width="20%" align="right"  | [[Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a DHCP server  with a configuration stored in openLDAP|Next]]
 
|}
 
|}
 
----
 
----
Line 19: Line 19:
 
* a few X10 appliance or lamp modules.
 
* a few X10 appliance or lamp modules.
 
* a serial port on your router, Heyu uses by default ttyS0.
 
* a serial port on your router, Heyu uses by default ttyS0.
* the <code class="filename">heyu.lrp</code> Package which is available starting with Bering-uClibc 5.0.3.
+
* the <code class="filename">heyu.lrp</code> Package.
  
 
==Configure the System==
 
==Configure the System==
Line 105: Line 105:
 
| width="40%" align="left"  | [[Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a HTTP Anti Virus Proxy|Prev]]
 
| width="40%" align="left"  | [[Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a HTTP Anti Virus Proxy|Prev]]
 
| width="20%" align="center" | [[Bering-uClibc 6.x - User Guide - Advanced Topics|Up]]
 
| width="20%" align="center" | [[Bering-uClibc 6.x - User Guide - Advanced Topics|Up]]
| width="40%" align="right"  |  
+
| width="40%" align="right"  | [[Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a DHCP server  with a configuration stored in openLDAP|Next]]
 
|}
 
|}
  
 
[[Category:Bering-uClibc 6.x]]
 
[[Category:Bering-uClibc 6.x]]
 
[[Category:User Guide]]
 
[[Category:User Guide]]

Latest revision as of 09:39, 22 April 2018

Advanced Topics - Setting Up a Home Automation Controller with heyu
Prev Bering-uClibc 6.x - User Guide Next

Objectives

This page explains how to turn a LEAF Bering-uClibc router into a Home Automation controller using the heyu.lrp Package. Taken from http://www.heyu.com introduction: "Heyu is a text-based console program for remotely controlling lights and appliances in the home or office. The complete source is made available under the GNU GPLv3 license. Heyu uses the CM11A computer interface to send and receive X10 control signals over the AC power lines to modules which can turn On, Off, or Dim attached lamps or appliances. It can store a schedule of timed events in the CM11A memory for execution without any more computer intervention." It is also mentioned that " Heyu supports an optional W800RF32A, MR26A, or RFXCOM RF receiver connected to a second port as an auxiliary input device for RF signals from X10 and other supported transmitters. Heyu can also use an optional CM17A interface to transmit X10 RF signals." Though what follows has only been tested on the CM11A computer interface.

Prerequisites

The prerequisites are:

  • a working LEAF Bering-uClibc 6.x router.
  • a CM11A Computer interface module, some might still be available on line.

Unfortunately CM11 or CM12 interface modules, as they are called in Europe, are not as easy to find as the north American CM11a. There might be some at Elektroshop, or at uk-automation.

  • a few X10 appliance or lamp modules.
  • a serial port on your router, Heyu uses by default ttyS0.
  • the heyu.lrp Package.

Configure the System

Loading the Package

Load the heyu.lrp Package by adding heyu to the list of Packages specified in the leaf.cfg file on the boot media. There are no dependencies for this Package.

Configuration files

To start and test heyu.lrp the default configuration files /etc/heyu/x10.conf and /etc/heyu/x10.sched should work.

Test your setup

At this point you can either reboot the firewall or install heyu.lrp manually by:

mount /dev/sdx1 /mnt   # x= default to a, but could be b, c, etc, if you have other disks 
cd /mnt 
apkg -i heyu 
heyu

You should see something like:

Heyu version 2.11-rc1 
X10 Automation for Linux, Unix, and Mac OS X 
Copyright Charles W. Sullivan and Daniel B. Suthers 
Usage: heyu [options] <command>  (Enter 'heyu help' for commands.) 

Then type:

heyu start 
 

And check that task heyu_relay is displayed

ps
11236 root      1432 S    heyu_relay

Get more info:

heyu info 
Heyu version 2.11-rc1 
Configuration at //etc/heyu/x10.conf 
Powerline interface on /dev/ttyS0 
Firmware revision Level = 1 
Interface battery usage = Unknown 
Raw interface clock: Tue, Day 076, 00:51:55 
(--> Civil Time: Tue 18 Mar 2014   00:51:55 UTC) 
No schedule has been uploaded by Heyu. 
Housecode = K
0 = off, 1 = on,               unit  16.......8...4..1 
Last addressed device =       0x0400 (0000000000001000) 
Status of monitored devices = 0x0000 (0000000000000000) 
Status of dimmed devices =    0x0000 (0000000000000000)

Now send a command to an appliance module, with address "k 5" for instance, where "k" is the housecode set in the configuration.

heyu on k5 
heyu off k5 

If you hear two heart warming thumbs, everything works fine... have fun !

Troubleshooting

Check again that heyu_relay is working.

Check serial port ttyS0 parameters:

stty -F /dev/ttyS0        # the speed should be 4800 bauds. 

Check the CM11A is transmitting by typing:

cat /dev/ttyS0 

The CM11a will transmit the letter “z” when it detects a module changing state. Plug a lamp in one of your connected module and force it to activate by switching the lamp on or off a few time you should then see the letter "z" appears every seconds on your display. You also can use an RF remote control, if you have one, to activate any module.

Additional reading

The net is crowded with x10 howtos, here are a few interesting links:


Prev Up Next