-
Notifications
You must be signed in to change notification settings - Fork 61
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native Huawei Support #135
Comments
What features are you missing, or hoping to see for huawei? |
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. |
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. |
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. |
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. |
Very interested in this , my setup Please contact me and let me know how i can help |
@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 ? |
hi nice to meet you, |
@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: |
@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 |
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 |
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 |
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 |
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. |
@Roving-Ronin looking good. We can use the entity below for the inverter status. Does the sensor return the string, the number or both?
|
@slipx06 the sensor returns the text string. Here's the messages mine has for 'Device Status': So I'd say this is the full list of possible messages for that sensor (not that I've seen many... and hopefully never will). Name: Device Status "Standby: initializing", The 'Inverter State' you posted above Note that currently mine is operating and saying "Grid-Connected, Grid-Connected normally", so it looks like those messages can be grouped together based upon the first 3 number groups being the same i.e. 0b0000_0000_0000_xxxx . So the options appear to be: "Standby", @kurtdefeyter could you screenshot your battery diagnostic section and also click on the status sensor to confirm the options that is shows are as below ? Name: Battery Status Options: OFFLINE |
I'll update the grid connected status logic to be case-insensitive so that your Off-Grid Status is interpreted correctly. EDIT: Added to 3.17.1 |
@slipx06 ahould we be using this to denote it's Huawei and bring up the correct inverter image and also the status ? inverter: |
Yes like this once I've updated the code
|
@slipx06 D'oh I forgot about that modern : false requirement. I can confirm though that the grid off symbol no longer appears / grid is correctly showing as online now. Let me know when to update and I'll check the inverter image / status and advise if it works. Thanks ! |
I propose the following mapping using the Inverter State. Please check.
|
It looks good apart from the typo ("internalcauses" instead of "internal causes", thats from the WLCRS Huawei integration, I've just submitted a change for this to be fixed: wlcrs/huawei-solar-lib#5 I'd suggest going with the status message with the typo corrected, pending the merge being approved by WLCRS I would think the chances of anyone having that alarm message
|
@Roving-Ronin |
@slipx06 3am here, so in the dark and in 'Standby' atm. But card now shows:
I think for the other battery related sections, we'll need to wait for @kurtdefeyter to reply to confirm the sensor outputs the Huawei Luna + WLCRS integration provides. |
@slipx06 on a seperate note, I'm not a software skilled person, but I thought that this might be of interest to you. Interesting part is section in which he's using the https://github.com/elax46/custom-brand-icons to allow adding inverter icons ( phu:huawei-solar-inverter ) versus having to develop your own and then he's also worked out how to make the inverter change colour based upon if its online of not and then blink/flash. Thought this might give some ideas and allow this kind of functionality to highlight status / draw attention to issues. If not, please ignore.
|
Thanks. The card is currently rendered through SVG elements so not something we can apply here with that method |
@kurtdefeyter thank, also need to keep an eye on that on the diagram to see it changes (sleep etc). |
Please test battery status messages in 3.20.1 You can use the entity |
From the picture you posted, it still seems to be missing the battery temperature, Amps and Watts
and in the entities section:
Refer to picture below, could you also please confirm these entity sensor names that I have listed, and also provide the sensor entity names (i.e. the battery_xxxx_yyy names) for the missing ones: Is "battery_rated_capacity:" a number you enter here or is this supposed to be to call a sensor ( documentation doesn't specify)? Re the prog1_time / prog1_capacity / prog1_charge is this like being able to set options to tell the battery to charge/discharge or feed to grid at certain times ? See from page 45: LUNA2000-(5-30)-S0 User Manual - 2023-05-31 v14.pdf On Hauwei LUNA ESS we can set different modes: and then within TOU or Custom for instance iirc we can setup 14 different time/rules. |
However the flow is wrong , now as we speak the battery discharge something like 1300 w , however the flow is showing like the inventor is putting current in the battery I have done a test last night charging a 5000w and then it shows the other way , like the battery is transferring to the inventor On battery temperature, that sensor thus not exist , only the inventor has a temperature sensor |
a) add invert_power: true so the top part of the card yaml reads:
Can you also send that 'whole of card' picture and advise re the above data requested and what sensors you had to enable (i.e. power meter Phase A/B/C Active Power and also Phase A/B/C Voltage, Frequency and Power Factor (that aren't enabled by default with WLCRS iirc) ? Thanks. |
The battery energy can be provided in one of 3 ways:
I would recommend option 1 or 2 as the 3rd option has not been tested thoroughly
Yes that's correct |
@slipx06 OK so having a sensor.battery_rated_capacity is required essentially. Looking and it seems that Huawei LUNA ESS (battery) have a modbus register for this. But checking the python library for WLCRS it looks like this isn't currently supported / queried. I would presume all batteries report their Rated Capacity in Amp Hours... ??? |
The entity
|
@kurtdefeyter we need to wrap this up for @slipx06 and provide him the ' FULL' list of entities that work for Huawei, to allow publishing in the documentation this list for new users to copy/paste and be up and (mostly) running with Huawei inverters. Once you reply with your yaml / sensor list, I can double check against mine (and add the battery sensors in) and provide Slipx06 with the final list. As requested above, could you please send a screenshot of the entire card you have and the card configuration (yaml) your using, noting an custom sensors you had to make? If you could you also please provide the information (sensors name / ID) for the battery data from: that should correspond to the data from WLCRS (here): @slipx06 inverter_voltage_L2: null |
Thanks I'll add those to the example |
@slipx06 |
Hi Folken, With multiple inverters .... a) note that the card can only display 1 inverter, so I've just gone with using the primary inverters Phase A/B/C Current, but then using the combined "Inverters Active Power" that shows the total Active Power of both inverters. See next item... b) do you have the derived sensors ( https://github.com/wlcrs/huawei_solar/wiki/Connecting-to-daisy-chained-inverters#combining-multiple-inverter-values ) setup, especially the combined "Inverters Active Power" (note the plural) and the "House Consumption Power" sensor? Thinking about it, but would the 'house consumption power' need to also factor in the LUNA discharging into the house or charging from the grid? Can you confirm from looking at your loads and power meter outputs? c) Given the card can only show 1 inverter, but it can show 4 PV strings, its best to just these for pv1 = inverter 1 string 1, pv2 = inverter 1 string 2, pv3 = inverter 2 string 1, pv4 = inverter 2 string 2. pv1_name: IV1.S1 pv1_power_186: sensor.inverter_input_power_1 Comment: Huawei / WLCRS input power is the total for each inverter, if you wanted to get the input power for each PV string, you could define a derived sensor that is voltage x current = power (w), and use that for 186 - 189. This would be:
If you created these derived sensors for each string you'd then use: pv1_power_186: sensor.inverter_pv_1_power_1 with or without these extra sensors, you'd use these entities to show the 2 inverters individual V & C. pv1_voltage_109: sensor.inverter_pv_1_voltage_1 d) I note this new entity in the card 'battery_current_direction', checking and there are these registers Reg.37000 = STORAGE_UNIT_1_CHARGE_DISCHARGE_POWER = "storage_unit_1_charge_discharge_power" Register Output is: > 0: charging or... < 0:discharging Folken could you:
End goal is to get a list of those sensors that are there with WLCRS by default and those we need to create (for a single inverter vs multiple inverter site, and for those with/without a battery), and then map/populate those default (and extra) entities into the Sunsynk card, so we end up with a couple of example configurations for single inverter / two inverters / inverter with battery that @slipx06 can the publish on his site for new Huawei users to simply copy and paste to setup a HA card (like the examples for Solis / Goodwe etc at: https://slipx06.github.io/sunsynk-power-flow-card/index.html ) |
This is mainly used for solis inverters (can be used for others). Their battery power is always positive, with an extra sensor for current direction. This is a bool, 1 for charging, 0 for discharging. |
@slipx06 given @Pho3niX90 's reply above, does this mean to get this battery_current_direction working for Huawei users would require adding a derived sensor for Huawei + WCLRS integration users, that says 'If STORAGE_UNIT_#CHARGE_DISCHARGE_POWER is > 0 (charging) then report sensor = 1; Or does the SunSynk card already have logic in to the recognise other inverters that show a postive or negative W output and recognise the power direction from the + vs - ? |
@Roving-Ronin If battery power is both positive and negative to indicate direction then this sensor is not needed and can be ignored. |
Hi @slipx06 Just working with another user to get this all tested with his setup that includes a LUNA ESS battery (and 2 x 5kW L1 1p inverters). ie. CHANGE FROM:
TO:
|
Sure I can make that change for you https://github.com/slipx06/sunsynk-power-flow-card/releases/tag/v4.10.3 |
@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 |
I've pushed a fix. Please test |
@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. |
OK I see the issue. Pushed another version to test |
@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. |
@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?
|
@Roving-Ronin Ive added the example section to populate https://slipx06.github.io/sunsynk-power-flow-card/examples/huawei.html |
@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 ? |
Thanks for the support suggestion. I've added the new section and categories. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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.
The text was updated successfully, but these errors were encountered: