Skip to main content

Hydro-Québec smart home integration, free and open source

Hydro-Québec integration for Gladys Assistant

Hydro-Québec consumption priced by Gladys (Rate D, Flex D), peaks, billing and outages.

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:

  1. Add your contract's device from the Discovery tab (or click Update if it already existed).
  2. 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.
  3. 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​

  1. Open the Configuration tab of the integration.
  2. Enter the same email/username and password you use to sign in at session.hydroquebec.com.
  3. 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).
  4. 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 (secret field) 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.

Configuration settings​

These are the settings Hydro-Québec asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Hydro-Québec accountsectionNoUse 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 / usernamesecretYesThe email address or username used to sign in to your Hydro-Québec online account.
PasswordsecretYesStored encrypted by Gladys and never leaves your instance except to talk to Hydro-Québec.
Refresh interval (s)numberNoHow 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)numberNoHow 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.

How to install Hydro-Québec in Gladys​

  1. In Gladys, open Integrations: Hydro-Québec appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/lm1lc3n7/gladys-hydro-quebec:0.2.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/LM1LC3N7/Gladys-Hydro-Quebec.

Hydro-Québec requires Gladys >=5.2.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Hydro-Québec is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by LM1LC3N7, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂