Integración domótica Hydro-Québec, gratuita y de código abierto

Hydro-Québec consumption priced by Gladys (Rate D, Flex D), peaks, billing and outages.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
Monitor your Hydro-Québec electricity account directly in Gladys: consumption per half-hour, its cost computed by Gladys for your rate (Rate D, Flex D), average outdoor temperature, account balance, outages, and — if you are enrolled in the dynamic rate options — Winter Credit (CPC) and Flex D (DPC) peak events.
Requires Gladys 5.2 or later.
What you get
One Gladys device is created per Hydro-Québec contract on your account (a single login can have several: a primary residence, a rental, a cottage...). Every device exposes:
- Consumption (30 min) (kWh): Hydro-Québec's hourly consumption, each hour split in two equal half-hours. Hydro-Québec publishes a day about a day late: each half-hour is recorded at its real time. Gladys adds a cost feature to it on its own, computed by the energy contract you attach to the device (see below).
- Average cost per day (current period) ($): the average per day of the current billing period, according to Hydro-Québec.
- Average outdoor temperature for the most recent day Hydro-Québec has published (recorded under that day).
- Account balance ($).
- Power outage in progress (on/off), for the contract's service address.
If the contract is enrolled in Winter Credit (tarif D + option CPC), you also get: cumulated and projected credit ($), the current state (normal / anchor / critical anchor / peak / critical peak), whether a critical peak is coming up, and whether the pre-heat before a critical peak is in progress (not before the ordinary daily peaks).
If the contract is billed under Flex D (tarif DPC), you also get: the current state (normal / critical peak), whether a peak or a pre-heat period is in progress, the critical hours called so far this winter, and the savings/loss compared to the base rate.
Peak states switch at the exact minute a pre-heat or a critical peak starts or ends, not at the next refresh. During the hours Hydro-Québec announces the next day's peaks (10:30 to 15:00, Eastern time), the integration checks for new announcements every 15 minutes.
The cost of your electricity
The integration gives Gladys two contract templates, Hydro-Québec – Rate D and Hydro-Québec – Flex D (rates of April 1, 2026), and the Flex D peak calendar. To get the cost of your consumption:
- Add your contract's device from the Discovery tab (or click Update if it already existed).
- In Gladys, open Integrations → Energy Monitoring → Contracts and create a contract: pick your Hydro-Québec contract's device as the meter, then the Rate D or Flex D template. With Winter Credit, pick Rate D: the credit itself stays tracked by the device's "Winter Credit" features.
- That's it: Gladys computes the cost of every half-hour, shows it in its energy charts and in the Electricity price widget, and the Electricity price changed scene trigger follows the tier changes and the peaks.
For Flex D, the half-hours of the critical peaks are read from Hydro-Québec's
open data and published in the hq-critical-peaks calendar: their energy is
billed at the peak price and does not count toward the 40 kWh per day tier. A
peak cancelled before it starts goes back to normal.
On first connection, the integration fetches the consumption since the 1st of the current month, so the month's tiers are counted in full (10 days per refresh: the backfill can take a few hours).
Scene triggers
In the scene editor, under Integrations:
- Hydro-Québec critical peak announced: Hydro-Québec announced a critical peak, usually the day before;
- Hydro-Québec pre-heat started: the pre-heat before a critical peak just started (its length is the "Pre-heat duration" setting);
- Hydro-Québec critical peak started / ended.
Each one can be limited to one contract and to morning or evening peaks, and passes the peak's day, start time and end time to the scene's actions, for example a message: "Critical peak tomorrow from 6:00 to 10:00". The first reading after the integration starts never fires them: a restart does not re-announce known peaks.
Configuration
- Open the Configuration tab of the integration.
- Enter the same email/username and password you use to sign in at
session.hydroquebec.com. - Adjust the refresh interval if needed (Hydro-Québec only publishes the consumption about a day late — polling faster than every 30-60 minutes brings no extra data).
- Save: your contracts appear in the Discovery tab.
Actions
- Test the connection — attempts a real login to Hydro-Québec and reports success or the exact failure reason under the button.
Tested and confirmed working
This integration has been validated against a real Hydro-Québec account and a real Gladys instance, not just automated tests:
- Login, contract discovery, and adding a discovered device from the Discovery tab.
- An account with more than one meter under the same subscription (a primary contract and a secondary one) — both correctly reporting their own, distinct data.
- The refresh loop, including the first reading appearing right after saving the configuration.
- A contract with no current billing period yet on Hydro-Québec's side (e.g. a newly added or secondary meter): temperature, balance and outage status still come through, only the average cost per day is left blank for it.
Not yet confirmed on a real account:
- the consumption per half-hour and its cost computed by Gladys (new in this version);
- the Winter Credit (CPC) and Flex D (DPC) peak-event figures: they come from the same values the Home Assistant Hydro-Québec integration uses, but no account enrolled in either option has used this integration yet.
If something looks off, please open an issue.
Important notes
- This integration is developed independently and is not supported by Hydro-Québec — do not contact Hydro-Québec customer service about it. If Hydro-Québec changes its portal, authentication or API can break; please open an issue on the repository.
- Your password is stored encrypted by Gladys (
secretfield) and is only ever sent to Hydro-Québec's own servers. - The cost computed by Gladys is an estimate: Hydro-Québec bills about every two months, Gladys counts the tiers per month. The difference only shows when a very heavy month and a light one fall in the same bill. The Winter Credit is not deducted from that cost.
- The rates change every April 1: a new version of the templates will follow, and Gladys will offer to update your contract.
Upgrading from a previous version
The Discovery tab shows a structure change: click Update. The daily consumption is replaced by the consumption per half-hour (its history is deleted), and the "average daily cost" becomes the average cost per day (current period), a plain dollar amount (its history is kept).
Troubleshooting
The connection status shown on the Configuration screen turns red, with the reason, when every contract on the account failed its last refresh (Hydro-Québec unreachable, password changed...). It turns green again on its own at the next successful refresh: there is no need to save the configuration again. A single failing contract on a multi-contract account is only reported in the logs.
Check the integration logs from the Gladys UI (or docker logs on the host)
with LOG_LEVEL=debug for the full detail of every request made to
Hydro-Québec.
Parámetros de configuración
Estos son los parámetros que Hydro-Québec te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Hydro-Québec account | section | No | Use the same email/username and password you use to sign in to the Hydro-Québec customer space (session.hydroquebec.com). This integration is developed independently and is not supported by Hydro-Québec: do not contact Hydro-Québec customer service about it. Every contract on the account is discovered automatically after saving — there is nothing else to enter (no account/contract numbers needed). |
| Email / username | secret | Sí | The email address or username used to sign in to your Hydro-Québec online account. |
| Password | secret | Sí | Stored encrypted by Gladys and never leaves your instance except to talk to Hydro-Québec. |
| Refresh interval (s) | number | No | How often each contract is refreshed. Hydro-Québec updates daily consumption about once a day with a 1-2 day delay, so there is no benefit in polling faster than every 30-60 minutes. |
| Pre-heat duration (min) | number | No | How long before a Winter Credit / Flex D critical peak the "pre-heat in progress" sensor turns on. Only affects contracts enrolled in one of these options. |
Cómo instalar Hydro-Québec en Gladys
- En Gladys, abre Integraciones: Hydro-Québec aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/lm1lc3n7/gladys-hydro-quebec:0.2.0), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/Gladys-Hydro-Quebec.
Hydro-Québec requiere Gladys >=5.2.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.
¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.
Guías relacionadas
- Eventos de punta de Hydro-Québec hoy: las puntas de Flex D y del crédito de invierno en directo.
- Tarifa Flex D de Hydro-Québec: cómo funciona Flex D y las automatizaciones que lo hacen rentable.
Sobre las integraciones externas
Hydro-Québec es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene LM1LC3N7, no el equipo principal de Gladys.
- Explorar todas las integraciones, nativas y de la comunidad
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación