A Prometheus exporter for Emporia Energy smart devices.
This repo contains a Python-based Prometheus metric exporter for Emporia smart devices. This can then be combined with Grafana for dashboard viewing. Note that the default port used (9947) has been reserved on the Prometheus Wiki.
Place a file called .user.json
in the base directory of this
repo. It should contain the following:
{
"username": "<Emporia Username>"
"password": "<Emporia Password>"
}
See the pypi entry for the PyEmVue module for more information. Then run the following command:
./emvue-exporter.py
If you point a browser at localhost:9947
you should see the
metrics for the Emporia devices linked to your account. For more usage
options:
./emvue-exporter.py -h
You can install this as a systemd service on your using via the following steps (tested on Ubuntu 24.04):
sudo python3 -m venv /usr/local/venvs/emvue-exporter
.sudo /usr/local/venvs/emvue-exporter/bin/pip install -r requirements.txt
.sudo cp emvue-exporter.py /usr/local/bin
.sudo cp emvue-exporter.service /etc/systemd/system/
.sudo mkdir -p /usr/local/share/emvue-exporter
.sudo cp .user.json /usr/local/share/emvue-exporter/.user.json
.sudo touch /usr/local/share/emvue-exporter/.keys.json
.sudo systemctl daemon-reload
sudo systemctl enable emvue-exporter.service
sudo systemctl start emvue-exporter.service