The objective of the project is to monitor and be notified of an upcoming :) problem with the ground water level in my cellar. With an existing hole in my cellar floor (used for automatic drainage with waterpumps) it is possible to measure the ground water level variations between minus 200 and 250 centimetre. To give the Wemos some extra things to do an extra sensor is added. More can be added like a light sensor to be notified if you forget the lights.
Is this an original project? Hardly; I am using standard components, I do not like to solder (hence I like this WeMos) and the sketches are a variation from those already available in the libraries. Likely other numerous projects are available with these standard components, but maybe I was the first (?) to use this combination with Cayenne in December 2016. The sketch works for both an Arduino UNO plus W5100 as a Wemos D1 R2; (un)comment the relevant lines. The sketch is further enriched with some additional info and URL’s (as long as I was keen enough to store this original information).
Because the HC-SR04 is not waterproof it is installed a bit higher than required with a PVC raintube of 1 meter so 50 centimetres above the cellar floor; hopefully the sensor will last a little bit longer. An old telephone wire (4-wired) is used to connect the HC-SR04 with the Wemos.
Remarks:
- Disconnected the sensor HC-SR04 when upload the sketch to the Wemos D1 R2.
- Also the Wemos hangs when it is connected to a PC; make sure you use a separate power source. With this remarks in mind you avoid having an issue.
- You should make an extra tab in the sketch filled with the "repeat.ino" attachment.
- In this sketch the number of uploads to the Cayenne server is reduced without loosing connection with the "timer.run()"-loop (imho this should be a manditory addition to use Cayenne, feel free to comment on this because i have might missed recent developments around this).
Comments