Created At

Jan 10, 2023

Last Update

May 17, 2023

Platforms

HC 3 Lite, HC 3

Views

1558

Download

103

Type Quick App

ENTSO-e Energy Rate QuickApp

The ENTSO-e Energy Rate QuickApp give you the current and coming energy spot price rates by hour  from ENTSO-e transparency platform in your local currency. ENTSO-e is independent from any power company and no subscription or specific hardware is required to get this to work.

If you pay your energy consumption by hour then this QA can help you to save money!

This QA has spot prices for the following countries: Austria, Belgium, Bosnia and Herz., Bulgaria, Croatia, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Netherlands, North Macedonia, Norway, Poland, Portugal, Romania, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, Ukraine and United Kingdom.

  

How to install

After you have download, you need to unzip the file to get the .fqa file to install in FIBARO and I also provide the icon in .png format.

  1. Click "+ Add device"
  2. Choose Other Device
  3. Choose Upload File
  4. Select unzipped .fqa file 

How it works

After you have add this QA in FIBARO devices, you need to set your energy area in the general variables that you belong to in [EnergyArea] to start collecting energy prices.
The variation of energy hour level in [EnergyHourLevel] is set by price values you set in the QA local variables [PriceLow], [PriceMedium], [PriceHigh], [PriceVeryHigh]. You set those prices from what you feel is the correct level prices for you in your local currency by consumed kWh.
(The currency exchange rate is collected from exhangerate.host service in this QuickApp if your currency is other than €.)

The general variable [EnergyNextHourLevel] indicate what price level it will be the next hour, and [EnergyMonthLevel] indicate what the avrage price is in current month.

To calculate different energy prices including tax, costs, etc, you change values in the local QA variables.

Trigger scenes

You can then easy trigger scenes or devices based on the value in the general variables [EnergyHourLevel], [EnergyNextHourLevel] or [EnergyMonthLevel] that can have the following values:

  • 🔴 VeryHIGH
  • 🟠 HIGH
  • 🟡 MEDIUM
  • 🔵 LOW
  • 🟢 VeryLOW

Usage in Lua scen:

    local value = hub.getGlobalVariable("EnergyHourLevel")
    if (value == "VeryHIGH") then
        ...
    end

Or in Block scen:

FIBARO Tariff rates

You can turn ON/Off storage of ENTSO-e Energy Rates in the FIBARO Energy Tariff table with the general variable [EnergyTariffInFibaro], and you set how many days to store history in FIBARO tariff table in the QA variable [TariffHistory]

 

Lua code samples

    -- How to get FIBARO Energy Tariff data
    local tariffData = api.get("/energy/billing/tariff")
    local currentRate = tariffData.rate
    local tariffTable = tariffData.additionalTariffs
    ...

    -- How to get General variable QA Tariff state table decoded in a Lua table
   local jsonString = fibaro.getGlobalVariable("EnergyStateTable")
   local tariffTable = json.decode(jsonString)
    ...


I would love if you give me some feedback on whether or not you like this QA, maybe I missed some function you need, let me know... Or just give your Rating on this QA ;)

 

Changelog:

V1.4 - 2023-05

  • Fix timer update for QA display panel and general variables.

V1.3 - 2023-05

  • Rewrite energy tariff table to store in general variable instead of FIBARO tariff table to solve negative energy prices.
  • Fix UTC time when request next day energy prices from ENTSO-e.
  • Improved energy value formatting in panel display with price decimal local variable that shows correct price if negative price.
  • All the rate levels are moved from general to local variables and are in acctual energy price in local currency.
  • Move general variable "EnergyTaxPercentage" to local variable as "EnergyTax".
  • Add general variable ON/OFF to store prices in FIBARO Tariff rate table.
  • Add translation in Portuguese PT (Thanks to Leandro C.).
  • Add more cost variables to calculate energy prices: {((ENTSO_price + operatorCost) x losses x adjustment) + dealer + localgrid} x tax (by Leandro C.).

V1.2 - 2023-04

  • Option to set tax to the energy prices in procentage.
  • Display more info on ENTSO-e service error.

V1.1 - 2023-03

  • Keeps Tariff rate history in FIBARO tariff table.
  • Show more usefull info in QA panel.
  • Added new general month level variable "EnergyMonthLevel" for those that pay energy consumption per month avrage.
  • Added new QA variable "TariffHistory" for how many days to store history in FIBARO tariff rates.
  • Localized panel text for language: EN, DK, NO, SV
    If you want to help with translation you can contribute on GitHub: https://github.com/JonnyMalman/EnergyRate

     Breaking changes that you need to update in your scenes and delete the old variables if you using first release v1.0:

  • General variable name change: "EnergyRateArea" to "EnergyArea".
  • General variable name change: "EnergyRateMedium" to "EnergyMediumPrice".
  • General variable name change: "EnergyRateLevel" to "EnergyHourLevel".
  • General variable name change: "EnergyRateNextLevel" to "EnergyNextHourLevel".

V1.0 - 2023-01

  • First release

17 Comments,  Want to add comment please login
E44b1a494c02e0f3d091dc417fbb7323

I have found the solution - manually creating the global variables solves the crashing of the Quickapp. The child device is created and now all data comes in!

E44b1a494c02e0f3d091dc417fbb7323

Hi Jonny, thanks for this QA! However, also for me on HC3L this version 1.2 crashes. The child device is not created, nor do I get any Global variables. HC3L does have the Energy panel, including the Tariff panel, so that can't be the reason. Glancing through the LUA code, it seems to me the Class for QuickAppChild is missing, but I am definitely not well enough educated to really understand. Fibaro manual refers to below class (prefilled with my expectation): class 'ENTSOE_Next_Rank'(QuickAppChild) function ENTSOE_Next_Rank:__init(device) -- You should not insert code before QuickAppChild.__init. QuickAppChild.__init(self, device) end It's not like somehow a piece of code got missing with the latest version?

442e554f86e81f77aaea2e69595714b5

Do I make something wrong if I will not get any data and will get ERROR "QA crashed" .../Users/kulnokagu/Desktop/Screenshot 2023-05-02 at 13.30.00.png

Af04f2493be6fa27fc2324de5f13391c

Hi @Erik Rosen, I’m not so familiar with HC3L, but I hope you have an Energy panel there as in HC3!? In HC3 you switch currency in FIBARO Tariff panel settings (Energy => Panel settings => Tariff), but I don’t know if it’s same in HC3L? But send me an email “energyrate@jamdata.com” if you can’t change the currency in HC3L, then I interested in how it looks on a HC3L 😉

48504c8a4cedddf268af75c8a00ac47e

Hi Jonny I have two FIBARO system ( HC3 main system and a HC3L for testing) I have some problem to install ENTSO-e at my HC3L (with version 5.140.17) Version 1 of ENTSO downloded 2023--03-20 seems to work at HC3, but at HC3L the currensy show up with EUR instead of SEK/kWh as it do at HC3. Both system have EnergyArea set to SW (SE3). ENTSO V1.1 and 1.2 are not able to install at HC3L. Installation fail. No variables installed and the child "ENTSO-e Next Energy Rate" do not appear. ( All variables and QA was removed before installation of V1.1 & 1.2). How to change currency from EUR to SEK/kWh at HC3L in version ENTSO-e V1.0 ? .... othervise I think the QA are exelent and I will use it in our energy control system to our building... Best regards Erik