Wednesday, June 24, 2009

Basic Home Automation


I have two home automation projects going on concurrently:

- The basic HA project allows simple remote on/off control using an iPhone app over the wireless network.
- The advanced HA project does more complex event driven tasks based on multiple inputs and time based calculations.

This blog covers the basic approach and covers a working example where I turn my espresso machine on in the morning from bed using my iPhone.

Hardware needed:
  • WinXP machine with available serial port
  • iPhone or iPod Touch
  • Wireless network
  • Insteon 2414S PowerLic Controller (PLC) Note: Do not confuse with 2412S (PLM)
  • Insteon ApplianceLinc
  • Serial cable (Comes with PLC)

Disclaimer - If you only want to buy one controller and want to eventually do more sophisticated projects than described here, I recommend buying the PLM. The PLM however will not work with the software described here.

Software:
  • Smarthome Device manager (SDM) running on PC (free download)
  • iLinc iPhone app running on iPhone/Touch ($10)

The iLinc support page has information on configuring SDM and the iLinc app. Follow the Insteon instructions to linc the ApplianceLinc to the PLC.

Saturday, June 13, 2009

Advanced Home Automation

I have two home automation projects going on concurrently:

- The basic HA project allows simple remote on/off control using an iPhone app over the wireless network.
- The advanced HA project does more complex event driven tasks based on multiple inputs and time based calculations.

This blog covers the advanced approach that will allow me to define actions based on events such as sensor inputs and time of day using Insteon HA devices and a Linux server.

Hardware needed:
  • Linux machine with available serial port
  • iPhone or iPod Touch
  • Wireless network
  • Insteon 2412S PowerLic Modem (PLM) Note: Do not confuse with 2414S (PLC)
  • Insteon devices such as ApplianceLinc
  • Serial cable (Comes with PLM)

Note - You don't really need a controller for simple event driven tasks. For example, an Insteon I/O Linc can be used to turn a light on/off when a door opens. The PLM and control software is only needed for more sophisticated control.


Software:
  • MisterHouse open source project. (also runs on WinXP and OS X) (free)
Links:
- Setup howto for MH
- The configuration file is /opt/misterhouse/mh.private.ini (edmhc to edit)
- The device definition file is /opt/misterhouse/code/insteon.mht (edmhd to edit)
- Use the mhsend commad to execute commands from command line.
- Perl scripts in /opt/misterhouse/code get executed as part of the "big run loop".
- Log file is /opt/misterhouse/data/logs/print.log
- MH Perl syntax

Accomplished so far:
MH running and several devices configured.
Able to turn devices on/off through web interfce
Able to turn devices on/off from command line
Wrote basic perl script to turn on light at certain time. It worked.


To do:
- Get iPhone interface working
- Configure motion sensor
- Garage light turns on when door opens (done)
- Wine cellar by motion sensor
- Front outside lights by motion sensor
- Stair light by motion sensor
- AppleTV reboot
- AV equipment controlled by iPhone remote


Saturday, May 2, 2009

Creating Linux file server for use with MacOS and WinXP machines

- Starting with this guide.
- Several related links here.
- Used hparted to partition and format drive.
- Sudo fdisk -l to list all drives.
- Setting up Samba on Ubuntu server.
- sudo gedit /etc/samba/smb.conf (workgroup)
- Another useful Samba tutorial.
- Good information on WINS

Friday, January 16, 2009

Hacking my bike trainer

I have a new bike trainer made by an Italian company and sold by Performance under the name Elite Real Tour. For the money I paid ($340) it does quite a lot since it monitors power and does video simulations. But the videos available are somewhat limited and I'm exploring the possibility of getting the Real Axiom videos to work and also creating my own videos.

So far I've worked out that the video simulation consists of a video file (.avi) and a database file (.rxvp) that contains information synced with the video that passed information about distance and grade to the trainer. I've already established that a different video file can be substituted with the same name and the simulator will play it. But what about the database file? Can it be hacked so that the trainer can be tuned to respond appropriately to my own video files?

It seems that some crazy Swedes have been working on this and so I'm going to try to leverage their work.