Python interface to the Combined Energy API
Project description
Python: Asynchronous client for Combined Energy API
Provides an async Python 3.11+ 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
from combined_energy.helpers import ReadingsIterator
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)
# To generate a stream of readings use the iterator, this example fetches
# data in 5 minute increments
async for readings in ReadingsIterator(combined_energy, increment=300):
print(readings)
await asyncio.sleep(300)
asyncio.run(main())
Development Environment
You will need:
- Python 3.11+
- poetry
- pre-commit
Ensure pre-commit is installed into your git repository with pre-commit install.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file combined_energy_api-1.0.1.tar.gz.
File metadata
- Download URL: combined_energy_api-1.0.1.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f265a053ed1b122e176845d6248e7d77c5021a175d3d4589046ba57a901f8abb
|
|
| MD5 |
ae555861d77b15f7dabed11f7fdec4bc
|
|
| BLAKE2b-256 |
b727cb7d27f834b57d8893c8f9c894764521c7a6ac16bbb6f4e59cb967f667c8
|
File details
Details for the file combined_energy_api-1.0.1-py3-none-any.whl.
File metadata
- Download URL: combined_energy_api-1.0.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f5bf22d8513d1d3dc80c4aba0ab20f393b77a139ead07ae0bb6c709aa759f49
|
|
| MD5 |
13874e5d5bd6a94f5786721e4c9dc062
|
|
| BLAKE2b-256 |
0d4b179c234931e3efb2028c2f900fde094debe12fa6dfa2b22f1ae5fad3966a
|