Giter VIP home page Giter VIP logo

pyindrav2h's Introduction

pyindrav2h

A basic API client and example CLI to interact with Indra V2H Chargers. Required by Home Assistant.

This is a very early Alpha release, and functionality may change very rapidly.

NOTE: Indra Renewable Technologies Limited are aware of this integration. However, this is an unofficial integration and Indra are not able to provide support for direct API integrations. The Indra API will likely change in future which may result in functionality provided by this integration failing at any time.

Installation

Install pyindrav2h with pip. Using venv is recommended.

  pip install pyindrav2h

to update pyindrav2h

  pip install pyindrav2h -U

On installation a CLI will become available: indracli

Usage/Examples

CLI

usage: indracli [-h] [-u EMAIL] [-p PASSWORD] [-d] {statistics,device,alldevices,all,loadmatch,idle,exportmatch,charge,discharge,schedule} ...

Indra V2H CLI

positional arguments:
  {statistics,device,alldevices,all,loadmatch,idle,exportmatch,charge,discharge,schedule}
    statistics          show device statistics
    device              show device info
    alldevices          show data on all available devices
    all                 show all info
    loadmatch           set mode to load matching
    idle                set mode to IDLE
    exportmatch         set mode to export matching
    charge              set mode to CHARGE
    discharge           set mode to discharge
    schedule            return to scheuduled mode

options:
  -h, --help            show this help message and exit
  -u EMAIL, --email EMAIL
  -p PASSWORD, --password PASSWORD
  -d, --debug

It is possible to provide a configuration file to provide Indra Smart Portal credentials. If no username/email or password is provided it will be retrieved from ./.indra.cfg or ~/.indra.cfg

Example .indra.cfg Configuration file

[indra-account]
[email protected]
password=yourindrapassword

Library Usage

Intended for use with Indra V2H Home Assistant integration. Documentation to follow.

Support

This is a community project that lacks formal support.

For support from the community please join the Indra V2H trial support community: https://indrav2h.zendesk.com/hc/en-gb/community/topics

For bugs or feature requests please create a GitHub Issue: https://github.com/creatingwake/pyindrav2h/issues


NOTE: Please do not contact Indra Support. Indra are unable to assist with unofficial API integrations.

Acknowledgements

  • trizmark for help with home assistant API integration examples

pyindrav2h's People

Contributors

creatingwake avatar

Watchers

 avatar

pyindrav2h's Issues

Handle BearerToken auth failures gracefully when Token is missing or expired.

  1. An Indra Bearer token is only obtained when the checkAPICreds() method is called. If a connection is configured but bearerToken = None an API call is attempted and results in an Auth exception. Wanted behaviour, if bearerToken = None, call method to obtain a BearerToken.
  2. Indra Bearer tokens expire after ~ 30 days resulting in auth failures. Handle auth failures with expired bearer tokens by catching exception and requesting a new token before retrying once more. Need to ensure retries to avoid too many requests in case of permanent/temporary auth errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.