Integrate eFriends Platform

HI,

has anyone had experience with this electricity cooperative and does anyone have an idea how it can be integrated into home automation? There’s also an API interface available.

[https://support.efriends.at/hc/de/articles/26626854641181-Schnittstelle-Leistungsdaten]

Thanks for you answers.

Hi, i tinkered a bit and finally got a result in my HA :wink:

put this in your configuration.yaml and you should get a “efriends_pv_meter” sensor.

rest:
  - resource: http://<your Cube IP>/v3/MeterDataAPI/getCurrentValue?format=xml
    method: GET
    scan_interval: 5
    headers:
      apiKey: "<Your API Key from the App>"
      content-type: "application/xml;charset=UTF-8"
    sensor:
      - name: "eFriends PV Meter"
        device_class: energy
        value_template: "{{ value_json['energyData']['energyBalance']}}"

this refreshes every 5 seconds on your main screen, you can change that by editing “scan_interval” up or down.

i might tinker a bit more since i want to color it red or green depending on the value shown.

Edit: Also don’t forget to restart HA after pasting this into the config file, otherwise you wont have the sensor available :wink:

Greetings from Vienna, Andreas

Vielen Dank, das funktioniert schon ganz gut.
Kannst du mir vielleicht auch helfen, wie das mit anderen Sensoren / Werten funktioniert wie z.B. die Handelsdaten?

https://support.efriends.at/hc/de/articles/27406366305949-Schnittstelle-Handelsdaten

Hello, du musst nur die URL tauschen und unten die variablen die du empfangen möchtest... die Schnittstelle ist ja die gleiche :wink:

rest:
- resource: http://<CubeIP>/v3/MeterDataAPI/TradingSummary?format=xml
    method: GET
    scan_interval: 10
    headers:
      apiKey: "<APIKey>"
      content-type: "application/xml;charset=UTF-8"
    sensor:
      - name: "eFriends toGrid"
        device_class: energy
        value_template: "{{ value_json['tradingsummary']['aggregatedData']['toGrid']}}"
      - name: "eFriends fromGrid"
        device_class: energy
        value_template: "{{ value_json['tradingsummary']['aggregatedData']['fromGrid']}}"

lG