OKTE (Organizator kratkobokeho trhu s elektrinou) is the Slovak electricity market operator. It publishes day-ahead market (DAM) spot prices — the hourly wholesale price of electricity in EUR/MWh determined by the previous day’s auction.
The TapHome template fetches these prices from the public OKTE API (isot.okte.sk) via HTTP Packet Parser. It provides the current hour’s price, price rankings, min/max/average calculations, and time-window analysis — all updated automatically every hour. No authentication is required.
Configuration
The template connects to isot.okte.sk over HTTPS (port 443). No IP address or credentials are needed — the endpoint is a public API.
During template import, two optional custom variables can be set:
- From — start hour of a custom time window (0–23, default: 9)
- To — end hour of a custom time window (0–23, default: 17)
These variables control the “in Time Window” device variants. The defaults (9–17) cover standard working hours. If not needed, leave them at their defaults — the full-day devices work independently.
How it works
The module polls the OKTE DAM API once per hour (3600 s interval). The API request uses today’s date:
| |
The response contains an array of price objects, each with a period number and a price in EUR/MWh. Depending on the time of day and OKTE publication schedule, the response may include prices for today only (24 periods) or for up to 3 days (72 periods).
Each device script parses this JSON array using PARSEJSON(output, "$..price") and applies sorting, filtering, or aggregation functions to derive its value.
Device capabilities
The template exposes 13 sensor devices. All are read-only — they derive values from the same API response.
Current price and ranking
- Current Price — the spot price for the current hourly period in EUR/MWh. The script determines the current period index from
NOW()and returns the corresponding price from the array. - Current Period Rank — the rank of the current hour’s price among all available periods (1 = cheapest). Useful for automation rules like “run the heat pump only when the current hour is among the 8 cheapest.”
- Current Period Rank in Time Window — same as above, but limited to the user-defined From–To window. Returns NaN if the current hour is outside the window or if From >= To.
Price extremes
- Highest Price of Day — the maximum spot price across all available periods
- Lowest Price of Day — the minimum spot price across all available periods
- Highest Price in Time Window — maximum price within the From–To window
- Lowest Price in Time Window — minimum price within the From–To window
Averages
- Average Price of Day — arithmetic mean of all available period prices
- Average Price in Time Window — arithmetic mean within the From–To window
Period identification
- Cheapest Period of Day — the 1-based period number of the cheapest hour (e.g., 3 means 02:00–03:00)
- Cheapest Remaining Period — the cheapest hour from the current hour onward. Updates dynamically as the day progresses.
Counts
- Period Count — total number of price periods in the API response (typically 24 or 72)
- Period Count in Time Window — number of periods within the From–To window
Service attributes
The module exposes up to 96 service attributes (Period 1 through Period 96), each showing the spot price for that specific hourly period as a string with “EUR” suffix. In practice, 24 attributes are populated for a single day, or 72 for three days.
These attributes provide a full price schedule visible in the TapHome module detail view.
Custom variables (From / To)
Several devices have “in Time Window” variants that filter the price data to a subset of hours. The window is defined by two custom variables set during template import:
- From — the starting hour (inclusive), value 0–23
- To — the ending hour (exclusive), value 0–23
For example, setting From=8 and To=16 analyzes prices only between 08:00 and 16:00. This is useful when you want to optimize energy usage during specific hours — such as running appliances only during the cheapest hours of your working day.
If From >= To, all windowed devices return NaN.
Automation examples
Run devices during cheapest hours
Use the Current Period Rank device in a smart rule condition. For example, to run a pool pump only during the 6 cheapest hours of the day:
- Condition: Current Period Rank <= 6
- Action: Turn on pool pump
Avoid peak prices
Use the Current Price device with a threshold:
- Condition: Current Price > 150 (EUR/MWh)
- Action: Turn off non-essential loads
Time-window optimization
Set From=22, To=6 to define an overnight window, then use Lowest Price in Time Window or Current Period Rank in Time Window to schedule battery charging or water heater operation during the cheapest overnight hours.
Troubleshooting
All devices show zero or no data
- Check internet connectivity on TapHome Core — the template requires outbound HTTPS access to
isot.okte.sk - Verify the API is responding — open
https://isot.okte.sk/api/v1/dam/results?deliveryDayFrom=2026-03-28&deliveryDayTo=2026-03-28in a browser - DAM prices for the next day are typically published after 12:45 CET. Before publication, requests for tomorrow’s date return empty results.
Windowed devices return NaN
- Verify that From < To in the template import parameters
- Check that the current hour falls within the From–To range (for Current Period Rank in Time Window)
- Remember that From and To use 24-hour format (0–23)
Price values seem incorrect
OKTE publishes prices in EUR/MWh. To convert to EUR/kWh (household scale), divide by 1000. The template displays raw values from the API without conversion.