Home‎ > ‎

Home Automation Project

Current projcets on the run (2014-01-25) ...

Home Automation
2 Raspberry PI running Debian Wheezy and OWFS for 1-wire and Domoticz for automation and control.
2 i2c 1-wire GPIO board
1 RFXcom for 433 MHz
3 Nexa plug switches
2 Nexa built-in switches
1 Nexa wireless door bell switch
2 Humidity / temp-sensor
10+ Tempsensor DS18B20
1 1-wire 4-port HUB with external Power

The first Raspberry is running the primary system with Domoticz and the second one is mounted in the garage also with Domoticz, but this system only feeds the primary. Both are on the wireless network. This setup is only temporarily until I can dig down a physical network and 1-wire cable to the garage.

The 4-port hub is necessary to split and run several 1-wire branches not interfering with each other. Right now 1 branch is using an old telephone line with poor twisted pairs to the attic, which increases the risk for external interference. This branch has 1 humidity / temp sensor measuring the moisture on the attic and keeping it under control. Thanks to the hub this will not conflict with other sensors on the other branches.

One branch (the main one) is covering the basement with a bunch of temp sensors and one for lightning. A two channel digital counter connected to the S0 output on the electricity meter for the heating pump, the other channel will soon be connected to the central meter for the entire house.

Instead of Tellstick I’m now running an RFXcom stick for the 433 devices, this one has a better firmware and supports a bunch of devices. I’m mixing both Waveman and Nexa switches and one Nexa doorbell. That one is actually quite cool, a little script is executed when someone hits the door bell, a network camera is taking a picture that is emailed, a ssh tunnel is opened to the HTPC to mute the TV and show a prompt “The doorbell…”.

The 1-wire light device measure the actual light to control when to turn on or off the lights instead of the traditional way with geographic position for the sunrise/sunset. Now I don’t need to worry if it’s a cloudy day, my lights will then go on a bit earlier than the sunset time, always keeping the home enlightened when necessary.


NAS & Squeezebox

One Raspberry is running my NAS with all the family’s home shares and a common share for movies, pictures and other stuff. I have a USB hub with external power to run 2 USB 1GB HDD, one drive for data and the other for backup. Every night I run a crontab job with rsync.

Squeezebox (like Sonos) is running Logitech Media Server LMS, this enables me to finally listen to (internet) radio.

Another Raspberry with Squeezeplay is mounted in the kitchen, Sound speakers with integrated amplifier. A mobile app (Andriod & IOS) is available to control where to play what, when, and even synchronize several players.


***************************** Old System not in use *************************************
This is my current setup and my future plans for my home Automation project. Right now I have 2 separate installations, one for lightning and one for monitoring and logging. The plan is to merge them into 1 Linux installation.

Most of the HW is bought from Clas Ohlson and mätteknik.

Link to pictures

Lightning project

Windows 7, Telldus center, SwitchKing

1 - Tellstick 433.92 MHz
6 - Waweman plug-in switch 2000W resistive load
3 - Nexa PB-3-Vit 2300W
1 - Nexa LCMR-1000 - built-in

Tellstick Center is installed to control and configure the switches, this enables the control for the Tellstick. On top of this Switch King is installed to create schedules and comes with a handy app for both IOS and Andriod. The SwitchKing software is installed as services and has a client that connects with the server for configuration.

Before I have tried Nexa home (Windows) and Automatically (Linux) but both of them suffers functionallity that SwitchKing has. The main difference and advantage that SwitchKing has is the posibility to create scenarios and to use external data sources. There is also possible to build events based on the outcome for a external data source or a previous event, this makes it very flexible. Due to non licensing I'm limited to only use 5 groups so far.

The Lightswitches are placed and grouped like this:
GRP 1 - 2 switches in kitchen windows.
GRP 1 - 1 switch in the stairway between level 1 and 2.
GRP 2 - 1 switch in living room facing the main road.
GRP 3 - 1 switch in living room facing the back yard.
GRP 4 - 2 switches at the upper floor, one in each window North/South.
GRP 5 - 1 built-in switch, front door lightning

Scenario Home
 Schedule & GRP ON OFF ON OFF 
 Week - All Groups 05:30 Sun Rise Sun Set 22:30 
 Weekend - All Groups07:00  Sun RiseSun Set 23:30 
 Christmas GRP 2,3 05:30 11:00 13:00 23:30 

Scenario "Night Light" 
If someone in the family is expected to be home late they would very much like the lightning at the frontdoor to be on, and also the light in the window facing the back yard.
When choosing this scenario it will turn off other GRP at the normal time but leave the the others. At 03:00 they will be turned  off and the scenario "home" will be selected enabling the next morning to be lighted as usually.

Scenario "Drunk"
At this age it doesn't occur that often but sometines someone (not me) will arrive the home after 03:00, or scenario "Night Light" has been forgotten, and they need to find the back yard, and eventually the front door. This scenario will light up the front door and the window for the back yard, the light will shine for 30 minutes and then go off, and the scenario "home" will be selected again.

Logging and monitoring
Thermia Classic 7500 ground source. Drilling hole 140m deep. (with no doubt the most expensive part =)
Serial Interface 901 331B
Super Vision 1.3 (crap program for Windows 95 with Access DB.)

On the top of my whishlist is a new program for the Thermia pump so I can Integrate the data with my other sources.

Now the current real project.

Raspberry Debian "Wheezy"

6 - Temp sensor 85C external power DS18S20
1 - Light Sensor TSL252R
1 - Kamstrup Digital 3-phase 400V counter with S0 output.
100m - Pair twisted EKKX 2x2x0.5 cable
? - Modular Straight RJ-12 Male Connector
? - Modular RJ-12 Splitter F2F 

The 1-wire network is built on EKKX 2x2x0.5 pairtwisted and RJ-12 connectors and splitters. The networked is powerd with +5V from the Raspberry.

The Kamstrup 3-phase counter control the heating pump only and the battery backedup counter is mounted on the S0 output. On every 1000W used the signal on the S0 will be shortend  to ground and this is stored in the battery backed up memory, so even if the 1-wire network is down no data will be lost. 2 DS18B20 is mounted on the radiators IN/OUT-pipes from the heating pump. At my first mounting the readings where a bit off, I only had 2 degrees difference so I stole some folie from the kitchen and wrapped around the pipe and isolated with some fome, topped it off with some tape. Now the readings are accurate.

Every 5th minutes (by a cronjob) the counters are read and the values are stored in a RRD database, the RRD setup will store readings for 10 years and the DB size is 5.4MB. RRDgraph will create the graphs and copy the .png image to my apache map. I'm struggling with PHP to create dynamic pages that will allow me to choose input range

This is the temperature in red out to the radiators and the blue is the returning water. The Delta value is in average about 6 degrees, which is perfect for my pump.

This is the power consuption for the last 12 hours for my heating pump only. The graph started to peak 04:00 because the outdoor temperatre dropped below -17C and the effecency for the pump is not enough at such low temerature, additional energy by pure electricity is added. There are tre stages 3, 6 or 9 kW.

Jan Larsson,
29 Jan 2013, 10:09
Jan Larsson,
29 Jan 2013, 10:05
Jan Larsson,
29 Jan 2013, 10:06
Jan Larsson,
29 Jan 2013, 10:06