Coder Social home page Coder Social logo

ondilo's Introduction

Ondilo ICO

PyPi PyPi

A simple client used to access Ondilo ICO APIs.
Implemented to be used in Home Assistant, but can be used anywhere else.

Install

To install ondilo, run:

pip install ondilo

Example usage

Ondilo is using the Authorization Code Grant flow, so each user must be individually authenticated.
The client_id and client_secret are always the same, there is no need to create a specific app on Ondilo side. So they are hard coded. However, if needed, they can also be passed during initialization.

A very basic implementation could look like:

from ondilo import Ondilo

client = Ondilo(redirect_uri="https://example.com/api")
print('Please go here and authorize,', client.get_authurl())

redirect_response = input('Paste the full redirect URL here:')
client.request_token(authorization_response=redirect_response)

print("Found all those pools: ", client.get_pools())

If the Oauth2 flow is handled externally and a token is already available, one can also use the package this way:

from ondilo import Ondilo

client = Ondilo(token)
print("Found all those pools: ", client.get_pools())

Available APIs

More information about the returned objects can be found here: https://interop.ondilo.com/docs/api/customer/v1/

  • get_pools: Get list of available pools / spa
  • get_ICO_details: Get details of a pool/spa
  • get_last_pool_measures: Get the last measures from an ICO
  • get_pool_recommendations: Get the list of recommendations from an ICO
  • validate_pool_recommendation: Acknowledge a recommendation
  • get_user_units: Get user units
  • get_user_info: Get user infos
  • get_pool_config: Get pool/spa ranges for temperature, pH, ORP, salt and TDS
  • get_pool_shares: Get list of users with whom the pool/spa is shared
  • get_pool_histo: Get measurements historical data

ondilo's People

Contributors

jeromehxp avatar valfr avatar

Stargazers

 avatar Dom avatar  avatar  avatar  avatar BadFoo avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

valfr

ondilo's Issues

Cannot retrieve last mesaures

Ondilo changed thei APIs, or enforced something that was not previously.
It is now required to pass the measures we want to retrieve to get the last measures.

Add "last_update" sensor

Hi
Thanks for your integration.
Do you think it's possible to add a "last_update" sensor for the Home Assistant integration ?
According to the api documentation, there is a key "update_at"
Thanks

Homebridge

Hi @JeromeHXP
Any chance this project could be ported to work with homebridge.. I would love to help the best I can.

Sincerly
Jogistar

Homekit support

Hey @JeromeHXP
Thx for the great work on this integration.

Im doing all my automations in Homekit
Is it possible to change the device class or unit_of_measurement to something Homekit supports?
Maybe something like lx as unit_of_measurement or illuminance as their device_class.

I have tried to change them in HA under developer tools, but they jumps back to origin after a while.

Battery sensor and pool temperature works because they have % and °C as unit_of_measurement

Hope it makes sense :)

Kind regards
Joachim

device class

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.