ePrivacy and GPDR Cookie Consent by TermsFeed Generator IoT - Smart Home - OpenHAB 3 | DomoticsDuino - OpenHAB 3 Fanatic

IoT / Smart Home / OpenHAB 3

Migration from
OpenHAB 2.5 to OpenHAB 3
was successfull.

The idea

A few years ago, thanks to a suggestion of a friend, I discovered the world of Arduino & co; if you don't know it, Arduino is a company that designs and manufactures microcontrollers based on open source hardware and software. There are several models which vary according to technical characteristics and dimensions; therefore, the choice is made according to the objectives. These electronic boards (found on many ecommerce websites) allow, writing simple or complex software, to manage inputs and outputs. A very simple example is the firing of a led (OUTPUT) through the use of a button (INPUT). In general, through digital inputs and outputs and software programming you can create real circuits to interface with sensors and actuators.
I don't want to go too far on the subject and I put the link to the official website, where you can eventually go deeper into the topic https://www.arduino.cc/.

Let's get back to main topic...
My first experiment with Arduino was the creation of a GAS sensor. You can find all the details on the relevant post of my blog: First experiment: a simple gas detector.
From that moment on I began to deepen this fascinating world and several ideas flashed through my head, up to my final project: the implementation of a Home Automation System, thanks also to the discovery of the Wifi buttons (see Home Automation System - Discovering sonoff) and ESP8266 microcontrollers, very similar to Arduino but with integrated Wifi, much smaller and much less expensive. All this, enriched by different sensors (temperature, humidity, gas, probes for monitoring energy consumption, etc etc) and thanks to the help of mini computers (such as the famous Raspberry PI) and open source software allowed me to get to the real development of my project, currently still in "work in progress" (the available time is less than the required time...)

What an Home Automation System is

What an Home Automation System is

There are many definitions of Home Automation System around the network. In very simple words, we can define an Home Automation System as an interface to monitor, control and automate the main functions of a so-called "smart home". A set of sensors and actuators that communicate with a central unit, called the Hub, the brain of the system. A classic example of components of an Home Automation System can be given by temperature sensors, switches and virtual buttons, video surveillance and security systems, energy measurement sensors, smart bulbs, etc etc, all interconnected through hubs capable of interfacing with the various communication protocols of the devices, often heterogeneous to each other. Alongside the hub we also have user interface systems, which allow the real use of the system: starting from the wall-mounted panel up to the app on the smartphone, a desktop application or a web interface; last but not least the voice control, which allows us to "use" our Smart Home simply speaking in natural language. Famous examples are Amazon Echo Dot / Alexa and Google Home / Assistant. Another important feature of the Home Automation Systems is remote control: we can manage our devices wherever we are, using the internet. In summary, a Home Automation System allows us to manage home devices, even outside the walls of the house, without the need to physically act on the actuators but simply using a software (smartphone, PC, tablet, wall panel) or even our voice. The last aspect, no less important than the others, that makes our home even smarter is the ability to automate different operations allowing it to take decisions based on the state of the system itself. Examples: the temperature in the living room is above 28°C, so I turn on the air conditioner; the photovoltaic system is producing 2.5Kwh, then I start the washing machine; it's evening, so I turn on the lights in the garden. As you can easily imagine, the only limit is out fantasy.

The design

After all these beautiful words, let's move on to the real things. After studying and carrying out numerous practical experiments I finally reached the definitive project of my Home Automation System, however always in continuous evolution. My system is based on the excellent OpenHAB software, now in version 3, selected from the several Open Source systems of Home Automation on the network. In this post of my blog you can learn more about what led me to make this choice.
Here are the main modules of my current Home Automation system:

  • DHT11
    DHT11 - Humidity / Temperature probe

    Cheap sensor to get humidity and temperature values. It has digital output, easy to use with microcontrollers.

  • DS18B20
    DS18B20 - External temperature probe

    External temperature probe. More precise than DHT11 but more expensive. Can be used several sensors with a single communication bus, using the One Wire interface.

  • PZEM-004t
    PZEM-004t - Multimeter for current and voltage measurements.

    Non-invasive sensor (thanks to the CT current transformer) for measuring electrical powers. It can work standalone with PC software and USB connection, or connected to a microcontroller via serial port.

  • MQ-4
    MQ-4 - GAS sensor

    GAS Sensor, mainly sensitive to methane, propane and butane gas. It has an analog output to obtain a precise value and a triggerable digital output.

  • photoresistor
    PHOTORESISTOR - Measurement of the intensity of sunlight.

    Sensor for measuring the intensity of sunlight, used for the auto switch of the external night lights.

  • SONOFF Basic
    SONOFF Basic - WiFi button with single output

    WiFi single output button, based on ESP8266 chip. It allows you to control a load remotely, using APP and / or integrated button.

  • SONOFF Mini
    SONOFF Mini - WiFi button with single output

    WiFi single output button small dimensions, based on ESP8266 chip. It allows you to control a load remotely, using APP and / or integrated button. It's already prepared to be used with an external button / switch and it can works in DIY mode

  • SONOFF Dual
    SONOFF Dual - Wifi button with dual output

    Dual output WiFi button, based on ESP8266 chip. It allows you to control two loads remotely, using APP and / or integrated button.

  • SONOFF 4 Channel
    SONOFF 4 Channel - WiFi button with four output

    WiFi buttons with four outputs, based on ESP8285 chip. It allows you to control four loads remotely, using APP and / or integrated buttons.

    SONOFF B1 - WiFi RGB Smart Bulb

    WiFi RGB Smart Bulb, remote controlled. It is possible to control color, temperature and brightness.

  • Xiaomi Yeelight
    Xiaomi Yeelight RGB - Wifi RGB Smart Bulb

    Xiaomi RGB WiFi bulb controlled by proprietary app (Mi Home) and interfaced in OpenHAB.

  • Xiaomi Mi Robot Vacuum
    Xiaomi Mi Robot Vacuum - Robot vacuum cleaner

    Robot vacuum cleaner remote controlled with room mapping and stair detection features.

    ARDUINO Uno - Microcontroller for DIY.

    One of the most famous microcontrollers with analogic/digital I/O. It works with 5V power adapter.

  • ESP8266
    ESP8266 - Microcontroller for DIY, with built-in WiFi.

    A cheap microcontroller with built-in WiFi. It works with 3.3V power adapter; it has several digital I/O and a single analogic I/O.

    OPENHAB Main UI - Web responsive UI to setup and control OpenHAB application.

    This is new in OpenHAB 3. Web responsive UI to setup and control OpenHAB application, automatically built following the semantic model design, another innovation of OpenHAB 3.

  • OPENHAB Basic UI
    OPENHAB Basic UI - Simple web user interface for OpenHAB

    Simple and minimal web user interface to monitor and control OpenHAB Items. It can also be used on Android, iOS and Windows Smartphone / Tablet with the dedicated app.

  • OPENHAB Hab Panel
    OPENHAB Hab Panel - Web interface for touch panel for OpenHAB

    Web interface built on AngularJS framework to design and build user interface optimized for touch panel (for example tablets). In OpenHAB 3 may be replaced by Main UI.

    GRAFANA - Web based software to design and build several dashboards.

    Web based software to design and build several dashboards composed by graphical widget to monitor real time and historical data read from Home Automation System.

    MOSQUITTO MQTT Server - MQTT Broker to publish and consume messages.

    MQTT Broker to publish and consume messages among different modules of the system.

  • TASMOTA Firmware
    TASMOTA - ESP8266 Firmware.

    Open source and alternative firmware for ESP8266 with web interface.

    INFLUXDB - Time-series RDBMS.

    Open source time-series RDBMS.

  • GRAFANA Server
    GRAFANA Server - Data visualization service.

    Open Source data visualization service to manage interactive dashboard, easily interfaced with many RDBMS.

  • Docker
    DOCKER - OS level virtualization.

    Open source project that use OS-level virtualization to deliver software in packages called containers.

  • Google Home Mini
    Google Home Mini

    Google Virtual Assistant

  • Amazon Alexa Echo Dot
    Amazon Alexa Echo Dot

    Amazon Virtual Assistant

  • Samsung Smart TV 4K 49'
    Samsung UE49NU8000T 49' - 4K Ultra HD Smart TV

    4K TV 49 inches

  • Bose Speaker Bluetooth
    BOSE Soundlink Color - Bluetooth Speaker

    Portable Wireless speaker

  • Jam Waterproof Speaker Bluetooth
    JAM Chill Out - Waterproof Bluetooth Speaker

    Portable Wifi Speaker with a good design

  • Samsung Bluetooth Soundbar 2.1
    SAMSUNG Bluetooth Soundbar

    Wifi Soundbar with external subwoofer

  • Google Chromecast
    Google Chromecast

    Turn your old TV in a Smart TV

  • Ubiquity PowerBeam 5AC Gen2
    Ubiquity PowerBeam 5AC Gen2 - 5Ghz PTP Wireless Bridge

    High-performance 5 GHz Point-to-Point (PtP) bridge

  • Linksys WRT54G Wireless Router
    LinkSys WRT54G - Wireless Router

    An old wireless router with DD-WRT firmware, used for the first floor network

  • Belkin F5D7234-4 Wireless Router
    Belkin F5D7234-4 - Wireless Router

    Un old wireless router used for the basement network

  • Tplink Archer C7 Gigabit Wireless Router
    Tplink Archer C7 - Gigabit Wireless Router

    A new wireless router with LAN Gigabit, providing network at ground floor

  • WD My Book World Edition 1TB NAS
    WD My Book World Edition - 1 TB NAS

    An old 1TB NAS with LAN Gigabit but without any RAID setup; it is used to store backup data

  • WD My Cloud EX2 Ultra 4TB NAS
    WD My Cloud EX2 Ultra - 4 TB NAS RAID 1

    A new 4TB NAS with RAID 1 and with LAN Gigabit, used to store backup data

  • Dahua HDCVI Recorder
    Dahua XVR5108HS-4KL-X - HDCVI Recorder

    4K Videorecorder - 8 input

  • Dahua 4MP Mini Dome
    Dahua HAC-HDBW2401R-Z - 4MP Mini Dome Camera

    4MP external camera

  • Dahua 4MP Bullet
    Dahua HAC-HFW2401R-Z-IRE6 - 4MP Bullet Camera

    4MP external camera

OpenHAB v. 3

The current setup of my Home Automation system includes a number of sensors and actuators integrated in OpenHAB which represent the heart of the system. OpenHAB, in addition to managing the data acquisition with database persistence (InfluxDB - Time Series Database) and sending the action commands, allows its control and visualization through its MainUI, BasicUI and HabPanel user interfaces, as well as manages the automation rules, another important aspect of a Home Automation system, which cannot be ignored.

Actually my system manages:

  • complete control of 95% of the lights in the home and garden, with automatic management of night lights based on the intensity of sunlight.
  • the acquisition and monitoring of temperature data in the different rooms of the house and outside.
  • the acquisition and monitoring of the humidity data of the different rooms of the house.
  • the acquisition and monitoring of the GAS level in the kitchen, with relative management of alarm notification if a certain threshold is reached.
  • the acquisition and monitoring of home energy consumption and photovoltaic production, with relative management of alarm notification when a certain level of consumption is exceeded in order to avoid the automatic disconnection of the meter due to exceeding the contractual limit.
  • the control of the vacuum robot for automatic cleaning and maintenance monitoring, sending of the relative notification when interventions are necessary.
  • an automation rules set.
  • an alarm notifications set.