The objective of this project is provide some local processing power and intelligence in our conservatory, to make it 'smart'. This was the second slave HCS processor installed as part of our distributed Home Control System (HCS) and it allows us to provide a lot of features for not a lot of money, whilst ensuring excellent performance and minimal latency.
When our conservatory was built we fitted a number of 12V halogen lights into the roof (to ensure the wires were completely hidden within the aluminium frames). These are dimmable and powered by a 12V ac transformer. Because we have other lighting in the conservatory, they are not used often enough to justify the cost of installing LED equivalent bulbs. They also present sufficient load to control them using a Z-Wave dimmer module but, this may not be the case if we used LED replacement bulbs.
The above lights are controlled by a dimmer switch mounted on the (previously outside) wall in a surface box. The location was chosen for us because this is where the outside light originally came through the wall, with a light switch opposite on the inside (inside our dining room). The ducting conveniently runs up to the central point in the conservatory roof, carrying a permanent feed to the ceiling fan and a switched feed to a 12V ac lighting transformer. The black box mounted on the wall is the 433Mhz RF remote control unit for the ceiling fan and its integral light.
We have the following digital sensors (type, zone, object):
- Door, Conservatory, Conservatory Door
- Door, Conservatory, Patio Door
- Smoke, Conservatory, Conservatory Smoke Alarm
- PIR, Conservatory, Conservatory PIR
- PIR, Global, Garden Left PIR
- PIR, Global, Garden Right PIR
We have the following digital outputs (type,zone,object):
- Light,Global,Back Garden Lighting1
- Light,Global,Back Garden Lighting2
- Appliance,Global,Garden WiFi
We have the following variable (dimmable) outputs (type,zone,object):
- Dimmer,Conservatory,Conservatory Lights
We have the following analogue sensors (type,zone,object):
- Voltage,Conservatory,Conservatory Supply Voltage
- Humidity,Conservatory,Conservatory Humidity
- Humidity,Global,Back Garden Humidity
- Temperature,Global,Back Garden Temperature
- Analogue,Global,Garden Light Level
Other Sensors & Devices
- Light,Conservatory,Conservatory Fan Light
- Fan,Conservatory,Conservatory Fan
- Temperature,Conservatory,Conservatory Slave Temperature (temperature inside the case)
- Temperature,Conservatory,Conservatory Ceiling Temperature
- Temperature,Conservatory,Conservatory Temperature
- Temperature,Conservatory,Conservatory Floor Temperature
When tested, these three sensors showed a temperature variation of less than 0.2°C.
We also monitor slave processors and measure and record a large number of things on the Raspberry Pi.
Existing Sensors & Devices
We already have a Z-Wave connected lamp in the conservatory, which is used for security lighting and convenience lighting.
We also have a (manually) switchable 1kW/3kW electric heater in our conservatory.
The slave processor will use a standard Raspberry Pi camera module for still image and video capture. We are still testing the standard module and the NoIR version to see works best in each given environment. We have the ability to switch on both visible and infra-red lighting to improve the quality of the captured image and we are also dynamically adjusting the exposure and white balance settings, based on the the lighting available.
Installation & Implementation
We have used a 'standard build' for our slave HCS processors, to enable us to build and deploy them quickly.
This slave processor uses a 12V dc power supply from our 12V UPS and a wired Ethernet network connection.
Ceiling Fan & Fan Light
We are using an 433Mhz RF transceiver to duplicate the functionality of the remote control. This is covered as a separate project.
We have replaced the 100W halogen bulb with a 20W GU10 mounted on a custom bulb adapter.
Ceiling Lights Dimmer
Inside the light switch wall box, there was plenty of room for a Fibaro FGD211 Z-Wave dimmer module.
Replacing this dimmer switch with an MK 2-way momentary action grid switch is the only visible change and user interface change we have made in this room. This allows both dimming and on/off control via the Fibaro module.
Our conservatory has double doors that open out into the garden. The contact sensor is installed on the primary door only, as this has to be opened before the secondary door will open. A reed switch is hidden in the door frame and the wires hidden up to the roof support beam. These tap into the same 6-core alarm cable that connects the PIR sensors.
The heater is controlled by a Z-Wave Fibaro module mounted in the isolation switch box. Our HCS software models devices, to enable us to track energy usage.
The part of the conservatory where we have installed the outside temperature and humidity sensors is in shade all of the time, making it a good position to place these sensors.
This is a sliding door that used to lead from the dining room, out into the garden. It now leads into the conservatory. A reed switch is hidden in the door frame and a magnet is fixed to the sliding door. Hidden wires lead back to the Raspberry Pi.
We did look at using a central 360° ceiling-mounted PIR sensor but, two standard PIR sensors wired in parallel and installed in the far corners of the conservatory provides better coverage, less latency and is also less likely to be falsely triggered. It was also much easier to hide the wiring out of sight. Installed like this, these PIR sensors are also very subtle and hard to spot, blending into the white UPVC frame.
We also have two separate external Elite GJD023 PIR sensors that provide good coverage over our back garden. These are quite expensive but they are IP55 rated.
Raspberry Pi Interfacing
The following components form part of our 'standard build' for our slave HCS processors:
We use an AB Electronics I2C analogue input board to provide 8 analogue input channels.
Connected to this header board we have our own 8-channel optically isolated input board.
Our header board presents and we use standard 10-way ribbon cables to connect other boards to this header board.
For this project we have also fabricated a bespoke 4-channel output board.
We have installed networked smoke detectors in the past. For this project we are using an ESP Fireline 12V optical smoke detector (PSD-212). This is a low-cost (~£20) compact, low-profile device that has no built-in sounder but, it does have a visual indicator when activated. We interface this using our I/O board. This is installed near the top of the roof. This is a another project in its own right.
These types of detectors are designed to work with an alarm control panel and signal an alarm by increasing the current drawn when smoke is detected. To enable this to work with our interface board, we have had to add a local 4N26 opto-isolator that detects the voltage drop on the alarm output and uses this to power the photo-diode and thus turn on the photo-transistor. When activated there is approximately a 3V drop on the alarm 'output'. Once activated these devices do not reset and the power needs to be removed to perform a reset.
The three temperature sensors monitor the temperature in the conservatory at floor level, 1.5m above floor level and six inches below the highest ceiling point. This allows us to measure the temperature gradient in the conservatory and decide if the ceiling fan needs to be turned on, to even this temperature gradient out. To save energy, it only makes sense to do this is the conservatory is occupied.
The 240V ac ceiling fan has (wireless) remote control with has three speed settings. It also has an integral light, which we don't currently use as it uses a 100W halogen bulb. We have tried LED equivalent bulbs but, the switching electronics in the fan don't work with low loads. When someone is in the conservatory, we don't generally use the two highest speed settings as fan moves the air very quickly. If the temperature gradient becomes too great and the conservatory is not occupied, we enable the fan using all the speed settings as appropriate.
The direction of the ceiling fan can be changed manually, using a switch on the fan body. These are effectively 'summer' and 'winter' settings. The summer setting draws cool air up from the floor and the winter setting pushes warm air down from the ceiling. We are investigating ways of controlling the fan direction automatically.
We are currently investigating automated vents, which could be controlled by this slave processor. At the moment, the fan has built-in 'dumb' temperature control using a gas filled piston.
We have a dehumidifier in our conservatory and we are investigating control options.
Because the conservatory is not used regularly, it is not heated by our central heating system. The electric heater is used for frost protection and keeps the temperature in the conservatory above 5°C.
We use door contact sensors and the PIR sensors to control convenience lighting. When someone enters the conservatory, the ceiling lights ramp up in brightness for a defined period of time and after the conservatory is considered empty, they will ramp back down again.
Every device in our conservatory is controlled and has a known power rating. Our devices model captures and reports energy use down to a device level. This is captured logged on a daily, weekly and monthly basis.
We have turned the Raspberry Pi into an AirPlay device, so that we can connect our iPhones and iPods to it, to play music whilst relaxing and exercising in this room. A lot of people say the audio quality from the 3.5mm jack socket is not very good but, we've found it to be good enough for this application. We are also looking at USB audio boards for other applications and this is a possible upgrade path to get better quality audio. The downside of this approach would be the need to add a USB hub though.
We followed the instructions on Jordan Burgess' site:
Change default audio output, force the RPi to output to the headphone port rather than through the HDMI:
sudo amixer cset numid=3 1
Shairport has several prerequisites that need to be installed first. This is a single instruction to install them all:
sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
Installing Perl Net-SDP. A change in IOS 6 requires this module to installed.
git clone https://github.com/njh/perl-net-sdp.git
This creates a directory called
sudo ./Build test
sudo ./Build install
Download shairport from github and compile it into a usable program:
git clone https://github.com/hendrikw82/shairport.git
./shairport.pl -a Conservatory
This powers a set of smallish bookshelf speakers and the audio quality is pretty good.
The slave processor has direct control over our garden lighting and this is driven by detected occupancy.
We are using contact sensors on all of the doors into the conservatory to help determine occupancy and presence. We are using the PIR sensors and other means to detect people inside the conservatory.
The slave processor will also relay things to the rear of our house, e.g. the front door bell being pressed.
We have also set trigger levels on the humidity sensors, to spot if water has leaked in through a roof vent.
We plan to have a number of scenes specific to this conservatory:
Secondary Wi-Fi Access Point
As part of our patio entertainment project, we installed a secondary wireless access point to provide full Wi-Fi coverage in our garden. We are now using this slave processor to control the power to this, so that we can use detected occupancy to switch it on only when required and save power.
We are using a bespoke I/O board for this project, which has high-power transistors for switching 12V dc to devices like the BT Home Hub 3 we are using. The BT home home has a 12V dc power source and requires 0.55A in normal operation.
The 'Garden WiFi' is a modelled 'Appliance' object and fully controllable via our Home Control System (HCS). We use a software controller to ensure it is available whenever the garden (a modelled zone) is occupied. We have a physical 'Garden WiFi +60' button which extends the time the Wi-Fi is on for by one hour when pressed. We also model a 'Garden WiFi Switch' which is used when we have guests to ensure it remains on for longer periods.
The various sensors on the inside and outside of the conservatory are used to drive the capture of still images and short video clips.
Detailed logs enable us to track all aspects of the conservatory and how it is used.
As well as being a social space, or conservatory is also used as a gym and has a cross trainer in it as well as some other exercise equipment. This is used regularly each morning before I go to work and at the same time each working day morning. The heating controller will schedule the conservatory to be heated up prior to entry in the morning.
The slave processor can locally make voice announcements because the amplifier is always on and uses very little power in standby.
This slave HCS processor is also our first test case, to see if we can get whole home audio announcements synchronised and distributed over IP. More on this coming soon.
We have written all of the functionality running on our slave processors in Java and Python. We are planning to publish our software as quickly as possible.
The only visible element or change that we have had to make is to the light switch for the ceiling lights.
We have specifically ruled out doing anything with the blinds for this project as it would be extremely expensive to replace them with automated blinds.