top | item 10632262

(no title)

kgs42 | 10 years ago

Hi, maybe not entirely relevant for this topic - but maybe you guys have any idea how to build and cheap system which will gather temperature wireleslly to one place. Ideally I'd like to have 2 sensors (one inside and other outside, with own batteries) which will send data to some central device.

I have home server on MacMini - so WiFi could be option. Any ideas?

I've always wanted to build something like this which - but always ended calculations that are rather expensive and devices are relatively big.

discuss

order

cuonic|10 years ago

Hi kgs42,

I've actually created such a setup, I have 3 battery powered temperature sensors built on Arduino Pro Minis, they all communicate with a central RPi node via NRF24L01 transceivers, and the node then sends the different temperatures to a server via GSM. The sensors are pretty cheap to make, and if you put them in a sealed box they last for months without recharging the batteries (Currently 7 month battery life on 4 x AA batteries)

Here is some of the sensor code: https://github.com/cuonic/Arduino-NRF24L01-Thermometer

gedrap|10 years ago

How about running a http server on the mac exposing restful api, and using something like ESP8266 + temperature sensor, sending basic http requests to the server every minute or so? Should be much cheaper than arduino.

kgs42|10 years ago

but I have to connect ESP8266 to something (Arduino?) or is it standalone device?

kbouck|10 years ago

I am doing something similar to this. My setup includes multiple temperature sensors in addition to a Raspberry Pi thermostat which controls my heating system. The thermostat also acts as a HomeKit server, and so can be controlled using Siri - which is really just a fun party trick more than anything else.

(I know Nest and Ecobee can probably do all of this out of box -- my reasons for building this were just to tinker and learn)

Here's what I use:

Sensors:

Since these are likely to run on batteries, you'll need to choose a platform with allows for low enough power consumption that you aren't draining the batteries too quickly. This is suitable for the microcontroller-based options (Arduino, ESP8266, NodeMCU, Particle), but not for R-Pi (due to too-high power consumption). In addition to the platform, your code will also need to take advantage of power saving opportunities, like going to sleep and disabling battery-draining radio services like WiFi, waking up periodically to take a measurement, enable WiFi and emit the metric before going back to sleep.

For my temperature sensors, I chose to the $19 Particle Photon [1] for the following features:

  - Built-in WiFi
  - Built-in REST API (goes through Particle's cloud REST API)
  - Add a temperature sensor like TMP36 [2] to it and your sensor hardware is done.
Thermostat:

For this I use a Raspberry Pi (plugged into wall power) + a relay breakout board to interface with my heating system. My thermostat needs to periodically do things like access google calendar, keep a log of temperature data, to run a HomeKit server [3] [4], and to be ever-ready to respond to REST requests from the internet (eg. IFTTT). So, it's more like a real server, for which RPi was much more appropriate.

Data Storage:

Many options here. Take a look at Phant [5] from SparkFun form something quick and simple.

[1] https://store.particle.io/collections/photon

[2] https://www.sparkfun.com/products/10988

[3] https://github.com/KhaosT/HAP-NodeJS

[4] https://github.com/nfarina/homebridge

[5] https://learn.sparkfun.com/tutorials/pushing-data-to-dataspa...