Sunday, 4 October 2026

Adding zigbee2mqtt docker container to Home Assistant

My old Mint Linux laptop ("cottage") already runs Home Assistant as a docker container.

I now want to add a Sonoff USB zigbee dongle to provide zigbee2mqtt for it.



Following the instructions at: https://www.zigbee2mqtt.io/guide/installation/02_docker.html

I plugged in the ZBDongle-P (https://sonoff.tech/en-eu/products/sonoff-zigbee-3-0-usb-dongle-plus-zbdongle-p)


cottage@cottage-AMILO-Pro-Series-V8210:~$ date
Sun 04 Oct 2026 17:49:48 IST
cottage@cottage-AMILO-Pro-Series-V8210:~$ docker run    --name zigbee2mqtt    --restart=unless-stopped    --device=/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_18ab6971458aef1198d7baa3ef8776e9-if00-port0    -p 8180:8080    -v $(pwd)/data:/app/data    -v /run/udev:/run/udev:ro    -e TZ=Europe/Amsterdam    ghcr.io/koenkk/zigbee2mqtt
Using '/app/data' as data directory
Starting Zigbee2MQTT without watchdog.
Onboarding page is available at http://0.0.0.0:8080/


Now looking at http://172.28.207.40:8180/ I get the Zigbee2MQTT Onboarding control panel



Where I selected the USB dongle and set up access to my local MQTT server. But when I clicked on submit it crashed....

cottage@cottage-AMILO-Pro-Series-V8210:~$ docker run    --name zigbee2mqtt    --restart=unless-stopped    --device=/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_18ab6971458aef1198d7baa3ef8776e9-if00-port0    -p 8180:8080    -v $(pwd)/data:/app/data    -v /run/udev:/run/udev:ro    -e TZ=Europe/Amsterdam    ghcr.io/koenkk/zigbee2mqtt
Using '/app/data' as data directory
Starting Zigbee2MQTT without watchdog.
Onboarding page is available at http://0.0.0.0:8080/
[2026-10-04 19:03:47] info:     z2m: Logging to console, file (filename: log.log)
[2026-10-04 19:03:47] info:     z2m: External JS (converters/extensions) is disabled
[2026-10-04 19:03:47] info:     z2m: Starting Zigbee2MQTT version 2.14.2 (commit #5c0c1c60078e1737c5dee5f8217583bca7610e66
)
[2026-10-04 19:03:47] info:     z2m: Starting zigbee-herdsman (10.10.0)
[2026-10-04 19:03:48] info:     zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"ITead","serialNumber":"18ab6971458aef1198d7baa3ef8776e9","pnpId":"usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_18ab6971458aef1198d7baa3ef8776e9-if00-port0","vendorId":"10c4","productId":"ea60"} => zstack: 4
[2026-10-04 19:03:48] info:     zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2026-10-04 19:03:48] error:    z2m: Error while starting zigbee-herdsman
[2026-10-04 19:03:48] error:    z2m: Failed to start zigbee-herdsman
[2026-10-04 19:03:48] error:    z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2026-10-04 19:03:48] error:    z2m: Exiting...
[2026-10-04 19:03:48] error:    z2m: Error: Error: No such file or directory, cannot open /dev/ttyUSB0
cottage@cottage-AMILO-Pro-Series-V8210:~$ ls -al /dev/ttyUSB0 
crw-rw----+ 1 root dialout 188, 0 Oct  4 17:48 /dev/ttyUSB0


So tried using a docker-compose.yaml file next... It appears to be running and the onboarding URL still works. 


cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ docker ps
CONTAINER ID   IMAGE                                               COMMAND                  CREATED         STATUS                 PORTS                                                                                                                                     NAMES
21c367c966e1   ghcr.io/koenkk/zigbee2mqtt                          "docker-entrypoint.s…"   2 minutes ago   Up About a minute      0.0.0.0:8180->8080/tcp, [::]:8180->8080/tcp                                                                                               zigbee2mqtt
fe6073fda2b6   ghcr.io/nextcloud-releases/aio-domaincheck:latest   "/start.sh"              11 days ago     Up 11 days (healthy)   0.0.0.0:443->443/tcp, [::]:443->443/tcp                                                                                                   nextcloud-aio-domaincheck
51d370ce0c3b   ghcr.io/nextcloud-releases/all-in-one:latest        "/start.sh"              12 days ago     Up 12 days (healthy)   0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp, 0.0.0.0:8443->8443/tcp, [::]:8443->8443/tcp, 9000/tcp   nextcloud-aio-mastercontainer
537d6342b1a8   portainer/portainer-ce                              "/portainer"             12 days ago     Up 12 days             8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, [::]:9000->9000/tcp                                                                           portainer
f3334b17bdfe   ghcr.io/home-assistant/home-assistant:stable        "/init"                  4 weeks ago     Up 3 weeks                                                                                                                                                       homeassistant
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ date
Sun 04 Oct 2026 18:16:08 IST
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ 


But how to control it? The last time I used this it listed all devices allowed for joining, etc. Ah I need to enable the frontend (disable onbaording) in the configuration.yaml file and restart it!

cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ cat data/configuration.yaml 
version: 5
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://
***SECRET ***:1883
  password: ***SECRET ***
  user: 
***SECRET ***
serial:
  port: /dev/ttyUSB0
  adapter: zstack
  baudrate: 115200
  rtscts: false
advanced:
  log_level: info
  channel: 11
  network_key:
    - 254
    - 211
    - 68
    - 22
    - 58
    - 56
    - 250
    - 47
    - 128
    - 49
    - 238
    - 228
    - 90
    - 12
    - 209
    - 230
  pan_id: 53974
  ext_pan_id:
    - 136
    - 21
    - 24
    - 143
    - 233
    - 86
    - 235
    - 52
  enable_external_js: false
frontend:
  enabled: false
  port: 8080
homeassistant:
  enabled: false
onboarding: true
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ vim data/configuration.yaml 
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ ls -al data/configuration.yaml 
-rw-r--r-- 1 root root 632 Oct  4 18:14 data/configuration.yaml
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ sudo vim data/configuration.yaml 
[sudo] password for cottage:           
Sorry, try again.
[sudo] password for cottage:             
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ 
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ docker ps
CONTAINER ID   IMAGE                                               COMMAND                  CREATED          STATUS                 PORTS                                                                                                                                     NAMES
21c367c966e1   ghcr.io/koenkk/zigbee2mqtt                          "docker-entrypoint.s…"   18 minutes ago   Up 16 minutes          0.0.0.0:8180->8080/tcp, [::]:8180->8080/tcp                                                                                               zigbee2mqtt
fe6073fda2b6   ghcr.io/nextcloud-releases/aio-domaincheck:latest   "/start.sh"              11 days ago      Up 11 days (healthy)   0.0.0.0:443->443/tcp, [::]:443->443/tcp                                                                                                   nextcloud-aio-domaincheck
51d370ce0c3b   ghcr.io/nextcloud-releases/all-in-one:latest        "/start.sh"              12 days ago      Up 12 days (healthy)   0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp, 0.0.0.0:8443->8443/tcp, [::]:8443->8443/tcp, 9000/tcp   nextcloud-aio-mastercontainer
537d6342b1a8   portainer/portainer-ce                              "/portainer"             12 days ago      Up 12 days             8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, [::]:9000->9000/tcp                                                                           portainer
f3334b17bdfe   ghcr.io/home-assistant/home-assistant:stable        "/init"                  4 weeks ago      Up 3 weeks                                                                                                                                                       homeassistant
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ docker compose restart zigbee2mqtt
[+] restart 0/1
 ⠧ Container zigbee2mqtt Restarting                                                                                       1.7s
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ 
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ docker ps
CONTAINER ID   IMAGE                                               COMMAND                  CREATED          STATUS                 PORTS                                                                                                                                     NAMES
21c367c966e1   ghcr.io/koenkk/zigbee2mqtt                          "docker-entrypoint.s…"   18 minutes ago   Up 3 seconds           0.0.0.0:8180->8080/tcp, [::]:8180->8080/tcp                                                                                               zigbee2mqtt
fe6073fda2b6   ghcr.io/nextcloud-releases/aio-domaincheck:latest   "/start.sh"              11 days ago      Up 11 days (healthy)   0.0.0.0:443->443/tcp, [::]:443->443/tcp                                                                                                   nextcloud-aio-domaincheck
51d370ce0c3b   ghcr.io/nextcloud-releases/all-in-one:latest        "/start.sh"              12 days ago      Up 12 days (healthy)   0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp, 0.0.0.0:8443->8443/tcp, [::]:8443->8443/tcp, 9000/tcp   nextcloud-aio-mastercontainer
537d6342b1a8   portainer/portainer-ce                              "/portainer"             12 days ago      Up 12 days             8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, [::]:9000->9000/tcp                                                                           portainer
f3334b17bdfe   ghcr.io/home-assistant/home-assistant:stable        "/init"                  4 weeks ago      Up 3 weeks                                                                                                                                                       homeassistant
cottage@cottage-AMILO-Pro-Series-V8210:~/zigbee2mqtt$ 


Now keep getting start up errors:

Using '/app/data' as data directory
Starting Zigbee2MQTT without watchdog.
[2026-10-04 18:39:30] info: z2m: Logging to console, file (filename: log.log)
[2026-10-04 18:39:30] info: z2m: External JS (converters/extensions) is disabled
[2026-10-04 18:39:30] info: z2m: Starting Zigbee2MQTT version 2.14.2 (commit #5c0c1c60078e1737c5dee5f8217583bca7610e66
)
[2026-10-04 18:39:30] info: z2m: Starting zigbee-herdsman (10.10.0)
[2026-10-04 18:39:30] info: zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"ITead","serialNumber":"18ab6971458aef1198d7baa3ef8776e9","pnpId":"usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_18ab6971458aef1198d7baa3ef8776e9-if00-port0","vendorId":"10c4","productId":"ea60"} => zstack: 4
[2026-10-04 18:39:30] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2026-10-04 18:39:30] error: z2m: Error while starting zigbee-herdsman
[2026-10-04 18:39:30] error: z2m: Failed to start zigbee-herdsman
[2026-10-04 18:39:30] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2026-10-04 18:39:30] error: z2m: Exiting...
[2026-10-04 18:39:30] error: z2m: Error: Error: No such file or directory, cannot open /dev/ttyUSB0


So tried restarting the "cottage" laptop. Still keeps restarting due to above error..


Maybe a USB 3.0 port issue. I will try on a RPi 4 tomorrow... (My "cttage" laptop is old Lenovo ThinkPad T420 and doesn't have 3.0 USB ports just 2.0 ones)

https://www.productindetail.com/pn/lenovo-thinkpad-t420#specs


(19:39) Decided to burn a Home Assistant OS 18.3 image onto a RPi4 Model B..

https://www.raspberrypi.com/products/raspberry-pi-4-model-b/



Which has 2x USB 3 ports




















Saturday, 3 October 2026

Wiring up UART, CAN bus and RS485 to a JK-BMS

Unfortunately, documentation can be tricky to hunt down. So this is what I know..

Version V6,4,02 of the JK-BMS android app reports:

Vendor ID: JK-BD6A32S10P

Hardware Option: HDCRE

Serial Number: 604135B6C000012

Hardware Version: V20H

Software Version: V20.11

Power-on Times: 23T

Total Time: 8H50M0S

First On Date: 2026-09-17


So it's a BD type JKBMS inverter and we need a UART 4-pin cable, and to wire up a 2-wire CAN bus to a RJ45 socket and a 2-wire RS485 to another RJ45 socket. The UART also needs to be wired to a RJ45 socket.

So let's dig in..








Some good info here: https://jkbms-ess.com/en-eu/blogs/news/jkbms-b-bd-series-smart-bms-interface-guide-jk-bxxxx-jk-bdxxxx

So the RS485 / CAN bus socket on the BMS is a A1254WF-4A socket

1 - CAN L (black)
2 - CAN H (red)
3 - RS485 A+ (yellow)
4 - RS485 B- (white)

I have a plug with four wires going to two clip sockets


And the GPS / UART socket on the BMS is a :


So what pins to use on the CAN bus and RS485 RJ45 sockets?

There are wiring standards for this. If I look at the Sungrow SH3.0RS documentation it states..

https://info-support.sungrowpower.com/application/pdf/2025/05/23/SH3.0-6.0RS&SH5.0-6.0RS-20-UEN-Ver20-202504.pdf

On page 79 it mentions CAN bus and RS485 but gives no details...


6.9.2 Connecting the CAN Cable 

The CAN cable enables the communication between the inverter and the Li-ion battery from SUNGROW and BYD. • Pin terminal connection Refer to the section 6.11 Meter Connectionfor details. Plug the wires into the H and L terminals according the labels on the bottom of the inverter. • RJ45 connection Refer to the section 6.13 DRM Connectionfor details. Plug the wires into the RJ45–CAN terminal on the bottom of the inverter. 


6.9.3 Connecting the Enable Cable 

The Enable cable along with the RS485 cable, are used for communication between the inverter and the Li-ion battery. For detailed connection description of the RS485 cable, refer to the section 6.12 RS485 Connection. For detailed connection description of the Enable cable, refer to the section 6.11 Meter Connection. Plug the wires into the EN_H and EN_G terminals according the labels on the bottom of the inverter.



So what next? Well it looks like the Sungrow SH3.0RS manual doesn't specify any wiring pin out for its RS485 and CAN bus. So I guess it expects you to get that from the battery manufacturer.








But I did find a great great website specify what different battery manufacturers do..

https://solis-service.solisinverters.com/en/support/solutions/articles/44002484785-communication-ports-for-battery-connection

So I will make my battery emulate a Pylon HV battery :)

So I will make cables like this for my inverter with matching Can bus and RS485 socket wiring in my battery pipe :)

Though, I just ordered a "JIKONG Communication Interface Board P-Link-CR-V2.0 for Smart BMS Expansion" from Ebay.ie for the final battery unit. So I should really make my battery pipe socket pin outs compatible with this interface board. https://www.ebay.ie/itm/406532685503

Which has UART, RS485 and CAN bus. It supports PC ineterface over UART and battery over CAN bus and multiple batteries over RS485. 


So what's its pin out? From https://manuals.plus/ae/1005008931931389



Happy days! I'm now ready to make my battery and inverter cables :)


For inverter I need power cables 2 meter with Sungrow clips at one end and crimp ring at the other.

Also need a 2-wire CAN bus cable ending in RJ45 plug. (Pin 4: CAN_H, Pin 5: CAN_L)

And a RS485 2-wire cable also ending in a RJ45 plug.  (Pin 7: RS485 A, Pin 8: RS485 B)

I will then use the ESP32 DIN monitor to look for CAN bus comms from the inverter.

Great that this is also Pylon HV compatible wiring.

https://info-support.sungrowpower.com/application/pdf/2025/05/23/SH3.0-6.0RS&SH5.0-6.0RS-20-UEN-Ver20-202504.pdf

And here's the Sungrow SH3.0RS COM2 connector pin out




Here's the cables :)

















Tuesday, 22 September 2026

Making a JBD BMS bluetooth ESPHome monitoring device

 

Tues 22nd Sep 2026

(21:39) Based on the code at: https://github.com/syssi/esphome-jbd-bms

Got both "SP10S0009-L8S-100A-B-U" and "BR2262e-s" 24V LFP batteries monitored by HA

Happy days!






Thursday, 17 September 2026

Getting an experimental 96V battery to talk to Sungrow Inverter

 

The goal of this project is to repurpose my 3x 24V LFP to a 96V  battery for my Sungrow SH3.0RS inverter.

To do this I will need to create a RS485 JK-BMS comms to Sungrow CANBUS comms converter and start by using 32x 18650 3.7V Li-Ion batteries in place of the 24V LFP ones (I will need to buy another 24V LFP battery once I get the comms going.



(Tues 22nd Nov 2026)




Got ESPHome working using ESPHome Device Builder on rhubarb laptop (accessed via http://localhost:6052/)




And successfully got HA to see ESP32-C3 device pulling BMS data over BLE to MQTT and directly to HA.


including the state of all 32 cells..



Must make a dashboard next and test if I can turn CHARGE and DISCHARGE ON and OFF. Yep switches work fine :)

Based on code at https://github.com/syssi/esphome-jk-bms/blob/main/esp32-ble-v19-example.yaml

https://deepwiki.com/syssi/esphome-jk-bms/4.2-basic-uart-configuration


Now. How to make a HA dashboard? And replace BLE with UART connection to BMS

I will try this RS485 example next..

https://github.com/syssi/esphome-jk-bms/blob/main/esp8266-jk-pb-modbus-example.yaml



(Mon 21st Nov 2026)

(16:34) Giving up for now. Will try ESP32-C3 ESPHome project next! Say https://github.com/syssi/esphome-jk-bms

(Backed up Node Red  to sionnach_after_jkbms_modbus_mqtt_added_flows.json)



(16:05) Maybe I should just cable the ON/OFF button,_96V and 0V power, UART, RS485 and CAN to the 6 inch pipe lid and then work on unit in the kitchen connected to laptop via USB/RS485 dongle?

Annoys me that some Modbus commands get a response of 0x8604 (error code?) but often nothing. Hanging?


Should I switch to using direct ESP32 to UART port (not RS485 port). Or get PC Windows software running? Cannot see a GPS UART protocol to select from in BLE app. Maybe "4G-GPS Remote module protocol V4.2" or maybe try an ESPhome project


(15:30) Cannot get any robust comms or sensible replies over RS485. Let me check the protocol assigned to UART-21 / UART-2. (Which is the real UART port and which is the RS485 port?)


https://www.gobelpower.com/jkbms-firmware-download_ap88.html

Are all these error code responses? Had to power OFF/ON BMS to get responses MODBUS again.



Last two above examples from http://www.jk-bms.com/en/Upload/2023-12-05/1559153362.pdf





Tried sending Modebus command 01 03 02 58 00 02 44 60 and got response 01 86 04 43 a3.

What does this mean? 

Modbus RTU uses 8-bit Serial Communications to send Modbus messages. Format is:

Unit Address: 1 Byte
Message: N Bytes
CRC: 2 Bytes

(See https://www.fernhillsoftware.com/help/drivers/modbus/modbus-protocol.html)

01           Address 
03           Modbus Read Holding Registers (03)
02 58      First input address
00 02      Register count
4460       CRC

And the response means..

01          Address
86 04     Two bytes of data
43 a3     CRC

So a success read of register 0x0258 returning 0x8604

http://www.jk-bms.com/en/Upload/2023-12-05/1559153362.pdf

01 03 00 05 00 02 D4 0A

https://koeed.com/pages/modbus-crc-calculator

Cannot get any robust comms or sensible replies over RS485. Let' sme chekc the protocol assigned to UART-21 / UART-2



So added code to NodeRed "Sungrow Inverter" tab at http://192.168.1.153:1880/ to send and receive Modbus messages



But what do I send to get a response?

It  looks like the Waveshare converter should work with the Sungrow SH3.0RS inverter once I get the BMS comms going..

https://www.waveshare.com/wiki/ESP32-S3-RS485-CAN-Web

SungrowSH3.0/3.6/4.0/5.0/6.0RS1( ⭐⭐ )80 / 460BYD protocol

https://github.com/dalathegreat/Battery-Emulator/discussions/2164

"BYD Protocol" being.. "BYD Battery-Box Premium HVS over CAN bus"



(Sun 20th Sept 2026)

I soldered the RS485 converter to the ESP32-C3 board and made some push connectors for the RS485 A- and B+ wires.




Powering up JK-BMS caused a few messages to be received by the ESP32 monitor (used "IoT MQTT Panel" app to subscribe to MQTT topic "home/solar/esp32c3_jkbms_monitor/#" )

home/solar/esp32c3_jkbms_monitor/RxByte  "e0e0" followed by "cf"



(Sat 19th Sept 2026)

I created an Arduino sketch for the BMS comms and burned it into a ESP32-C3. Code in directory: 

/home/coderdojo/Arduino/esp32c3/esp32c3_jkbms_monitor



(Fri 18th Sept 2026)

Have code programmed into Waveshare protocol adaptor and added it to the Tola Park SSID WiFi network.



But now need it to talk to the JK-BMS over RS485 and to the Sungrow SH3.0RS hybrid inverter over CAN bus.


Here are the protocols on offer:



So I think I will go with:

1) Set the JK-BMS to use "005 – PYLON_low_voltage_Protocol_RS485_V3.5"

2) The Waveshare converter battery setting to "Pylon /Dryness compatible battery" / RS485 and its Inverter setting to "Pylon HV battery over CAN bus" / CAN (Native)

I should be able to monitor things over the USB-C UART debug connection and, if successful, over MQTT broker






(Thurs 17th Sept 2026)

The Waveshare-ESP32-C3-RS485-CAN DIN module should be ideal to act as the comms converter and the software is available for it at:

https://github.com/dalathegreat/Battery-Emulator

See Sungrow SH3.0RS entry in table at:

https://dalathegreat.github.io/Battery-Emulator-Wiki/inverter/

Vendor Product Name          AC Phases Compatibility level Voltage min / max (V) Notes

SungrowSH3.0/3.6/4.0/5.0/6.0RS1              ( ⭐⭐ )              80 / 460                                  BYD protocol

https://www.waveshare.com/wiki/ESP32-S3-RS485-CAN


This discussion also helpful

https://github.com/dalathegreat/Battery-Emulator/discussions/2164



I had problems with App not talking to BMS but latest version of App worked fine.

I finished wiring up 32x 18650 3,7V Li-Ion batteries to the 32s JK-BMS and got the BLE app going.








Saturday, 25 July 2026

Getting Modbus comms going to Sungrow S100 power meter

(Weds 26 August 2026)

Well, I got my two ESP32-C3s shipping data from my Sungrow S100 meter via MQTT and Node-Red to my Sungrow SH3.0RS Hybrid Inverter last week. But after a firmware update to the inverter on Monday it stopped working.

So, it looks like my code was marginal and the new inverter has now less than 100 mSec between inverter Modbus transmissions at 9600 baud. So later today I will reflash the ESP32s with a 10 mSec inter-byte time-out but for now I will fix it in Node-Red :)

This means processing MQTT messages received on topic: home/solar/sungrow/esp32c3_s100_emulator/RxBytes to chop and tail inverter messages that have been fused together.

So these rx messages:

fe03003f0001a009

f604101f0001118b

207300000001c370

fe03500000018105

fe03003f0001a009

f604101f0001118b

etc.

Huh? This looks OK. So how is the S100 meter responding? Battery was low so after changing it I got more garbled rx data from the inverter


207300000001c370   got S100 response 20730203275e69

fe03500000018105

fe03003f0001a009

f604101f0001118b

207300000001c370 got S100 response 20730203275e69

030000000d82be20030000000d82be20030000000d82be20030000000d82be20030000000d82be

fe03500000018105


So I will clip the garbled 207300000001c370 message in Node-Red and send the cleaned up one to the S100 ESP32


This caused the S100 meter to eventually respond with:

20031a00002ebd0000056c00002951092800000294000002fc01e513835580
20031a00002ebe0000056d00002951091900000271000002e802041383e90d
20031a00002ebe0000056d00002951091d00000261000002c001e71383bbfd
20031a00002ebe0000056d00002951091600000266000002dc01f41388e686
20031a00002ebe0000056d0000295109160000025f0000027401c01388f8c1


But the inverter is only seeing these every 30 seconds or so...



(base) coderdojo@rhubarb:~$ 
(base) coderdojo@rhubarb:~$ mosquitto_sub -h 192.168.1.1 -p 1883 -u user -P password -t  home/solar/sungrow/esp32c3_s100_emulator/RxBytes  -v
home/solar/sungrow/esp32c3_s100_emulator/RxBytes f604101f0001118b
home/solar/sungrow/esp32c3_s100_emulator/RxBytes 207300000001c370
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03500000018105
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03003f0001a009
home/solar/sungrow/esp32c3_s100_emulator/RxBytes f604101f0001118b
home/solar/sungrow/esp32c3_s100_emulator/RxBytes 207300000001c370
home/solar/sungrow/esp32c3_s100_emulator/RxBytes 030000000d82be20030000000d82be20030000000d82be20030000000d82be20030000000d82be
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03500000018105
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03003f0001a009
home/solar/sungrow/esp32c3_s100_emulator/RxBytes f604101f0001118b
home/solar/sungrow/esp32c3_s100_emulator/RxBytes 207300000001c370
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03500000018105
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03003f0001a009
home/solar/sungrow/esp32c3_s100_emulator/RxBytes f604101f0001118b
home/solar/sungrow/esp32c3_s100_emulator/RxBytes 207300000001c370
home/solar/sungrow/esp32c3_s100_emulator/RxBytes 030000000d82be20030000000d82be20030000000d82be20030000000d82be20030000000d82be
home/solar/sungrow/esp32c3_s100_emulator/RxBytes fe03500000018105
^C(base) coderdojo@rhubarb:~$ 
(base) coderdojo@rhubarb:~$ date
Wed 26 Aug 2026 11:18:19 IST
(base) coderdojo@rhubarb:~$ mosquitto_sub -h 192.168.1.1 -p 1883 -u user -P password -t  home/solar/sungrow/esp32c3_s100_emulator/TxBytes  -v
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20031a00002ebe0000056d00002951091900000271000002e802041383e90d
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20031a00002ebe0000056d00002951091d00000261000002c001e71383bbfd
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20031a00002ebe0000056d00002951091600000266000002dc01f41388e686
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20730203275e69
home/solar/sungrow/esp32c3_s100_emulator/TxBytes 20031a00002ebe0000056d0000295109160000025f0000027401c01388f8c1

(11:24) So I think I need to try fixing the ESP32 firmware next...

Looking at the existing it is crashing! So that needs to be fixed :)


11:34:07.669 -> onnecting to Tola Park
11:34:07.669 -> 
11:34:07.669 -> ...
11:34:07.669 -> 
11:34:07.669 -> WiFi connected
11:34:07.669 -> 
11:34:07.669 -> IP address: 
11:34:07.669 -> 
11:34:07.669 -> 192.168.1.198
11:34:07.669 -> 
11:34:07.669 -> Attempting MQTT connection...connected
11:34:07.669 -> 
11:34:07.669 -> New response from S100 meter:254 3 80 0 0 1 129 5 
11:34:07.669 -> 
11:34:07.669 -> mqttPublishRxData: [home/solar/sungrow/esp32c3_s100_emulator/RxBytes:
11:34:07.669 -> 
11:34:07.669 -> fe03500000018105]
11:34:07.669 -> 
11:34:14.004 -> New response from S100 meter:254 3 0 63 0 1 160 9 
11:34:14.004 -> mqttPublishRxData: [home/solar/sungrow/esp32c3_s100_emulator/RxBytes:
11:34:14.004 -> fe03003f0001a009]
11:34:24.019 -> New response from S100 meter:246 4 16 31 0 1 17 139 
11:34:24.019 -> mqttPublishRxData: [home/solar/sungrow/esp32c3_s100_emulator/RxBytes:
11:34:24.019 -> f604101f0001118b]
11:34:34.016 -> New response from S100 meter:32 115 0 0 0 1 195 112 
11:34:34.016 -> mqttPublishRxData: [home/solar/sungrow/esp32c3_s100_emulator/RxBytes:
11:34:34.016 -> 207300000001c370]
11:34:34.348 -> Message arrived on topic: home/solar/sungrow/esp32c3_s100_emulator/TxBytes. Message: <20730203275e69>
11:34:34.348 -> Modbus Tx msg to send: [ 32 115 2 3 39 94 105 :7]
11:34:34.348 -> 7 bytes Modbus tx message: < 32 115 2 3 39 94 105 >
11:34:35.211 -> rxCount overflow!
11:34:35.709 -> New response from S100 meter:3 0 0 0 13 130 190 32 3 0 0 0 13 130 190 32 3 0 0 0 13 130 190 32 3 0 0 0 13 130 190 32 3 0 0 0 13 130 190 
11:34:35.709 -> mqttPublishRxData: [home/solar/sungrow/esp32c3_s100_emulator/RxBytes:
11:34:35.709 -> 030000000d82be20030000000d82be20030000000d82be20030000000d82be20030000000d82be]
11:34:35.974 -> Message arrived on topic: home/solar/sungrow/esp32c3_s100_emulator/TxBytes. Message: <20031a00002ebf0000056e00002951091e0000021c0000005c000013836a81>
11:34:35.974 -> Modbus Tx msg to send: [ 32 3 26 0 0 46 191 0 0 5 110 0 0 41 81 9 30 0 0 2 28 0 0 0 92 0 0 19 131 106 129 :31]
11:34:35.974 -> 31 bytes Modbus tx messGuru Meditation Error: Core  0 panic'ed (Instruction access fault). Exception was unhandled.
11:34:35.974 -> 
11:34:35.974 -> Core  0 register dump:
11:34:35.974 -> MEPC    : 0x006e616e  RA      : 0x42006c68  SP      : 0x3fca2800  GP      : 0x3fc90a00  
11:34:36.008 -> TP      : 0x3fca28a0  T0      : 0x7f7f7f7f  T1      : 0x40380354  T2      : 0xffffffff  
11:34:36.008 -> S0/FP   : 0x3fc93980  S1      : 0x3fc94000  A0      : 0x3fc93a00  A1      : 0x3fca280f  
11:34:36.008 -> A2      : 0x00000001  A3      : 0x00000001  A4      : 0x00000000  A5      : 0x006e616e  
11:34:36.008 -> A6      : 0x00000004  A7      : 0x00000009  S2      : 0x00000001  S3      : 0x3fc99000  
11:34:36.041 -> S4      : 0x3fc94000  S5      : 0x3c0c0000  S6      : 0x00000000  S7      : 0x00000000  
11:34:36.041 -> S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
11:34:36.041 -> T3      : 0x652f776f  T4      : 0x32337073  T5      : 0x735f3363  T6      : 0x5f303031  
11:34:36.041 -> MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000001  MTVAL   : 0x006e616e  
11:34:36.134 -> MHARTID : 0x00000000  
11:34:36.134 -> 
11:34:36.134 -> Stack memory:
11:34:36.134 -> 3fca2800: 0x00000000 0x00000000 0x00000000 0x20c99000 0x3fc99000 0x3fc94000 0x3fc94000 0x420002aa
11:34:36.134 -> 3fca2820: 0x00000000 0x00000000 0x00000000 0x00000000 0x3fc99000 0x4200d000 0x3fc99000 0x42000136
11:34:36.134 -> 3fca2840: 0x30303033 0x00000000 0x00000000 0x00000000 0x00000000 0x4200d000 0x3fc99000 0x4200afc6
11:34:36.134 -> 3fca2860: 0x00000000 0x00000000 0x00000000 0x403881ea 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.134 -> 3fca2880: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
11:34:36.134 -> 3fca28a0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xbaad5678 0x15fdf73c 0xc0129370 0xcbf4f686
11:34:36.134 -> 3fca28c0: 0xbb014120 0x00e03016 0x929e966f 0x62aaa540 0xbd81cae8 0xe50f5bd6 0xc84c08b6 0xbb6e6505
11:34:36.134 -> 3fca28e0: 0xe8b20461 0xd1c5975a 0x3b65773e 0x3c1102ed 0xd8007dc2 0x638cf032 0x167e8136 0xf9fc1ccc
11:34:36.134 -> 3fca2900: 0x0460b370 0xda383dd0 0x6dd6904a 0x62440f91 0xd904f79f 0xb9d4559b 0xd8b89b4f 0xa64a85a2
11:34:36.134 -> 3fca2920: 0xc571613b 0x42150e60 0xe437f7bf 0x448a3b06 0x5f134579 0xcad6f51b 0x35399a7a 0x5b41d4b7
11:34:36.134 -> 3fca2940: 0xb4947443 0x583922c4 0x4ea3b59c 0x77372cc1 0xe12a9cc8 0x1bfb5746 0x18e1c049 0xfee80f3c
11:34:36.152 -> 3fca2960: 0x28d35c45 0x9c440c06 0x4cb6e28e 0xd1add68d 0x27b315c7 0x1ef2397e 0xf1520207 0xf3f3af89
11:34:36.152 -> 3fca2980: 0x1e403a56 0x7ee10568 0x0b5fa76f 0xf004fcfe 0xc5983ebe 0x6ea13dd5 0x20880629 0xde6298f9
11:34:36.174 -> 3fca29a0: 0xe94bcf31 0x02209ae1 0xb2d69694 0x1a3fe845 0xd2cde1fd 0x4fe2e6a4 0x43c301b0 0x27527c74
11:34:36.174 -> 3fca29c0: 0xbcf96a8c 0xb1e163b8 0x31e4bd25 0x1920d1a4 0xe6c1b7df 0x693eb93d 0x2e4085b1 0x3fd29483
11:34:36.207 -> 3fca29e0: 0xc5b804a5 0x7a4e62ba 0x6b8723ac 0x0a8d1701 0x1f067fc0 0xb0c0fad7 0x5e097b2b 0xbe6c14ce
11:34:36.207 -> 3fca2a00: 0x6a2bec04 0x43c47883 0x4cf23bb7 0x07b6a26d 0x97907e86 0x9a95c98f 0x276ce1cb 0xeda225bb
11:34:36.207 -> 3fca2a20: 0x5662383b 0xc259da97 0x677fb7fb 0x201b3b65 0x79787f4a 0x208ce1a3 0x8419be82 0x414fcf9d
11:34:36.207 -> 3fca2a40: 0x1da56912 0x59582f20 0x2c7eba4e 0x4d85dc38 0x7304b1ca 0xee0db524 0xc22bc5ba 0x59f0b974
11:34:36.240 -> 3fca2a60: 0x2b091472 0xe2b1450b 0x6d60f8e5 0x0c12db44 0x3b3afea3 0x9b9b3cfa 0xc330cc93 0x79b6c660
11:34:36.240 -> 3fca2a80: 0x27c3293c 0x20bc1634 0xe0f01cee 0x8c444277 0xffafe90f 0xc77a7977 0x751d0ca8 0x3edaffb8
11:34:36.240 -> 3fca2aa0: 0xc61526d5 0x3fca08a0 0x00000170 0xabba1234 0x0000015c 0x3fca2720 0x00009aaa 0x3fc9433c
11:34:36.240 -> 3fca2ac0: 0x3fc9433c 0x3fca2ab4 0x3fc94334 0x00000018 0x3fcb0b90 0x3fcb0b90 0x3fca2ab4 0x00000000
11:34:36.273 -> 3fca2ae0: 0x00000001 0x3fca08b0 0x706f6f6c 0x6b736154 0x00000000 0x00000000 0x3fca28a0 0x00000005
11:34:36.273 -> 3fca2b00: 0x00000000 0x00000001 0x00000000 0x3fc9e3c8 0x42016708 0x01b72dff 0x0000000b 0x3fc99ce4
11:34:36.273 -> 3fca2b20: 0x3fc99d4c 0x3fc99db4 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
11:34:36.273 -> 3fca2b40: 0x4201628e 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.307 -> 3fca2b60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.307 -> 3fca2b80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.307 -> 3fca2ba0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.307 -> 3fca2bc0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.340 -> 3fca2be0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
11:34:36.406 -> 
11:34:36.406 -> 
11:34:36.406 -> 
11:34:36.406 -> ELF file SHA256: 7732dc014
11:34:36.406 -> 
11:34:36.406 -> Rebooting...
11:34:36.406 -> ESP-ROM:esp32c3-api1-20210207
11:34:36.406 -> Build:Feb  7 2021
11:34:36.406 -> rst:0xc (RTC_SW_CPU_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
11:34:36.406 -> Saved PC:0x40386eb2
11:34:36.406 -> SPIWP:0xee
11:34:36.406 -> mode:DIO, clock div:1
11:34:36.406 -> load:0x3fcd5820,len:0x1010
11:34:36.406 -> load:0x403cbf10,len:0x9f4
11:34:36.406 -> load:0x403ce710,len:0x2e94
11:34:36.406 -> entry 0x403cbf10
11:34:46.601 -> 
11:34:46.601 -> 
11:34:46.601 -> 
11:34:46.601 -> Sungrow esp32c3_s100_emulator.ino v2.0 
11:34:46.601 -> 
11:34:46.601 -> 
11:34:46.601 -> Connecting to Tola Park
11:34:47.199 -> ...
11:34:48.196 -> WiFi connected
11:34:48.196 -> IP address: 
11:34:48.196 -> 192.168.1.198
11:34:48.196 -> Attempting MQTT connection...connected
11:34:48.328 -> New response from S100 meter:254 3 80 0 0 1 129 5 
11:34:48.328 -> mqttPublishRxData: [home/solar/sungrow/esp32c3_s100_emulator/RxBytes:
11:34:48.328 -> fe03500000018105]


I'll post the code to Github later :)

So lets change

// Changing the Modbus inter-byte timeout to 10 mSec (from 100 mSec)

// Modbus is operating at 9600 baud so a 10-bit transmittion takes about 1 mSec

#define MODBUS_RX_TIMEOUT 10


And take it for a spin..

After turning off serial debug in the code I got the inverter to report in grid power in the iSolarClod app. Job done! :)





12:15:48.963 -> 

12:15:48.963 -> 

12:15:48.963 -> 

12:15:48.963 -> Sungrow esp32c3_s100_emulator.ino v2.1 

12:15:48.963 -> 

12:15:48.963 -> 

12:15:48.963 -> Connecting to Tola Park

12:15:49.527 -> ...

12:15:50.522 -> WiFi connected

12:15:50.522 -> IP address: 

12:15:50.522 -> 192.168.1.198

12:15:50.555 -> Attempting MQTT connection...connected



(Mon 27th Jul 2026 21:54)

Created an emulator ESP32 devicewhich is tested by the working monitor ESP32 device (which was tested talking to a Sungrow S100 meter)






2026-07-27T21:53:40+0100{"tst":"2026-07-27T21:53:40.899401+0100","topic":"home/solar/sungrow/MonTxBytes","qos":0,"retain":0,"payloadlen":18,"payload":"20030009000212b8"}

2026-07-27T21:53:51+0100{"tst":"2026-07-27T21:53:51.504754+0100","topic":"home/solar/sungrow/MonTxBytes","qos":0,"retain":0,"payloadlen":18,"payload":"20030009000212b8"}

2026-07-27T21:53:52+0100{"tst":"2026-07-27T21:53:52.199721+0100","topic":"home/solar/sungrow/EmuRxBytes","qos":0,"retain":0,"payloadlen":18,"payload":"20030009000212b8"}

2026-07-27T21:53:52+0100{"tst":"2026-07-27T21:53:52.324962+0100","topic":"home/solar/sungrow/Emulated_power","qos":0,"retain":0,"payloadlen":5,"payload":220}

2026-07-27T21:53:52+0100{"tst":"2026-07-27T21:53:52.334065+0100","topic":"home/solar/sungrow/EmuTxBytes","qos":0,"retain":0,"payloadlen":20,"payload":"20030400000898cd5b"}

2026-07-27T21:53:53+0100{"tst":"2026-07-27T21:53:53.272921+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":220}

2026-07-27T21:53:53+0100{"tst":"2026-07-27T21:53:53.282750+0100","topic":"home/solar/sungrow/MonRxBytes","qos":0,"retain":0,"payloadlen":22,"payload":"8:20030400000898cd5b"}

2026-07-27T21:54:04+0100{"tst":"2026-07-27T21:54:04.145330+0100","topic":"home/solar/sungrow/MonTxBytes","qos":0,"retain":0,"payloadlen":18,"payload":"20030009000212b8"}

2026-07-27T21:54:04+0100{"tst":"2026-07-27T21:54:04.636205+0100","topic":"home/solar/sungrow/EmuRxBytes","qos":0,"retain":0,"payloadlen":18,"payload":"20030009000212b8"}

2026-07-27T21:54:04+0100{"tst":"2026-07-27T21:54:04.826091+0100","topic":"home/solar/sungrow/Emulated_power","qos":0,"retain":0,"payloadlen":5,"payload":316}

2026-07-27T21:54:04+0100{"tst":"2026-07-27T21:54:04.829405+0100","topic":"home/solar/sungrow/EmuTxBytes","qos":0,"retain":0,"payloadlen":20,"payload":"20030400000c58cfcb"}

^C(base) coderdojo@rhubarb:~$ 


So every few requests from the Monitor (made once every 10 secs) it sees the response from the Emulator

'2026-07-27T22:00:10+0100{"tst":"2026-07-27T22:00:10.879481+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":351}

2026-07-27T22:00:23+0100{"tst":"2026-07-27T22:00:23.306534+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":156}

2026-07-27T22:00:45+0100{"tst":"2026-07-27T22:00:45.020536+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":268}

2026-07-27T22:01:07+0100{"tst":"2026-07-27T22:01:07.447752+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":178}

2026-07-27T22:01:19+0100{"tst":"2026-07-27T22:01:19.742903+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":266}

2026-07-27T22:02:03+0100{"tst":"2026-07-27T22:02:03.681408+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":247}

2026-07-27T22:02:16+0100{"tst":"2026-07-27T22:02:16.184611+0100","topic":"home/solar/sungrow/Feeder_power","qos":0,"retain":0,"payloadlen":5,"payload":137}


So next is to connect Monitor to S100 near ESB meter and change Emulator to use values posted to topic "home/solar/sungrow/Feeder_power" rather than the random ones :)




(Sat 25th Jul 2026 16:42) 

It is working over RS485 to the SH3.0RS over two wires (A,B). But the CT sensor needs to be between the consumer unit and the ESB meter clamped on the live wire the correct way round. Otherwise it won't know how much energy from the inverter is being consumed within the house.

My plan is to relay this information using ESP32 devices.

The first step is to capture th current comms between the inverter and the S100 meter. I'm expecting the inverter to be sending read commands every few seconds to the meter to which it responds.

I have found a blue USB RS485 dongle and a MAX485 board attached to a Heltec CubeCell Board Plus.

So I'd like to get something lik Modbus Poll running on my Rhubarb Linux laptop first. However..

(base) coderdojo@rhubarb:~$ date

Sat 25 Jul 2026 16:49:26 IST

(base) coderdojo@rhubarb:~$ ldd --version

ldd (Ubuntu GLIBC 2.39-0ubuntu8.7) 2.39

Copyright (C) 2024 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Roland McGrath and Ulrich Drepper.

(base) coderdojo@rhubarb:~$ cd Downloads/

(base) coderdojo@rhubarb:~/Downloads$ ./"Modbus Poll_0.1.5_amd64.AppImage"

modbus-poll: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.43' not found (required by /tmp/.mount_ModbusLFngMe/usr/lib/libglib-2.0.so.0)

modbus-poll: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.43' not found (required by /tmp/.mount_ModbusLFngMe/usr/lib/libwebkit2gtk-4.1.so.0)

modbus-poll: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.42' not found (required by /tmp/.mount_ModbusLFngMe/usr/lib/libwebkit2gtk-4.1.so.0)

modbus-poll: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.43' not found (required by /tmp/.mount_ModbusLFngMe/usr/lib/libjavascriptcoregtk-4.1.so.0)

modbus-poll: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.43' not found (required by /tmp/.mount_ModbusLFngMe/usr/lib/liblcms2.so.2)

modbus-poll: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.43' not found (required by /tmp/.mount_ModbusLFngMe/usr/lib/libjxl.so.0.11)

(base) coderdojo@rhubarb:~/Downloads$ 


(base) coderdojo@rhubarb:~$ dmesg -w


[  299.296263] usb 1-3: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.62

[  299.296281] usb 1-3: New USB device strings: Mfr=0, Product=2, SerialNumber=0

[  299.296289] usb 1-3: Product: USB2.0-Serial

[  299.346087] usbcore: registered new interface driver usbserial_generic

[  299.346102] usbserial: USB Serial support registered for generic

[  299.347405] usbcore: registered new interface driver ch341

[  299.347423] usbserial: USB Serial support registered for ch341-uart

[  299.347437] ch341 1-3:1.0: ch341-uart converter detected

[  299.347902] usb 1-3: ch341-uart converter now attached to ttyUSB0


https://github.com/gavinying/modpoll


(base) coderdojo@rhubarb:~$ pip3 install 'modpoll[serial]'

(base) coderdojo@rhubarb:~$ modpoll


Modpoll v1.6.0 - A New Command-line Tool for Modbus and MQTT


usage: modpoll [-h] [-v] -f CONFIG [CONFIG ...] [-d] [-r RATE] [-1] [--interval INTERVAL] [--tcp TCP] [--tcp-port TCP_PORT]

               [--udp UDP] [--udp-port UDP_PORT] [--serial SERIAL] [--serial-baud SERIAL_BAUD]

               [--serial-parity {none,odd,even}] [--timeout TIMEOUT] [-o EXPORT] [--mqtt-version {3.1.1,5.0}]

               [--mqtt-host MQTT_HOST] [--mqtt-port MQTT_PORT] [--mqtt-clientid MQTT_CLIENTID]

               [--mqtt-publish-topic-pattern MQTT_PUBLISH_TOPIC_PATTERN]

               [--mqtt-subscribe-topic-pattern MQTT_SUBSCRIBE_TOPIC_PATTERN]

               [--mqtt-diagnostics-topic-pattern MQTT_DIAGNOSTICS_TOPIC_PATTERN] [--mqtt-qos {0,1,2}]

               [--mqtt-user MQTT_USER] [--mqtt-pass MQTT_PASS] [--mqtt-use-tls] [--mqtt-insecure]

               [--mqtt-cacerts MQTT_CACERTS] [--mqtt-tls-version {tlsv1.2,tlsv1.1,tlsv1}] [--mqtt-single]

               [--diagnostics-rate DIAGNOSTICS_RATE] [--autoremove] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}]

               [--timestamp] [--delay DELAY] [--framer {default,ascii,rtu,socket}]

modpoll: error: the following arguments are required: -f/--config

(base) coderdojo@rhubarb:~$ modpoll --serial /dev/ttyUSB0


(base) coderdojo@rhubarb:~$ git clone https://github.com/gavinying/modpoll.git

Cloning into 'modpoll'...

remote: Enumerating objects: 1871, done.

remote: Counting objects: 100% (336/336), done.

remote: Compressing objects: 100% (110/110), done.

remote: Total 1871 (delta 267), reused 226 (delta 226), pack-reused 1535 (from 2)

Receiving objects: 100% (1871/1871), 16.17 MiB | 1.71 MiB/s, done.

Resolving deltas: 100% (1093/1093), done.

(base) coderdojo@rhubarb:~$ cat modpoll/contrib/eniwise/scpms6.csv 

device,scpm001,1,,,

poll,holding_register,46001,6,BE_BE,

ref,CT_TYPE,46001,uint16,rw,

ref,CT_RATING,46002,uint16,rw,

ref,DATA_SCALAR,46003,uint16,rw,

ref,ReservedA,46004,uint16,rw,

ref,ReservedB,46005,uint16,rw,

ref,SIGNED_MODE,46006,uint16,rw,

poll,holding_register,46011,92,BE_BE,

ref,Hz,46011,int16,r,Hz,1

ref,V,46012,int16,r,V,1

ref,CH1_A,46013,int16,r,A,1

ref,CH2_A,46014,int16,r,A,1

ref,CH3_A,46015,int16,r,A,1

ref,CH4_A,46016,int16,r,A,1

ref,CH5_A,46017,int16,r,A,1

ref,CH6_A,46018,int16,r,A,1

ref,CH1_kWh,46019,uint32,r,kWh,1

ref,CH2_kWh,46021,uint32,r,kWh,1

ref,CH3_kWh,46023,uint32,r,kWh,1

ref,CH4_kWh,46025,uint32,r,kWh,1

ref,CH5_kWh,46027,uint32,r,kWh,1

ref,CH6_kWh,46029,uint32,r,kWh,1

ref,CH1_kWh_P,46031,uint32,r,kWh,1

ref,CH2_kWh_P,46033,uint32,r,kWh,1

ref,CH3_kWh_P,46035,uint32,r,kWh,1

ref,CH4_kWh_P,46037,uint32,r,kWh,1

ref,CH5_kWh_P,46039,uint32,r,kWh,1

ref,CH6_kWh_P,46041,uint32,r,kWh,1

ref,CH1_kWh_N,46043,uint32,r,kWh,1

ref,CH2_kWh_N,46045,uint32,r,kWh,1

ref,CH3_kWh_N,46047,uint32,r,kWh,1

ref,CH4_kWh_N,46049,uint32,r,kWh,1

ref,CH5_kWh_N,46051,uint32,r,kWh,1

ref,CH6_kWh_N,46053,uint32,r,kWh,1

ref,CH1_kVARh,46055,uint32,r,kVARh,1

ref,CH2_kVARh,46057,uint32,r,kVARh,1

ref,CH3_kVARh,46059,uint32,r,kVARh,1

ref,CH4_kVARh,46061,uint32,r,kVARh,1

ref,CH5_kVARh,46063,uint32,r,kVARh,1

ref,CH6_kVARh,46065,uint32,r,kVARh,1

ref,CH1_kVARh_P,46067,uint32,r,kVARh,1

ref,CH2_kVARh_P,46069,uint32,r,kVARh,1

ref,CH3_kVARh_P,46071,uint32,r,kVARh,1

ref,CH4_kVARh_P,46073,uint32,r,kVARh,1

ref,CH5_kVARh_P,46075,uint32,r,kVARh,1

ref,CH6_kVARh_P,46077,uint32,r,kVARh,1

ref,CH1_kVARh_N,46079,uint32,r,kVARh,1

ref,CH2_kVARh_N,46081,uint32,r,kVARh,1

ref,CH3_kVARh_N,46083,uint32,r,kVARh,1

ref,CH4_kVARh_N,46085,uint32,r,kVARh,1

ref,CH5_kVARh_N,46087,uint32,r,kVARh,1

ref,CH6_kVARh_N,46089,uint32,r,kVARh,1

ref,CH1_kVA,46091,int16,r,kVA,1

ref,CH2_kVA,46092,int16,r,kVA,1

ref,CH3_kVA,46093,int16,r,kVA,1

ref,CH4_kVA,46094,int16,r,kVA,1

ref,CH5_kVA,46095,int16,r,kVA,1

ref,CH6_kVA,46096,int16,r,kVA,1

ref,CH1_PF,46097,int16,r,,1

ref,CH2_PF,46098,int16,r,,1

ref,CH3_PF,46099,int16,r,,1

ref,Reserved1,46100,int16,r,

ref,Reserved2,46101,int16,r,

ref,Reserved3,46102,int16,r,



(base) coderdojo@rhubarb:~$ modpoll   --serial /dev/ttyUSB0   --serial-baud 9600   --config modpoll/contrib/eniwise/scpms6.csv


Modpoll v1.6.0 - A New Command-line Tool for Modbus and MQTT


2026-07-25 17:00:44,347 | I | modpoll.main | No MQTT host specified, skip MQTT setup.

2026-07-25 17:00:44,347 | I | modpoll.modbus_task | Loading config from: modpoll/contrib/eniwise/scpms6.csv

2026-07-25 17:00:44,348 | I | modpoll.modbus_task | Added 1 device(s)...

2026-07-25 17:00:44,348 | I | modpoll.main | Loaded 1 Modbus config(s).

2026-07-25 17:00:44,348 | I | modpoll.main |  === Modpoll is polling at rate:10.0s, actual:10.0s ===

^C2026-07-25 17:00:55,487 | I | modpoll.main | Exiting /home/coderdojo/anaconda3/bin/modpoll

2026-07-25 17:00:56,363 | E | pymodbus.logging | No response received after 3 retries, continue with next request

2026-07-25 17:00:56,363 | E | modpoll.modbus_task | Modbus exception: scpm001 3 46001 6


Device: scpm001

+-------------+-------+-------+

| Reference   | Value | Unit  |

+-------------+-------+-------+

| CT_TYPE     |  None |       |

| CT_RATING   |  None |       |

| DATA_SCALAR |  None |       |

| ReservedA   |  None |       |

| ReservedB   |  None |       |

| SIGNED_MODE |  None |       |

| Hz          |  None | Hz    |

| V           |  None | V     |

| CH1_A       |  None | A     |

| CH2_A       |  None | A     |

| CH3_A       |  None | A     |

| CH4_A       |  None | A     |

| CH5_A       |  None | A     |

| CH6_A       |  None | A     |

| CH1_kWh     |  None | kWh   |

| CH2_kWh     |  None | kWh   |

| CH3_kWh     |  None | kWh   |

| CH4_kWh     |  None | kWh   |

| CH5_kWh     |  None | kWh   |

| CH6_kWh     |  None | kWh   |

| CH1_kWh_P   |  None | kWh   |

| CH2_kWh_P   |  None | kWh   |

| CH3_kWh_P   |  None | kWh   |

| CH4_kWh_P   |  None | kWh   |

| CH5_kWh_P   |  None | kWh   |

| CH6_kWh_P   |  None | kWh   |

| CH1_kWh_N   |  None | kWh   |

| CH2_kWh_N   |  None | kWh   |

| CH3_kWh_N   |  None | kWh   |

| CH4_kWh_N   |  None | kWh   |

| CH5_kWh_N   |  None | kWh   |

| CH6_kWh_N   |  None | kWh   |

| CH1_kVARh   |  None | kVARh |

| CH2_kVARh   |  None | kVARh |

| CH3_kVARh   |  None | kVARh |

| CH4_kVARh   |  None | kVARh |

| CH5_kVARh   |  None | kVARh |

| CH6_kVARh   |  None | kVARh |

| CH1_kVARh_P |  None | kVARh |

| CH2_kVARh_P |  None | kVARh |

| CH3_kVARh_P |  None | kVARh |

| CH4_kVARh_P |  None | kVARh |

| CH5_kVARh_P |  None | kVARh |

| CH6_kVARh_P |  None | kVARh |

| CH1_kVARh_N |  None | kVARh |

| CH2_kVARh_N |  None | kVARh |

| CH3_kVARh_N |  None | kVARh |

| CH4_kVARh_N |  None | kVARh |

| CH5_kVARh_N |  None | kVARh |

| CH6_kVARh_N |  None | kVARh |

| CH1_kVA     |  None | kVA   |

| CH2_kVA     |  None | kVA   |

| CH3_kVA     |  None | kVA   |

| CH4_kVA     |  None | kVA   |

| CH5_kVA     |  None | kVA   |

| CH6_kVA     |  None | kVA   |

| CH1_PF      |  None |       |

| CH2_PF      |  None |       |

| CH3_PF      |  None |       |

| Reserved1   |  None |       |

| Reserved2   |  None |       |

| Reserved3   |  None |       |

+-------------+-------+-------+

(base) coderdojo@rhubarb:~$ ^C

(base) coderdojo@rhubarb:~$ date

Sat 25 Jul 2026 17:00:59 IST

(base) coderdojo@rhubarb:~$ 


Can I set this up to interoogate my simulation of the Sungrow S100 meter?

https://github.com/Linux-RISC/Sungrow-Meter-cheater/issues/1