Sunday, September 29, 2019

IoT House Monitor


In the fall of 2018 I developed an initial prototype of an IoT House Monitor using Particle boards, the Particle platform and ThingSpeak.  The goal was to prototype a device that would monitor temperature and humidity and publish the data for remote monitoring.

See Adventures in IOT - Particle Photon for more information on the Particle Photon and Particle Platform.


Hardware

The prototype was built using a Particle Argon so that if the house to be monitored didn’t have Internet connectivity a Particle Boron could be swapped for the Argon and the setup would be able to communicate using cellular rather than wifi.

A BME280 sensor was used for temperature and humidity, information was locally displayed using a 0.96" I2C IIC SPI Serial 128X64 OLED LCD Display and for local input a 1 x 4 membrane keypad was added.  A lipo battery was added so that the device could operate for a time without external power.

Software

The Particle platform along with excellent libraries from Adafruit for the BME280 and the OLED display made it extremely easy to integrate the individual components into a working prototype.  In addition to the Adafruit libraries I included the clickButton library.

The code for the prototype is on Github.

Cloud Services

Once the data has been transmitted into the Particle Cloud I used a webhook to send the data over to Thingspeak.  Thingspeak has a nice clean simple to use interface and a free tier for small non-commercial projects that allows messages every 15 seconds which was more than enough for my prototype.

On the Particle end the webhook integration was configured as shown below:


Then on the Thingspeak end widgets were configured to create the following Then on the Thingspeak end widgets were configured to create the following:

ThingSpeak

After creating a ThingSpeak account you start by setting up a channel.  For this channel I used the following:


You then customize the resulting web page by editing the charts, removing charts or by adding visualizations.  Below are the settings for the Temperature chart.



At this point you should have a pretty nice dashboard to monitor the temperature and humidity.