-
1Step 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
- 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.
- sudo modprobe w1-gpio
- sudo modprobe w1-therm
- cd /sys/bus/w1/devices
- ls
- cd 28-xxxx (change this to match what serial number pops up)
- 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!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.