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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b6efa5873a415a0dd3e27bc558cdd8f481b081563fae74a8380e46bf55eb7a |
|
MD5 | 25b6892c46da535aaf55c111f7648e30 |
|
BLAKE2b-256 | 45d7dff09483a7f85e8cda86e361b13743363d998a20261a5ab4cd206df4b5c1 |
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
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
equationconnectsdk-0.2.0.tar.gz
- Subject digest:
60b6efa5873a415a0dd3e27bc558cdd8f481b081563fae74a8380e46bf55eb7a
- Sigstore transparency entry: 150256979
- Sigstore integration time:
- Predicate type:
File details
Details for the file EquationConnectSDK-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: EquationConnectSDK-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6399961c0c9dfdd71823b1f2b00e5d313cd2947189b65ef549333a383a4b1250 |
|
MD5 | c4980fe677322f8a895d860ba31d8f2f |
|
BLAKE2b-256 | 09f7fb317c675e34a2bc760be40bbb4b3c4f8250446ca80f2216eadc29e66095 |
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
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
equationconnectsdk-0.2.0-py3-none-any.whl
- Subject digest:
6399961c0c9dfdd71823b1f2b00e5d313cd2947189b65ef549333a383a4b1250
- Sigstore transparency entry: 150256980
- Sigstore integration time:
- Predicate type: