Python interface to the Combined Energy API
Project description
Python: Asynchronous client for Combined Energy API
Provides an async Python 3.8+ interface for the http://combined.energy/ monitoring platform API.
Note this API client is reverse engineered from observing requests being made
in the web-application. Please report any failures to read data, this is likely to occur for readings as I am only able to create entries for devices that I have.
Installation
Install from PyPI
python3 -m pip install combined-energy-api
Usage
import asyncio
from combined_energy import CombinedEnergy
async def main():
"""
Example using Combined Energy API client.
"""
async with CombinedEnergy(
mobile_or_email="user@example.com",
password="YOUR_COMBINED_ENERGY_PASSWORD",
installation_id=9999,
) as combined_energy:
status = await combined_energy.communication_status()
print(status)
# Get the last 2 hours in 5 min increments
readings = await combined_energy.last_readings(hours=2, increment=300)
print(readings)
asyncio.run(main())
Development Environment
You will need:
- Python 3.8+
- poetry
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
combined_energy_api-0.3.tar.gz
(13.9 kB
view hashes)
Built Distribution
Close
Hashes for combined_energy_api-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e3b1a23bbbc815ac954ffa53768352fc5ad71392bacd6ba0255e41d6c36f0bb |
|
MD5 | 83ad4bd4c770e31585c5136d1e8939b2 |
|
BLAKE2b-256 | 2fc6f6bf34976a9904e612b9abdf68abae3744fe35da78d49769818326670858 |