Skip to main content

A Python SDK for interacting with Equation Connect devices.

Project description

EquationConnectSDK

This is an unofficial Python package to interact with and control Equation radiators from Leroy Merlin, that use the EquationConnect app. It is based on the equation-conect.js JavaScript library by AndreMiras, from where the API configuration parameters and endpoints have been extracted. The package can be easily installed through pip using the following command:

python3 -m pip install EquationConnectSDK

Once installed you just need to import it to start using it. Some examples can be found on the demo file.

API Reference

Here is the documentation for the different endpoints that are implemented in the SDK to retreive information from the devices, as well as to modify their properties such as power state or target temperature. Before being able to make calls to the Firebase API, one needs to login using the Firebase Auth REST API. From the response, the idToken and the localId will be needed for the future calls. Notice that the idToken needs to be included as a parameter and not as a header.

Here are all the parameters common to all the methods:

Parameter Type Description
DATABASE_URL string Required. This is the URL for the firebase database.
FIREBASE_TOKEN string Required. This is the idToken retreived after loging in.

Get user information

  <DATABASE_URL>users/<UID>.json?auth=<FIREBASE_TOKEN>
Parameter Type Description
UID string This is the localId from the login, it is the user id.

Get user installations

  <DATABASE_URL>installations2.json?auth=<FIREBASE_TOKEN>&orderBy="userid"&equalTo="<UID>"
Parameter Type Description
UID string This is the localId from the login, it is the user id.

Get zone for an installation

  <DATABASE_URL>installations2/<InstallationId>/zones/<ZoneId>.json?auth=<FIREBASE_TOKEN>
Parameter Type Description
InstallationId string This is an Installation ID, can be obtained when listing user installations.
ZoneId string This is a Zone ID, can be obtained when listing user installations. Needs to be a zone in the installation.

Get device properties

  <DATABASE_URL>devices/<DeviceId>.json?auth=<FIREBASE_TOKEN>
Parameter Type Description
DeviceId string This is an ID for a specific device, can be obtained when listing installations or for a specific zone.

Set device properties

This endpoint is the same for changing any property by specifying it in the request body, i.e. changing the temperature, changing preset or turning on/off the radiator.

  # Endpoint
  <DATABASE_URL>devices/<DeviceId>/data.json?auth=<FIREBASE_TOKEN>

  # For example to turn on, this would be the body:
  {
    "power": true
  }
Parameter Type Description
DeviceId string This is an ID for a specific device, can be obtained when listing installations or for a specific zone.

Acknowledgements

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

equationconnectsdk-0.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

EquationConnectSDK-0.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file equationconnectsdk-0.2.0.tar.gz.

File metadata

  • Download URL: equationconnectsdk-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for equationconnectsdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 60b6efa5873a415a0dd3e27bc558cdd8f481b081563fae74a8380e46bf55eb7a
MD5 25b6892c46da535aaf55c111f7648e30
BLAKE2b-256 45d7dff09483a7f85e8cda86e361b13743363d998a20261a5ab4cd206df4b5c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for equationconnectsdk-0.2.0.tar.gz:

Publisher: publish-to-pypi-and-testpypi.yml on carlesibanez/Equation-Connect-SDK

Attestations:

File details

Details for the file EquationConnectSDK-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for EquationConnectSDK-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6399961c0c9dfdd71823b1f2b00e5d313cd2947189b65ef549333a383a4b1250
MD5 c4980fe677322f8a895d860ba31d8f2f
BLAKE2b-256 09f7fb317c675e34a2bc760be40bbb4b3c4f8250446ca80f2216eadc29e66095

See more details on using hashes here.

Provenance

The following attestation bundles were made for EquationConnectSDK-0.2.0-py3-none-any.whl:

Publisher: publish-to-pypi-and-testpypi.yml on carlesibanez/Equation-Connect-SDK

Attestations:

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