PyEmVue
raw JSON → 0.18.9 verified Fri May 01 auth: no python
Unofficial Python library for interacting with Emporia Vue energy monitors. Version 0.18.9. Active development with frequent releases.
pip install pyemvue Common errors
error ModuleNotFoundError: No module named 'pyemvue' ↓
cause Library not installed.
fix
Run
pip install pyemvue in your environment. error TypeError: login() takes 1 positional argument but 2 were given ↓
cause Using old API where login accepted separate arguments.
fix
Use
vue.login(username='...', password='...') as keyword arguments. error AttributeError: 'PyEmVue' object has no attribute 'get_devices' ↓
cause Using a very old version or wrong import.
fix
Ensure you have a recent version and import
PyEmVue from pyemvue. Warnings
breaking login() now returns tokens dictionary instead of boolean. ↓
fix Update code expecting boolean return value.
gotcha get_devices() returns a tuple (devices, device_gids, device_status), not just devices. ↓
fix Unpack all three return values or index appropriately.
gotcha API rate limits may cause HTTP 429 errors. Automatic retries were added in v0.18.1. ↓
fix Upgrade to >=0.18.1 or implement custom retry logic.
Imports
- pyemvue wrong
from pyemvue import PyEmVuecorrectimport pyemvue - PyEmVue wrong
import PyEmVuecorrectfrom pyemvue import PyEmVue
Quickstart
from pyemvue import PyEmVue
vue = PyEmVue()
try:
vue.login(username='your_username', password='your_password')
devices, device_gids, device_status = vue.get_devices()
print(devices)
except Exception as e:
print(f'Error: {e}')