eFriends This function block reads the electricity prices of the Austrian supplier eFriends. Unlike a pure exchange price source, eFriends provides two price series: the consumption price and the feed-in price. Only with both is it possible to judge when feeding a battery into the grid actually pays off.
The consumption price is always above the feed-in price; the difference is made up of grid fees, levies and the supplier's margin. Both are delivered by the interface in Euro per megawatt hour excluding VAT and converted by the block into cent per kilowatt hour — plus the VAT and surcharges configured below.
Both prices are output separately and passed on separately to the Block storage optimizer. There it is the interplay of both prices that decides whether to charge, consume or feed in.
Prices apply per billing interval. Depending on the tariff an interval is 15 or 60 minutes long; the block detects this itself and reports it on the output Interval duration. Today and the following day are always requested. eFriends publishes the prices for the following day from 17:00 only — until then the output Prices next day available stays at 0, which is not an error. From 17:00 the block retries every 15 minutes until the prices are available.
Before 17:00 the interface already returns the intervals of the following day, but fills them with zeros. A whole day at exactly zero is not a market result but a placeholder, so the block discards it. Without this check the Storage optimizer would plan against a fictitious day and empty the battery in the evening.
The price series read last is stored. After a restart of the controller or after transferring a project it is therefore available again immediately, even when there is currently no connection to the cloud. Prices before the start of the current day are discarded in the process. All addresses are written once in full after the start — otherwise they would stay empty until the next change, as normally only changes are transmitted.
In addition to the prices the block can read the live values of a local eFriends Cube or eFriends Watch+: three-phase grid meter, grid and community flows and — if present — generation power, inverter and battery state of charge. This request runs on the local network and is completely independent of the price request: if the Cube fails the prices remain valid and vice versa. That is why the error outputs are separate.
The price series is also made available internally and can be picked up by the Block storage optimizer function block without any wiring.
On its outputs the block only ever reports the price of the current interval. The course of the feed-in price over the next 24 hours is shown by the Block storage optimizer control element in its schedule, hour by hour next to the planned setpoint and the state of charge. The block no longer creates its own address per hour. With diagnostics switched on it outputs both price series of the complete following day as a message.
The block may exist only once in the project. Several instances would request the same prices repeatedly.
Setup:
Notes:
Inputs |
||
| FR |
Enable |
At 0 both requests are stopped. If the input is not connected, the block is enabled. |
| AB |
Trigger request |
A rising edge triggers a price request immediately without waiting for the next cycle. Useful during commissioning and after a change of tariff. |
Outputs |
||
| FE |
Error |
Collective error. Set to 1 as soon as either the price request or the Cube request is disturbed. |
| FC |
Error price request |
The price request has failed three times in a row. The last price series read is retained and continues to be used. |
| FL |
Error Cube |
The eFriends Cube or Watch+ cannot be reached. The live values keep their last state and are not set to 0. |
| PB |
Consumption price now [ct] |
Consumption price of the current interval. |
| PS |
Feed-in price now [ct] |
Feed-in price of the current interval. |
| PI |
Consumption price minimum [ct] |
Lowest consumption price in the period still ahead. Intervals already past are not taken into account. |
| PM |
Consumption price maximum [ct] |
Highest consumption price in the period still ahead. |
| DR |
Consumption price average [ct] |
Average consumption price in the period still ahead. |
| PE |
Consumption price median [ct] |
Median consumption price in the period still ahead. |
| SM |
Feed-in price maximum [ct] |
Highest feed-in price in the period still ahead. Shows how much will be paid at best for delivering into the grid. |
| MI |
Cheapest window active |
Set to 1 when the current interval lies within the cheapest contiguous consumption window. The length of the window is defined by the parameter "Time minimum cost". |
| MA |
Best feed-in window active |
Set to 1 when the current interval lies within the window with the highest feed-in revenue. The length of the window is defined by the parameter "Time maximum revenue". |
| MO |
Prices next day available |
1 as soon as the prices for the following day have been read. Before 17:00 the output is 0; this is not an error. |
| IZ |
Number of intervals |
Number of price intervals read. |
| IM |
Interval duration [min] |
Resolution defined by the tariff, 15 or 60 minutes. |
| NL |
Total grid power W |
Measured power at the grid connection point. Consumption positive, feed-in negative. |
| L1, L2, L3 |
Power L1 … L3 W |
Power of the individual phases. |
| I1, I2, I3 |
Current L1 … L3 A |
Current of the individual phases. |
| U1, U2, U3 |
Voltage L1 … L3 V |
Voltage of the individual phases. |
| NA |
Feed-in grid W |
Share of the generation that goes into the public grid. |
| NE |
Consumption grid W |
Share of the consumption that comes from the public grid. |
| CA |
Delivery community W |
Share of the generation delivered to other participants. |
| CE |
Consumption community W |
Share of the consumption coming from other participants. |
| PV |
PV power W |
Current generation power, provided the Cube knows a generation plant. |
| SOC |
State of charge % |
State of charge of a battery known to the Cube. |
| BL |
Battery power W |
Power of the battery. Positive while discharging, negative while charging. |
| WR |
Inverter power W |
Current power of the inverter. |
| WE |
Inverter energy today Wh |
Energy generated by the inverter since midnight. |
Parameters |
||
| Cloud access key | Key from the eFriends app under Settings → API Manager. Without this key the price request is not started. | |
| Tariff name | Name of the contracted tariff, for example "Der bessere Flex Tarif". The name must match exactly, spaces are permitted. | |
| Server | Address of the eFriends server. As a rule the default value should be kept. | |
| IP address Cube | IP address of the eFriends Cube or Watch+ on the local network. If the field stays empty, no live values are read. | |
| Cube access key | Key for the local request, also taken from the API Manager. | |
| Connection Cube | HTTP or HTTPS. On the local network HTTP is used. | |
| Price request interval | Cycle time of the price request. As the prices change only once a day, a short cycle serves no purpose. | |
| Cube request interval | Cycle time of the local request. The trading summary is read on every third pass only, as it is more expensive. | |
| VAT consumption | Percentage added to the delivered consumption price. The interface delivers net values, in Austria 20 % is to be expected. | |
| VAT feed-in | Percentage added to the feed-in price. Depending on the tax situation 0 or 20 %. | |
| Surcharge consumption | Fixed amount added to the consumption price, for example for grid fees and levies. Only with this does the storage optimizer work with the actual cost. The default is 10 ct/kWh — take the exact value (grid energy rate plus levies) from your own grid bill. | |
| Surcharge feed-in | Fixed amount added to the feed-in price. Negative values are permitted in order to map deductions. | |
| Time minimum cost | Length of the cheapest consumption window in hours. If 2 is entered here because a load needs two hours of operation, the output "Cheapest window active" reports 1 exactly while these two hours are running. | |
| Time maximum revenue | Length of the window with the highest feed-in revenue in hours. This allows a battery to be discharged into the grid exactly when the payment is highest. | |