A simple program for reading statistics from a Shelly device and writing them to an Influx database.
I wondered if I could charge my electric toothbrush during the cheap night hours, without having to plug and pull the charger's cord every day. As it appears, a Shelly power metering switch was exactly what I needed and so I bought one. And since it has an API I thought it would be nice to collect some data from it and store it in an InfluxDB database, which I already had in place.
Simply grab the the files in this repository, edit the config files, and launch the program with, e.g. nohup python shellies.py &.
The config files are simple: the influxdb.ini contains necessary things for the program to connect to your database, and the shellies.ini contains the names your Shelly devices are findable in your network (space separated list).