Skip to main content

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

This package is currently only available from source

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


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.2.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

combined_energy_api-0.2-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page