element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi Projects
  • Products
  • Raspberry Pi
  • Raspberry Pi Projects
  • More
  • Cancel
Raspberry Pi Projects
Blog Remote Home Monitoring with Raspberry Pi and Hologram Nova - Full Instructions
  • Blog
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: luislabmo
  • Date Created: 25 Apr 2018 11:49 PM Date Created
  • Views 8879 views
  • Likes 20 likes
  • Comments 9 comments
  • temperature reading
  • homeautomationch
  • remotemonitoringcontrolch
  • home automation
  • internet of things
  • hologram nova
  • ac current
  • raspberry pi
  • analog sensor
  • hologram
  • iot
  • luislab
  • questionofscalech
  • dashboard
  • raspberry_pi_projects
  • remote monitoring
  • current sensor
  • nova
Related
Recommended

Remote Home Monitoring with Raspberry Pi and Hologram Nova - Full Instructions

luislabmo
luislabmo
25 Apr 2018

The Remote Home Monitor will encourage you to upgrade your home to a smarter and more secure one, offering safety measures, protection, monitoring and key indicators for later improvement using the Nova Cellular USB Modem and a Raspberry Pi.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This project is not about just turning ON/OFF a light from a smart phone. It is focused on integrating a network of sensors, nicely presenting the data in a dashboard, monitoring and controlling all the features with a simple and friendly user interface, accessible from a web browser or a touch screen console at home.

 

This project was originally posted at Hackster.io where I was sponsored with a free kit to participate in a contest.

 

    • 1. How it works
      • 1.1. Advantages
      • 1.2. Features Included
      • 1.3. Dashboard
        • 1.3.1. Stove Widget
        • 1.3.2. Sump
        • 1.3.3. Temperature
    • 2. BOM
    • 3. Instructions
      • Step 1: Configure your raspberry Pi
      • Step 2: Build the hardware
        • Important things to consider
      • Step 3: Programming the Raspberry Pi
      • Step 4: Create a Route for the Dashboard data
      • Step 5: Deploy the Dashboard files
        • Dashboard
        • Webhook Receiver
        • Publish payload in JSON
      • Step 6: Prevent Basement Flooding (send an e-mail)
      • Step 7 (optional): Enjoy a Touch Display dashboard
    • 4. Other ideas to improve the Remote Home Monitor
    • 5. Source Code and Custom Parts

 

1. How it works

An array of sensors are connected to the Raspberry Pi, data is collected and stored in the cloud using the NOVA, the most recent data is re-routed to a Webhook that will help presenting the data nicely on a web page. Also, the system is capable of sending email alerts on critical events, like basement flooding risk.

{gallery:width=620,height=425,autoplay=false} Remote Home Monitoring

 

image

Remote Home Monitor: Hologram NOVA

image

Remote Home Monitor: Assembled components

image

Remote Home Monitor: Main components

image

Non-contact current sensor: Known also as split core current transformer

image

Remote Home Monitor: Components description

image

Remote Home Monitor: Other components

image

Stand for Touch Screen: 3d-printed stand for Raspberry Pi Touchscreen

 

1.1. Advantages

  • Low initial cost: each component or sensor can be made or bought for a low cost, avoiding the need of expensive "smart appliances".
  • Flexibility: nodes and sensors compatible with Arduino will work, and can be tuned to your needs. You are not limited only to the features I have provided. Also the web app can be easily expanded with more Widgets.
  • Reliability: with the Nova Cellular USB Modem and the Raspberry Pi paired together with a rechargeable battery implementation, an impressive up-time and an extra redundancy layer can be added making this a reliable and independent monitoring system when Internet is not working, during power outages and so on.
  • Low maintenance cost: data sent is lightweight and the frequency at which is triggered can be adjusted, which makes this inexpensive to maintain.

 

1.2. Features Included

The current implementation is very simple and tries to explain how easy it is to build a remote monitoring system like this.

 

The features included in this project:

  • Tracks the power consumption of your most important appliances like HVAC, Oven, etc. Implemented with a non-invasive current sensor attached to a power cord.
  • Monitors the stove status: using the same current sensor, have peace of mind knowing you didn't leave the stove ON.
  • Sump water level meter: water level is measured with an ultrasonic distance sensor (HC-SR05), measuring the distance between transceiver and the fluid. I used the same concept in my Smart Watering System project.
  • Sends an email alert when the Sump Water Level is critical.
  • Sensor's data can be monitored using a web browser -compatible with most web browsers-.
  • See all the sensor's data in a Touch DisplayTouch Display at home using Chromium web browser on the Raspberry Pi 3Raspberry Pi 3.
  • The web browser doesn't need to be refreshed to see the latest data in the Dashboard (this is acomplished using jQuery, Javascript and CSS)

 

1.3. Dashboard

Three simple widgets were designed for the dashboard which visually change depending on their status and were easily adapted using jQuery, JavaScript and CSS.

image

 

1.3.1. Stove Widget

Displays the apparent power consumption and the status of the Stove. When it is detected to be ON, the stove will be visualized a "little hot" with a status in red.

Stove OFF Stove ON

image

Stove OFF - Widget

image

Stove ON - Widget

Data for this widget is simulated with the CT sensor connected to a power cord connected to an appliance. Due to local regulations, I can't tap the stove or electric main panel.

 

1.3.2. Sump

Water level changes color according to its level. Also displays the status of the sump pump.

Sump - Low level Sump - Medium level

image

Sump widget - Low water level

image

Sump widget - Medium water level

Pump status (ON/OFF) is simulated in the circuit with a push-button.

 

1.3.3. Temperature

Displays the room temperature in °F and °C. Temperature color changes gradually from blue to red (cool to warm), also the thermometer will adjust its thread level according to the temperature.

Temperature Temperature

image

Temperature widget - Cool

image

Temperature widget - Warm

The temperature color change was accomplished changing the font-color with a function in JavaScript that does color mixing gradually.

 

2. BOM

  • Raspberry Pi 3 Model BRaspberry Pi 3 Model B or any other RPi.
  • Raspberry Pi Touch DisplayRaspberry Pi Touch Display
  • Hologram Nova
  • Hologram Global IoT SIM Card
  • Texas Instruments LM35 Precision Centigrade Temperature SensorTexas Instruments LM35 Precision Centigrade Temperature Sensor
  • Microchip MCP3008Microchip MCP3008 8-Channel 10-Bit ADC With SPI
  • HC-SR05 Ultrasonic Sensor or HC-SR04HC-SR04
  • SCT013 Non-invasive AC Current Sensor also known as a Split core current transformer
  • Push-button switch
  • Various resistors: 2k, 3.9k, 10k, 3.3k, 470k
  • Ceramic capacitor 0.01µF
  • Electrolitic capacitor 10µF
  • Jumper wiresJumper wires
  • BreadboardBreadboard

 

3. Instructions

Step 1: Configure your raspberry Pi

We'll assume that you already have a Raspberry Pi working and connected to the internet, so the first thing required is to update your software in Raspbian.

 

Open a terminal and run the following commands

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

 

Install the python Dev libraries

sudo apt-get install python-dev python-pip

 

Upgrade the GPIO and PIP libraries to the latest version

sudo pip install --upgrade RPi.GPIO
sudo pip install pip --upgrade

 

Install the Hologram SDK and make sure the NOVA works by following these instructions.

curl -L hologram.io/python-install | bash

 

Step 2: Build the hardware

Build the circuit as shown in the Fritzing diagram (attached in PDF too).

image

 

Important things to consider

  • For demo purposes, a Raspberry Pi 3 Model BRaspberry Pi 3 Model B was used with a touch display (optional).
  • the Red jumper wires in the diagram, represent the 5V connections.
  • the Orange jumper wires in the diagram represent the 3.3V connections.
  • There are two voltage dividers that will convert 5V outputs from the sensors to 3.3V.
    image
  • A 3.3k ohm resistor was used as a Burden Resistor in order to maximize the sensibility of the CT sensor.

The Burden Resistor value must be adjusted in relation to the maximum AC current value expected.

Step 3: Programming the Raspberry Pi

Paste the Python script (attaced) to a file home_monitor.py on your Raspberry Pi and make it executable

$ chmod +x home_monitor.py
$ ls -l home_monitor.py
-rwxr-xr-x 1 pi pi 8908 Jan  5 21:29 home_monitor.py

 

Test the script with variable DEBUG = 1 , it should print all the readings of the sensors without sending the data

sudo ./home_monitor.py

 

If everything is correct, the sensors' data is displayed in the console output, including the Payload that will be sent to the Hologram Cloud in JSON format.

image

We are now ready to send the data to the Hologram Cloud, first on the python script, change the debug variable to DEBUG = 0 and save the changes, plug in the NOVA, wait for the blinking lights and run the program again.

 

This time, the only output from the console should be a "Message sent successfully".

image

Data should now be visible in the Hologram console in JSON format:

image

 

{
  "dtUTC":"2018-01-09T00:47:37.235216Z",
  "iRMS":0.01,
  "apparentPower":1.21,
  "stoveStatus":"OFF",
  "sumpLevel":69,
  "sumpPump":"OFF",
  "tempC":25.0,
  "tempF":77.0
}

Step 4: Create a Route for the Dashboard data

A home monitor is not complete without a dashboard, right?. In that order, we'll use the Hologram Data Router, to re-send the data collected by the Hologram Cloud to a webhook that will keep the most recent data and will present it nicely using PHP, HTML, CSS and jQuery.

image

Create a new route, select Custom Webhook URL (Your Own App), select the topic power-usage, assign a ROUTE NICKNAME and a WEBHOOK KEY of your choice. Type the Destination URL where you plan to put the webhook receiver PHP <script attached>.

image

The topics can be personalized in the phyton script home_monitor.py by changing the parameters of the sendMessage function that sends the main JSON values:

response_code = hologram.sendMessage(json, topics = ["power-usage"])

With some minor adjustments to the webhook receiver PHP script, the Advanced Webhook Builder may also be used to send the data to be published in the dashboard.

Step 5: Deploy the Dashboard files

This may not be an easy step for some as this requires a PHP web server, but source files are provided anyway with enough documentation and instructions.

 

Dashboard

The home monitor dashboard displays the status of the different sensors connected to the Remote Home Monitor in a nice and friendly way. It gets the information published in JSON format using jQuery.

 

The dashboard code requires the Dashboard external CSS file. PHP is not mandatory for the dashboard to work -the php code could be removed-.

 

The address of the script that delivers the Hologram Payload in JSON format should be adjusted in case it is placed in a different path

$.get( "./publish_payload_json.php?t=t", function( data ) {

 

Webhook Receiver

Receives the webhook data from the Hologram Router and stores the payload in a .txt file in its original format.

 

Copy the same WEBHOOK KEY assigned to the route in the Hologram router to the $hologram_wh_Key variable in the PHP script.

image

 

$hologram_wh_Key = "webhookkey1234567890"; // Hologram Webhook key

 

Publish payload in JSON

Decodes Hologram payload previously saved in a .txt file and publishes it in JSON format. JSON data is later used by the Dashboard to present the data with jQuery.

 

Step 6: Prevent Basement Flooding (send an e-mail)

We don't want to let our basement flood right?. What if the Hologram Cloud sends an email when the sump water level is critical?, lets say 90% or more?. We will use this time the Hologram Email Data Router:

image

Create a new route, select Email, select or type the topic email-sump-level, fill in the ROUTE NICKNAME, SUBJECT and EMAIL RECIPIENTS of your choice, then type the following in the EMAIL MESSAGE field:

Sump water level is at <<decdata.sumpLevel>>%, sump pump is <<decdata.sumpPump>>

 

Things should look similar to the image below

image

 

If everything is working correctly, when the sump water level is 90% or more, the python script should show a message with the topic name:

email-sump-level: Message sent successfully

 

and we should see a message in the Hologram Message Console with the same topic name: email-sump-level and the email route triggered:

image

{
  "dtUTC":"2018-01-09T01:12:16.419195Z",
  "sumpLevel":92,
  "sumpPump":"OFF"
}

 

and an email from the Hologram Cloud:

image

 

The email topic can be personalized in the phyton script home_monitor.py by changing the parameters of the sendMessage function that sends the jsonEmail data

response_code = hologram.sendMessage(jsonEmail, topics = ["email-sump-level"])

 

Step 7 (optional): Enjoy a Touch Display dashboard

To enjoy the Remote Home Monitor Dashboard on a nice Touch DisplayTouch Display, Chromium web browser is required, since it is one of the few capable of handling the adjustments in the CSS styles I've used.

 

Select the Add / Remove Software

image

 

Then type "Chromium" in the search, once found, select it and click the OK button to proceed with the installation.

image

 

Once the Chromium web browser is installed, Create a shortcut in the desktop pointing to the Home Monitor Dashboard by creating a new text file called home_monitor.desktop in the /home/pi/Desktop/ directory.

 

It should contain the following (assign the correct web address to your dashboard):

[Desktop Entry]
Name=HomeMonitor Dashboard
TryExec=/usr/bin/x-www-browser
Exec=x-www-browser http://luislab.com/path/dashboard.php 
Icon=rpi
Terminal=false
Type=Application
Categories=Application;Network;
StartupNotify=true
Comment[en_US]=Remote Home Monitor with Hologram Nova

 

the shortcut should be visible in the desktop, and enjoy...

 

Live Dashboard Demo

 

{gallery:width=620,height=425} Dashboard in Chromium web browser

image

Dashboard: Remote Home Monitor Dashboard  in the Chromium web browser

image

Dashboard full screen: Remote Home Monitor Dashboard - chromium web browser (full screen)

 

4. Other ideas to improve the Remote Home Monitor

The Home Remote Monitoring could be expanded with many more features, here are some ideas:

  • Monitoring status of doors: find when your doors are open/close (main door, garage, back door) and send notifications in case of a security breach.
  • Home surveillance / Intruder alert: add cameras, motion detectors, vibration, noise and pressure sensors.
  • Water flow sensor: detect a water leak -very useful when not at home-.
  • Add more Sensors: smoke/fire, Carbon dioxide (CO2).
  • Video door bell.
  • Control relays/switches: to activate/deactivate blinds, fans, lights, home appliances, etc.
  • Control valves: to activate/deactivate the main water supply or an irrigation system.
  • Save/visualize important information -like he power consumption- this is very helpful analyze trends, to add automatic features and to save money.
  • Send Important alerts: via email, text message and other methods.

 

5. Source Code and Custom Parts

The source code, schematics and all supporting material required to replicate this project are attached, also, a description of each file is provided below.

 

{tabbedtable} Tab Label Tab Content
Schematic

Fritzing diagram in PDF format

 

remote_home_monitor_fritzing_diagram.pdf

Main python program

Main program for the Raspberry Pi. Gathers all sensors data and will publish the data collected to the Hologram Data Engine in JSON format using the Hologram Nova.

 

raspberry_main_python_program.py

Webhook receiver

PHP that receives the webhook data from the Hologram router and stores the payload in its original format (base64) in a in a .txt file.

 

webhook_receiver.php

Publish payload

PHP that decodes Hologram payload previously saved in a .txt file and publishes it in JSON format. JSON data is later loaded by the Remote Home Monitor dashboard with JQuery.

 

publish_payload_in_json.php

Dashboard

The home monitor dashboard displays the status of the different sensors connected to the Remote Home Monitor in a nice and friendly way using HTML/PHP.

 

remote_home_monitor_dashboard.php

Dashboard CSS

Dashboard External Style Sheet (CSS)

 

dashboard_external_css.css

Raspberry Pi 7" touchscreen Stand For my prototype, I used the Raspberry Pi 7" Touchscreen 60 degrees stand
Attachments:
remote_home_monitor_with_raspberry_pi.zip
  • Sign in to reply

Top Comments

  • genebren
    genebren over 7 years ago +2
    Interesting project. When I moved into my present home there was a security system in place, but not in operation. I was thinking that I might want to build my own controller (making use of the existing…
  • genebren
    genebren over 7 years ago in reply to luislabmo +2
    Thanks luislabmo ! I will keep you in mind if this task bubbles up to the top of my 'to do' list. Thanks again, Gene
  • three-phase
    three-phase over 7 years ago +2
    Cool project, very clean professional looking user interface. Thanks for posting. Kind regards
  • colporteur
    colporteur over 6 years ago

    G'Day,

    As a former IT security specialist "stored in the cloud" initiatives give me cause for concern. Who has access to the data? How secure is the data? are two of many questions I ask. A security audit of any initiative would review these two questions as well as a host of others. What criteria to providers to ensure the data is protected?

     

    As a technology thriller fiction reader, I have a over heightened sense of the possible. A company having access to data, that is an indicator of occupancy, is not a problem if access to the data is secure.

     

    I enjoyed the read. Thank you for posting.

     

    Sean

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • varndizzle125
    varndizzle125 over 6 years ago

    I am looking for a baseline to create an environmental controller for use in hydroponics.

    Hoping you might be able to help me integrate sensors such at temp, humidity, PH, EC, water level, and soil moisture level and display them each on a dashboard.
    Would this project work for this function?

    Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • luislabmo
    luislabmo over 6 years ago in reply to dixonselvan

    Thank you dixonselvan!. Let me know if I could be of any help.

     

    Luis

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dixonselvan
    dixonselvan over 6 years ago

    Very nice project luislabmo I can't wait to make one like this for me!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • luislabmo
    luislabmo over 7 years ago in reply to three-phase

    Thank you three-phase

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube