/poolmonitor

Django project to monitor pool temperature with Raspberry Pi and integrate with SmartThings

Primary LanguagePython

Pool Monitor

Originally developed as a django website hosted locally, now simply reports temperatures to www.initialstate.com

Requirements

  1. Sensors as described in next section
  2. RaspberryPi compatible with sensor
  3. initialstate.com account, and api key

Purchase List

  1. Large Plastic Project Enclosure - Weatherproof with Clear Top
  2. Adafruit Assembled Pi Cobbler Breakout + Cable for Raspberry Pi Adafruit Assembled Pi Cobbler Breakout + Cable for Raspberry Pi - Model B
  3. Half-size breadboard Half-size breadboard
  4. Premium Male/Male Jumper Wires - 40 x 3 Premium Male/Male Jumper Wires - 40 x 3" (75mm)
  5. Waterproof DS18B20 Digital temperature sensor + extras Waterproof DS18B20 Digital temperature sensor + extras

And of course a raspberryPi (B to work with Pi Cobbler) and heatsink(s)

  1. Raspberry Pi Model B
  2. Aluminum Heatsink set for Raspberry Pi

Sensor Install/Configure

This should be used as a general overview of adding the water proof temperature sensor: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/overview

Physical Install

You should have a water tight box if your RaspberryPi will sit outside. I opted for a clear top to show of my nerd skills to other nerds. The case will need 2 holes: 1 for power (microUSB) and one for the sensor wire.

Case Holes 1 Case Holes 2

These holes will need to be sealed with caulk/silicon to prevent water from getting in. Similar to a fish tank, its a good idea to have a dip in your line to prevent water running down the line and dripping in to the case.

caulk

My first attempt looked nice, but heat generated by the rPi (especially running django), plus sunlight ended up baking it.

deployed deployed 2

With my second attempt, I placed a paper towel in there under the pi to catch any water that may get in, hopefully before it gets to the rPi. I also, placed tin foil over the top, as well as add rPi heat sinks, to prevent the temperature from getting too hot.

tinfoil tinfoil unwrapped

I dropped my sensor in about a foot, in the shallow end, near the jets. This should be low enough to avoid surface temperature fluctuation, yet high enough to avoid getting eatten by the vaccum stingray.

![sensor](https://github.com/h00die/poolmonitor/blob/master/docs/submerged sensor.png)

Initial State

Originally I developed a Django powered website to handle the data, and show graphs. Then I learned of initialstate.com which did all of what I wanted, and much more in an easier fashion. Since then, I've contacted support on a Saturday at 3pm EST. The Founder/CEO of the company responded in ~15min with lots of good helpful (technical) answers. What better do you want from a company? One thing to keep in mind, is that the ISStreamer library queues 10 events by default, so if you want your data to show up immediately, make sure to change this or flush the queue as per the instructions if you want to ensure the visualization is as real-time as possible.

Example Data

Initial State has quite a few different views, and works with Samsung SmartThings, but just a quick view of what one week or so of data for my pool looks like

Initial State