This is the second in a series of blog posts about some of my adventures into the world of Home Automation with openHAB. Part 1 was primarily about building and preparing the Linux (Debian) based system and the openHAB base install. In this second article we will dive into the details of maken openHAB do usefull things, like controlling lights or showing gas and electricity usage data and graphs. Note that this set of articles is focused on my particular setup. Your milage may vary, but you will most likely pick-up a thing or two for your own environment.
I am feeling a bit nostalgic today, so I will bother you with memories of the past – how it all got started when I was 12 years old. For more than 20 years my soldering iron (Weller, of course!), my oscilloscope, my pile of spare components, home-made PCB’s and other stuff has been stashed away in a few boxes in a dark place. Recently in a burst of nostalgia, I grabbed these boxes from the attic and started snooping around. It brought back memories of etching PCB’s in my mom’s backing dish (she hated that!), countless hours of finding the flaw in a circuit I built on a breadboard and assembler programming on home built microprocessor systems just to flash some LED’s or 7-segment displays.
Home Automation on steroids
This post has been updated to account for the release of openHAB 2.4.0 stable version, like where to download, and corrected a few minor errors along the way.
This is the first in a series of blog posts about my adventures into home automation (aka HA) land with openHAB and this one will be primarily about building and preparing the Linux (Debian) based system. In the next articles we will dive into the details of setting up a HA system with openHAB and some other tools. This is focused on my particular setup, but you will most likely pick-up a thing or two that applies to your own environment. Let's go to the process of getting a Linux base system up and running.
Atmel (recently bought by Microchip) has been producing a large family of 8-bit microcontrollers, the tinyAVR and megaAVR series for quite some time. Actually the first Atmel 8-bit AVR was introduced back in 1997. You will probably find AVR's in many household devices throughout your house, from microwaves to coffee machines and some home automation devices.
Like most microcontrollers, they have many I/O options and are quite flexible. Memory however, especially on the ATTiny (tinyAVR) devices, is rather scarce. So I started to write some low-level assembler routines with minimal footprint to do basic stuff for the programs I want to develop, like queueing data, send and receiving serial data, allocating memory, reporting errors, writing EEPROM memory, etc.
In the first article on low speed serial communications for 8-but microcontrollers, we looked primarily at the design principles and message structure. In this second, long overdue, article, we take a closer look at handling a message.
I am designing a simple, robust protocol for universal serial communications between low-level devices and sensors with very limited resources, whether it is over an RS485 bus, Wi-Fi, PLC or otherwise.