Close
0%
0%

Outdoor Hot tub monitoring

monitoring a spa/hot tub to prevent freezing and major leak

Similar projects worth following
I live in Quebec, and winter is really cold for many months. I have an outdoor hot tub which we use all year long. Issue is if something breaks in the hot tub, i.e. heater, or circulation pump, the water will start freezing, and considering the amount of piping the spa has, it could get very expensive very quickly (especially if you're gone for a week or so).

This is not a fancy deep dive hack, but something cheap, easy and quick to do, which could save me a few hundreds if not thousands of dollars.

I've used a raspberry pi zeri along with a temperature sensor (ds18b20) and a usb wifi dongle. The device reports back the temperature of the spa every 5 minutes to thingspeak, where alarm for low temperature or no incoming data are triggered, and notification if sent throughmaker.ifttt.com

That way I get an email when the temperature is lower than it should. I have not put the sensor in its final spot (which will be where the filter is) but I'm planning to use it as a water level too. If I put at the right spot, when the water gets lower (i.e. through evaporation or some leak), the temperature reported will be lower than expected (97-100F) and would trigger an alarm. So 2 checks with a single sensor.

I wrote a simple script reading the sensor file (1-wire sensor), script runs through the cronjob every 5 minutes and relay the info through wifi, to thingspeak. Result is the 2 charts below. In thingspeak, I've setup 2 "react", one for "no data for 30 minutes" in case the spa loses power, and one to check if temperature is lower than 95 for 15 minutes. In both cases, if threshold is met, a url is sent (through HTTPThing in thingspeak) to maker.ifttt.com. Ifttt.com takes the incoming url along with the data (current temperature) and sends an email which I could technically forward as a text message too I guess.

I've used the radio power supply (12v) with a regulator to power the raspberry, that should be sufficient. I may put the temperature sensor where the longnose's is (ozone injector), still not sure. It is just hanging on the side until I decide what I'll do.

I used a few scripts from the internet to create my own script. feel free to modify and copy whatever you want here.

I'll leave this running for a while, and i'm planning to add a few probes this summer. I have a ph probe for example. I'll also replicate this to monitor the pool, especially the ph and the salt level.

HOW TO:

required:

-raspbery pi

-sd card

-one wire sendor

setup raspbian (lite) on your sdcard

boot raspberry pi

enable ssh

setup wifi

apt-get upgrade

enable one wire  (https://pinout.xyz/pinout/1_wire) through /boot/config.txt

reboot

build the one wire dongle as shown in the pictures of this post

plug the one wire

copy the python templogger.py file from this to your raspberry pi

edit the templogger.py to add your own thingspeak key 

you have to edit the python to put your own device id

try manually the python "python templogger.py"

add a cronjob for the script to be called every 5 minutes

that's pretty much it. At this stage you have to configure thingspeak and IFFT.

py - 2.40 kB - 04/06/2016 at 15:38

Download

JPEG Image - 1.57 MB - 04/06/2016 at 15:25

Preview
Download

JPEG Image - 1.44 MB - 04/06/2016 at 15:25

Preview
Download

JPEG Image - 1.08 MB - 04/06/2016 at 15:25

Preview
Download

JPEG Image - 510.65 kB - 04/06/2016 at 15:25

Preview
Download

View all 8 files

  • 1 × raspberry pi zero
  • 1 × sd card
  • 1 × ds18b20 temperature sensor
  • 1 × resistor for the ds18b20
  • 1 × plastic box for the casing

View all 6 components

  • 1
    Step 1

    Here's what I did, i'll try to remember everything.

    -install raspbian on your sdcard, get the full release not the small one

    plug your raspberry pi zero with some power and your wifi usb dongle. configure your pi so you can access it through your laptop at home

    You can edit that file with nano by running sudo nano /boot/config.txt and then scrolling to the bottom and typing it there

    Copy Code

    1. dtoverlay=w1-gpio

    Then reboot with sudo reboot. When the Pi is back up and you're logged in again, type the commands you see below into a terminal window. When you are in the 'devices' directory, the directory starting '28-' may have a different name, so cd to the name of whatever directory is there.

    Copy Code

    1. sudo modprobe w1-gpio
    2. sudo modprobe w1-therm
    3. cd /sys/bus/w1/devices
    4. ls
    5. cd 28-xxxx (change this to match what serial number pops up)
    6. cat w1_slave

    -plus your ds18b20 to your raspberry pi using this guide:

    http://www.reuk.co.uk/DS18B20-Temperature-Sensor-with-Raspberry-Pi.htm

    I've used pins soldered to the raspberry pi so i can use it for other stuff if that does not work.

    -test you can reach the temperature by checking this file (through ssh, in your pi)

    ls -l /sys/bus/w1/devices/

    -mount your pi in some enclosure along with the regulator and the resistor for the sensor

    -install the setup in your hot tub and try connecting to it from your laptop. It was a challenge for me as the wifi signal was not strong outside (those wifi usb dongle are weak)

    -create an account on thingspeak.com and keep your api key.

    -Get the python script attached and put it in your pi. You will have edit the script to add your api key

    -add a cron job to run every 5 minutes to call the script

    -Test your script and check in thingspeak you get the data (see picture in the upload section of my project)

    -in thingspeak, create a "react" app to threshold on low temperature. you can create a second one for no data in case your pi loose power/signal.

    -create an account on www.ifttt.com and create a new channel. The rule you will create is from "MAker" channel to "send mail". You can to come up with a url that, when requested (GET), you'll get an email to notify you something is wrong. You can create 2 channels, one for low temp, one for no data.

    -in thingspeak, create 2 ThingHttp. Each will be to link your 2 "react" and trigger the GET request to send the email.

    test. voila!

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates