Tuesday 4 February 2020

The Home Automatization Platform openHAB

The main reasons for automating your home will be efficiency, convenience and security.  It also allows you to implement intelligent designs that automate systems that would otherwise not be at all practical.

It is important to understand measure and monitor the systems you design and to own them. It is also important to turn everything into a number, state or command no matter what system or equipment you are modelling. 

The approach openHAB uses is perfect for creating cheap and fairly easy automated systems that are a mix of different DIY devices and products.

If you want to get started, get a Raspberry PI (old computer or docker runtime..) and set up openHAB.  You can use the PaperUI to install bindings and see if you can get them working with any smart devices you have in your home.  I like to use the HABPanel to make simple UIs for monitoring and controlling devices.  There is plenty documentation and if you have the determination and patience you can access your openHAB over the internet securely.

If you can do that you can build systems that, for example:
  • monitor temperature and humidity
  • turn on / off ventilation fans
  • detect when you are home
  • set your thermostat setting
  • get the current weather forecast
  • turn on heaters
  • open ventilation flaps
  • charge batteries
  • control lighting levels and hue
  • monitor energy consumption
  • mow your lawn
  • monitor solar power production
  • charge electric cars
  • collect and display calendar data 
  • pull in data from the cloud
  • turn on music
  • ...
The real power of this type of home automatization comes when you make rules across these different system. ie.:  "When the grid electric price is low and the home battery is below 20% turn on the irrigation system until I get home then play Led Zeppelin in the Living Room."

OK that might not be a useful rule but I hope you get the potential of these ideas.  I hope to demonstrate some more piractical examples of projects that I have done.

I believe

I wrote the below a few years ago (before the Paris Agreement, BREXIT and TRUMP).  Since then I have played, experimented, failed and had a little success. I hope to share what is worth sharing so i opened up my blog and found the below which is is good optimistic introduction so I am posting it.

I believe we have a problem.


I believe that humanity faces huge challenges if we are to sustain our species in large numbers (or even complex life on this planet) for the next few decades. A few decades is a long time for a mortal but having had the luxury of living in a few decades of growth I worry about a future of dramatic decline.

Politically these challenges seam impossible to address at anything like the required pace of change required. The current political tactic of confusing opinion and beliefs with science, fact and basic maths, does nothing other than paralyse the progress needed to address the existential threats we face.

The main problem we face is well explained here. I believe that to instigate rapid positive political change we need to be aspirational or (as history often documents) war and/or disaster will result in positive political change eventually (if it is not too late).

I believe there are solutions.

What ever happens I believe increasingly rapid change is unavoidable and we can individually choose in which direction we wish to contribute to that change.  Individually we can make a small but significant difference and collectively we will determine the fate of the species inhabiting this planet.

I do believe that there are technical solutions out there that are aspirational and elegant and empowering.  These solutions might conflict with some commercial and systemic interests but they can be personally enriching.  Nature gives us a well established blueprint for experimentation by embracing biodiversity, efficiency, cooperation and cyclic systems together with brutal honestly. Humans can use science, intelligent guess work and modern communication to accelerate system change without the slow messy process of evolution.

The political systems will quickly follow the popular opinion and the Paris Agreement gives us hope that a real framework for avoiding irreversible climate collapse will develop.


Belief is for bullshitters we need maths and science.

Above are my evolving beliefs and opinions. I might be wrong but I intend to play with some ideas to learn more and I thought I would share my projects here for anyone that is interested.

The motivation of these projects is based on the following criteria:
  1. Energy.
    Energy needs to be distributed equally per person if it is to be an equitable (and therefore a stable) system.  Total energy use must fit with the solar budget of the planet so anything that reduces total energy is probably good.
  2. C02
    Reducing total C02 emissions is essential.
  3. Cyclic Systems
    Building cyclic systems dramatically exposes environmental damage outsourcing and so should be a priority.
  4. Economic
    Costs are subjective but good value for money is important to me personally.
  5. Robust.
    Solutions need to be robust and empowering rather than create external dependencies.
  6. Fun and easy
    I like to have fun and I am lazy. 
I think tracking personal energy use and environmental complexity honestly is brutal and full of hypocrisy, and therefore it is often corrupted.  I think it is a fascinating technical challenge that I wish to investigate without corruption as best I can.