Hacker News new | ask | show | jobs
by tsyd 3248 days ago
Although not strictly a Raspberry Pi project, I have a couple C.H.I.P. boards[1] scattered throughout my apartment collecting temperature and humidity readings (using a HIH8120 sensor[2]) and feeding it to my Raspberry Pi which runs InfluxDB and Chronograf[3] to store and display a simple dashboard. The end result looks like this: http://i.imgur.com/cIrhSUq.png

[1]: https://getchip.com/

[2]: https://sensing.honeywell.com/HIH8120-021-001S-humidity-sens...

[3]: https://www.influxdata.com/time-series-platform/chronograf/

6 comments

What language did you end up using to access the sensors?

I've been ~hoping~ to use Go to access the GPIO pins, but haven't had much success - any suggestions?

I've used https://github.com/stianeikeland/go-rpio to control my garage doors and this library https://github.com/kidoman/embd has some more advanced features which I've used for a thermostat solution.
Thanks! I'll take a look! I have an AstroHat on my Pi and I think it should be straight forward-ish using one of these.
+1 for embd. I've used it with great success.
Check out https://periph.io/, which makes GPIO access easy :)
Thanks for the suggestion! Any affiliation :) ?
This is really cool! I've been thinking about a similar idea lately and this seems like a great way of doing it. Do you by chance have any material on how you got the honeywell sensor working with the C.H.I.P. board? (This would be my first electronics project)
This was my first electronics project as well and I chose the Honeywell sensor because it has decent humidity accuracy (which is what I was mostly interested in) and a bonus temperature sensor built in. It uses the I2C protocol for communication which I found pleasant to work with although it would probably be simpler to just use am analog voltage sensor.

Here's the program I wrote to read the sensor over I2C: https://gist.github.com/tsyd/f48e933a21fb40b9f9eea28118f54e0...

I'll most certainly be checking this out in the near future. Thanks!
I'm currently prototyping an alternate approach - using an nrf52 to send readings beacons, and then gathering those beacons with a raspberry pi

This has the added benefits of being able to be powered with a solar panel.

I love the C.H.I.P board, seems like they'd have better market penetration if their name wasn't "CHIP" though. I feel like the Particle IOT line has suffered a similarly hindrence?
I'm planning on doing pretty much the same thing. A couple of questions:

1. Why not just run InfluxDB and Chronograf on one of the CHIPs?

2. How are you sending data to the Pi?

> Why not just run InfluxDB and Chronograf on one of the CHIPs?

I started off with a single C.H.I.P. and ran everything on it but then when I added a second C.H.I.P. I wanted to have all the data in a central location. I also found Chronograf lag a lot when trying to browse more than a couple day's worth of data. The Raspberry Pi has much faster storage and CPU.

> How are you sending data to the Pi?

The C.H.I.P. has a Python script that runs on a cron that calls a C program to read the sensor and then sends it to the Pi using InfluxDB's HTTP API.

Interesting... But what do you do with this data?
I'm the same, I use some cheap ESP8266 devices which have a temperature/humidity sensor attached. They submit their measurements every minute to a central MQ installation:

https://steve.fi/Hardware/d1-temperature-humidity/

While I don't have any particular reason for collecting the data it can be fun to look at. For example you can easily spot when somebody has a shower because the humidity spikes in the bathroom:

https://twitter.com/Stolen_Souls/status/848444075296641025

Naively I expected to track the weather, because I figure on a hot day the temperature of my living-room/etc would spike. Turns out this house is pretty well insulated so the internal temperature has essentially no relationship to the external one. I guess that makes sense in a country where you might have -25'C in the winters.

Nothing in particular. I just wanted a way to view the temperature and humidity in my apartment when I'm out. Also I wanted to know what affects the humidity in my apartment and by how much (for example, you can see when I take my morning shower). In the future I may use the data to control a humidifier to turn it on whenever the humidity drops below a certain level.
Funny you mention humidity & showers. This is what I see when I take one:

https://twitter.com/Stolen_Souls/status/848444075296641025