Electricity cost

Your loads and energy meters measure kWh. What you want to know is what the spa or the heat pump cost. Give your account an electricity price, and Tag Historian works out the cost hour by hour: the energy in each hour times that hour's price.

On every plan.

Last updated

Choose a price

In the Explorer, Settings has Electricity price. Everyone on the account sees it; an Editor or Admin changes it. Choose one of three:

  • Spot price (Sweden): the day-ahead price of your electricity area, SE1 to SE4, hour by hour - by the quarter where it is published so, each quarter priced with its hour's average. It is without VAT, grid fee and tax, so you can add one surcharge per kWh, from 0 to 20 kr: your own figure for grid fee, energy tax and VAT, as you count them. We do not know your contract, so the cost is only as right as that number.
  • My price tag: one of your own tags whose value is the price per kWh, such as Home Assistant's Tibber or Nord Pool sensor. Its unit says its currency: SEK/kWh, öre/kWh (a hundredth of a krona), EUR/kWh, ct/kWh, or the same per MWh. For kr/kWh or øre/kWh, which could be Swedish, Norwegian or Danish, you choose which, and likewise for $/kWh, ¢/kWh or c/kWh, which more than one currency uses. Each hour's average of the tag is that hour's price, so a 15-minute price becomes its hour's average. A sensor that reports only when the price changes keeps its price through the hours between.
  • Fixed price: one price per kWh, in the currency you choose.

Hour by hour, and hours without a price

Each hour's energy is multiplied by that hour's price, and the hours are added up. A day when the clocks change has 23 or 25 hours, and each has its own price. An hour that has energy but no price - before the spot prices we have, or while your price tag sent nothing - is left out of the cost and counted, never guessed from the hours around it. A figure that does not cover all of the energy says so: "Cost of 92% of the energy; 3 hours had no price."

Where you see it

  • Loads: each load's cost over the last 30 days, each run's and each session's, each day, week and month of its bars, and the period's total. A load whose power tag is not in W, kW or MW has no kWh, and so no cost.
  • Years: for a stored energy meter in Wh, kWh or MWh (not a computed meter), what its energy cost each month and each year.
  • The Monday summary: each load's cost last week and the week before, beside its kWh.

Without a price nothing about cost is shown, and nothing changes elsewhere.

Cheaper hours

With a price that changes by the hour - the spot price or a price tag, not a fixed price - a load's page has Cheaper hours: what its runs cost in the last 30 days and in each of the last three months, and what the same runs would have cost in the cheapest hours of their own days.

It is arithmetic on your own runs, by one rule. Each finished run keeps its length and its energy, minute for minute, and is tried at every whole and half hour of the day it started in, midnight to midnight in your account's time zone; it may run past midnight but must end by 06:00 the next morning. The cheapest of those starts is what it would have cost, at the same hour prices its cost is worked out with. Only prices that were already published when the run really started count: for the spot price, tomorrow's hours only for a run that started after 13:30 Swedish time; for a price tag, only the hours of the same day, so there nothing is moved past midnight. A run that had an hour without a price is left out, and the page says how many were.

A load whose runs are joined into sessions - a thermostat's short runs in one heating period - is moved a session at a time, not a run at a time: the session keeps its runs and the pauses between them as they were, is tried at the whole and half hours of the day its first run started in, and has to end, its last run with it, by 06:00. The page then counts finished sessions, and a session is counted once it is over. A thermostat's runs of a whole evening put into one cheap half hour would be a figure for a day the load could not have had.

The figure is an estimate, not a saving anyone measured, and not advice. Tag Historian does not know whether a run could have been at another time: a heat pump runs when the house is cold, and a hob when someone cooks. Each run, or each session, is counted on its own, so several can land in the same cheap hour, which a fuse or the appliance itself may not allow. A load that runs when it has to can be marked Cannot be moved to other hours where you change it (an Editor or Admin), and is then left out.

A difference is shown only when it is at least 10% of what the runs cost and at least 20 kr or 2 € (about as much in other currencies). Under that, the page says that the runs would have cost about the same. A surcharge is in both figures, so the difference comes from the spot price alone.

GET /api/loads/{loadId}/cheaper-hours answers the same periods (months from 1 to 12, 3 unless said) with actual, cheapest, difference and a verdict; PUT /api/loads/{loadId} with { "movable": false } marks a load, and true takes the mark away: a body with movable alone changes only the mark, while any other change of a load sends its whole definition. For a load moved by the session each period also has sessions.

Where the spot price comes from

The spot prices are fetched from elprisetjustnu.se, a free public service, which asks for the line "Elpriser från elprisetjustnu.se" wherever its prices are used, and the Explorer shows it there. We fetch an area's prices once for every account in that area, in the background - never when you open a page - and keep them: today's, tomorrow's once they are published in the early afternoon, and back 731 days. Only the area and the date are in the request; nothing about you or your account is sent. Right after you choose an area, its older days take a few hours to arrive, and the hours before them have no price until they have.

From the API

GET /api/account/electricity-price reads the price, and PUT with { "source": "spot", "area": "SE3", "surcharge": 0.95 }, { "source": "tag", "tagName": "sensor.nordpool" } or { "source": "fixed", "fixedPrice": 1.85, "currency": "SEK" } sets it (an Editor or Admin key). Each load's runs, usage and list carry a cost: { amount, currency, kwh, pricedKwh, hoursWithoutPrice }. GET /api/electricity/meter-cost/{tag} gives an energy meter's cost by month.

Common questions

Which plans have it?
All of them, Free included.
Is the cost what my bill says?
As close as the price you give it. The spot price is without VAT, grid fee and energy tax; the surcharge is your own figure for those, one number per kWh. A fixed monthly fee, a time-of-use grid tariff or a discount on your bill is not in it.
Why does a figure say "for 92% of the energy"?
Because some hours with energy had no price: before the spot prices we have, or while your price tag sent nothing. Those hours are left out of the cost rather than guessed, and the figure says how much of the energy it covers.
Do you send anything about me to elprisetjustnu.se?
No. We ask for an electricity area’s prices for a date, once for every account in that area, the way anyone can. No name, address, account or reading is sent.

Try it on the free plan

5 tags, 50,000 readings a day, 14 days at full resolution and ten years of hourly summaries. €0, no card.