Pool Temperature Monitoring

I saw this thread here - Reddit HASS Thread

Did some digging after reading it - and saw this Tweet around a solar battery pack and esp8266 - ESP8266 Battery Pack Tweet

I’m curious - could I use an esp8266, a solar battery pack and the DS18B20 to monitor temp of the pool in HASS?

I’ve never used an esp8266 before - so I’m not sure how to pull this all together, but it seems very workable. Could someone help put me on a track?

Thanks for any help!

My guess is that a cheap LiPo with 3.7 V could works as well if you use Deep sleep. The fastest way from my point of view.

  • Put micropython on your ESP8266
  • Create a boot.py script with your wireless setting
  • Put the code for your DS18B20 in main.py and publish your data with MQTT
  • Add Deep sleep
  • Create a MQTT sensor for Home Assistant
1 Like

@fabaff - thanks for those pieces of info - how would I know the LIPO would need recharging or would you go solar on that part? Or just by watching the sensor in HASS not changing or updating?

Sure, at some point in time the battery needs to be charged. With a solar panel you would be completely independent.

2 Likes

@fabaff -

I wonder if something like this would work - ADAFRUIT - USB LiIon/LiPoly charger - v1.2

In as similar thread a week or so ago, someone reported a temperature reporting node with a ESP8266 lasted about a month on 3 AA batteries.

Using a charger at the same time as draining batteries is complex. There are a few threads out there in the ESP8266 forums about doing this (unfortunately I can’t find them), but it is not a matter of connecting it all up directly.

Something using MySensors or a 433MHz Radio would last longer on batteries, but you would need to build a receiver as well, which is where using the ESP8266 has an advantage.

1 Like

@gpbenton - thanks for the heads up on that. I just wonder if one of those solar powered battery banks would do the trick like the tweet showed?

One of my biggest concerns is the heat on the ESP8266 and the solar battery pack in the summer. Don’t know how it would all hold up.

Let me share my experience with temperature (air, not water) monitoring. I’ve used a ds18b20 hooked up to an 3.3V arduino pro mini and using a NRF24L01 for sending the data to a Raspberry PI every 10 minutes or so. I’ve been running these sensors for over a year on 4xAA batteries and last I checked the voltage was 5.9V (at the start it was about 6.4V), so if this usage persists the sensors would last for at least 2 years, before requiring new batteries. Theoretically the sensors should stop working when the battery pack starts giving off less than 3.3V.

As a comparison when using a 5V arduino nano, with the same code, the batteries drained in 2 months!

Using 433MHz is also an option, but decent 433MHz tranceivers are very pricey (RFXTRX, etc).

1 Like

@kirichkov - thanks for sharing the experience! I’ve not used a ESP8266 - but are you suggesting it should be about the same voltage wise as your NRF24L01 ? If so - then I think I can handle something like that in terms of length.

Thanks again!

Indeed both the ESP8266 and the NRF24L01 are 3.3V, but their power draw is not the same. Furthermore the NRF24L01 just sends out the data without trying to associate to an access point, while the ESP8266 will have to associate on each wake up so it’ll be devouring the battery’s energy a lot quicker. I did attempt to make an ESP-based ds18b20 thermometer, but I never got to properly flash the ESP and I eventually gave up. I’ve seen reports that such sensors would last about a week on a 4 AA pack, so having them constantly powered is considered a must.

@kirichkov - thanks - that helps a lot!

From the discussion I guess you want to locate the ESP8266 close by the pool but I don’t think that is necessary. This probe https://www.adafruit.com/product/381 will work at considerable distance from the measurement device. The ESP Easy firmware for the 8266 will do all the work and put the temperature in an MQTT server so you could easily locate the 8266 somewhere that you could provide power and run a long CAT 5 (3) cable to connect the probe. I’m planning to do exactly this with a SONOFF to control the pool pump. The Sonoff TH16 has the capability for the probe AND can switch 16A.

1 Like

@rjstott - ok, thats even better, had no idea that probe could be used at distance. I have power within 10’ of pool, so that should work.

Thanks for the input!

That was my reddit thread, and I have those probes on order from aliexpress. As soon as those show up along with my esp8266, I plan to have the esp8266 in the house and run a cable out to the pool.I look forward to further conversation on this to get it set up properly, I have never used these nodemcu/wemos devices before, it should be interesting.

1 Like

Off topic but related, using this :


Could I have the display show a variety of specific info from home assistant? Ie. Pool temp, outside temp, etc
1 Like

If you are considering using the probe remotely http://www.sheepwalkelectronics.co.uk/index.php?cPath=23 have some hardware for using RJ45 plugs/sockets (and CAT5) cable to make connection plug/play AND you can connect multiple probes in parallel (because of the ‘one-wire’ bus) if this is helpful. You would need software modification to the standard probe library for probe addressing but this has {obviously} been done before. Also you might find additional information on the emoncms site http://www.sheepwalkelectronics.co.uk/index.php?cPath=23.

For a really simple display solution you could consider Node-Red Dashboard (which is pre-installed on a Raspberry Pi) and a cheap tablet such as an Amazon Fire using the browser only. There is quite a lot of information around about using Node-Red for control activities (timers and temperature control) that have graphical interfaces as well as displays for weather data http://tech.scargill.net/ is worth a read.

Finally MQTT is becoming the backbone as a data repository and for data exchange. The HA interface isn’t what I would call ‘plug and play’ but the Node-Red one is (because of the GUI and no YAML). SQL is also being used with Node-Red as a database to store configuration data and to drive some repetitive operations. I’m working on a Device Tracker (based on Ping) where the device IP address are held in a SQL file.

1 Like