lowtechmag / materialserver

a bash script exposing "AXP209" and "INA219" power metrics, temperature and machine load as a JSON API. For Armbian Allwinner A20 boards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

material server

a set bash scripts exposing device power metrics, temperature and machine load as a JSON API.

axp_stats.sh For Allwinner A20 ARM boards with the AXP209 chipset that run armbian

ina219_stats.sh For devices that use an external INA219 measurement circuit connected over I2C and loaded via the ina2xx kernel module

It further pulls in daily weather predictions using the brightsky API.

dependencies

  • jq > 1.5

installation

sudo apt get install jq

Update the url request string in brightsky.py with your location and other parameters you might need. Have a look at the brightsky documentation for options.

usage

bash ina219_stats.sh > /var/www/html/api/stats.json

in crontab: */2 * * * * /bin/bash /folder/to/ina219_stats.sh > /var/www/html/api/stats.json

About

a bash script exposing "AXP209" and "INA219" power metrics, temperature and machine load as a JSON API. For Armbian Allwinner A20 boards

License:GNU Affero General Public License v3.0


Languages

Language:Shell 69.7%Language:Python 30.3%