A home sensor with Arduino, InfluxDB and Grafana

TL;DR: it was fun to build great graphs. But the battery did not last long, air quality is difficult to track.

the woden box

Above, the box with plywood. Because I do not have a 3d printer, and I like wood.

Ingredients

For the sensor box

  • ESP 8826, WEMOS D1
  • LCD 20x16
  • Humidity sensor DHT11
  • Air quality sensor MQ9
  • Red and Green LEDs, corresponding resistors

For the outside sensor

  • Old pickes glass jar, and glue or silicon to seal it.
  • ESP 8826, WEMOS D1
  • 11B12 Temperature sensor
  • Batteries AA, rechargeable (because environment)

the server side

  • Nginx, with full encryption and authentication for the
  • InfluxDB, for storing the datapoints
  • Grafana

the result

Nice graphs were plotted:

Lessons learned

If you cannot know why is not working, its hardware

Battery life is hard

  1. Air quality measurement with MQ sensor was disappointing. Maybe have to spend a bit more, or just learn how to calibrate it.
Monte Carlo Method: Quasi vs. Pseudo-random
Although neural networks is taking the stage of AI these days, other approaches such as monte carlo methods are still relevant. In some cases, such as Alphago Zero, where a playing agent learns without any prior knowledge, neural network approaches are complemented with monte carlo simulation. When is random random... Read More
Spelling corrector in Erlang
Spelling correction is one of the coolest practical challenges in Information Retrieval. Since the famous article from Peter Norvig was published, many implementations were done. This article gave an insight of how practical problems - such simple spelling correction - are solved in Information Retrieval. Here is my contribute, in... Read More
Fixing Shellshock on ubuntu 12.10
Took a while to fix the shellshock vulnerability (did not have the kind of services that makes my host vulnerable). As is ubuntu 12.10, a simple apt-get update does not work: leonardo@pike:~$ x='() { :;}; echo ? VULNERABLE' bash -c : VULNERABLE leonardo@pike:~$ wget http://security.ubuntu.com/ubuntu/pool... Read More
Energy drink review: Black
A sweet vanila-powered drink of fast sugar-induced rush, must be drinked cold. Absense of citric aroma, but generous sugar content mildly tempered with shy herbal notes. The afterstaste is not impressive, but scales down well. Very faithful to the Polish tradition of energy drinks, but clearly not the top nectar... Read More
Quick and dirty location search tutorial
Some months ago, have been asked about how to generate a search result ordered by distance, without using spatial DB predicated. For a situation such as this, the steps are the following: Store the latitude and longitude in numeric fields in the table, something like this: create table poi(id... Read More