At the fully Charged live event at Silverstone earlier this month we stopped by the open energy monitor mean a chat with Glyn Hudson (check out the NIEVO video below for a taste of the show).

Glyn’s smart home configuration is based around the emonPi and employs MQTT, nodeRED, OpenHAB, LightwaveRF and Google Home.

Over to Glyn for all the good stuff…

I believe automation can play an useful role in assisting to reduce energy consumption. For example being able to control my home central heating system remotely enables me to only turn on the heating when it’s required and not have it running on a set schedule when the house is empty.

As previously mentioned in a blog post, the emonPi (running emonSD pre-built SD card) can function as a powerful home automation hub. Utilising the emonPi as a home automation hub is a good fit for a number of reasons:

It’s already running 24/7 for energy monitoring

It’s optimised for robust long term operation: the root Raspberry Pi file-system is read-only to increase SD card lifespan

It’s already connected to your local network

It’s running Debian Raspbian Jessie therefore installing extra bundles is easy and lots of support is available

Raspberry Pi 3 has plenty of space capacity

Extra radios / accessories can be connected via USB

It’s already running an MQTT server

emonSD pre-built SD card comes pre packed with the following integrations nodeRED, OpenHAB and LightWaveRF

In this post I want to share with you how I use the emonPi in my own home.

Here is a video demo using Google home to control my central heating and gadgets via MQTT:

Read on to learn how this is achieved using an emonPi and open-source software…

There are many many options when it comes to home automation and control. Where possible I prefer open-source solutions which do not depend on any third-party services. All the software services for my home system as I describe in this post runs locally on my emonPi and apart from Google home voice integration does not require an Internet connection to function. A self-hosted open-source solution has the added benefit of increased privacy and security which you are in fully in control of.

MQTT

MQTT lightweight communication protocol is used as the ‘glue’ communication layer between all the following services. See technical/MQTT section of the user guide for more info about how MQTT works on the emonPi.

Energy Monitoring

Emoncms…obviously!

Recently I have been loving using the V2 Emoncms Android app (currently in beta) which supports multiple pages (see forum thread).

Video demo Emoncms Android app V2 beta:

I have also recently enjoyed using the redesigned Emoncms apps module which have just bee released on Emoncms.org. It’s now possible to have more than one MyElectric or MySolarPV ‘app’ per Emoncms account and economy 7 split time of use tariffs are now supported (see forum thread):

Control

Ústredné kúrenie

To control my gas central heating boiler I use an MQTT WiFi relay which also has a developed in thermostat and scheduler, although I don’t use these features, I just control directly via MQTT. The WiFi Relay has been very reliable, it’s been used daily for the past two years in my home and never once required a reboot.

Plug sockets (lights)

I use LightWave RF plugs to which I have lights and other entertainment gadgets connected e.g. stereo and chromecast. being able to switch a whole plug bank on/off has the advantage of being able to turn gadgets fully off when not in use to minimise any vampire drain.

The emonPi can control LightWave RF gadgets directly via MQTT if an RF OOk modules is fitted. See LightWave RF emonPi user Guide.

LightWave RF gadgets are not perfect, the OOK RF protocol is simplistic, unsecure, occasionally unreliable and state feedback is not available. I am considering swithcing to ESp8266 based Sonoff plug with third party MQTT firmware or EmonESP firmware.

Rozhranie

For the past few years I have been using OpenHAB as the control interface. OpenHAB is pre-loaded onto the emonPi emonSD pre-built image. I am yet to upgrade to OpenHAB V2.0, it looks very nice. However, V1.8 has been very reputable and fits my needs. I use the OpenHAB Android app to access the interface quickly from my phone:

OpenHAB also integrates with my Pebble smartwatch which makes it super easy to turn on/off the heating while out and about:

A while back (early 2016) I dabbled with HomeAssistant, (see blog post). I was quite impressed, I have been following the project and it looks like it’s matured to be an excellent home automation platform. quit possibly a rival to OpenHAB.

Another option for an interface is NodeRED dashboard which is now officially part of the NodeRED project.

The beauty of MQTT is that it’s platform agnostic, it’s possible to have many different interfaces controlling the same control nodes.

Hlasové rozhranie

I’ve recentlyZískal reproduktor spustený hlasom Google Home, s malou pomocou spoločnosti Ha-Bridge, aby napodobňoval most Philips Hue Bridge, je celkom ľahké dostať spoločnosť Google domov na ovládanie miestnych gadgetov prostredníctvom MQTT. Rovnaká konfigurácia bude fungovať aj s Amazon Echo. Pozri Ha-Bridge Configuration Guide pre EMONPI.

Pozrite si ukážku videa v hornej časti tohto príspevku.

Konfigurácia zariadenia Používa webovú stránku HA-Bridge GUI:

Nastavenie aplikácie Google Home App:

Integrácia

Používam Nodered, ktorý je vopred zaťažený na EMONPI / EMONSD na integráciu s inými službami, ako je získanie najnovšej vonkajšej teploty z počasia podzemí, posielajte push upozornenia (vykurovanie teploty zapnutia / vypnutia) do môjho telefónu pomocou Pushover. Obidve tieto služby majú vopred vyrobené noderované toky, vďaka ktorým je integrácia veľmi jednoduchá. Nodered je predinštalovaný a nakonfigurovaný na EMONPI / EMONSD. Príklad prietoku zahrnutý do EMONPI demonštruje čítanie údajov EMONTH z údajov MQTT a externé údaje o teplote z počasia v podzemí.

Mám tiež noderovaný tok, ktorý spracováva vypnutie vykurovania, keď teplota v obývacej izbe (podľa Emonth) dosiahne stanovený bod. Mohol som na to použiť regulátor termostatu na relé WiFi, bolo by však v mojom dome ťažké spustiť snímač káblového teploty z relé WiFi do obývacej izby, preto namiesto toho používam bezdrôtovú teplotu Emonth.

Bezpečnosť a vzdialený prístup

Diaľkové ovládanie (zvonku miestnej siete) sa dá dosiahnuť pomocou dynamickej služby DNS, ako sú DuckDNS alebo Secure VPN, aby poskytli prístup k službám zvonka. Napr. Otvorím port 8080, aby som umožnil prístup k Openhabu bežiacemu na mojom emonpi z internetu. OpenHab má zapnutú autentifikáciu a HTTP je možné použiť na vytvorenie bezpečného pripojenia.

Alternatívne a možno lepším riešením by mohlo byť použitie služby myopenhab.org, ktorá umožňuje diaľkové ovládanie bez toho, aby ste museli externe otvoriť port.

Domáci asistent má príklad využívania služieb Tor Tor na prístup k domácemu asistentovi v prevádzke lokálne.

Navštívte OpenEnergyMonitor.org

Reprodukované z pôvodného blogového príspevku podľa láskavého súhlasu spoločnosti Glyn Hudson.

Zdieľajte toto:
Facebook
Twarch
Redit
Linkedin
Pinterest
E -mail
Viac

Whatsapp
Tlač

Skype
Tumblr

Telegram
Vreckovka

Leave a comment

Your email address will not be published.