Monitor your plants with Home Assistant

I love to have a lot of plants in my apartment, but unfortunately I sometimes forget to water them. So why not using modern technology to make sure, I don’t ever forget it again.

What you need

  • A Raspberry Pi or a Linux-PC with a supported Bluetooth LE interface.
  • Bluez
  • Mi Plant flower sensor for every plant
  • Home assistant

Setup

Home assistant

First you should install Home Assistant and make sure everything works well. Home assistant provides good documentation how to setup the platform.

Bluetooth software

The Linux bluetooth software might not yet be installed on your system.

Check communication with the plant sensor

The easiest way to make sure your PC can read data from the sensor is using the hcitool command line tool.

hcitool lescan
LE Scan ...
XX:XX:XX:XX:XX:XX (unknown)
XX:XX:XX:XX:XX:XX Flower mate

It might list a lot of other devices. Just make sure, it can also see the “Flower mate” device. If you can’t see this device, the distance between the flower sensor and your PC might be too large. Try moving the plant near your PC and check if it works then.

Integrate polling into Home Assistant

First, you need to poll the data from the sensor in Home Assistant:

sensor
  platform: miflora
  mac: xx:xx:xx:xx:xx:xx
  name: Flower 1
  force_update: false
  monitored_conditions:
   - moisture
   - light
   - temperature
   - conductivity

As the MAC address, you need to use the address that is shown in the hcitool lescan output.

Notify yourself when you come home

It doesn’t make much sense to send you a notification during the day that you should water the flowers. You might have forgotten it already when you come home. So let’s just send a notification when you come home.

Setup presence detection

Home Assistant documentation how to do this. There are a lot of different device trackers. Have a look and decide what works best for you.

Setup notifications

The next step is sending a notification to you. For this guide I use Pushetta, but Home Assistant provides a large number of notification mechanisms. Have a look at them and select the one that fits best for you.

An example notifier configuration might look like this:

notify
  name: pushetta
  platform: pushetta
  channel_name: mychannel
  api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Define the automation

Now comes the new rule:

automation:
  alias: Alarm me to water plants
  trigger:
    platform: state
    entity_id: device_tracker.myname
    from: 'not_home'
    to: 'home'
  condition:
    condition: numeric_state
    entity_id: sensor.flower1_moisture
    below: 20
  action:
    service: notify.pushetta
    data:
      message: 'Water Flower 1!'

What does this do? First it checks it check, if you came from (device tracker changes from not_home to home) and check then if the moisture is below a well-defined threshold. The value might be a bit different for your plant, you need to adjust this. If the moisture is too low, it sends a notification via Pushetta.

You can combine multiple plants in the condition statement or create an automation for every single plant. I personally prefer the latter as I then know exactly which plant I should water.

Long-term monitoring

It often helps to have long-term data available to optimize not only watering, but also fertilize in the right intervals. While you can store the whole history within Home assistant, it isn’t really optimized for this use case. Therefore I recommend to use InfluxDB for this. This is a time-series database specifically designed to store sensor data over a long period. To visualize the data, I use Grafana. With this, you can create nice reports like this:
TODO

Reverse engineering the Mi flora plant sensor

The Xiaomi Mi plant sensor is a well-made plant sensor that does not only measure the humidity, but also fertility, temperature and environment light. Pretty cool for a small device like this. And even cooler is that it uses Bluetooth Low energy for communication with your mobile device. This should make it easily hackable.

Ok, let’s start and check what characteristics are available:

handle = 0x0002, char properties = 0x02, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x0a, char value handle = 0x0007, uuid = 00002a02-0000-1000-8000-00805f9b34fb
handle = 0x0008, char properties = 0x02, char value handle = 0x0009, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x000d, char properties = 0x22, char value handle = 0x000e, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x0011, char properties = 0x1a, char value handle = 0x0012, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x0014, char properties = 0x02, char value handle = 0x0015, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0016, char properties = 0x12, char value handle = 0x0017, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x0018, char properties = 0x08, char value handle = 0x0019, uuid = 00000007-0000-1000-8000-00805f9b34fb
handle = 0x001a, char properties = 0x08, char value handle = 0x001b, uuid = 00000010-0000-1000-8000-00805f9b34fb
handle = 0x001c, char properties = 0x0a, char value handle = 0x001d, uuid = 00000013-0000-1000-8000-00805f9b34fb
handle = 0x001e, char properties = 0x02, char value handle = 0x001f, uuid = 00000014-0000-1000-8000-00805f9b34fb
handle = 0x0020, char properties = 0x10, char value handle = 0x0021, uuid = 00001001-0000-1000-8000-00805f9b34fb
handle = 0x0024, char properties = 0x0a, char value handle = 0x0025, uuid = 8082caa8-41a6-4021-91c6-56f9b954cc34
handle = 0x0026, char properties = 0x0a, char value handle = 0x0027, uuid = 724249f0-5ec3-4b5f-8804-42345af08651
handle = 0x0028, char properties = 0x02, char value handle = 0x0029, uuid = 6c53db25-47a1-45fe-a022-7c92fb334fd4
handle = 0x002a, char properties = 0x0a, char value handle = 0x002b, uuid = 9d84b9a3-000c-49d8-9183-855b673fda31
handle = 0x002c, char properties = 0x0e, char value handle = 0x002d, uuid = 457871e8-d516-4ca1-9116-57d0b17b9cb2
handle = 0x002e, char properties = 0x12, char value handle = 0x002f, uuid = 5f78df94-798c-46f5-990a-b3eb6a065c88
handle = 0x0032, char properties = 0x0a, char value handle = 0x0033, uuid = 00001a00-0000-1000-8000-00805f9b34fb
handle = 0x0034, char properties = 0x1a, char value handle = 0x0035, uuid = 00001a01-0000-1000-8000-00805f9b34fb
handle = 0x0037, char properties = 0x02, char value handle = 0x0038, uuid = 00001a02-0000-1000-8000-00805f9b34fb
handle = 0x003b, char properties = 0x02, char value handle = 0x003c, uuid = 00001a11-0000-1000-8000-00805f9b34fb
handle = 0x003d, char properties = 0x1a, char value handle = 0x003e, uuid = 00001a10-0000-1000-8000-00805f9b34fb
handle = 0x0040, char properties = 0x02, char value handle = 0x0041, uuid = 00001a12-0000-1000-8000-00805f9b34fb

Looks like some standard characteristics (the uuid’s starting with 00002) and a lot of non-standard. Let’s check the standard characteristics first. UUID 00002a00-0000-1000-8000-00805f9b34fb should contain the device name:

# gatttool --device=C4:7C:8D:60:8F:E6 --char-read -a 0x03
Characteristic value/descriptor: 46 6c 6f 77 65 72 20 6d 61 74 65 

“46 6c 6f 77 65 72 20 6d 61 74 65” is “Flower mate” in ASCII. Cool. Seems that Xiaomi is using the standards – not something we see from every Chinese company.

How do you know that this UUID contains the name? Check out the list of GATT characteristics on the Bluetooth web site.

Ok, let’s have a look at all characteristics that return values:

0x03 : 160823-164329 : 46 6c 6f 77 65 72 20 6d 61 74 65
0x05 : 160823-164329 : 00 00
0x07 : 160823-164329 : 00
0x09 : 160823-164329 : 0a 00 14 00 00 00 f4 01
0x0e : 160823-164329 : 01 00 ff ff
0x12 : 160823-164329 : c3 c8 fd 30
0x15 : 160823-164329 : 98 00
0x17 : 160823-164329 : 1f 8e 8e 13 86 dd a0 d8 52 66
0x1d : 160823-164329 : 4c cc ca 13 fc fa f7 a6 51 50 c6 85 ee 61 85 47 7f 3d d6 6b
0x1f : 160823-164329 : 2e a1 bc 3e b3 87 94 e9 68 6f ff b7
0x2f : 160823-164329 : 00
0x33 : 160823-164329 : aa bb
0x35 : 160823-164329 : f5 00 00 00 00 00 00 10 61 00 00 00 00 00 00 00
0x38 : 160823-164329 : 64 10 32 2e 36 2e 32
0x3c : 160823-164329 : aa bb cc dd ee ff 99 88 77 66 55 44 33 22 11 10
0x3e : 160823-164329 : aa bb cc
0x41 : 160823-164329 : 81 8d 23 00

Hmm, look pretty wild. Looking at the data you have no idea what they might encode.

Let’s try something different and dump all values every 10 minutes.

We see a lot of values that do not change at all like this:

0x38 : 160823-073844 : 64 10 32 2e 36 2e 32
0x38 : 160823-074852 : 64 10 32 2e 36 2e 32
0x38 : 160823-075856 : 64 10 32 2e 36 2e 32
0x38 : 160823-080859 : 64 10 32 2e 36 2e 32
0x38 : 160823-081909 : 64 10 32 2e 36 2e 32
0x38 : 160823-082914 : 64 10 32 2e 36 2e 32
0x38 : 160823-083918 : 64 10 32 2e 36 2e 32
0x38 : 160823-084922 : 64 10 32 2e 36 2e 32
0x38 : 160823-085925 : 64 10 32 2e 36 2e 32
0x38 : 160823-090931 : 64 10 32 2e 36 2e 32
0x38 : 160823-091936 : 64 10 32 2e 36 2e 32
0x38 : 160823-092940 : 64 10 32 2e 36 2e 32
0x38 : 160823-093945 : 64 10 32 2e 36 2e 32
0x38 : 160823-094951 : 64 10 32 2e 36 2e 32
0x38 : 160823-100006 : 64 10 32 2e 36 2e 32
0x38 : 160823-101010 : 64 10 32 2e 36 2e 32
0x38 : 160823-102014 : 64 10 32 2e 36 2e 32
0x38 : 160823-103018 : 64 10 32 2e 36 2e 32
0x38 : 160823-104022 : 64 10 32 2e 36 2e 32

Others seem to change randomly like this

0x41 : 160823-073844 : d4 0d 23 00
0x41 : 160823-074852 : 31 10 23 00
0x41 : 160823-075856 : 8e 12 23 00
0x41 : 160823-080859 : f0 14 23 00
0x41 : 160823-081909 : 4d 17 23 00
0x41 : 160823-082914 : aa 19 23 00
0x41 : 160823-083918 : 02 1c 23 00
0x41 : 160823-084922 : 5f 1e 23 00
0x41 : 160823-085925 : bc 20 23 00
0x41 : 160823-090931 : 19 23 23 00
0x41 : 160823-091936 : 76 25 23 00
0x41 : 160823-092940 : d3 27 23 00
0x41 : 160823-093945 : 30 2a 23 00
0x41 : 160823-094951 : 97 2c 23 00
0x41 : 160823-100006 : f4 2e 23 00
0x41 : 160823-101010 : 51 31 23 00
0x41 : 160823-102014 : ae 33 23 00
0x41 : 160823-103018 : 06 36 23 00
0x41 : 160823-104022 : 63 38 23 00
0x41 : 160823-105025 : c0 3a 23 00

But then there is one characteristic with very controlled changes:

0x35 : 160823-073844 : f2 00 00 68 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-074852 : f2 00 00 54 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-075856 : f1 00 00 54 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-080859 : f2 00 00 54 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-081909 : f2 00 00 68 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-082914 : f2 00 00 54 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-083918 : f2 00 00 68 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-084922 : f2 00 00 68 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-085925 : f2 00 00 57 00 00 00 10 66 00 00 00 00 00 00 00
0x35 : 160823-090931 : f2 00 00 57 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-091936 : f2 00 00 57 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-092940 : f2 00 00 57 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-093945 : f2 00 00 57 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-094951 : f2 00 00 6b 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-100006 : f2 00 00 6b 00 00 00 10 63 00 00 00 00 00 00 00
0x35 : 160823-101010 : f2 00 00 6b 00 00 00 10 63 00 00 00 00 00 00 00
0x35 : 160823-102014 : f2 00 00 79 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-103018 : f2 00 00 79 00 00 00 10 63 00 00 00 00 00 00 00
0x35 : 160823-104022 : f2 00 00 6b 00 00 00 10 65 00 00 00 00 00 00 00
0x35 : 160823-105025 : f2 00 00 79 00 00 00 10 65 00 00 00 00 00 00 00

Seems like there are 4 bytes of values and a lot of zeros. Could these 4 byte be the sensor values? They are!
Now let’s check the values in the Mi app on the iPhone:

  • 24.2 degree celcius
  • 121 Lux
  • 16% moisture
  • 101 us/cm fertility (whatever this means)

Except for the temperature these values map nicely to the data:

  • 16 = 0x10 – byte 8
  • 121 = 0x79 – byte 4
  • 101 = 0x65 – byte 9

The only thing that isn’t yet clear is the encoding of the temperature.

Also the sensor should be able to measure up to 10000 lux. This won’t work with a single byte. So, let’s put another plant it into the bright sunlight:

25 01 00 f7 26 00 00 28 0e 01 00 00 00 00 00 00
  • Fertility is now 270, which is bytes 9 and 10 (MSB byte 9, LSB byte 10)
  • Sunlight is 9975 lux which is stored in bytes 4 and 4 (MSB byte 4, LSB byte 5)
  • And now it is also getting clear how the temperature is encoded. It is in 0.1 degree Celcius steps in bytes 1 and 2, which gives us 29.3 degree celcius in this example (which fits the data displayed by the app).

Monitoring your laundry

You might know the problem that you put laundry in your washing machine or the dryer and forget about it.  While the dryer is usually less critical, it’s no fun to leave the laundry in the washing machine for hours.

Nolan Gilley wrote a nice article how to use accelerator sensors to monitor your laundry with Home Assistant. Check it out.

protoboard

I will further look into this. It would be very cool to use BLE for this and use energy harvesting from the vibrations to power the circuit. But unfortunately piezo elements for energy harvesting are quite expensive.

Connecting a particulate matter sensor to your PC or Mac

I’ve written before about what particulate matter sensors are and how they work. Many of these sensors come with a tiny 8-pin connector. With some luck, you even find an English data sheet. But you might just end up with a Chinese one. It might look like this:

pmsensor-cover

Luckily, most signals have english names:

datasheet

Ok, that’s all we need to know to connect this thing to a PC. You can see that the supply voltage is 5V and the I/O voltage is 3.3V. That’s perfect for most use cases. You also see that there is some kind of serial interface RX/TX and a SET and RESET input.

What do you need? The only thing you need is a USB to Serial (TTL) adapter. The come in different variants and might look like this:

usbser1 usbser2

usbser3

Before buying check 2 things: The adapter should offer 5V AND 3.3V power outputs (for this project we only need 5V, but you might need the 3.3V for other projects) and have a DTR output (we will use this to turn the sensor on and off).

Now connect the sensor to the adapter as follows:

 VCC pin 1  5V
 GND pin 2 GND
 TX pin 4  RX
 RESET  pin 6  DTR

Note that the pin numbers are for the specific sensor shown above. Check the data sheet of your sensor, the pins might be different!

Why isn’t RX not connected? All the dust sensors I’ve seen do not use this signal at all. If it isn’t used, there is no need to connect it (but you can do if you like).

Finally this will look like this:

dust-sensor-interface

You can now connect this to you PC or Mac and read data from the sensor. We will show in another article how to do this.

5 Ways to start Home Automation for under $50

Home Automation is getting more and more simple with each day. Using WiFi, almost everything in your house can become ‘smart’. For under $50 you can begin to monitor and control your house, from anywhere, without breaking the bank.

Hook-Budget-Home-Automation-SystemHook: The Hook home hub finds its origins in DIY Home Automation. With successful crowdfunding, Hook is a low-cost Automation system that can control up to 15 devices remotely; in partnership with IOS, Android, Amazon Alexa, and the IFTTT web server. With Radio Frequency compatibility, Hook can convert any cheap RF socket to a smart socket. The Hook hub ships this month for just $49.95.

tplinkTP Link: This smart outlet is an affordable Home Automation device that can give your house a lived-in look to deter burglars with its ‘away mode’ protocols, turn your devices on and off from afar, and control your appliances. Compatible with Android, iOS and Amazon Alexa, the outlet also integrates energy monitoring, and can be controlled through their free Kasa app. A low-cost beginning that save you money and monitors your home, the TP Link comes with a 2-year warranty and 24/7 customer support to guide you through the transition of smart-proofing your home. The TP Link can be purchased for $40.72, with cheaper options starting at $29.95.

huePhilips Hue lighting:  Starting at $29.99, your investment need not go beyond a lightbulb. The Philips hue lighting products offer lighting protocols that adjust to your time of day; creating a natural light that can also be customized for specific moods and settings. With daily routines and quick-control features, you can flick the switch; dimming or turning off your lighting, from your smart light-switch on your phone. With the addition of an optimized, open source Home Automation system such as Hobson, this investment can be the first piece of your Home Automation framework, and control your in-home lighting remotely, for ‘lived-in’ protection in your house. Philips Hue also offers a free app tailored specifically towards this product.

insteonforscamInsteon Remote Control Plug-In On/Off Module: This small hub can control lamps and other small appliances. The perfect introduction to Home Automation, Insteon is compatible with smartphones for remote accessibility. Starting at $49.99, the Insteon can also be connected to a larger hub, for when you need to expand upon your Home Automation.

Foscam Camera: Using Home Automation, you can check on your house remotely with this IP camera. With its own remote viewing and recording system, this device can easily be linked into any open source software, as part of your User Interface; growing with multiple devices. Pricing for Foscam IP cameras start at $39.99

Home Automation has become a vast and diverse landscape of options. Expanding outside of WiFi’s limitations, Investment in Home Automation seeks to revitalize your household with Infrared, Bluetooth and Z-wave compatibility.

Hacking the H801 LED dimmer

I just received the H801 LED dimmer. I couldn’t figure out, what the “W1” and “W2” connectors on this device were. So I removed the case and checked the board. I was pleasantly surprise to see that this isn’t a 3 channel (RGB) but a 5 channel device. The W1 and W2 connectors are 2 additional channels.

Installation isn’t complicated. You connect the power supply and the LEDs and turn on the device.

With a laptop or mobile device, you connect to the WiFi network HCX_856705 (the numbers might be different) and use the password “88888888”.  Now, the trouble begins if you don’t have an Android phone. I was expecting there is at least a simple web interface available that allows to configure WLAN credentials. Nope! The only way to control the device with the initial firmware is an Android app.

You now have 2 options if you don’t own an Android phone: flash another firmware or install an Android emulator on your PC. It used Droid4X. However, I wasn’t able to connect to the device. I’m note sure if this Application supports using the WLAN connection from the Mac.

Ok, back to the start. Flash another firmware. This is usually something that I don’t do easily, but on a device that costs less than 20$ and isn’t useable for me otherwise, I tried this. Luckily the board design makes it easy to flash a new firmware. The board is already prepared with 2 headers: RX/TX/GND/3.3V and J3. Just solder headers and use your existing ESP8266 programmer.

h801-header

As software I used the Arduino sketch from Eryk.io and adapted it slightly. My sketch can be downloaded from Github.

The GPIOs are used as follows:

Pin Function
15 Output red
13 Output green
12 Output blue
14 Output white 1
4 Output white 2
1 Internal LED green / Signal
5 Internal LED red / Power

Raspberry Pi as a Home Automation Server

The Raspberry Pi is a credit card-sized Linux computer on a single circuit board that runs on an SD card. It is powered off a 5V supply – so it can run all day it uses very little electricity and only costs around £25 – £45. The Raspberry Pi has a graphical output with a HDMI plug and a good standard of audio processing. It has networking capabilities, so you can plug it into your home network if you want to and configure it to automatically connect in the future, or you can plug it into a USB Wi-Fi dongle. As it is wireless, you can then place this server anywhere in your house because it is so portable (in a cupboard, below your desk, in the garage – even outside). The server is low cost, high performing and as of 2015, Raspberry Pi had sold over 8 million computers after launching in just 2012). The latest model is the Raspberry Pi 3 – modified to include wireless LAN and Bluetooth; making IoT and mobile projects more accessible. They were first designed to teach children how computers are made/ work, but are increasingly being used for a variety of other projects.

Moving your home automation code and programs over to the Raspberry Pi makes is simplistic in nature. You can connect low-level electronics to it, so you can read from sensors, but at the same time run Python scripts and interface with other devices on your network such as a Philips Hue hub – as well as pulling data from the internet. You also have the ability to create a graphical display if you want to; you can plug it into a monitor and plug in a keyboard and mouse and use it like a fully graphical-interfaced computer to do the programming. And because it is a Linux server too, you can connect to it via SSH on your home network.

The Raspberry Pi Foundation is committed to helping people learn about computers and how to solve problems in the digital world, so the company’s profits go straight into funding the training of teachers to help people use the technology they offer. They are a forward-thinking company, solving the modern-day shortage of programmers and coders by educating, training and enabling people to build their own HA servers in their own homes.

Hue emulation on a ESP8266

You might already know that I like the ESP8266. There is a cheap LED dimmer named H801 available on AliExpress and other Chinese web sites that uses the ESP8266 to control RGB LED strips.  You find a bit technical information about in on this Dutch web site.

H801_small

One issue is the simple protocol this device is using. While it has been reverse-engineered, the protocol is still proprietary and that makes it hard to integrate it into existing home automation solutions.

One option is emulating a Phillips Hue. There is the Github project ESP8266HueEmulator that implements this. Have a look at this!

Note that the Chinese device shown above is not certified to be used within the US or EU!

Home Security with Raspberry Pi and a Webcam

Home security has never been easier. Though the terms “front end development” and “open source” may be daunting to some, Raspberry Pi hardware is a cost-effective and efficient solution that makes Home Automation a DIY commodity.

For $39.99, Raspberry Pi, is paired with a Mirco SD card (at least 2GB), USB Hub and a compatible webcam, to create a simple means of home security.

The Raspberry Pi is a self-powered motherboard, that either remotely or connected to a monitor and keyboard via its own USB ports. Having inserted a formatted SD card into the slot of the Motherboard, you can begin set up your Home Automation system. Your Webcam needs to be connected to a USB hub which is then connected to the motherboard in order to supply power to your camera.

First, Raspberry Pi needs to install an operating system to its motherboard. Whereas you can access your OS’s terminal directly, use of NOOBS’ Raspbian integrated OS, is the most convenient set up for beginners. Note that this option can be booted directly onto your Raspberry Pi, through a preloaded SD card.

Having inserted your SD card into your computer’s card reader, you will first need to format it to FAT-32. Following this, you can then download NOOBS and its integrated Raspbian software. Upon installing Raspbian on your computer, Windows Clients will need to download Win32 in order to burn this OS to an SD card, whereas Mac and Linux clients can do so by opening the Disk Utility and Terminal.

Once this is done, your SD card can be inserted into the Raspberry Pi.

For the convenience of simply controlling your electronics; such as a webcam, Raspberry Pi can then be controlled remotely from another device over a local network using a Secure Shell (SSH).

For remote access, you will need to download a free IP Scanner client and an SSH client such as Putty.  This will identify your Raspberry Pi from your OS. Taking note of your hardware’s IP address in the scan, you can remotely configure your Pi through the SSH client.

To install the camera connected to your USB hub, you will need to configure your Raspberry Pi’s terminal to enable it, and create a webcam server. Over a remote control server, the webcam can then be accessed from using the Pi’s IP address. There is also configuration available online to access your webcam stream from an internet browser. Alternatively, you can connect a camera module to Raspberry Pi’s CSI port, enabling your Raspberry Pi to become its own IP webcam.

Using Home Assistant to control your home (and more)

If you’re looking for an home automation software, you will find a lot of projects. There is a huge interest in this area and a lot of developers working on different projects. Many focus on the visualisation. While it is important to have a good user interface, the main focus of an automation system should be it’s backend.
One project I really like is Home Assistant. It uses a very clean backend/frontend separation.You can easily add your own user interface by just using its web API. It is written in Python. That makes it easier for me to add missing functionalities.

An architecture based on Home assistant could look like this:

ha-architecture

KNX isn’t supported out-of-the box in the current Home Assistant release (June 2016). However, I already did some programming and will work on integrating it into the official Home Assistant release.