Skip to content
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

[Feature Request]: Huawei Energy Management Assistant (EMMA-A01 / A02) Support #498

Open
2 tasks done
Roving-Ronin opened this issue Oct 9, 2023 · 23 comments
Open
2 tasks done
Labels
on-hold Don't close when stale

Comments

@Roving-Ronin
Copy link
Contributor

Roving-Ronin commented Oct 9, 2023

Describe your feature request

As per the wall charger feature request, this 'issue' is intended as a location for people to be able to start gathering information and discussing how it works and how it may potentially be supported in the integration.

Given that the EMMA in future will be the preferred method of installation for Huawei Solar installations, with it :

  • providing the energy/consumption meter functionality (superceded the standalone DDSU/DTSU-666H meter);
  • connecting to the inverter(s) via RS485 to provide the aforementioned energy/consumption meter functionality;
  • providing network/internet connectivity for the inverter(s) and LUNA ESS connected via RS485, with its inbuilt WiFi+WAN ethernet ports;
  • connecting to the (forthcoming) SmartGuard-63A that is the replacement for the BackupBox device, that provides for a protected circuit in the event of a grid outage;
  • connecting to the (forthcoming) Huawei Smart Charger 7/21kW for EV charging, via either the LAN port (bad naming, it is only for charger <--> EMMA direct patching, with a single charger). See Issue: [Feature Request]: Wallbox Integration #491
  • Also adds smart / cloud capabilities such as being able to access weather information and make decisions, such as if it will be raining / overcast tomorrow, then charge the LUNA ESS off the cheapest grid power available before tomorrow.

Hopefully Huawei will be utilising the same modbus registers used on the DDSU/DTSU-666H meters, to provide themselves with maximum compatibility for existing installations upgrading, that will allow for 'out of the box' compatibility with WLCRS. However this needs to be confirmed when documentation is published detailing the modbus register definitions for EMMA.
As EMMA is adding additional functionality, it would be a good expectation that there may be additional modbus registers added to EMMA, that would then need to be reviewed and see if any are 'worthwhile' or of use to request being added to WLCRS.

To date documentation published on EMMA is:
EMMA-(A01, A02) User Manual.pdf v01 - Superceded
FusionSolar App Quick Guide (EMMA).pdf
Huawei - EMMA Quick Installation Guide.pdf

Proper usage

  • I confirm that this is not a bug report or support request
  • I confirm that this feature request is within the stated scope of the integration
@wlcrs wlcrs added the on-hold Don't close when stale label Oct 18, 2023
@Roving-Ronin
Copy link
Contributor Author

FYI Huawei have released an installation videa for the EMMA devices, and a new User Guide that includes updating network information.

Note: The EMMA is a device that manages energy in a home with a PV system. It can implement unified scheduling and management of home energy. The EMMA has two models:

EMMA-A01: Only PV and ESS features are supported. Plant-level power control functions, such as maximum self-consumption and grid-tied point control, are supported for unified scheduling of home energy and plant-level energy optimization, further improving the PV energy utilization

EMMA-A02: Features of PV, ESSs, smart chargers, and smart loads are supported. In addition to unified scheduling of home energy, the EMMA-A02 can connect to smart loads such as chargers, SG Ready heat pumps, and smart switches. Users can set the reservation time to charge vehicles and heat water in advance at the specified time. In addition, users can set the priority to use PV energy for devices as required to make the best use of PV energy.


EMMA Installation Video: https://support.huawei.com/enterprise/en/doc/EDOC1100338746?idAbsPath=7639526%7C258788303%7C258788491%7C258789989%7C23205712%7C256539983

[EMMA-(A01, A02) User Manual - 2023-10-31 - v02.pdf](https://github.com/wlcrs/huawei_solar/files/13445816/EMMA-.A01.A02.User.Manual.-.2023-10-31.-.v02.pdf) from https://support.huawei.com/enterprise/en/doc/EDOC1100325377/9a24721e/networking

Comments:

Updated network diagrams appear to confirm that the EMMA will replace the sDongle as the (default?) method to provide connectivity for inverters/site to FusionSolar, whilst the DDSU/DTSU-666 meters will also be superceded with the EMMA providing this functionality also (option to use inbuilt CT's <63A or connect external CT's for >63A systems).

There is only reference to modbus-tcp in relation to certificates and authenticating with 'peer NMS' and FusionSolar.

image

image

Looking at the RS485 details, it has an RS485 A and B, with A going to the inverter/cascade and B for '3rd party devices'.
Previously on the SmartLogger devices this meant the DDSU/DTSU-666 meter, however this functionality is now inbuilt to EMMA,
To date EMMA documentation has zero reference to connecting to a SmartLogger device (IMHO looks like EMMA will be pitched at home users and IF anyone needs a SL that is for more commercial installations where a DDSU/DTSU is not used/needed).
Pending more information about EMMA and its modbus-tcp specifics, given metion of it and prior support in the sDongle it must have it, but as a fallback there is the question of could RS485-B be used as method to connect and Elfin modbus-tcp appliance if needed as a 'last resort'?

image

@torwag
Copy link

torwag commented Jan 19, 2024

Hi,
just to understand, I did nowhere see a configuration with cascaded inverters. Did Huawei mention anywhere how this EMMA would work in that case. To me it looks like a combination of a smart meter (DTSU666-H) with the smart logger (SmartLogger 3000 which seems to be intended for larger PV systems) or Smart Module (Smart Module 1000).
Honestly, Huawei is terrible in naming devices so that it doesn't confuse the heck out of people...
SmartMeter, SmartLogger, SmartModule, SmartDongle and now EMMA....

@Roving-Ronin
Copy link
Contributor Author

@torwag the EMMA appliance is a replacement option for the DDSU/DTSU-666H, USB sDongle etc so from an inverters persepctive is doesn't matter is its 1 or 3 inverters in a cascade. Instead of wiring in the DDSU/DTSU-666H in future you'll connect the EMMA via that RS485 port.

Also read the prior posts carefully and you'll notice at the bottom of 'Figure 2-2' it mentions:

"Inverters connect to the EMMA over RS485. A maximum of three inverters can be connected in parallel"

Worth noting also is that since that post, Huawei / Shelly have also announced that EMMA can integrate with some of their devices, see:

image

@MarkusKAuatria
Copy link

Hello
EMMA is now available in Europe

When do you want to start the integration?
Thank you
Mark

@Roving-Ronin
Copy link
Contributor Author

@MarkusKAuatria

Do you have an EMMA installed already and are offering to install the current WLCRS integration version and see if it 'mostly' works already (assuming it uses the same modbus registers as the DDSU/DTSU-666H for the power meter data)? Post that your able to provide WLCRS with remote access to your setup to allow him to develop and test, for any new modbus registers that are required?

@MarkusKAuatria
Copy link

MarkusKAuatria commented Mar 16, 2024

Hello
I have already installed EMMA-A02.
YES, I can give you remote access from my HASSIO test system.
I would like to send you the login details on a private channel
(Email, Telegram,...)
I'm looking forward to a good collaboration

Konfiguration
->EMMA-A02

--> SUN2000-10KTL-M1 (Modbus 1)
---> 1. LUNA2000-15-S0 (15kw)
---> 2. LUNA2000-15-S0 (15kw)

--> SUN2000-5KTL-M1 (Modbus 2)
---> 14x SUN2000-450W-P

https://ske-solar.com/wp-content/uploads/2024/02/QuickGuide_Three-Phase_PVESSEMMA-Networking_V03_2024-01-31_EN.pdf

Attention
Emma is connected via pin 2/3 and not via PIN 5/7 like the DTSU

@Roving-Ronin
Copy link
Contributor Author

@MarkusKAuatria
Have you tried installing the integration yet, any luck ? If so, what information do you see, or are their any logs ?

"Emma is connected via pin 2/3 and not via PIN 5/7 like the DTSU"

PIN 5 ias 'shielding ground' (shared with LUNA also) with PIN7 (485A2) and PIN9 (RS485B2) being used to connect to the DTSU-666H. Are you sure that EMMA is correctly wired though with it using PIN 2 (RS485B1-1 'Differential -') and PIN 3 (RS485A1-2 'Differential +'), apart from these being from different pairs, the Huawei documentation shows it as PIN 1 (+) and PIN 3 (-) , that is also the A1/B1 pair previously used to cascade (i.e. out from 1&3 from higher up modbus device, that then goes into 2&4 from lower device in the cascade)? See diagram posted earlier/above, from the EMMA manual.

Note: This would mean that EMMA now would become the Modbus Master, with the 'primary' inverter now becoming a modbus slave to it.
This requires confirming the modbus ID# of EMMA and the inverters, as installation may now change to be using ID# of EMMA, then Primary inverter and lastly seconary inverter.
i.e. if originally inverters installed with Primary inverter is ID#1, Secondary is ID#2 and when EMMA was installed it just assumed ID#3. Then installing the integration would now mean needing to use ID 3,1,2 (whereas previously the sDongle didn't have an ID and you just entered it as 1,2).

Hoping that Huawei used the same modbus registers that the DDSU/DTSU-666H meter uses, meaning the Smart Meter part of EMMA will work with WLCRS. I haven't see any updated information as to Modbus Registers for EMMA, and IF it adds any new ones to 'share' whatever additional data has / provides access to.

@wlcrs
Copy link
Owner

wlcrs commented Mar 18, 2024

@MarkusKAuatria
Do you have an account on https://community.home-assistant.io/ ? I can send you my contact details via private message over there.

Can you also download the latest (and current only) file from https://support.huawei.com/enterprise/en/fusionsolar/smarthems-pid-256539983/software/ and upload it here? For SUN2000 software downloads, the ZIP-files with the firmware updates also include PDF's with documentation on how the available modbus registers look like. As I do not own such a device, I do not have access to those downloads.

@MarkusKAuatria
Copy link

@wlcrs
My https://community.home-assistant.io/ account ist the same as the GITHUB account (I changed it now)

@Roving-Ronin
Sorry it is 7 and 9
The Modbus Adress from EMMA is 0 so it is 0,1,2
image

@torwag
Copy link

torwag commented Mar 19, 2024

Just out of curiosity, what would be the benefit of the EMMA for home assistant integration? As I understood, the "smart" features would be why we connect it to home assistant in the first place.
If the connection would be easier, that would be a win, I'm just in the middle of setting up a dedicated Rpi-based home assistant server (as remote unit to the main server). Dealing with (in my case) three wifi dongles for three inverters, is a bit a hassle right now, as HaOS doesn't come with the wifi kernel modules yet. As usual I was stupid selecting the "wrong" wifi sticks 😉

@Roving-Ronin
Copy link
Contributor Author

Roving-Ronin commented Mar 19, 2024

@torwag EMMA combines the modbus access and network connectivity (WiFi and Ethernet) previously provided by the sDongle, the DDSU/DTSU-666H smart meter functions into one unit, whilst then also adding support and connectivity for the Huawei EV charger(s), Load Shedding/Control (via select Shelly devices) and abilty to access cloud data (e.g. forecasts) and your usage trends to provide some 'intelligence' to a Huawei installation.

Yes WLCRS + HA users will still be taking this a step further and pulling in their own data and making automations etc, but the main thing is EMMA appears to be 'the' preferred solution for adding network connectivity, and smart/consumption meter to Huawei installs going forward (vs multiple seperate items). Huawei is also pushing this by the fact that the new Backup Box (aka the SmartGuard) includes an EMMA built into it. From a business perspective for Huawei it also means they are moving from having to buy another vendors consumption meter and work with it, to now producing and selling their own meter (and extra functionality) that they control the IP for, meaning better profits potentially but also potentially reducing their support costs (from issues arising from DDSU/DTSU-666H).

BTW trying to remember, was your setup the one with 3 inverters, with each essentially going to seperate users/apartments? Otherwise, why don't you just cascase them all together (bit of Cat5e cable), the only need 1 sDongle connection for the lot and 1 DDSU/DTSU-666H meter?
Are you linking the 'remote' HA to the main server? Have you looked at: https://github.com/custom-components/remote_homeassistant


@MarkusKAuatria
Where you able to get a hold of the file that Thijs (WLCRS) was after, containing the modbus definitions?
Did you have any luck trying to install WLCRS integration and entering ID# 0,1,2 ? (would be nice if that works, confirming the EMMA is just passing through the inverter / optimiser / battery modbus registers like the existing connection methods do, even though you'd have to presume EMMA has some additional ones for itself, let alone the Smart EV charger ones).

@wlcrs
Copy link
Owner

wlcrs commented Mar 19, 2024

I've received access details from Markus. The EMMA device does not have any open TCP ports at the moment, so he will need to check if he can access a setting to fix this (which seems to be available according to a screenshot from the manual ).

Alternatively, the EMMA-device also exposes a serial Modbus RTU interface on 2 pins (cfr. bottom screenshot of #498 (comment)). So that is another scenario that we can explore if necessary.

@fkhofmann
Copy link

Hello, now that there should be more EMMAs in the field, have you received any new information about possible ways to access EMMA? :)

I hope Huawei won't keep it closed to third-party apps for querying their devices.

@wlcrs
Copy link
Owner

wlcrs commented Jun 5, 2024

The EMMA device I had access to via Markus does not answer to any queries: not via TCP, not via RTU (serial). We haven't been able to obtain instructions on how we can locally connect to a solar installation with EMMA from Huawei.

I would urge everybody considering to order a Huawei Solar installation with EMMA device to first contact Huawei to verify if a local Modbus-connection is supported. If possible, please obtain a manual on how to achieve this and share it with me here.

@fkhofmann
Copy link

Oh, that's too bad, that is certainly not an optimal situation. I have also tried to get information on the topic as a potential future Huawei customer. Huawei's technical support didn't provide any information because I am not a customer (couldn't provide a device serial no) and referred me to a distributor. The distributor also didn't want to tell me anything because I am an end user.

I guess a Huawei device owner would have to open a service request.

@MarkusKAuatria
Copy link

MarkusKAuatria commented Jun 5, 2024

Hallo
These were the last two feedbacks from HUAWEI Support

  • (Freitag, 5. April 2024 15:08) Unfortunately, we do not have any guideline about how access works exactly and how the individual services can be accessed (Modbus TCP, MQTT, web,...) especially for EMMA-A02.

  • (Friday, 5 April 2024 14:30) Please be advised that we created related SR NO. xxxxxxx and we will come back with a resolution as soon as possible. Kindly ask you to choose the option “Reply All” when communicating with our engineers in order to track your response easily.

@tmenguy
Copy link

tmenguy commented Jun 5, 2024 via email

@Roving-Ronin
Copy link
Contributor Author

@tmenguy the issue is adding support for EMMA, especially given in future installations it replaces the sDongle, DDSU/DTSU-666H consumption meter and becomes the primary means for communication for the plant (that also has 2 x M1 3p inverters).

@tmenguy
Copy link

tmenguy commented Jun 6, 2024

Yes, and I was looking at adding an EMMA to my existing installation (with the new backup box ... but it is not 3phases for now it seems). But correct me if I'm wrong: it will replace the meter and Sdongle all at once, but the inverter wifi will stay no? so perhaps there is a way to still connect through it?
(Or perhaps I'm completely dumb here and it is the Sdongle that was creating all the modbus connection and the inverter wifi was only a way to access the Sdongle capabilities, and the inverter is only a pass through. But if not it means at least the inverter inner meter and commands could still be available through the wifi no? )

@Roving-Ronin
Copy link
Contributor Author

@tmenguy The EMMA-A02 is available to support 3p, with AC voltage options of:
1P2W: 100 ~ 240 V, 50 / 60 Hz
3P3W: 346 ~ 415 V, 50 / 60 Hz
3P4W: 346 ~ 415 V, 50 / 60 Hz

The SmartGuard documentation has started mentioning a 'SmartGuard-63A-T0' with T0 = Three-phase Whole Home Backup system. See:

User Manual: https://support.huawei.com/enterprise/en/doc/EDOC1100366781?idPath=258788303%7C258788489%7C258789981%7C21102413%7C255740899

Networking Quick Guide: https://support.huawei.com/enterprise/en/doc/EDOC1100366779?idPath=258788303|258788483|258789967|21102414|21571652

Be aware though, that whilst it mentions 'whole home backup' have a look at the wiring diagram:
image

You'll note that it refers to 'Backup Load' and 'Non Backup Load', then have a look at the new 5k-12k MAP0 inverter series manual, with some handy networking diagrams on page 17-18:
https://support.huawei.com/enterprise/en/doc/EDOC1100366802?idPath=258788305|254827209|258792409|22755755

image

From this it appears the SmartGuard-63A-T0 will allow connecting the grid feed into it and then attaching the (bulk of the) house to its protected output up to 63A, so its now inline between your previous grid feed and the switchboard. You could then attach your 3p HVAC/Ducted Aircon unit to the unprotected circuit. Idea appears to be that you are protected this way and then can add an Automatic Transfer Switch (ATS) in to allow cutting over from a grid/mains feed to having a generator kick in, so your LUNA ESS + SmartGuard 'protects' the house for the 20ms until the generator kicks in automatically.

Note that is with the MAP0 inverters and typically it costs a few extra $ for a 3p with a automatic start. If you have the $ for a 3p generator and already have a M1 inverter(s), you could just have an ATS / Manual Transfer Switch (that don't cost much) installed and rely upon the LUNA covering you for a few minutes and walking outside and manually starting the generator.

@ismiregal17
Copy link

Hello, the new backup box Smartguard can also only supply 1 phase. The 3-phase designation refers to the inverter. There will be a real 3-phase backup box from Huawei in the future, but it will not be able to work together with the inverters currently on the market. There will be a new inverter for this backup box. The reason is that the current inverters are not unbalanced load capable.

@tmenguy
Copy link

tmenguy commented Jun 8, 2024

@Roving-Ronin thanks a lot for the, as always very detailed answer, I've seen only the S0 and not the T0 smartGuard, but loosing HA connection may be a no brainer to me if we don't find a way to connect to EMMA.
and well what you say @ismiregal17 is even worse then .... it means no true 3p backup for any of our current inverters (even my brand new MB0) ...something I completely missed, and well not happy at all (well I will survive probably :) )

@Roving-Ronin
Copy link
Contributor Author

@ismiregal17
"The reason is that the current inverters are not unbalanced load capable."

Good point, overlooked that....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold Don't close when stale
Projects
None yet
Development

No branches or pull requests

7 participants