
Internet of Things Temperature and Humidity Monitor - robputt796
https://www.robertputt.co.uk/2016/11/29/internet-of-things-temperature-humidity-monitor/
======
Animats
That's amusing. Everything has to be "cloud" oriented. This is a simple
temperature and humidity sensor which requires a web server to which it can
report. It can't talk to a local machine, unless it has a local DNS name and
routing. How did we manage to screw up networking so bad that you can't talk
to a local machine easily?

~~~
joezydeco
How would you suggest getting that information (say, a fixed IP address and
gateway) into a part that has no user interface and no removable storage? How
about after deployment?

~~~
laichzeit0
Isn't the usual approach for these things to not use IP or wireless at all,
but some other simple serial protocol like ZigBee and have them talk to a
gateway "controller" that's connected to the outside world? The last time I
played with wireless sensor networks that's how it worked, and they can
actually form their own mesh network.

~~~
jordz
That's still the case indeed.

------
sprobertson
Has anyone had luck with a battery powered ESP8266? I built one of these
temperature loggers and gave it 3xAA but it never lasts more than 2 weeks,
while "real" things (SmartThings sensors) last months on a single smaller
battery. I'm a beginner in EE but I'd like to know what's possible to stretch
the juice.

So far I have it sleep between every 15m measurement which brought it up from
three days of battery life.

~~~
emilburzo
> I built one of these temperature loggers and gave it 3xAA but it never lasts
> more than 2 weeks

For comparison purposes, I just changed the 3 x AA batteries on my outside
sensor[1], the batteries lasted for 13 months (again, in outside conditions,
including a very harsh winter).

I'm planning to write a post one of these days, but the gist of it is:

\- attiny84 (don't even think about using an Arduino)

\- DHT22 sensor (looking into SHT7x for better accuracy, but they're expensive
as hell)

\- TX module (I went with 433MHz because of better penetration)

I made 4 of these sensors, powered by batteries, so I can put them anywhere
(within range, of course).

They send the reading every 4..7 x 8 seconds[2], both to keep the frequency
clear (as required by law, I think it was 95% of the time) and as a poor man's
anti packet collision.

They all report to a master RX, which is connected via USB to my server (which
is always on anyway).

A small parser reads from serial USB and saves it in Mongo.

From there I can see the data in a simple webapp[3].

Oh yeah, and as a bonus, I made another thing that intercepts the outside
sensor and display it on a 7 segment display[4], which looks really cool (plus
I don't have to open the web page to see what's it like outside)

[1]
[https://twitter.com/emilburzo/status/799886284730892288](https://twitter.com/emilburzo/status/799886284730892288)

[2] [https://github.com/ambient-
monitoring/node/blob/master/node....](https://github.com/ambient-
monitoring/node/blob/master/node.ino#L130)

[3] [http://ambient.emilburzo.com/](http://ambient.emilburzo.com/)

[4]
[https://www.flickr.com/photos/eaglex/30242342623/in/datepost...](https://www.flickr.com/photos/eaglex/30242342623/in/dateposted-
public/)

~~~
z2210558
It's not just the DHT22's accuracy that's a problem, it's the calibration.

I have 8 of these, and they are up to 30%RH off - both in terms of their
readings relative to each other, and relative to the true RH of a saturated
salt solution[1]. Moreover, some of them have a strange "stickiness" to
certain levels.

I've heard good things about the BME280, and that's what I intend to replace
my DHTs with.

[1] See e.g.
[http://www.omega.com/temperature/Z/pdf/z103.pdf](http://www.omega.com/temperature/Z/pdf/z103.pdf)

~~~
gh02t
Same, I had a lot of trouble with the DHT22 calibration, for temperature as
well. And it was nonlinear, so I couldn't just add a correction. I switched to
a mix of BME280, Si7021 and DS18B20s. Si7021 is pretty similar to the DHT22 in
terms of nominal specs, but it's much better and cheaper.

[http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.ht...](http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.html)
does a pretty comprehensive review.

------
JshWright
If you're interested in playing with the ESP8266, I would really recommend the
D1 mini, by Wemos. It's an ESP8266 breakout, with a 5v regulator, a USB
programmer, and a micro-USB port built in (in a very small package). They also
make 'shields' that will plug directly into the headers, with a variety of
functionality (including the sensor used in this build).

[https://www.wemos.cc/](https://www.wemos.cc/)

(I'm not affiliated in any way, just my go-to product for DIY IoT stuff)

------
icoder
Cool project! I recently did roughly the same, publishing to the MQTT server
on my Raspberry Pi, which will be the 'backbone' of my home automation system.
It's insane how cheap you can get these parts off Ali Express and the likes.

I powered it from a programmer for now sticking out of a powered USB HUB
(probably not so wise!), but ordered a few sub-dollar 'power' modules to try
out as well.

------
stinos
I think this could be done using MicroPython as well (e.g.
[https://github.com/micropython/micropython/tree/master/esp82...](https://github.com/micropython/micropython/tree/master/esp8266)).
Should be the same functionally, but using Python 3 instead of Lua.

------
nicois
Are there any recommendations for combining these sorts of sensors with long-
range radios (e.g. HC12) and building a mesh network? Power consumption is
less critical an issue as usually a small solar panel can provide topups. I am
tempted to use micropython and effectively write my own mesh protocol but I'd
hate to be reinventing the wheel.

~~~
mianos
[https://www.pycom.io/solutions/py-
boards/lopy/](https://www.pycom.io/solutions/py-boards/lopy/) Lora, works for
kilometers. Micropython, easy sensors (supports the DHT out of the box).

