I was looking for an option to use the GPIO Pins with Perl directly. Thanks to Gordon the solution was pretty easy with the wiringPi framework and the perl wrapper wiringPi-Perl created by Gadgetoid. Gordon also created the useful PIN mapping overview which I used for my own table shown below which also includes the translation to the Ardafruit T-Cobbler.
Inspired by the Nest® learning thermostat I want to improve the HomeAutomation capabilities of the Raspberry Pi by adding some sensors to enhance the functionality.
Temperature and humidity sensor
To measure the rooms temperature and humidity and to control the electrical valve accordingly. The reason to choose the sensor DHT22 over the DHT11, is the much higher precision. For example for temperature measures: ±0.5°C accuracy (DHT22) vs. ±2°C accuracy (DHT11). To my believe ±2°C is not acceptable for steering the temperature in a room.
Temp/Hum Sensor (on the right hand side) already hooked up to the T-Cobbler on a breadboard
The Pi should be able to notice whether someone is in the room and regulate the temperature accordingly. Over time the server should be able to build a schedule and maintain this schedule. I’ll use this sensor from adafruit.com
IR distance / proximity
With this sensor the server should be able to detect a human being close to itself and enable interaction by making the user inteface available. For the time being I will work with the Sharp GP2Y0A21YK0F and may move to a DIY version later on.
One great feature of the Raspberry Pi is the extendability via the GPIO pins. I’m using a case around the Pi, while this is a good solution to avoid issues with shortcut circuits on the other hand the access to the GPIO is more complicated and involves in almost all cases disassembling the enclosure. Luckily I found the solution for me on the adafruit.com website, the Adafruit Pi T-Cobbler Breakout Kit for Raspberry Pi.
A closer look at the PCB shows how nicely the cobbler transfers the GPIOs to the breadboard. For me this better overview is the major advantage of the T-Cobbler over the standard cobbler from Adafruit. Please also note that the changes between the Raspberry Generation 1 and Generation 2 are reflected properly [PIN #21 (v1) vs PIN #27 (v2)].
Finally my Raspberry Pi has arrived and I want to use it as the server for the perl based HomeAutomation server fhem http://fhem.de/fhem.html.
For the fhem set-up I followed the installation instruction as described under http://www.fhemwiki.de/wiki/Raspberry_Pi and this worked like a charm
The installation of the culfw firmware was a bit more tricky, but with the following steps I was able to flash the CUL to the latest version.
Download the firmware
sudo wget http://culfw.de/culfw-1.46.tar.gz
and unpack it
sudo tar -zxvf culfw-1.46.tar.gz
Change into your device directory (e.g. Devices/CUL)
Install the package dfu-programmer
sudo apt-get install dfu-programmer
Insert the device into the USB slot while pressing the micro-switch
sudo make usbprogram_v3 V3 to be used for CUL V3.
After flashing the CUL, a new USB device should appear: “03eb:204b Atmel Corp.”. If not re-insert the device without pressing the micro-switch.
The server is now up and running since several days. For the time being the server is just listening to the FS20 traffic in the air and logs it.
I want to control the FHT8v directly from this server without the need to use the FHT80b device which is originally intended to steer the valve controller. Normally this should be straight forward but a first test was not successful. I will publish the results once I have it running.
Now with the arrival of my Raspberry Pi scheduled for Monday November 26th 2012, it was a perfect timing for the delivery of the casing.
The tolerances of the parts seem to be a bit too low, I was reading on Amazon that quite a few people managed to break off some of the clips while putting the parts together. I will try to modify the parts slightly to make them fit better, before finally assembling it.
With this delivery everything is in place for the Raspberry Pi. The SD Card is loaded with the latest Raspbian image and all wires are ready to be hooked up to the Pi.
My weather sensor (OC-3) seems to be broken, humidity is constantly reported at 99%, as you can see here http://weather.appco.de . I checked Google for potential solutions and found someone who renewed some soldering points to get it working again.
I will send it back to the manufacturer to get it replaced as the sensor is still covered from the warranty.
Maybe this is a good chance to add a solar panel to get rid of the batteries.
It turned out that the original layout of the HomeAutomation Board was far from perfect. From time to time I needed access to the USB hub to pull out or plug in an USB extension. This was almost impossible as the USB hub was located to far behind the wall. After fiddling around for quite some time I decided to give the whole board a re-design.
The key difference is now that the USB hub is the 1st item on the board when you try to access it. Which turns out to work perfectly. Especially as I will start my experiments on the Raspberry Pi with the CUL device which is during normal operations connected to the USB hub on the board.
After a while I was a bit unhappy with the reliability of the FS20 <-> io-homecontrol® system I had created. I was looking for alternatives and found it in the HM-LC-SW4-PCB, which is a HomeMatic 4 channel switch. If you buy it as a kit it is available for 29,95 € per unit. The soldering was no problem at all with the included instructions. The principle is quite the same as with the F20 switches, I always connected two Velux remotes to one HomeMatic switch.
As HomeMatic is using a bi-directional protocol the reliability of the whole system increased significantly.
Now the shutters are being closed automatically at sun-set and are opened up at sun-rise. If the sun rises before 07:00 CE(S)T the shutters will stay closed until 07:00, this helps getting enough sleep during the summer period.
IMPORTANT NOTE: do not open the shutters in the bedroom on weekends automatically, trust me!
As my HomeAutomation was growing, the amount of cables and other clutter around the TV set and the AV receiver was growing even faster.
It was time to find a different solution! I wanted it clean and simple, but did not want to make compromises to the amount of technical gadgets (and their potential growth).
The solution for me was a media wall which would host TV set, Mac mini , Apple TV and the AV receiver in front of it and everything else would be hidden behind the wall. It should also provide some capabilities to have a fancy background light.
As the storage for the equipment behind the wall I decided to go for a very simple shelf from the DIY store.
Some of the items in the picture did not make it into the final set-up, but nevertheless the amount of cable and devices was making a real mess behind the TV rack.
As a next step we were building a construction of dry walls around the shelf.
To ensure that the wall will be able to support also larger TV sets the initial layer was created out of OSB boards.
Followed by a layer from plasterboards and a trial run with the final equipment. The media wall has a distance from around 25 cm from the back wall. Access to the storage shelf is possible from the left side whereas the right side is completely closed
Almost complete, now with wall-paper.
Finally this is how it looks like at night and with the LEDs on. It turned out that this color is actually our favorite, and despite the fact we could change it via the HomeAutomation system we only do it once in a while.
You may agree the original casing from ELV for the FHT80b control unit has not been designed by Apple.
As we were planning to give the living room a make over I wanted a different enclosure for my FHT80b. Using at this time Google’s (now Trimble’s) SketchUp http://sketchup.google.com I created an alternative casing for the unit.
When the time was come to have my 1st 3D print created, I used the service of http://i.materialise.com to get the design printed.
I am really satisfied with the 1st trial run, the original FHT80b PCB fits nicely into the print, the LCD unit (missing in the picture) is sitting to tight, which needs to be adopted with the next revision. All the buttons are working, the details around the turn wheel need a remake and overall the case is to short by 5 mm (in the area of the battery connector).