Metadata-Version: 2.1
Name: combined-energy-api
Version: 0.2
Summary: Python interface to the Combined Energy API
Home-page: https://github.com/timsavage/combined-energy-api
License: BSD-3-Clause
Keywords: energy,monitoring,combined.energy,api,client,async
Author: Tim Savage
Author-email: tim@savage.company
Maintainer: Tim Savage
Maintainer-email: tim@savage.company
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: aiohttp
Requires-Dist: pydantic
Project-URL: Documentation, https://github.com/timsavage/combined-energy-api
Project-URL: Repository, https://github.com/timsavage/combined-energy-api
Description-Content-Type: text/markdown

# 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

```python
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
