After recently purchasing a home, I wanted a way to know when my sump pumps were running. Some DIYers used distance sensors to measure the height of the water in the pump hole and others use large gain electronic amplifiers to detect when current is flowing to the pump.
I desired a non-invasive simple to setup solution. The Ruuvi bluetooth beacons turned out to be a perfect fit. I taped them onto the pump's pipes and presto the acceleration data shows when the pumps are running.
This image shows the graph from one of my sump pumps, it runs about every 30 minutes for about 2 solid minutes.
This graph shows my other sump pump that runs about every 8 minutes but for 3 seconds or less.
The data shown in the above graphs is produced by the Ruuvi bluetooth beacons, captured by the bluetooth scanning code running on the Particle Argon. The Argon then publishes the data from the Ruuvi's to the Particle Cloud. A custom flow in NodeRED subscribes to the Particle Cloud, processes the messages and stores them into InfluxDB. Grafana then provides the visualization fronted to access the accumulated data.
This image shows the NodeRED flow subscribing to the Particle Cloud and ending with pushing the data into InfluxDB. We will discuss each of the steps and how you can get the system going in your home below.
- Get the parts
You will want at least one Particle Argon, and one Ruuvi for each of your sump pumps. Depending on how large your home is, and how far your sump pumps are from each other you may need more than one argon to receive the bluetooth advertisements from the Ruuvi tags.
You'll need a server for InfluxDB, Grafana and NodeRED to run on. An inexpensive solution is to use a Raspberry Pi. I would recommend getting a Pi 4 in the 2GB or 4GB ram models. I'm using an old desktop computer that I installed Ubuntu on.
- Flash the Argon
Use the Particle app to claim your Argon and get it connected to your home WiFi.
I used the particle CLI to compile and flash the firmware. You can download the code from the github repo, or copy the main.ino from the repo into the particle web IDE and add two libraries (Base64RK, JsonParserGeneratorRK).
- Install Docker on your server system
Here is a good set of directions: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-engine---community
- Install Docker Compose on your server system
I recommend this set of directions: https://docs.docker.com/compose/install/
- Setup InfluxDB, NodeRED and Grafana using Docker Compose
Comments
Please log in or sign up to comment.