Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Huawei ESM-48100B1 Changing Slave ID

Featured Replies

Hi, I am busy trying to communicate with Huawei ESM-48100B1 batteries through RS485. When polling just one battery I have no issues, but I want to connect more batteries in parallel and read them as a rack. When I procured my batteries they were set to the default slave ID of 214 so they both share the same ID. Looking through the modbus spec it gives no indication of how multiple batteries can be read from or how slave IDs can be changed.

I know there is a Smart Logger that Huawei sells that allows one to edit certain parameters on these batteries (haven't been able to confirm if Slave ID is one of them), but I would prefer a method that didnt require me to go out and buy another piece of equipment.

Does anyone have any experience working with Huawei batteries?

  • 3 weeks later...
  • 2 weeks later...
On 1/17/2023 at 8:21 PM, Emile Pienaar said:

Hi, I am busy trying to communicate with Huawei ESM-48100B1 batteries through RS485. When polling just one battery I have no issues, but I want to connect more batteries in parallel and read them as a rack. When I procured my batteries they were set to the default slave ID of 214 so they both share the same ID. Looking through the modbus spec it gives no indication of how multiple batteries can be read from or how slave IDs can be changed.

I know there is a Smart Logger that Huawei sells that allows one to edit certain parameters on these batteries (haven't been able to confirm if Slave ID is one of them), but I would prefer a method that didnt require me to go out and buy another piece of equipment.

Does anyone have any experience working with Huawei batteries?

What program u use ? Use python or other?

Edited by Shingsam

  • 11 months later...

I have a system using 2x ESM48100B3 bats in parallel. In the past I used them with growatt 5000W inverters, but with now RS485 / modbus connection. The Huawei bats use Modbus RU protocol but it's implemented a little out-side of the Modbus spec so I wouldn't expect any non Huawei equipment to be able to communicate with it. After hours of searching I ran into this support article describing a Huawei maintenance tool that can communicate with the batteries, read internal cell voltages etc. from a PC over a custom rs485 cable. 

Sadly access to the tool is quite restricted, and Huawei support just spun me round and round when I asked for it.  


Long story short I found someone with the tool, and was able to finally connect from my pc and read out the voltages while doing a serial log/sniff.
As I have an EPEver XTRA charge controller & NP2000 inverter that work with the batteries now, I decided to give a go at creating a little c# app that lets me pull data out of the charge controller and the Huawei Batteries...

The code is available here on Github: https://github.com/TruthData/SimpleModbusCommander   

This code is proof of concept only, and I can't vouch for its  reliability...

 

as the original poster said ... I have found no way to set the battery ID's... both of my batts seem to be hardcoded to "214".  The batteries don't immediately respond to requests.. It seems you have to poll them a few times over a few seconds. before they start responding....  

I use a stock EPEver USB-RS485 cable for communications with their charge controller, and followed the instructions on the support article above for building a custom usb-rs485 cable for the Huawei using a $3.50 USB to RS485 Converter FT232 RS-485 Max485 Adapter FTDI FT232RL

I hope the above is a blessing to folks...

  • 1 month later...
On 2024/02/19 at 11:26 PM, daud said:

I have a system using 2x ESM48100B3 bats in parallel. In the past I used them with growatt 5000W inverters, but with now RS485 / modbus connection. The Huawei bats use Modbus RU protocol but it's implemented a little out-side of the Modbus spec so I wouldn't expect any non Huawei equipment to be able to communicate with it. After hours of searching I ran into this support article describing a Huawei maintenance tool that can communicate with the batteries, read internal cell voltages etc. from a PC over a custom rs485 cable. 

Sadly access to the tool is quite restricted, and Huawei support just spun me round and round when I asked for it.  


Long story short I found someone with the tool, and was able to finally connect from my pc and read out the voltages while doing a serial log/sniff.
As I have an EPEver XTRA charge controller & NP2000 inverter that work with the batteries now, I decided to give a go at creating a little c# app that lets me pull data out of the charge controller and the Huawei Batteries...

The code is available here on Github: https://github.com/TruthData/SimpleModbusCommander   

This code is proof of concept only, and I can't vouch for its  reliability...

 

as the original poster said ... I have found no way to set the battery ID's... both of my batts seem to be hardcoded to "214".  The batteries don't immediately respond to requests.. It seems you have to poll them a few times over a few seconds. before they start responding....  

I use a stock EPEver USB-RS485 cable for communications with their charge controller, and followed the instructions on the support article above for building a custom usb-rs485 cable for the Huawei using a $3.50 USB to RS485 Converter FT232 RS-485 Max485 Adapter FTDI FT232RL

I hope the above is a blessing to folks...

can you share the manuals for 485 of EMS-48100b1 i have some modules but the huwaei site dont aprov my account to see tech manuals.

  • 6 months later...
On 2023/01/17 at 10:21 AM, Emile Pienaar said:

Hi, I am busy trying to communicate with Huawei ESM-48100B1 batteries through RS485. When polling just one battery I have no issues, but I want to connect more batteries in parallel and read them as a rack. When I procured my batteries they were set to the default slave ID of 214 so they both share the same ID. Looking through the modbus spec it gives no indication of how multiple batteries can be read from or how slave IDs can be changed.

I know there is a Smart Logger that Huawei sells that allows one to edit certain parameters on these batteries (haven't been able to confirm if Slave ID is one of them), but I would prefer a method that didnt require me to go out and buy another piece of equipment.

Does anyone have any experience working with Huawei batteries?

Puso la resistencia terminal de red? Si no tiene la original es una de 120ohm

  • 1 year later...

Hola a todos,

Ando buscando como conectar el esp32 a mi bateria por rs485 actualmente uso este software que me fasilitaron contiene informacion importante que les puede ayudar a buscar las direcciones se usa con un usb to 485 FTDI solo en Com3 les dejo link BATTERY MAINTENANCE TOOLS este mismo tiene un DLL que les podria ayudar no pude solo y les pido ayuda a uds, los pines del rj45 son 1/4=A 2/3=B solo funcionan en COM3 9600 RTU 8E1

Lithium Battery Maintenance Tool.zip

"Dirección","Nombre","Unidad","Tipo","Precisión","Observaciones"
"0x0000","Voltaje de busbar","V","uint16","0.01",""
"0x0001","Voltaje de batería","V","uint16","0.01",""
"0x0002","Corriente de batería","A","int16","0.01",""
"0x0003","Porcentaje de capacidad de batería restante (SOC)","%","uint16","1",""
"0x0005","Temperatura máxima de celda","°C","int16","1",""
"0x0006","Temperatura mínima de celda","°C","int16","1",""
"0x000E","Modo del módulo","","uint16","","0: hibernando; 1: bajo consumo; 2: carga; 3: descarga; 4: en espera; 0xFFFF: desconocido"
"0x0012","Temperatura de celda 1","°C","int16","1",""
"0x0013","Temperatura de celda 2","°C","int16","1",""
"0x0014","Temperatura de celda 3","°C","int16","1",""
"0x0015","Temperatura de celda 4","°C","int16","1",""
"0x0016","Temperatura de celda 5","°C","int16","1",""
"0x0017","Temperatura de celda 6","°C","int16","1",""
"0x0018","Temperatura de celda 7","°C","int16","1",""
"0x0019","Temperatura de celda 8","°C","int16","1",""
"0x001A","Temperatura de celda 9","°C","int16","1",""
"0x001B","Temperatura de celda 10","°C","int16","1",""
"0x001C","Temperatura de celda 11","°C","int16","1",""
"0x001D","Temperatura de celda 12","°C","int16","1",""
"0x001E","Temperatura de celda 13","°C","int16","1",""
"0x001F","Temperatura de celda 14","°C","int16","1",""
"0x0020","Temperatura de celda 15","°C","int16","1",""
"0x0021","Temperatura de celda 16","°C","int16","1",""
"0x0022","Voltaje de celda 1","V","uint16","0.001",""
"0x0023","Voltaje de celda 2","V","uint16","0.001",""
"0x0024","Voltaje de celda 3","V","uint16","0.001",""
"0x0025","Voltaje de celda 4","V","uint16","0.001",""
"0x0026","Voltaje de celda 5","V","uint16","0.001",""
"0x0027","Voltaje de celda 6","V","uint16","0.001",""
"0x0028","Voltaje de celda 7","V","uint16","0.001",""
"0x0029","Voltaje de celda 8","V","uint16","0.001",""
"0x002A","Voltaje de celda 9","V","uint16","0.001",""
"0x002B","Voltaje de celda 10","V","uint16","0.001",""
"0x002C","Voltaje de celda 11","V","uint16","0.001",""
"0x002D","Voltaje de celda 12","V","uint16","0.001",""
"0x002E","Voltaje de celda 13","V","uint16","0.001",""
"0x002F","Voltaje de celda 14","V","uint16","0.001",""
"0x0030","Voltaje de celda 15","V","uint16","0.001",""
"0x0031","Voltaje de celda 16","V","uint16","0.001",""
"0x0042-0x0043","Contador de descargas de batería","veces","uint32","","Dato estadístico (32 bits). Aumenta en 1 cuando pasa a modo descarga por más de 5 minutos"
"0x0044-0x0045","Amperios-hora descargados","Ah","uint32","","Dato estadístico (32 bits)."
"0x0046","Estado de alarma crítica de batería 1","","uint16","","Expresado en bits. 1: alarma; 0: normal o reservado. Bit 0: advertencia; Bits 1–6: falla; Bits 7–15: reservado"
"0x0047","Estado de alarma crítica de batería 2","","uint16","","Expresado en bits. 1: alarma; 0: normal o reservado. Bits 0–15: falla. Consulte registro 0x0320 para alarma de celda cuando >16 celdas"
"0x0048","Estado de alarma mayor de batería","","uint16","","Expresado en bits. 1: alarma; 0: normal o reservado. Bits 0–14: protección; Bit 15: reservado"
"0x0049","Estado de alarma menor de batería","","uint16","","Expresado en bits. 1: alarma; 0: normal o reservado. Bits 0–9: advertencia; Bits 10–15: reservado"
"0x004A","Estado de alarma del módulo","","uint16","","Expresado en bits. 1: alarma; 0: normal o reservado. Bits 0,2,4,9,10,12: advertencia; Bits 3,5,7,8,11: protección; Bits 6,13: falla; Bits 14–15: reservado"
"0x0101","Versión de software","","uint16","",""
"0x0102","Versión de hardware","","uint16","",""
"0x0103","Versión de BootLoader","","uint16","",""
"0x0104","Tipo de dispositivo","","uint16","","0x01: BMS integrado; 0x02: BMS separado"
"0x0105","Fabricante","","uint16","","0x00: Huawei"
"0x0106","ID de subsoftware","","uint16","",""
"0x0107","Capacidad de batería","Ah","uint16","1",""
"0x010F","Número de celdas de batería","celdas","uint16","",""
"0x0204","Potencia de salida","W","uint16","1",""
"0x0205","Voltaje de bus externo","V","uint16","0.01",""
"0x0209-0x020A","Tiempo de funcionamiento acumulado","h","uint32","","Dato estadístico (32 bits) en horas."
"0x0300","Temperatura de celda 17","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0301","Temperatura de celda 18","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0302","Temperatura de celda 19","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0303","Temperatura de celda 20","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0304","Temperatura de celda 21","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0305","Temperatura de celda 22","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0306","Temperatura de celda 23","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0307","Temperatura de celda 24","°C","int16","1","Válido solo si la batería tiene más de 16 celdas."
"0x0310","Voltaje de celda 17","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0311","Voltaje de celda 18","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0312","Voltaje de celda 19","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0313","Voltaje de celda 20","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0314","Voltaje de celda 21","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0315","Voltaje de celda 22","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0316","Voltaje de celda 23","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0317","Voltaje de celda 24","V","uint16","0.001","Válido solo si la batería tiene más de 16 celdas."
"0x0320","Estado de alarma crítica de batería 3","","uint16","","Expresado en bits. 1: alarma; 0: normal o reservado. Bits 0–7: falla; Bits 8–15: reservado. Válido solo si la batería tiene más de 16 celdas."
"0x0332-0x033D","Modelo de batería","","uint16","","Cadena ASCII de 12 registros con el modelo (ejemplo: ESM-48100B1)."
"0x0342-0x0343","Energía descargada (Wh)","Wh","uint32","","Dato estadístico (32 bits)."
"0x1000","Año","","uint16","","Rango: 2000–2199"
"0x1001","Mes","","uint16","","Rango: 1–12"
"0x1002","Día","","uint16","","Rango: 1–31"
"0x1003","Hora","","uint16","","Rango: 0–23"
"0x1004","Minuto","","uint16","","Rango: 0–59"
"0x1005","Segundo","","uint16","","Rango: 0–59"

cambiar_coeficiente_esm48100a6.py

  • 7 months later...

I am trying to integrate Huawei ESM-48100U2 batteries with Home Assistant using ESPHome/Modbus RTU and would appreciate any technical insight regarding protocol details and register maps.

What I have discovered/tested so far:

Battery:

- Huawei ESM-48100U2

- Possible slave ID: 214

- Communication settings:

- 9600 baud

- 8E1 (8 data bits, EVEN parity, 1 stop bit)

Hardware used:

- ESP32

- MAX485

- MAX490

- ESPHome

Tests performed:

------------------------------------------------

1) MAX485 RS485 2-wire

- Partial communication achieved

- Received:

- CRC errors

- truncated responses

- UART echo

At some moments I received valid Modbus exceptions:

- 0x83 exception 2

- 0x84 exception 1

This indicates:

- slave 214 is responding

- protocol is likely Modbus RTU

- but register/function selection may be wrong

------------------------------------------------

2) MAX490 RS422 4-wire

- Tried separating:

- T+/T-

- R+/R-

Received strange/partial UART responses:

- 94 0A 2F FF ...

No stable valid Modbus frames.

------------------------------------------------

3) Important discovery from forum

Found this thread:

https://powerforum.co.za/topic/16372-huawei-esm-48100b1-changing-slave-id/

Important information found:

- Default slave ID = 214

- Communication = 9600 8E1

- Huawei implementation is described as “slightly outside standard Modbus”

- Requires repeated polling attempts

- Another user succeeded using FTDI RS485 adapter

Most important finding:

RJ45 pinout:

- pins 1 and 4 = A

- pins 2 and 3 = B

This strongly suggests:

- duplicated 2-wire RS485

- NOT classic RS422 full duplex

------------------------------------------------

4) Registers found in forum

Supposed register map:

- 0x0000 = busbar voltage

- 0x0001 = battery voltage

- 0x0002 = current

- 0x0003 = SOC

- 0x000E = mode

------------------------------------------------

5) Registers I already tested

Tested:

- 74

- 802

- 1000

- 1329

Results:

- some returned Modbus exceptions

- some returned partial responses

- still no confirmed valid readings

------------------------------------------------

6) Current ESPHome setup

Using:

- modbus_controller

- slave 214

- 9600 EVEN

- tested function 03 and 04

Examples:

- function 03 -> exception 2

- function 04 -> exception 1

------------------------------------------------

Next step:

I will test using a USB RS485 adapter directly on PC with:

- QModMaster

- Modbus Poll

Planned wiring:

- Huawei pins 1 + 4 -> A

- Huawei pins 2 + 3 -> B

Questions:

1) Has anyone successfully integrated ESM-48100U2?

2) Is the register map above correct?

3) Is there any byte swap/endian requirement?

4) Is this really standard Modbus RTU?

5) Which function code should be used?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.