AP System integration for EZHI

Hi folks,

Is there a way to integrate the EZHI into the existing AP Systems integration using the local API?

More infos about the API: https://www.photovoltaikforum.com/core/file-download/499638/

Sure. Considering the limited scope of the API and the lack of security, just use a

Why not extend the existing AP system integration? If I’m correctly informed, it also uses a similar local API for the EZ1.

Why not indeed, but unless you do it yourself (assuming it is not actually possible, already, I don’t use this), you might end up waiting forever rather than having a quick win…

For sure i will use this way but hey why not make it simple for other users? I would like to see the support for the new inverter in the AP Systemens integration. I thought this forum is the right place to adress the demand.

An actual integration would be nice. The pdf you posted was a big help in getting data out. Though not all features described in the pdf appear to be working correctly. Perhaps that’s why an integration hasn’t been created yet.

My rest implementation:

# Create Rest Sensors

# Example output
# {"data": "deviceId":"D0200xxxxxxx","type":"EZHI","devVer":"1.1.1.1","batteryCompany":"2","batteryModel":"1","batteryCapacity":"2.76","ssid":"MySSID","ip":"MyIP"},"deviceId":"D0200xxxxxxx","message":"SUCCESS"}
rest:
 - resource: "http://192.168.x.y/getDeviceInfo"
   scan_interval: 3600
   sensor:
    - unique_id: "{{ value_json.deviceId }}.deviceId"
      name: "Inverter Device Id"
      value_template: "{{ value_json.data.deviceId }}"

    - unique_id: "{{ value_json.deviceId }}.type"
      name: "Inverter Type"
      value_template: "{{ value_json.data.type }}"

    - unique_id: "{{ value_json.deviceId }}.devVer"
      name: "Inverter Firmware Version"
      value_template: "{{ value_json.data.devVer }}"
        
    - unique_id: "{{ value_json.deviceId }}.batteryCompany"
      name: "Battery Company"
      value_template: "{{value_json.data.batteryCompany}}"

    - unique_id: "{{ value_json.deviceId }}.batteryModel"
      name: "Battery Model"
      value_template: "{{value_json.data.batteryModel}}"
        
    - unique_id: "{{ value_json.deviceId }}.batteryCapacity"
      name: "Battery Capacity"
      value_template: "{{value_json.data.batteryCapacity}}"
      unit_of_measurement: "kWh"


# Example output
# {"data":{"batSoc":"29.0","batSoh":"100","batTemp":"16.0","devTemp":"29.7","pvP":"211","pvTE":"204.3777","batP":"136","batCTE":"116.1680","batDTE":"88.8651","ogP":"-438","ogOTE":"129.3418","ogITE":"13.0866","ofgP":"363","ofgOTE":"0.0693","ofgITE":"141.3964"},"batS":"2","deviceId":"D0200xxxxxxx","message":"SUCCESS"}
#2. batSoc(string) – battery state of charge (unit: %)
#3. batSoh(string) – battery state of health (unit: %)
#4. batTemp(string) – battery temperature (unit: ℃)
#5. devTemp(string) – device temperature (unit: ℃)
#6. pvP(string) – photovoltaic input power (unit: w)
#7. pvTE(string) – total photovoltaic input energy (unit: kWh)
#8. batP(string) – battery power (unit: w)
#Positive numbers indicate charging;
#Negative numbers indicate discharge
#9. batCTE(string) – total battery charge energy (unit: kWh)
#10. batDTE(string) – total battery discharge energy (unit: kWh)
#11. ogP(string) – on-grid power (unit: w)
#Positive numbers indicate input power;
#Negative numbers indicate output power.
#12. ogOTE(string) – total on-grid output energy (unit: kWh)
#13. ogITE(string) – total on-grid input energy (unit: kWh)
#14. ofgP(string) – off-grid power (unit: w)
#Positive numbers indicate input power;
#Negative numbers indicate output power.
#15. ofgOTE(string) – total off-grid output energy (unit: kWh)
#16. ofgITE(string) – total off-grid input energy (unit: kWh)
#1. batS(string) – battery Status
#1: idle; 2: charge; 3: discharge;
#4: fault; 5: shutdown; 6: no communication);
 - resource : "http://192.168.x.y/getOutputData"
   scan_interval: 5
   sensor:
    - unique_id: "{{ value_json.deviceId }}.batSoc"
      name: "Battery state of charge"
      value_template: "{{ value_json.data.batSoc }}"
      device_class: "battery"
      state_class: "measurement"
      unit_of_measurement: "%"
      
    - unique_id: "{{ value_json.deviceId }}.batSoh"
      name: "Battery state of health"
      value_template: "{{ value_json.data.batSoh }}"
      unit_of_measurement: "%"

    - unique_id: "{{ value_json.deviceId }}.batTemp"
      name: "Battery temperature"
      value_template: "{{ value_json.data.batTemp }}"
      device_class: "temperature"
      state_class: "measurement"
      unit_of_measurement: "Β°C"
      
    - unique_id: "{{ value_json.deviceId }}.devTemp"
      name: "Inverter temperature"
      value_template: "{{value_json.data.devTemp}}"
      device_class: "temperature"
      state_class: "measurement"
      unit_of_measurement: "Β°C"
      
    - unique_id: "{{ value_json.deviceId }}.pvP"
      name: "Power input Photovoltaic"
      value_template: "{{value_json.data.pvP }}"
      device_class: "power"
      state_class: "measurement"    
      unit_of_measurement: "W"
       
    - unique_id: "{{ value_json.deviceId }}.pvTE"
      name: "Total photovoltaic input energy"
      value_template: "{{value_json.data.pvTE }}"   
      device_class: "energy"
      state_class: "total"  
      unit_of_measurement: "kWh"
      
    - unique_id: "{{ value_json.deviceId }}.batP"
      name: "Power Battery"
      value_template: "{{ value_json.data.batP }}"
      device_class: "power"
      state_class: "measurement" 
      unit_of_measurement: "W"
      
    - unique_id: "{{ value_json.deviceId }}.batCTE"
      name: "Total battery charge energy"
      value_template: "{{value_json.data.batCTE }}"   
      device_class: "energy"
      state_class: "total"  
      unit_of_measurement: "kWh"
      
    - unique_id: "{{ value_json.deviceId }}.batDTE"
      name: "Total battery discharge energy"
      value_template: "{{value_json.data.batDTE }}"   
      device_class: "energy"
      state_class: "total" 
      unit_of_measurement: "kWh"
      
    - unique_id: "{{ value_json.deviceId }}.ogP"
      name: "Power export On-grid"
      value_template: "{{value_json.data.ogP}}"   
      device_class: "power"
      state_class: "measurement"
      unit_of_measurement: "W"
      
    - unique_id: "{{ value_json.deviceId }}.ogOTE"
      name: "Total on-grid output energy"
      value_template: "{{value_json.data.ogOTE }}"      
      device_class: "energy"
      state_class: "total" 
      unit_of_measurement: "kWh"
      
    - unique_id: "{{ value_json.deviceId }}.ogITE"
      name: "Total on-grid input energy"
      value_template: "{{value_json.data.ogITE }}"      
      device_class: "energy"
      state_class: "total" 
      unit_of_measurement: "kWh"
      
    - unique_id: "{{ value_json.deviceId }}.ofgP"
      name: "Power input Off-grid"
      value_template: "{{value_json.data.ofgP}}"   
      device_class: "power"
      state_class: "measurement"
      unit_of_measurement: "W"
      
    - unique_id: "{{ value_json.deviceId }}.ofgOTE"
      name: "Total off-grid output energy"
      value_template: "{{value_json.data.ofgOTE }}"       
      device_class: "energy"
      state_class: "total" 
      unit_of_measurement: "kWh"
      
    - unique_id: "{{ value_json.deviceId }}.ofgITE"
      name: "Total off-grid input energy"
      value_template: "{{value_json.data.ofgITE }}"   
      device_class: "energy"
      state_class: "total" 
      unit_of_measurement: "kWh"
      
1 Like