Skip to main content

Python: Asynchronous client for Combined Energy API

Provides an async Python 3.11+ interface for the http://combined.energy/ monitoring platform API.

Testing Coverage Maintainability Rating PyPI PyPI - License Code style: black

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.

Metadata

Release files for combined-energy-api 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for combined-energy-api 1.0.1
File Size Uploaded
combined_energy_api-1.0.1.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for combined-energy-api 1.0.1
File Interpreter ABI Platform
combined_energy_api-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.2 kB

Release files / combined_energy_api-1.0.1.tar.gz

Download URL combined_energy_api-1.0.1.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f265a053ed1b122e176845d6248e7d77c5021a175d3d4589046ba57a901f8abb
BLAKE2b-256 checksum
How to use checksums
b727cb7d27f834b57d8893c8f9c894764521c7a6ac16bbb6f4e59cb967f667c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release files / combined_energy_api-1.0.1-py3-none-any.whl

Download URL combined_energy_api-1.0.1-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f5bf22d8513d1d3dc80c4aba0ab20f393b77a139ead07ae0bb6c709aa759f49
BLAKE2b-256 checksum
How to use checksums
0d4b179c234931e3efb2028c2f900fde094debe12fa6dfa2b22f1ae5fad3966a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0

2 release files

0.8

2 release files

0.7

2 release files

0.6.1

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page