INtegration of old homewizard energylink

Hi,

I can find a lot of information about integration of the recent P1 link for homewizard, but I’m trying to integrate my old energy link. I already found some commands to read it:

IP/password/el/graph//<[day/week/month/year]>
IP/password/el/get/0/readings
IP/password//el/get/0/telegram

The first and the second command give a response, the last one gives a failure. But with the first two I can get the information out of the link.

Can anyone tell me how I can integrate this into home assistant ? See the responses below.

IP/password/el/get/0/readings, gives the response:
{“status”: “ok”, “version”: “3.403”, “request”: {“route”: “/el” }, “response”: [{“type”:“electricity”,“tariff”:1,“consumed”:440.683,“produced”:456.977},{“type”:“electricity”,“tariff”:2,“consumed”:438.798,“produced”:1011.508},{“type”:“gas”,“consumed”:147.947,“timestamp”:1700949601}]}

IP/password/el/graph//<[day/week/month/year]> gives the responce:
{“status”: “ok”, “version”: “3.403”, “request”: {“route”: “/el” }, “response”: [{ “t”: “2023-11-24 00:00”, “u”: 55, “a”: 55, “s1”: 0, “s2”: 0, “g”: 0.00}, { “t”: “2023-11-24 00:05”, “u”: 53, “a”: 53, “s1”: 0, “s2”: 0, “g”: 0.00}, { “t”: “2023-11-24 00:10”, “u”: 54, “a”: 54, “s1”: 0, “s2”: 0, “g”: 0.00}, and so on for every 5 minutes, from yesterday to the current time.

Thanks,

Ronald

Add this to your configuration.yaml, you can choose your own names offcourse :slight_smile:

rest:
  - resource: 'http://ip/pw/el/get/0/readings'
    sensor:
      - name: totaal_gas
        value_template: '{{ value_json.response[2].consumed }}'
        unit_of_measurement: "m3"
        device_class: energy
      - name: totaal_laag
        value_template: '{{ value_json.response[0].consumed }}'
        unit_of_measurement: "kWh"
        device_class: energy
      - name: totaal_hoog
        value_template: "{{ value_json.response[1].consumed }}"
        unit_of_measurement: "kWh"
        device_class: energy
      - name: solarlaag
        value_template: '{{ value_json.response[0].produced }}'
        unit_of_measurement: "kWh"
        device_class: energy
      - name: solarhoog
        value_template: '{{ value_json.response[1].produced }}'
        unit_of_measurement: "kWh"
        device_class: energy

Thanks for this.
Do you also know Which command I will need to read the actual usage / production ? Because this is what I need to switch devices based on energy production.

rest:
  - resource: http://ip/password/get-sensors
    sensor:
      - name: actualusage
        value_template: '{{ value_json.response.energylink[0].aggragate.po }}'
        device_class: temperature
        unit_of_measurement: "°C"

Thanks, I’m getting the totals, but I’m not gettting the actual value, my configuration looks like this now, did I do something wrong ?

  • resource: ‘http://ip/password/el/get/0/readings
    sensor:
    • name: totaal_gas
      value_template: ‘{{ value_json.response[2].consumed }}’
      unit_of_measurement: “m³”
      device_class: energy
      state_class: total
    • name: totaal_laag
      value_template: ‘{{ value_json.response[0].consumed }}’
      unit_of_measurement: “kWh”
      device_class: energy
      state_class: total
    • name: totaal_hoog
      value_template: “{{ value_json.response[1].consumed }}”
      unit_of_measurement: “kWh”
      device_class: energy
      state_class: total
    • name: solarlaag
      value_template: ‘{{ value_json.response[0].produced }}’
      unit_of_measurement: “kWh”
      device_class: energy
      state_class: total
    • name: solarhoog
      value_template: ‘{{ value_json.response[1].produced }}’
      unit_of_measurement: “kWh”
      device_class: energy
      state_class: total
  • resource: ‘http://ip/password/get-sensors
    sensor:
    • name: Huidigverbruik
      value_template: ‘{{ value_json.response.energylink[0].aggragate.po }}’
      device_class: energy
      unit_of_measurement: “W”

My fault :face_with_peeking_eye: I forgot the s in Energylinks

energylinks[0].aggregate.po

Thanks, I should have seen that myself. Also I had to change aggragate to aggregate

I’m getting an error on the following:

value_template: '{{ value_json.response.energylinks[0].aggregate.po- }}

Any idea what goes wrong ? This is the log:
Logger: homeassistant.config
Source: config.py:1258
First occurred: 17:20:16 (1 occurrences)
Last logged: 17:20:16

Invalid config for ‘rest’ at configuration.yaml, line 61: invalid template (TemplateSyntaxError: unexpected ‘end of print statement’) for dictionary value ‘rest->1->sensor->2->value_template’, got ‘{{ value_json.response.energylinks[0].aggregate.po- }}’,