ERCOT real-time prices (Texas) smart home integration, free and open source

Unofficial. ERCOT (Texas) real-time load zone prices for Gladys energy contracts.
Unofficial integration, not affiliated with ERCOT. It reads the real-time Settlement Point Prices (report NP6-905-CD) of the Texas load zones you choose from the official ERCOT Public API, every 15 minutes, and feeds the Gladys energy contracts with them.
Never tested with a real ERCOT account yet: the requests follow the official documentation and its OpenAPI description, the answers were checked against synthetic ones only.
Setup
- Create a free account on the ERCOT API Explorer (Sign In / Sign Up, e-mail verification, a password of your choice).
- In Products, subscribe to the Public API product; in your Profile, show and copy the Primary key of the subscription.
- In Gladys, fill the configuration: the e-mail of the account, its password, the subscription key and the load zones to read (the one of your home: your retailer or utility tells it).
- Create the devices you want from the Discovery tab, and an energy contract from the "ERCOT real-time price" template of your zone.
ERCOT blocks requests from outside the USA: the integration only works from a Gladys installed in the United States.
The password is used for one thing: the one-hour ID token, asked as the ERCOT documentation shows (a POST
to ercotb2c.b2clogin.com, the user name and password in the form body, never in the address). The
password and the subscription key are kept by Gladys in its database; the integration keeps the token in
memory only and never writes the password, the key or the token, nor logs them.
What you get
- A Gladys energy calendar per zone:
spot-ercot-rt-lz-houston,-north,-south,-west, one price per 15-minute interval in USD per kWh (the ERCOT price in $/MWh divided by 1,000), local time of Texas (America/Chicago). The first read goes three days back; after an outage, the read starts from the last price known (three days at most). - A contract template per zone, "ERCOT real-time price, <zone> load zone": the real-time price plus your adder per kWh (retailer margin, delivery charges per kWh), your monthly charges and a tax rate, all 0 by default, and a fallback price that you choose (no default).
- A device per zone with one sensor, "Real-time price ($/MWh)": the price of the last interval ERCOT published, sent once. Without a date while that interval ended less than 30 minutes ago (a scene can react to it), dated with its end up to 2 hours, not sent beyond.
What the Gladys engine cannot express
- The current interval has no price yet. ERCOT publishes a real-time price a few minutes after its 15-minute interval ends. So the price widget and the "current price" scene condition show the fallback price of the contract for the running interval, and the cost of an interval read before its price came is computed with the fallback, then corrected when the price arrives (Gladys recomputes the costs that read a changed calendar value). Gladys shows a warning on its Jobs page each time the fallback is used.
- Negative and extreme prices. A negative real-time price is published as it is (−250 $/MWh = −0.25 USD/kWh): the engine counts that interval as a credit that lowers the bill, the tax included. ERCOT's cap of 5,000 $/MWh (5 USD/kWh) is kept. A value beyond ±10,000 $/MWh is taken as unreadable: that interval stays unknown and the fallback price applies. The adder may be negative; the fallback price may not (Gladys refuses a negative fallback).
- The fallback price replaces the ERCOT price and the adder for an interval without a price; the tax still applies to it. It is required: the contract cannot be saved without it.
- A missing price is never guessed: an interval that ERCOT gives without a readable number (empty, text) is left out of the calendar; it is never 0.
- The template is the simple shape of a wholesale-indexed plan (price + adder + monthly charges + tax); demand charges, tiers or a capped price are not in it.
- Wholesale prices are not your retail rate: most Texas plans are fixed-rate.
Reads, pace and errors
- One cycle every 15 minutes, never sooner (ERCOT publishes one price per 15 minutes; the only
exceptions follow a refusal: new credentials, the button, once a minute at most): a token when
needed (reused for 55 minutes), then one request per zone, one at a time. At most 6 requests per cycle,
far under the 30 requests per minute ERCOT allows. The time of each cycle is written to
/databefore its first request, so a restart or a new configuration keeps the pace. - Errors (no answer, HTTP 5xx, 403) pause the reads 15 minutes, then 30, 60... up to 6 hours. An HTTP 429
or 5xx pauses them the same way, longer if its
Retry-Afterasks (6 hours at most). A pause is kept across restarts and applies to the button too. - An HTTP 403 usually means the request came from outside the USA: it is a failure, not a refusal.
- An HTTP 401 that does not name the subscription key: the token is renewed once and the zone read again; if a new token is not accepted either, it is a failure, retried after 15 minutes, then up to every hour.
- Refusals: an OAuth
invalid_grantanswer to the token request (user name or password refused), or a 401 naming the subscription key, stops the reads. The integration does not try the same credentials again by itself, even after a restart (it keeps 8 bits of a salted hash of them in/data: nothing to find them back from). New credentials are tried within a minute. The Test the connection button tries the account again (once a minute at most) and lifts the refusal if ERCOT accepts. - An unreadable answer for one zone does not stop the other zones. When no zone gives a readable price (an unexpected format), the status says so (not connected, "unreadable answer or unexpected format") and the reads go on every 15 minutes; rows that could not be read are logged once per zone.
- A calendar Gladys does not take (its key held by another integration, or refused) is named in the status.
/dataunreadable or not writable: nothing is read until it is fixed (retried every 10 seconds).
Not included
- Day-ahead prices, hub prices, the energy-weighted load zone prices (LZEW), the other load zones (Austin Energy, CPS Energy, LCRA, Rayburn): not in this version.
- Demand and generation of the ERCOT grid: see the integration gladys-us-grid.
- No command: read-only.
Data
The prices come from ERCOT's public market information, read through its Public API with your own account and subject to the ERCOT Terms of Use. Nothing is shipped with the integration.
Configuration settings
These are the settings ERCOT real-time prices (Texas) asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| ERCOT real-time prices | section | No | Unofficial connector, not affiliated with ERCOT. It reads the real-time Settlement Point Prices (report NP6-905-CD) of the Texas load zones you choose, every 15 minutes, from the official ERCOT Public API. It needs a free ERCOT API Explorer account: its user name and password (used only to get the one-hour token, as ERCOT documents) and the subscription key (Primary key) of your profile. ERCOT blocks requests from outside the USA. Each zone gets a sensor (last price, $/MWh) and a Gladys energy calendar spot-ercot-rt-lz-<zone>, used by the "ERCOT real-time price" contract templates. Wholesale prices, published after each interval: not your retail rate. |
| API Explorer user name (e-mail) | string | Yes | The e-mail address of your ERCOT API Explorer account. |
| API Explorer password | secret | Yes | Kept by Gladys in its database, never shown again, sent only to ERCOT (ercotb2c.b2clogin.com) to get the one-hour token. Never written by the integration. |
| Subscription key (Primary key) | secret | Yes | From your API Explorer profile, after subscribing to the Public API product. Kept by Gladys in its database, never shown again, sent only to ERCOT (api.ercot.com). |
| Load zones | multi_select | Yes | The load zones to read: the one of your home (your retailer or utility tells it). One request per zone every 15 minutes. |
How to install ERCOT real-time prices (Texas) in Gladys
- In Gladys, open Integrations: ERCOT real-time prices (Texas) appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/lm1lc3n7/gladys-ercot:0.1.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/LM1LC3N7/gladys-ercot.
ERCOT real-time prices (Texas) requires Gladys >=5.3.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
ERCOT real-time prices (Texas) 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.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation