How do you know you can't do something if you haven't tried

The New Web Interface

This is the new web interface for my home automation interface.

Reporting Module

The reporting module has a series of graph plugins that can display any data logged to the database. Currently the reports cover

  • Electricity usage
  • Furnace Usage (how long it has run, daily, weekly, monthly, etc)
  • Temperature graphs (inside vs outside)
  • Water Usage (hot vs cold by time)

The Hidden Features

There are a few background features that have been implemented that are quite powerful.

  • The system has an Javascript messaging bus that talks constantly to all connected clients and can relay status messages and events to the clients. This is used to display notifications like "The newest episode of ____ has just downloaded" or send status messages like if XBMC is playing and what file its playing.
  • Each connected client's device registers with the backend and receives a cookie. That identification number can be used to send specific commands back to the client. I use this to control various wall screens around the house that run on wall mounted IPAD's. This allows me to load the traffic cameras on the front door panel as i leave for work in the morning.
  • There is a scheduled task engine where services can register for events to be run at specific times or at set events like "sunrise" or "sunset". These events are stored in the database and survive server reboots.
  • Intelligent downloading rules that run nightly allow all movies or TV shows with specific actors, dates, or other criteria to be automatically added to the download queue. So any 1950's movie that gets more then 4 stars that has a specific actor will be downloaded.
  • The system can work with Asterisk to automatically ring all phones in the house when phone numbers are clicked on (yellow pages app). Once the home phone is picked up it makes the outbound call to the number that was clicked on.
  • some elements of the system can be controlled from asterisk by calling into your home number and entering the passcode.
  • any page layout based on plugins can be edited by adding the "?movable" tag to the url. Drag the elements to where you would like them and resize any that need to be resized and remove the flag from the url. Changes are saved in the database.
  • The main plugin page is configured for each user account. One user can have a completely different layout from the next user.
  • NIghtly the system will analyse the movies you have downloaded and compare that to an online database of recommended movies. Each movie is assigned a score which is incremented with each match. Once completed it will return the top 100 movies that you would like to download. Clicking on any of those entries will automatically add it to couch potato for download. Once a movie has completed downloading it is removed from the wanted list and added to the local movie database.
  • I'm sure there are more, i will document them here as i go :

Comics Module

I used to love reading morning comics but who gets a paper in the mail anymore. This page automatically loads up on my main touch screen every morning when i start walking down the stairs.

It downloads and stores the daily comics in a database and allows me to click though them. Every morning it automatically goes out and downloads the updated comics.

Family Finder Module

My wife and i have 3 children, its hard enough to keep track of one kid let alone the 3 kids at all times. This module shows all family members over-top of google maps. it updates in real time on a 5 minute delay as we move around.

It has geofencing capabilities. Currently I use the following rules:

  • Turns on the outside house lights when a family member drives or walks toward the house. But only if its dark out.
  • Alerts my wife when i am driving home from work so she knows she can start making dinner.
  • Alerts me if my kids leave the school yard during school hours.

Traffic Camera Module

This module displays life feeds of every traffic camera in the city i live in. In the morning when i get up to go to work the wall touch screen by the front door turns on and displays the cameras that i will pass on my way to work. I can quickly use these cameras to figure out which roads i should take. The cameras are all live feeds and update with a new image every 2-3 seconds.

Pong Clock Module

every wall screen needs a screensaver so i created a pong clock in javascript and CSS. If the screens are not touched for 2 minutes they default back to the pong clock. For those of you not familure with this concept. The automated player on the left wins every hour on the hour, the automated player on the right wins every minute on the minute. Because of this the score is always the time.

I have written this app 3 times over the last 5 years or so, it gets a little better every time. This version uses some code i found on the internet which allows it to run in the browser very smooth. My previous version had better more realistic paddle movement where the left hand player was obviously a worse player. I plan on combining the logic code from my previous version with the new version to create a better clock interface.

Yellow Pages Module

I wanted the touch wall screens to replace every possible item in the home. One item that was easily replaced was the phone book.

This module is simply an Iframe to the canadian 411 service that allows for lookups and reverse lookups.

Site Links Module

Site links are configurable and provide a nice jumping point to the different servers and services that are needed to bring this site together.

Sites can be added or removed and proxy can be enabled for these interfaces so they can be accessible from outside the home. Please note that the proxy is hosted on an SSL driven website that uses authentication.

Ping Module

The ping module pings home devices from the server and alerts if the server or service is down. This works in real time refreshing though the items on the list every few seconds.

Subnet Scan Module

The subnet scan module is alot like the ping module exept it scans though all known and unknown IP addresses in the subnet. I use this to identify what IP addresses i can assign to various pieces of equipment around the home.

  • Unfinished Modules.

    08/19/2016 at 18:490 comments

    I originally wrote this system about 14 years ago while working for the cable company. I had a software development position at the time and wrote the system completely in VB6 and ASP. Since that time i have rewritten the entire system in PHP using HTML 5 and CSS.

    The old system had a few great features that i have not yet ported over to PHP

    • Music Index (indexes all music files and finds duplicates. Allows music to be played thoughout the house.
    • Picture viewer (screensaver and picture index that allows family photos to be cataloged, tagged and indexed
    • Recipe index (search by ingredients, etc)
    • Shopping list creator (works with kitchen mounted bar-code scanner). Allows you to select a store which causes the list to reorder as per the aisle in the stores. it does this using an online bar-code database that has product categories. I then created a database of the nearby stores and mapped each product category to an aisle in the store.
    • Security system arm/disarm. I bought a TCP-IP bridge for my DSC alarm system, have to reimplement.
    • Contacts listing. Lists off all friends and family with pictures/address/phone number etc. Clicking on the number caused all phones in the house to ring. (this was possible using an Asterix server that i built.
  • Scheduling and Scripting

    08/19/2016 at 18:560 comments

    The engine has the ability to add PHP scripts that can be scheduled or triggered on events

    Here is what i have in place so far

    1. Turn the outside lights on when my IPhone GPS shows I am within 2 blocks of my house.
    2. Turn of my wall screen with the traffic cam page when I walk down the stairs in the morning.
    3. Lock the front door every 30 seconds. (If its unlocked)
    4. Turn off any TV when XBMC is not playing as long as the TV is on the XBMC input
    5. Turn off bedroom lights if there is no motion for 10 minutes
    6. Turn the hallway light on at night when a kid walks to the bathroom then turn off the bathroom light when there is motion back in their bedroom again.
    7. Turn on the TV and select the proper input, then send the proper JSON statement to XBMC to play a movie after the movie is selected on the wall screen.
    8. Announce across the house (speakers)
      1. Laundry Status
      2. Parking (Snow day means I cannot park on the street by law)
      3. When Todd's Iphone leaves the work zone around 5PM
      4. Battery low on any of the sensors
      5. Pings, if any cannot be completed ("Internet Down", "Phone Server Down", etc)
    9. Take a picture of people at the front door when they ring the doorbell. This is done with the front door PTZ camera.
    10. Take a picture of whoever is at the front door if the door access code is entered wrong, take this picture and txt message it to my cell phone.
    11. Control the blinds in the house depending on outside weather and light. IE, if it's windy and the window is open then raise the blinds so they don't get wrecked
    12. ARM/Disarm the alarm depending on upstairs/downstairs motion (night mode)
    13. Open the garage door when the right HID card is read at the outside SMART Card reader.
      1. Have one time user cards
      2. Have timeframe cards (Drywall guy will be here from 12-2PM)
      3. Have permanent use cards.
    14. Pantry light, automate based on door open/closed.
    15. Alert if my ATV leaves the radius of the house.
    16. Send Alerts to XBMC (Display on TV)
      1. Outside Door Open
      2. Backyard Motion (Night Time)
      3. Doorbell
      4. Caller ID
      5. Voicemail
    17. If lights in the living room are off and the living room XBMC is paused, slowly bring the lights up 60%. (also for Bedroom and Basement)
    18. When the sliding door is opened and it's dark outside turn on the outside light. Then turn the light off if no outside motion for 5 minutes
    19. Voice control for Door Locks, Lights, Alarm arm, list events, etc.
    20. At night send the off commands to lights/stereo/TV's if no motion in anything other than bedrooms
    21. When humidity gets to high in the bathrooms the fan will automatically turn on until the humidity matches the surrounding rooms.
    22. Enable whole house fan when temp outside is closer to the target temp then inside.
    23. on Saturday morning, if movement in the kids rooms is followed by movement in the living room it puts on the most watched kids movie from the last 1.5 weeks. (keeps them from waking me up)
    24. I have added a large arcade style button below each TV, pushing the button plays a random Kids TV show. This keeps me from having to pay for cable TV.
    25. Transcoding all unwatched video to smaller file sizes that can be streamed to my iphones via a podcast.

Plugin Module

Module: Plugin module

These plugins have already been created

  • Clock
  • Daily Comics
  • Webpage widgit (load any webpage in an iframe)
  • Energy Usage 24 hour (Any one of the sensors can be selected)
  • Energy Usage 30 days (Any one of the sensors can be selected)
  • Energy Usage Year (Any one of the sensors can be selected)
  • My Location (on google map)
  • Weather
  • Traffic cams
  • Garage Door Status
  • stereo volume (airplay)
  • Temp (current, target, mode)
  • Snow route (can i park my car on the road today)
  • Webcams

These Plugins have yet to be written

  • Small Weather (easier to place version)
  • Today (# of downloaded TV Episodes, # of added movies, # of movies played, # of TV Shows Watched.
    • podcasts encoded, power used today, cost of power 24 hours,
  • Yesterday (Same as above.
  • status (# of movies, # of TVShows, # of recepies, # of contacts)
  • Hours of TV watched, Hours of movies watched. (by week month and year)
  • Door Locks (unlock the front door, garage door etc)
  • Error log (last 25 events)
  • Notifications (last 25 events)
  • Lights that are on
  • Devices that are on
  • Doors/windows that are open
  • Water usage
  • IR Events
  • Doorbell log
  • Front door image list (camera images taken when doorbell or lock triggered)
  • Furnace Runtime Day/week/month/year
  • Kids PC usage day/week/month/year by child
  • Server disk space (Donut Chart
  • Gas usage
  • Solar charge
  • Body weight (using my Withings Scale)
  • Download GB (by PC... Donut Chart)
  • Internet traffic in and out of the house
  • Video game Timer, keeps track of how long the XBOX, etc have been on

Media Module

This module controls the 6 TV's throughout my home, the system supports XBMC or VLC control.

Each TV is setup with XBMC running on a raspberry PI. Each PI has a USB to serial adapter that connects to the TV control. There is a small script that shares the serial port via TCP-IP to allow TCP control of the TV even though they only have Serial control.

The interface for media allows access to TV, Movies and hard drive folders containing my familys home movies. Movies and TV can be sorted by category or name or searched. There is also a "Query" option that allows for customized lists of TV or Movies. Currently I have customized queries by:

  • decade
  • Unwatched
  • Unwatched by TVDB or MovieDB rating
  • Ended TV Shows
  • Kids Shows
  • Kids Movies
  • Random TV Show
  • Random Movie
  • Random Top Gear Episode.

Currently there is one view for TV and another for Movies however the code is written that multiple views like cover view could be added in the future.

Selecting the TV or Movie that you would like to play and selecting the room to play it in will cause the TV to turn on, TV input to change, Volume to reset, AMP to turn on, Its input to change, etc.

Current Features

  • Movies and TV are automatically added and indexed from CouchPotato or SickBeard.
  • Watched VS unwatched is tracked and logged by date/user for reporting
  • Customized podcasts are created and video is transcoded to allow my IPAD to stream all my shows while i work.
  • Any video playing in any room can be transfered or mirrored in any other room
  • Playlist support for creating TV/Movie playlists.
  • Bookmarks can be created and restored at any time on any TV.
  • Supports XBMC and VLC as output devices
  • Many nightly maintenance tasks that download new reviews, update movie relationships, set movies to download based on criteria, download image artwork, etc.
  • Hard drive folders can be added and indexed.
  • TV and AMP control using configuration files for each make and model. I have generated config files for all of my home equipment (very scale-able)
  • RV Sync. When my RV is parked in front of my house it syncs all unwatched TV to the NAS onboard and deletes any previously synced content that has already been watched. When we vacation all of our TV and Movies are ready to be watched on the go.

I plan to create a youtube video for this section to walk though the various media features.

Future features

  • Audio support for MP3/ogg/etc using XBMC/VLC
  • Support for MythTV (I had this completed at one point but have rewritten all code since then)
  • Better Podcast support to allow custom podcasts and custom encoding settings for each podcast

Calendar Module

This is a pretty simple module, it allows multiple Google Calendars to be viewed at once. Currently I sync my work Microsoft Exchange calendar to Google and my wife uses google on her phone. This quickly and easily allows all of us to see how our scheduales work together.

Scratch Pad Module

I have always liked to take notes when an idea comes to me. This simple editor lets me create new notes and store them on the web server. The HTML 5 editor functionality comes from a great online project called CKEditor ( All saves are version controlled and stored on the web server. Any revision, save or edit can be undone even years later.

Module Thermostat

Another fairly simple module, this module allows control of any ZWave thermostat via the Vera controller. I have stolen the images from an android app made by Honeywell. If and when i release the code i will have to remove those image and come up with my own interface. I just really liked the Honeywell interface.

I have also added the ability to add additional Zwave switches to the interface, for now this allows my "summer Fan" that feeds the whole house to be controlled.

Lighting Module

This module will get some more love in the near future. Currently it displays a fairly simple list of all the lights, outlets and other zwave output devices in the home. All of these devices are currently hooked up to a Vera home controller. This page interfaces with the Vera API's to constantly pole the current status as well as allow the status to be changed.

I would like to have a configurable background image and an interface to place switches or outlets onto the image, this could be used to create a 3D view of a home with an easy touch interface.

Live Camera Widgit

Another small plugin that allows viewing of my outdoor and indoor webcams (one turned off for this screenshot). The images stream MJPEG and the PHP script acts as a proxy server to stream to the outside world. Its capable of using password protected cameras. The page is then feed out the the internet using my authentication and HTTPS protocols even if the cameras did not support SSL or authentication.

This plugin can also be attached to any camera monitoring or recording service that supports MJPEG.

  • TV Remote Module

    This module is used by the media module to control TV's and various equipment around my home. It can also be used manually to control the different devices in my home. Each device has a configuration file that specifies if the device is IR/RF/Serial/TCPIP and the hex or ascii commands that are used for each trigger. The configuration file also contains several macro options like "TV on" that contain the list of commands that must be sent when the attached TV is powered on.

    The last item in the configuration file is a list of image files and coordinates that can be used to draw a functional picture of the remote. This would allow for buttons to have hover, click, etc images. Eventually i will take the time to take photos of the remotes and make these pages pretty. For now its functional.

    I currently have about 15 devices working in this list, most of which use Hex commands sent via TCP-IP.

City Bus Module

My wife doesn't have a drivers license and takes the bus everywhere, and so the bus module was born. Specify a time and bus stop number and it will display the current bus location on the map and let you know how long it will take the bus to get to your stop.

The City i live in published great API's that can be used to query every bus location

  • Calculator Module

    This is a simple javascript calculator that i found online as a free sample. I have adapted it to become a movable plugin that can be added and moved around though the main interface.

    I plan to add basic conversions to the calculator to make it more handy on the kitchen touch screens. milliliters to liters, pounds to kiligrams, etc.