Native Huawei Support #296
Replies: 69 comments 11 replies
-
What features are you missing, or hoping to see for huawei? |
Beta Was this translation helpful? Give feedback.
-
Hi. That integration will give you most of the required sensors for the card to work. If you can share your card configuration I can add it as an example. If there are specific Huawei Inverter status codes and/or messages please share them. |
Beta Was this translation helpful? Give feedback.
-
Hi, apologies on slow reply, just busy as atm. Yes I've been working on 'translating' WLCRS entities into the card, however there's some items on the card that don't map to WLCRS / Huawei inverters and also wondering if/how we can add a picture of the Huawei inverters into the card, same as like GoodWe etc have been added? If I can map out the corresponding entities for Huawei in the card, is there somewhere to publish them or would this be added into the code so if a user has something like this in the yaml, it would show the Huawei inverter image ?
Also wondering if anyone has looked at supporting multiple inverters in the card? May not be space for 2 inverter images, but more instead of 4 MPTT on 1 inverter in the card, if you could have 2 MPTT per inverter (maybe option to different colour per inverter data) and additional entries for 2nd inverter internal temperature / status / autarky / inverter Amps and Active Power etc. |
Beta Was this translation helpful? Give feedback.
-
Hi. If you share an image of the inverter I can add together with the model tag. What is the significance of the appended "gridmode". I would have assumed just I don't think support for multiple inverters will be possible without a complete redesign. Maybe there is a way for you to have two separate cards to depict this. |
Beta Was this translation helpful? Give feedback.
-
Hi @slipx06, th The 'gridmode' was just from mymicing the GoodWe inverter config that has that, ignore/delete it in regards Huawei. For the residential sizes Huawei inverters, the current range looks like: or if you need a dark background: Will revert re the mappings, need to get a chance to do some more testing. |
Beta Was this translation helpful? Give feedback.
-
Very interested in this , my setup Please contact me and let me know how i can help |
Beta Was this translation helpful? Give feedback.
-
@kurtdefeyter a) Do you have WLCRS integration for Huawei installed ? If not see: https://github.com/wlcrs/huawei_solar b) If/once you have WLCRS installed, could you lookup ALL the battery entities that is creates ? Open up the entity and copy the raw e.g. 'sensor.battery_state_of_capacity_1' (or does it not add the _1 if there's only 1 ESS?) and all the other sensor for the LUNA ESS ? Below is the entities its supposed to have... but there might be more that are not enabled in HA by default (handy to list them also). c) I assume you have a single inverter, could you also confirm the entity naming structure WLCRS uses by default, as I have a couple of inverters and have changed the format of mine to make more sense. iirc I think your inverter Input for the panels would have: sensor.inverter_pv_1_voltage or is it sensor.inverter_pv_voltage_1 ? |
Beta Was this translation helpful? Give feedback.
-
hi nice to meet you, |
Beta Was this translation helpful? Give feedback.
-
the inventor looks like this The input sensors |
Beta Was this translation helpful? Give feedback.
-
@slipx06 is this to type of information that you require, to allow the card to understand the Huawei status / state and grid status codes? https://github.com/wlcrs/huawei-solar-lib/blob/master/src/huawei_solar/register_values.py i.e. sensor.inverter_device_status appears to have any of these for status message: Name: Device Status "Standby: initializing", ============================= Name: Inverter State 0b0000_0000_0000_0001: "Standby", Is what is in the py code, but looking at my inverter its only had 'Standby' (currently as its 3am here) and during the day 'Grid-Connected, Grid-Connected normally'. Based upon that and the grouping of the options above by the 0000_0000 pattern in front it looks like the options are: "Standby", ============================= Name: Battery Status Options: OFFLINE ============================= Not sure about this, if I could find out the sensor entiry it is published as AND if it equates to being able to use this as the current working mode (flow direction) of the battery. class StorageForcibleChargeDischarge(IntEnum): Options: |
Beta Was this translation helpful? Give feedback.
-
@kurtdefeyter how are you billed for your electricity ? i.e. Time of Use with set times of the day/night and/or specific days that different tariffs apply? Do you get paid for electricity you export back into the grid / how much (flat rate or varies)? I still have to group up all the sensors / energy_meters and utility_meters a Huawei users needs to add in atop WLCRS, but you might want to start by making a huawei_derived_sensors.yaml file and place it in the /packages directory, copy this following into it and reload HA.
To get the Daily Import / Export kWh totals, I'll send the file later (need your electricity how billed info first), But you might want to install https://github.com/zeronounours/HA-custom-component-energy-meter that gives you the Energy_Meter (like Utility_Meter but supports working out the costs and storing costs paid for kWh import / export |
Beta Was this translation helpful? Give feedback.
-
We do have a dynamic contract , so the price we pay is based on the Belpex the daily result looks like Yes we do get paid for the injection , this is also based on the Belpex price |
Beta Was this translation helpful? Give feedback.
-
Umm yeah ok, talk about overly complicated. Has someone already released an integration for HA, that provides you with an entity of the current price to buy and sell power ? No idea who the Belgium power retailers are but UK example iirc is Octopus, in Australia there is Amber ... look them up in HACS and you'll see they have e an integration that allows pulling 5min update prices as they resell wholesale market prices. See: https://doe-duurzaam.nl/artikel/dynamische-energieprijzen-inlezen-met-home-assistant-zo-doe-je-dat/ ??? Or this one that supports Belgium prices : https://github.com/custom-components/nordpool |
Beta Was this translation helpful? Give feedback.
-
sure this is the calculation template based on the entsoe intagration however i have many costumers that are using it with nordpool to . We post our templates on https://github.com/JaccoR/hass-entso-e/discussions/categories/price-modifyer-templates |
Beta Was this translation helpful? Give feedback.
-
OK I think I've worked out most of the mappings / Huawei equivalents, I've just got to work out the best way of defining the extra sensors that WLCRS doesn't create by default (i.e. the Daily Export / Import totals) and try and ensure they align with other addons/integrations.. oh and also the p/kWh import costs / export sell price (I use a sensor that tracks day and time and switches automatically as per our Time of Use plan in Australia, but Kurt provides an example of way complex plans that EU has.... thinking it might just be a case of BYO for that sensor). Here's my current setup, ignore the reference to IoTaWatt, its just providing some of the sensors (lights, HVAC, GPOs etc) whilst the servers / network gear is provided by Athom ESP plugs. Exporting KWh back to the Grid - correct export price also shows. Importing kWh from the Grid - correct import price also shows. Only thing missing at the moment, apart from the battery specific sensors that @kurtdefeyter will need to test (since I don't have a battery) is the inverter status information, that currently the card doesn't understand hence no green/red next to the inverter status and the Grid icon showing as Off Grid. Here's the yaml as it stands currently (but my servers etc sensors reverted back to the geyser sensor etc).
@kurtdefeyter could you check the sensors here and 'convert' the sensors that I have based upon multiple inverters, into your single inverter sensor names? I've tried to enter them as I think a single inverter sensor naming format is by default, but they need checking. For example here's what my config has, 2 x 6kW M1 inverters, each with MPTT #1 having a single 19 panel string attached (nothing on MPTT @2), hence my config I use pv1 to represent the primary inverter string and pv2 to represent the secondary inverter string. pv1_power_186: sensor.inverter1_input_power total_pv_generation: sensor.inverter1_total_yield Hopefully this is a good start. |
Beta Was this translation helpful? Give feedback.
-
@slipx06 As in when that status mess was in:
the first error message is defined by ' at the start and end, and the second status message has ` at the start and end. Where as in the 4.10.3 we have updated it to:
That has both the status messages for the 'normal definition, being found with ' at the start/end of each... should the second message have |
Beta Was this translation helpful? Give feedback.
-
I've pushed a fix. Please test |
Beta Was this translation helpful? Give feedback.
-
@slipx06 no that doesn't appear to work either. 4.10.2 worked fine, just that we're trying to move i.e. so normal can be either of 'Grid-Connected, Grid-Connected normally' or PS. Apologies for all the hassle. |
Beta Was this translation helpful? Give feedback.
-
OK I see the issue. Pushed another version to test |
Beta Was this translation helpful? Give feedback.
-
@slipx06 Thanks version is working now. Appreciated. Hopefully will have mapping list (with battery) and extra items to allow copy/paste for Huawei users to setup. |
Beta Was this translation helpful? Give feedback.
-
@slipx06 Apologies but I'm not having any luck working out how to create examples in the documentation for Huawei. Would you be able to setup a page for this, probably looking at examples for: a) 1 x L1 1phase inverter with 15kWh LUNA ESS battery - 2 PV strings. I would assume users should be able to work out from that if they don't have a battery, how to disable it in the card etc. ... then the additional derived sensors that users need to create in HA, from the standard WLCRS integration from Huawel, to cater for mulitple inverters combined values, daily kW/h usage/export totals, AUX and Non-Essential Power/Energy totals etc. For 'solar_sell_247' trying to work out if there's a call for this for Huawei and if so, if/how to setup a switch that calls a WLCRS added service to change the Power Feed to Grid to Maximum (i.e. Sell) or Zero (i.e. Don't sell) Debating including examples of sensors to define the current electricity costs (or compensation from exporting kWh), that are then used in the card, or (most probably) including a link to the WLCRS integration Wiki ( https://github.com/wlcrs/huawei_solar/wiki - new page to add under here). To start, here's the 2 x Huawei L1 (1phase) with 1 x 15kWh LUNA ESS battery - 4 PV strings:
Note: I haven't defined the:
as whilst Huawei has the ability to define (and read via Modbus / WLCRS integration) 'Time of Use Periods' and 'Fixed Charging Periods' these are made available as attributes in the sensors, where as I assume the card / for Sunsynk inverters expects this to be individual senors for each time period?
|
Beta Was this translation helpful? Give feedback.
-
@Roving-Ronin Ive added the example section to populate https://slipx06.github.io/sunsynk-power-flow-card/examples/huawei.html |
Beta Was this translation helpful? Give feedback.
-
@slipx06 I've just submitted a pull request for this. Still just needing to add some example tariff plan yaml though. I've created a sub folder in the examples to hold the huawei example yaml files. As I'm working off my Fork of your repository (so I can make edits and only merge when ready), added a discussion section (in addition to the 'Issues' section is has by default), thinking that instead of clogging up your discussions with Huawei / iStore (fyi in Australia Huawei is now being resold via a partner as iStore) 'can you fix this' or 'can you add that' that people can do that there. Which will also allow them to then use the example yamls from there to test (as they'll be the BETA versions), prior to them merging with your repository (i.e. GA versions). Thinking as I type... would it be a good idea to add a 'Section' in your Discussion area for "Specific Vendor Support" and then creating 'Categories' within that for the various inverter brands now supported? i.e. Sunsynk, Deye, Solis, Lux, FoxESS, Goodwe, Huawei / iStore, Victron etc? Then in the Huawei / iStore just put a comment for issues/changes/requests etc refer to https://github.com/Roving-Ronin/sunsynk-power-flow-card/discussions ? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the support suggestion. I've added the new section and categories. |
Beta Was this translation helpful? Give feedback.
-
@slipx06 thought you might be interested in this, to allow creating animated GIFs on the readme page (or when trying to show how to do something / how card should be working in a discussion/issue thread), have a look at this free and without watermarks etc app. https://www.screentogif.com/. Easy as to use, just place frame around area on desktop to record, click record button and then 'save as'. |
Beta Was this translation helpful? Give feedback.
-
Hi @slipx06 Could you please confirm (or point me to where they are defined / which file in the card code) the colour codes assigned to the battery status? Just looking at the instance of the gent that is generous to provide me with access to his battery for checking yaml and noticed his battery has a fault and is reporting offline. I would have thought that 'Offline' would earn a red status light, not a Yellow one? Also looking at the inverter and notice that its showing with a Green icon and 'Normal' status. This would be as inverter_status_59 is looking at the Inverter(s) 'Device Status', where as the issue for the child device (battery) is flagged in the Inverter(s) 'Alarms' sensor. Interested in your thoughts... do the other inverters your used to show the alarms and everything such as that within the inverter 'status' sensor? Would you suggest needing to update the Huawei InverterS (the derived sensor version) to somehow say if <insert the current 'normal' status messages we have coded in> then report normal, "else if" status = BUT then merge in the 'sensor.inverters_alarms" state so the inverter(s) status sensor would have
See page 82 / Section 5.1 for the Alarm Codes. Solar Inverter Modbus Interface Definitions - 2023-02-16 v05 SPC158.pdf Would have to double check, but appears to be that WLCRS presents this in the format of: i.e. [Minor] 0268: Battery Abnormal |
Beta Was this translation helpful? Give feedback.
-
Hi @slipx06 I'm trying to 're-do' the Huawei sensors and mapping of sensors to the card, given updates to your code and also the updates to the WLCRS Huawei Intergration (in testing at v1.4.0a3 currently). As part of that will be trying to re-work it to more closely align with the default powr flows of the card (as far as Huawei tech / software allows). i.e.: I'll post any questions / issues that arise as I go below, but the first issue I've run into is:
Given this I have a sensor for the total rated batteries capacity, that will automatically calculate the size of all the battery modules in kWh. So currently it is showing a battery stack of 2 x 5000W unit, as a rated capacity of 10kWh. Using this sensor in the card, it shows as 0.01 kWh capacity. So in other words the card logic is assuming any sensor is in Watts, could this be updated to support the official units in HA (or at least kWh and Wh.... given the crazy prices of batteries I think we don't have to worry about a sensor with MWh for a while) ;-)
Would it be possible that non_essential_load1_extra instead is located just left of the power line (or above the W in 18W) and extended to the left, and the non_essential_load2_extra is aligned to the right of the power line (or just left a bit of the 3 in 3W) and extends right. Whilst the price for power above the grid icon is maybe to the right of the pylon, or even better if it could be split so the $ 0.xxxx is left of the power line and maybe with the $/kWh below the numbers? Like: |
Beta Was this translation helpful? Give feedback.
-
@Roving-Ronin Just some feedback
This has been fixed. Thanks for raising it
Its possible but moving things around is a bit of a pain. I'll need to investigate a bit more if it makes sense
Thanks I've fixed the alignment and split the energy_cost_buy and energy_cost_sell over two lines to make more space for the extra info,
I've standardized the placement of the daily load and daily aux. They now appears above the rectangle.
Parked as an idea. Thanks
Getting this logic correct is going to be challenging and the way non-essential loads are handled can vary depending on settings, wiring and inverter. I dont really want to go down that rabbit hole.
5 - essential_power is the only value that the card will calculate based on supplied sensors i.e. essential = inverter_power_175 + grid_power_169 - aux_power_166
No that should be fine.
Can you share mockup of how this will look? |
Beta Was this translation helpful? Give feedback.
-
@slipx06 I have to get a moment to do the mock up... been busy. It was essentially just the same as the top left side, but on the top right, displaying the Total kWh used for the house (that a user could then map to the House Consumption feed into a utility_meter to show overall usage (i.e. PV + Grid + Battery)) and next to that the House Consumption showing the Active Power / current Watts or kW being used for the house (i.e. Essential + Non-Essential... optional ? AUX) Anyhow, just wondering if needed would it be possible to have an 'Invert' option for Non-Essential' ? |
Beta Was this translation helpful? Give feedback.
-
@slipx06 At the time I suggested that maybe it could be a conditional item, that is available IF the AUX is disabled (and the AUX section of the card then unused). You asked if I could paste a screenshot back as to what/where I was talking about. As such please find below (apologies on slow reply, just snowed under for a while now). I have highlighted the AUX area I was thinking off with 'Box 1' or broken into two parts in 'Boxes 2 and 3' would be another alternative. Doubt it could fit, but utopian would be across the top of the essential 1 and 2 boxes on the top right of the card [showing 244W / 165W], so it could be a 2.30kW / 34.5kWh with a smaller 'Load / Daily Energy' underneath it) that would be like the 'Daily Solar / Left Today' on the left top of the card. Active Load / Daily Cons. are other descriptors that could be used to reduce the letter count in those examples also.? |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
Current Behavior
No native Huawei support
Expected behaviour
Native Huawei support would be nice.
Possible Solutions
If you could give some pointers as to what you require to add support for Huawei, I would be able to look at it to add support to determine the sensors that could be utilised from the Huawei Solar Integration by WLCRS ( https://github.com/wlcrs/huawei_solar ).
Mode
Both
Context / Reason
Provide added support for Huawei users.
Beta Was this translation helpful? Give feedback.
All reactions