Skip to content

Voltage monitoring

jdeananderson edited this page Dec 3, 2018 · 5 revisions

The voltage monitoring system built in to the wall-ink server is optional. It uses a RRDTool and a cron to create graphs showing historical voltage values of all wall-ink devices reporting to a server. This can be useful to monitor batteries and make decisions regarding battery replacement. To install and configure voltage monitoring, see the readme.md.

Voltage monitoring files

rrd files

RRDtool uses RRD database files to store data for each wall-ink device. These files are stored in the folder specified in the rrdDirectory entry in settings.cfg file on the wall-ink-server. There is a <mac_address>.rrd file for each wall-ink device.

png files

Graphs representing the data in the RRD database files are stored at "wall-ink-web-root"/voltage_monitor/data/ to be used by the voltage monitoring console in the device manager.

voltage_charts.php

This php script make a webpage using all of the png files created from the RRD database files. A link to this script is in the device manager.

collect_data.sh cron script

The script "wall-ink-server-directory"/voltage_monitor/collect_data.sh should be run every 30 minutes to collect data to populate the RRDtool RRD database files. See readme.md for installation instructions.

Example voltage monitoring console

This is an example voltage monitoring console. Each row of images represents one wall-ink device. The left image is the battery voltages reported in the last week. The middle image is the battery voltages summarized for the last month, and the right image is the battery voltage summarized for the last year.

Voltages are relative!

Note that the ESP8266 does not do a great job of reporting back an exact voltage. When placing brand new batteries in several dozen wall-ink devices, you will notice that every device reports back a different maximum voltage. The most important thing we are looking for here, is a rapid decline in voltage to show that a battery is dying. The voltage should be held constant for a very long time, and then should degrade rapidly over the course of a few weeks.

To interperet the above graph, notice that reporting wasn't working until about June, where the voltage was constant through June and July around 3.1 volts. June is when the voltage monitoring was turned on. Then sometime in late July to early August, the voltage dropped slightly. This is the first warning sign that the batteries will be going out some time in the next few months or so. Then there was a period of 1-2 months when voltages were not being reported properly to the system. If you look at the other devices graphs, you will note that this was a system-wide problem. This means that the cron or service that queries the device database to save historical battery voltages was not running. When reporting resumed, the voltage is now being reported around 2.6v, and continues to drop. This falling curve means that the device will have a dead battery soon and the batteries should be replaced.