HydroQC - Hydro Quebec API wrapper
This is a library to use if you want to build your own solution. If you want a user-friendly implementation for your home automation system please use hydroqc2mqtt which provide a MQTT publisher, docker image and HASS addon.
This is a package to access some functionalities of Hydro Quebec API that are not documented.
We started a discord server for the project where you can come to discuss and find help with the project on our #development channel
Donations
We put a lot of heart and effort in this project, any contribution is greatly appreciated!
Tested Rates
Each account, contracts and rates are different and we do our best to integrate all available options. Currently the account combinations listed below are supported and tested automaticaly by our CI/CD pipeline. If your account scenario is not currently tested and listed as Needed feel free to reach out to us on our discord #development channel if you want to volunter for testing. We provide a way to setup CI/CD tests in your own account in a way that keep your account info private to you (more details here). Keep in mind that this process is a bit involved technicaly so it is best if you have some working knowledge with Gitlab.
Rate D
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|---|---|---|---|---|---|
| D | - | @weimdall | |||
| D | - | @mdallaire1 | |||
| D | - | @devzwf | Hilo | ||
| D | CPC | @titilambert |
Flex D (DPC)
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|---|---|---|---|---|---|
| DPC | - | @mdallaire1 |
Dual Energy (DT)
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|---|---|---|---|---|---|
| DT | - | @mdallaire1 |
Rate M
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|---|---|---|---|---|---|
| M | - | @hdenergy | HD Énergie | ||
| M | GDP | @hdenergy | HD Énergie |
Thanks to HD Énergie for sponsoring developpement of the Rate M support.
Other plans
We don't have anyone to test with. Please reach out to us if you have this plan and want to help!
Documentation
Code documentation
https://hydroqc.readthedocs.io/
Architecture / concepts
If you need more information about the usage and current integrations of the library please see our website https://hydroqc.ca
Goal
Make it easy to fetch and manipulate data from Hydro-Quebec, especially the winter credit periods
Example folder
An example script that extracts the data available from Hydro-Quebec is available in the examples folder.
Basic setup
This uses python 3.10
-
Clone the repo
git clone https://gitlab.com/hydroqc/hydroqc.git
-
Create a virtual-env
python -m venv env . env/bin/activate pip install --editable .
-
Enter your hydro account credentials in the examples/hydro.py file (line 6)
-
Run
examples/hydro.py
TODO
https://gitlab.com/groups/hydroqc/-/issues
Targeted architecture (might change in the future)
classDiagram
WebUser <-- Customer
WebUser <-- HydroClient
Customer <-- Account
Account <-- Contract
Contract <-- HydroClient
Contract <-- Period
Contract <-- Event
Contract <-- WinterCreditHelper
WinterCreditHelper <-- HydroClient
HydroClient <-- Authenticator
class HydroClient{
}
class WinterCreditHelper{
}
class WebUser{
-HydroClient _hydro_client
+List~Customer~ customers
+get_contracts()
}
class Customer{
-HydroClient _hydro_client
+List~Account~ accounts
}
class Account{
-HydroClient _hydro_client
+List~Contract~ contracts
}
class Config{
-string config_file_path
}
class Contract{
-HydroClient _hydro_client
-int customer_id
-int webuser_id
+string subscription_type
+float balance
+list~Period~ periods
+list~Event~ events
+get_winter_credit()
+fetch_periods()
+fetch_summary()
}
class Period{
}
class Event{
}
Metadata
Release files for Hydro-Quebec-API-Wrapper 4.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hydro_quebec_api_wrapper-4.2.6.tar.gz | 396.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hydro_quebec_api_wrapper-4.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 456.2 kB
Release files / hydro_quebec_api_wrapper-4.2.6.tar.gz
| Download URL | hydro_quebec_api_wrapper-4.2.6.tar.gz |
|---|---|
| Size | 396.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a47bf168f0ee43aadb507fda1759fb9dcf64cdae30bc5bbaf9860a7ed7960a9
|
|
BLAKE2b-256 checksum How to use checksums |
ce2206604f5036d1c0869e090e89d0f0c7936e8c267d4c2135d11aa6d0b5b9bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / hydro_quebec_api_wrapper-4.2.6-py3-none-any.whl
| Download URL | hydro_quebec_api_wrapper-4.2.6-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f94e2c350ba9ca5b079ffd17a5dad9be73ed1ed0593e6a2d92a450fe2342b93a
|
|
BLAKE2b-256 checksum How to use checksums |
a66625ddbf0abcb08e6c46e9f39d5eb15074846364f1a08aee5f13ba1d1d8d60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|