[APP][Pro] Huawei Solar - Smart energy for a better life

@Becke111 did you request api credentials?

Yes, with everything. When I use that mail(username) i get No new devices found. So I guess it is a bit on the way. No sun at the moment and inverter says Standby. Can that be the reason it is not found?

Just to be sure, the username cannot be a mail address, this username is only for the website.
The API username starts with your name or firstname.

The inverter being on standby cannot be the reason

OK! Thank you.

Made new user but get No new devices found. When selecting the app it says no devices added yet.
Any suggestions to se if there is a connection at all with Homey?

@Becke111 you are not able to create a username, for this you need to contact Huawei or your installer.
From what Iā€™m reading this seems to be the issue.

I am the installer and have created user
Installer6969 with all data to the API. Checking of credentials OK but Homey does not find any new devices through Huwaei Solar app.

Can you send me your credentials so I can double check?

If I can send by mail, messenger or something private.

You can send it to.
[Mod break: removed private information, please use DMs for that]

Hi Wouter! Massive fan of this app, thank you so much for creating it!

Would it be possible to enable the smart meter reading (in kWh consumed and kWh produced) as capabilities? That would make this app compatible with the ā€œPower by the hourā€, which creates devices that log power usage over time and simplifies average readings etc.

I also wonder if it would be possible to make more of the logic sensor values also as capabilities? That would simplify integration with the brand new smpl dashboard device, which can integrate any device capability and show its value. There is a workaround to have a flow run every minute which copies the logic value of e.g. ā€œDaily yieldā€ into a logic variable, which smpl then can show, but capabilities would be far easier. As far as I can see only ā€œBattery SOCā€, ā€œPowerā€ (what is this btw?), ā€œInverter tempā€ and ā€œPanels efficiencyā€ are readable as capabilities.

Again, many thanks for the hard work! Happy to send you a beer if you have a donation link somewhere.

Good evening @jseverinson

Iā€™m glad to hear that you like the app.

Regarding your questions, what would you like to see regarding the smart meter?
Iā€™ve done some digging and it is possible to query the values

These are the daily values

    collectTime: 1673218800000,
    stationCode: 'xxxx',
    dataItemMap: {
      radiation_intensity: null,
      installed_capacity: 6.4,
      use_power: 11.93,
      inverter_power: 1.4,
      reduction_total_tree: null,
      power_profit: 0.747,
      theory_power: null,
      reduction_total_coal: 0.001,
      perpower_ratio: 0.219,
      reduction_total_co2: 0.001,
      ongrid_power: 0,
      performance_ratio: null
    }
  },
  {
    collectTime: 1673305200000,
    stationCode: 'xxxx',
    dataItemMap: {
      radiation_intensity: null,
      installed_capacity: 6.4,
      use_power: 9.66,
      inverter_power: 0.22,
      reduction_total_tree: null,
      power_profit: 0.369,
      theory_power: null,
      reduction_total_coal: 0.001,
      perpower_ratio: 0.034,
      reduction_total_co2: 0.001,
      ongrid_power: 0.01,
      performance_ratio: null
    }
  }

These are the hourly values:

    collectTime: 1673377200000,
    stationCode: 'xxxxx',
    dataItemMap: {
      radiation_intensity: null,
      inverterPower: 0,
      power_profit: 0,
      theory_power: null,
      ongrid_power: 0
    }
  },
  {
    collectTime: 1673380800000,
    stationCode: 'xxxx',
    dataItemMap: {
      radiation_intensity: null,
      inverterPower: 0,
      power_profit: 0,
      theory_power: null,
      ongrid_power: 0
    }
  }

As you can see, I think the daily stats would be the most useful, but Iā€™m not sure how to present them, any suggestions?

All the capabilities should be available to query using the logics plugin:

Let me know where I can help!

Thanks for the reply. Dang it, I was hoping you would be getting the actual meter values. Iā€™m not an expert but I thought the smart meter would have two values that would continuously increment, one for total number of kWh imported and one for total number of kWh exported. My understanding is that apps like ā€œPower by the hourā€ use that data but Iā€™m not sure. It seems to be able hook into these two capabilities from your app:

  • Energy Meter (meter_power capability)
  • Power Meter (measure_power capability)

If Iā€™m not mistaken your app exports the second one, which is called ā€œPowerā€. Iā€™m guessing this is inverterPower?

Since I have a battery this metric becomes a bit confusing. This is what it looks like for me:

Compared to the inverter app it shows where these values originate:

The power is the current power consumed by my house, whereas the current sun yield is accurate but shouldnā€™t the unit be kW rather than kWh?

I have two tests running now to manually send sensor values to two virtual PBTH devices, one where I send current sun yield and one where I send the daily sun yield. I think the latter one is the most appropriate but Iā€™ll let you know how that goes. If the latter one is successful, exporting that (daily sun yield) as a meter_power capability would make it plug-n-play for others, I think, as long as they remember to toggle the PBTH setting for ā€œdaily resetā€.

And as for the second part, this is what it looks like in the smpl app in terms of which capabilities the Huawei inverter device seems to export. The smpl displays (you should get one, theyā€™re great!) can either show a device capability or any logic variable, so Iā€™ve gotten it up and running by having a flow that copies the logic sensor value from the Huawei inverter to a logic variable that smpl can show but this step would be unnecessary if there was a capability to hook directly into.

Selecting a capability to display:

Example of what a display looks like:

Again thanks for all the hard work on the app!

Iā€™ll try to answer all of your questions:

So these are the values that the app exposes:

    "capabilities": [
        "meter_power.day",
        "meter_power.month",
        "meter_power.installed_capacity",
        "meter_power.total_power",
        "meter_power.discharge_power",
        "meter_power.sun_power",
        "meter_power.positive_active_energy",
        "meter_power.negative_active_energy",
        "meter_power.import_export",
        "measure_power",
        "measure_battery",
        "inverter_temperature",
        "solar_efficiency"
    ],

Iā€™m guessing that smpl is unable to work with the meter_power. values, or maybe you should give it a shot.

Regarding to the realtime values, Iā€™m copying a quote from the documentation:
So getting the values is possible but there is no realtime value from what I can see here, so Iā€™m not sure if this is useful. What do you think?

Iā€™ve changed the description and unit of the PV yield.
A test version is deployed Huawei Solar | Homey, please feel free to test it.

Thank you Wouter! On the 1.0.42 test version now.

On capabilities, that makes sense and Iā€™ve fed that back to the smpl developer. Appreciate you sharing the json, made me understand how it works.

Having said that, Iā€™m more confused than ever. Iā€™m starting to wonder if the Huawei is flawed, or I have misunderstood the concept of yield. This is what my Fusionsolar app looks like:

Happy to see some production in January! But even though the numbers have been around those levels for a few hours, the app still says the yield for the day is 0.00 kWh. I donā€™t understand this.

The Homey app then reflects this (incorrect?) daily yield value, as you pull it from the API. But if I look at the appā€™s current yield figure, this is what it looks like:

So all Iā€™m trying to do is summarise the area under that graph.

Do you understand whatā€™s going on here? Iā€™m not sure I do.

Edit: Oh and by the way, I think also the ā€œCharge battery powerā€ is a kW rather than a kWh value, no?

Wondering if using Modbus-TCP would be an option. I found this: Emil Vanherp / HuaweiSolar Ā· GitLab - but unfortunately my programming skills are rather rudimentaryā€¦

Iā€™ve double checked the values but they match on my end


But Iā€™m not sure what you are missing here.

I have been trying to look at the modbus integration, but I donā€™t see any advantage of using it.
With the current api all needed values are exposed and Iā€™ve read that they will disable the modbus integration this year.

So for now itā€™s not on the roadmap.

I think I now know what the cause for this is. In a Swedish Facebook group for solar panel owners a lot of people have seen the same discrepancies and another person had been in touch with Huawei about it. Leaving a comment here for posterity.

Turns out the figure ā€œYield todayā€ is not a gross figure but a net figure for the installation. It can in practice be negative, as the inverter requires energy to operate and you also lose some energy when charging the battery. The app rounds every negative number up to zero though so you never see a negative ā€œYield todayā€. You do however need to produce a certain amount of energy to to ā€œmake up for the debtā€ before the number starts moving.

In Sweden we still donā€™t have many daylight hours this time of year and sun is very low on the horizon when up, so we get very small amounts of solar production which is why I think weā€™re the first to notice this.

Thanks for the help troubleshooting!