This is a set of scripts for storing the metrics from the Nextys dcw20 in a timescale database
- clone the repo
git clone https://github.com/titus672/nextys_monitoring.git
- update and install prereqs
sudo apt update && sudo apt install python3.11-venv python3-dev libpq-dev
- move into the repo and create the python virtual environment
cd nextys_monitoring
python3 -m venv venv
- activate the virtual environment and install python prereqs
. venv/bin/activate
pip install -r requirements.txt
- cd into the src dir and configure the program
cd src
cp config_example.json config.json
vim config.json
python lib/psql_functions.py -v
- copy the
nextys_monitor.service
file and enable it
sudo cp nextys_monitor.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now nextys_monitor
If the device is in the db but hasn't been deployed yet, ie the bogus alerts
are annoying, the fix for now is UPDATE sensor_metadata SET batt_low = 0, ac_down = 0 WHERE id = 7;