Energy dashboard - GoodWe inverter and HomeKit - what entity and where?

To the few who use GoodWe inverter and HomeKit energy consumption monitor - could you please help me on how you integrated the data to home assistant and what sensors you added to the energy dashboard to view the data inside home assistant and where?

I want to be able to make the full use of my energy monitoring, from the grid and from the solar panels, how much we are consumption and from where and how much we are sending back to the grid.

I would love to see some work and be inspired! :heart_eyes:

Please and thank you.

I’m also interested in this. I have a GoodWe inverter and looking to purchase a Home Assistant compatible consumption meter. Has anyone used the Goodwe HomeKit 1000/3000? Or are there any recommendations for alternatives?

I got the GoodWe inverter and HomeKit HK1000. Struggling to integrate it to HA.

I am also not sure about the SEMS portal. Should I add the inverter and HomeKit as two seperate plants or just one? I’m also not sure if the CT clamps were installed correctly as the energy reported by the inverter is different to the one reported by the HomeKit energy monitoring. HomeKit also reports 0% self consumption for the last week :man_shrugging:t2::exploding_head:

I’ve read that the GoodWe inverters need to run a modern firmware in order to work with HA. Called GoodWe today to request an upgrade. Mine is a GW5000D-NS, installed about 2 years ago. I don’t have the HomeKit yet, waiting for confirmation that it works with HA ;). I’ll let you know once the firmware upgrade has been done and the result with HA integration.

The inverter does through the native integration but not the HomeKit. I have heard people use SEMS api hacs which scraps the SEMS portal for data and makes it available on HA.
I’m still trying to make it work and get the right data and display it on the energy dashboard.

I’ve decided to order the IoTaWatt solution instead, I hope you get the HomeKit working!

I really hope. I paid $600 for it plus installation.
If I had know this would happen, I would have got the inverter and energy monitoring from Shelly or Iotawatt.

1 Like

There is a GoodWe SEMS portal integration in HACS that works perfectly with HomeKit. I am currently using it with no issues at all.

I have added a feature request to add similar integration in the official GoodWe integration at: GoodWe HomeKit Integration. Please upvote if you think it will be useful.

I have added them as separate devices in the same plant. One is inverter and the other one is data logger. Can see 100% data match between SEMS and HA.

1 Like

Can you show your dashboard config? I need to see which entity to be added where to get proper energy dashboard up and running.

I got them activated yesterday and noticed the installers connected the CT clamps wrongly. Here’s the SEMS portal.

I am waiting for them to come back on Monday and fix it or else I was told I can call GoodWe technical support and then can change it from their end electronically but I would prefer if they come back and fix it for a more permanent solution.

I dont use Energy Dashboard. I am using Grafana to plot my import/export. power generation and current load.

Once you add the HomeKit, it will create multiple entities that you can play with:

Ok. So from there, I use a script to extract pv, load and grid?
Pv - solar generation?
Load - how much I’m consuming?
Grid - how much I’m getting from the grid?
Charts sell - how much I’m exporting?

I’m sorry but there isn’t much information and I’m struggling to understand what they mean? Since my values are all reversed thanks for clamps being put in the wrong place, I can’t understand anything from my readings.

I really appreciate your help :slight_smile:

Yeah. So if you look at above screenshot, I have created HA attributes to fit my needs. PV is current solar generation, load is current power consumption for the home (does take in to account how much energy is being generated by solar, grid shows power being imported or exported, grid status (1 or -1) tell you whether you are importing or exporting to/from grid). These are some of the custom attributes I have created:

  • platform: template
    sensors:
    homekit_loadstatus:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.loadStatus }}’

  • platform: template
    sensors:
    homekit_gridstatus:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.gridStatus }}’

  • platform: template
    sensors:
    homekit_gridusage:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.grid }}’
    unit_of_measurement: ‘W’
    device_class: energy

  • platform: template
    sensors:
    homekit_load:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.load }}’
    unit_of_measurement: ‘W’
    device_class: energy

  • platform: template
    sensors:
    homekit_powerflowdirection:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.PowerFlowDirection }}’
    unit_of_measurement: ‘W’
    device_class: power

  • platform: template
    sensors:
    homekit_pv:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.pv }}’
    unit_of_measurement: ‘W’
    device_class: energy

  • platform: template
    sensors:
    homekit_buytoday:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.Charts_buy }}’
    unit_of_measurement: ‘kWh’
    device_class: energy

  • platform: template
    sensors:
    homekit_selltoday:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.Charts_sell }}’
    unit_of_measurement: ‘kWh’
    device_class: energy

  • platform: template
    sensors:
    homekit_buytodaypercent:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.Charts_buyPercent }}’
    unit_of_measurement: ‘%’

  • platform: template
    sensors:
    homekit_selltodaypercent:
    value_template: ‘{{ states.sensor.homekit_XXXXXXXXXXXXXX.attributes.Charts_sellPercent }}’
    unit_of_measurement: ‘%’

  • platform: template
    sensors:
    gird_usage:
    value_template: “{{ states(‘sensor.homekit_loadstatus’) | float(0) | multiply(-1) * states(‘sensor.homekit_gridusage’) | float(0) }}”
    unit_of_measurement: ‘W’
    device_class: energy

  • platform: template
    sensors:
    energy_buy_cost:
    value_template: “{{ states(‘sensor.homekit_buytoday’) | multiply(0.3094) }}”
    unit_of_measurement: ‘$’

  • platform: template
    sensors:
    energy_sell_profit:
    value_template: “{{ states(‘sensor.homekit_selltoday’) | multiply(0.052) }}”
    unit_of_measurement: ‘$’

  • platform: template
    sensors:
    energy_dailyrate:
    value_template: “{{ 1 | multiply(0.6936) }}”
    unit_of_measurement: ‘$’

  • platform: template
    sensors:
    homekit_grid_actual:
    device_class: energy
    unit_of_measurement: ‘kWh’
    value_template: “{{ (states(‘sensor.homekit_pv’) | float(0) - states(‘sensor.homekit_load’) | float(0)) | multiply(-1) }}”

2 Likes

This is great. Best I have gotten including the GoodWe team themselves :blush:

I will try this out after next Monday and let you know how it goes.

Thank you so much :slight_smile:

Hey!

I got the values extracted and it matches the SEMS portal.


Not - my CT clamps are added in reverse where the grid is in the place of PV. :frowning:

To convert it to KWh, do I use Riemann sum integral sensor so they can be added to Energy dashboard?

Also, is there a way to split the import and export sensors so I can add them to the energy dashboard? I am assuming the energy dashboard doesn’t need the load so it has PV, import/export to determine the load (consumption)?

Thanks :smiley:

I wanted to test it before giving you are confirmation. It works by using Riemann sum. Didnt work for directly from configuration under sensors but had to add settings → devices & services → helpers and new helpers for import and export. Make sure the sensor you are using for source value is “W”.

For import and export, I am using following to make value zero for import and export when I am not importing or exporting:

  • platform: template
    sensors:
    homekit_gridusage:
    value_template: ‘{{ states.sensor.homekit_91000hku22301310.attributes.grid }}’
    unit_of_measurement: ‘W’
    device_class: power

  • platform: template
    sensors:
    homekit_import:
    device_class: power
    unit_of_measurement: ‘W’
    value_template: >
    {% set power = (states(‘sensor.homekit_grid_actual’)|round ) %}
    {{ 0 if power < 0 else power }}

  • platform: template
    sensors:
    homekit_export:
    device_class: power
    unit_of_measurement: ‘W’
    value_template: >
    {% set power = (states(‘sensor.homekit_actual_usage’)|round ) %}
    {{ 0 if power < 0 else power }}

After the post, I managed to extract charts_buy and charts_sell and use that for the energy dashboard. The values are close to 0.2 approx to what AGL registers which I’m happy with.

1 Like

Hi @Hufflepuff-source, it sounds like you got it going. I wonder if I can pick your brain a bit? I have a quote for what seems like a similar system (GoodWe GW5000-MS inverter with a HomeKit unit) and want to be sure I will be able to connect it to Home Assistant using local polling.

Have I got this right?

  • Both the inverter and the HomeKit unit connect to your home network (WIFI or Ethenet)
  • HA talks to the inverter using the standard GoodWe integration?
  • Does HA talk to the HomeKit unit?
  • Your connection gives you all the data needed for PV generation, grid import/export, and local consumption?

Thanks

Hey Rob!

I got it working and haven’t had any issues since then.

You connect GoodWe inverter to the HA either via the official integration or the hacs SEMS API and HomeKit via hacs as well.

HA talks to the inverter and HomeKit and can capture almost all the information it reports from solar production, live consumption and cost incurred.

Here’s my energy dashboard for today.

1 Like