
Arduino-Based Home Weather Station on the Elastic Stack - bryanrasmussen
https://www.elastic.co/blog/arduino-based-home-weather-station-on-the-elastic-stack?ultron=aug-2016&blade=newsletter&hulk=email&mkt_tok=eyJpIjoiWlRVMFpHTmhNVGt3WVRBMiIsInQiOiJNTStwaXZqVFkxQk9GWit5XC9kUTZldmN1N0VFSFwvV0RoMXpldlR3MmR2Qkc0aXdrNTRHM0lCOVlZNHp6ZkJxbWJrN2dCSWt0SzNXNVN6anRZMm1vYjFEMXpVdzltZGlpXC9JN2l2RDBYRjZyTT0ifQ%3D%3D
======
cstuder
The BMP180 temperature sensor sports a +-2°C temperature accuracy.

That's too much for my sensibilities.

The DHT22's accuracy is +-0.5°.

Does anybody know of more accurate sensors (+-0.1°) suitable for usage wit the
ESP8266?

~~~
gh02t
Accuracy is not as important as precision though. For accuracy, you can
usually just calibrate it out against a known reference (you usually need to
do this anyway to get consistent results across multiple sensors). The only
case when you can't is nonlinear accuracy, which is rare but I've seen it with
the DHT22 actually.

Precision (stability of measurements) is what you really care about. That
said, the BMP180 isn't so great at that either. The temperature sensor is I
think a secondary function used to improve the pressure estimate. It doesn't
give very stable temperature estimates in my experience.

If you want a direct replacement for the DHT22 (and I did, god I hate that
module for a variety of reasons) the HTU21D-F is great. The BME280 is also a
big improvement over the BMP180. If you just care about temperature, the
DS18B20 is the way to go on performance and price, while if you really want
high accuracy and precision then the MCP9808 is the way to go. I use the
MCP9808 as my reference to calibrate against, with a mixture of the other
three in various applications.

~~~
perch56
You seem to have experimented with some sensors. I was wondering what would be
your top choices of sensors for someone learning hardware hacking with
Arduino/Raspberry Pi(not only temperature measurements). Thank you very much.

~~~
gh02t
Well, my favorites are:

* DS18B20 - One-wire temperature sensor that is cheap

* Generic PIR (motion) sensors - you can find simple motion sensor boards for cheap and they are pretty fun.

* Capacitive sensors - you can make a touch sensor/button out of anything conductive that only uses a single wire (not even ground, just one wire)

* Ultrasonic distance detectors

* Hall effect sensors - detect presence of a magnet, especially useful with stepper motors

* BME280 - temperature/barometric pressure/humidity, one of the best all around sensors for weather monitoring as it's all on one chip. Also supports both i2c and SPI. Note it's BM _E_ 280, the BMP280 doesn't support humidity.

A good bet is to buy a kit that gives you a random bunch of sensors to play
with. You can find them cheap.

------
uberneo
Nice weekend project -- How often you are sending data to Elasticsearch and
how does Kibana is polling the Elastic?

Another good combination would be Influxdb + chronograf

[https://influxdata.com/time-series-
platform/chronograf/](https://influxdata.com/time-series-platform/chronograf/)

~~~
MasterScrat
Or rather InfluxDB + Grafana.

Grafana is more mature and Chronograf is closed-source, I don't see any reason
to go with it.

But yes if you want to display time series there are better options than
Kibana, which has a focus on searchable documents.

~~~
coredog64
Elastic.co is trying to get into that business. A time series datapoint is
just a very small document, and they're churning out agents that collect and
ship it.

I'm not entirely sold on the idea, as their examples for turning metrics into
actionable insights are a lot more complex than they are for Grafana (or
similar).

------
linker3000
It seems reasonable to point out that there is no 'Arduino' involved here -
it's an ESP8266-based board programmed using the Arduino IDE with the ESP-8266
board support package installed.

------
uberneo
Its a pure Time Series data with sensor is recording approx every 1 sec. Which
protocol you are using to send this data to server , as posting every 1 sec
oever TCP for a sensor doesn't seems a good idea. For any IoT which protocol
you guys prefer to push data to server

~~~
izak30
It all depends what you're doing. For a weather station you could do very well
and have very low power at one reading per minute. HTTP is great for that.

Also your approximation is off. I'm under 200ms (closer to 110) per insert,
end to end. That's before any optimizations.

------
whatwasmypwd
Should you rely on es as your primary db?

~~~
swsieber
No, not for writing. It's never safe. It will eventually eat your data.

But for reading it's fine. So by all means, you can populate from a main data
store that you never otherwise touch.

Then again, if you're running just a single instance on really small data...
What could go wrong?

Edit: Again, small stuff, locally, it's probably fine. But ElasticSearch
wasn't really built to be a primary data store.

Sources:

[https://aphyr.com/posts/332-jepsen-crate-0-54-9-version-
dive...](https://aphyr.com/posts/332-jepsen-crate-0-54-9-version-divergence)
(This has links to other good sources, right in the beginning).

[https://news.ycombinator.com/item?id=11325316](https://news.ycombinator.com/item?id=11325316)

[https://news.ycombinator.com/item?id=11362069](https://news.ycombinator.com/item?id=11362069)

~~~
bryanrasmussen
yeah, I agree if your requirements is data consistency then not Elasticsearch,
however I think from the Jepsen tests I don't think there has been any NoSQL
db that performs really good on that? ( I seem to remember there was one that
did bad on the first test but improved a lot with the second - SOLR, CouchDB?)

~~~
earleybird
you're thinking of RethinkDB [https://aphyr.com/posts/329-jepsen-
rethinkdb-2-1-5](https://aphyr.com/posts/329-jepsen-rethinkdb-2-1-5)

~~~
bryanrasmussen
Thanks! I knew someone would have either a better memory than me or the
willingness to actually go to
[http://jepsen.io/analyses.html](http://jepsen.io/analyses.html) and figure
out which one it was! And now that I went I see both the ones I thought it
might be haven't even ever been done!

I need to run a Jepsen test on my brain.

