Sunday, 22 November 2026

Adding IKEA Air Quality sensor to Home Assistant

 (Sun 22nd Nov 2026)




[16:15] Yesterday I watched two very good YouTube videos about adding an ESP MCU to an Ikea air quality monitor


"IKEA Air Quality Sensor in Home Assistant: How to Make IKEA Vindriktning Smart"

https://youtu.be/BQ222qzYUqw  using Tasmota on an ESP32



I will take the ESP32 Tasmota approach to go to:

https://tasmota.github.io/install/


and plug in blank ESP32-C3 SuperMini to laptop USB port..

[16:36] Couldn't get that to work. So switching to ESPHome mode :)


"

IKEA Air Quality Sensor ESP32 Version. Commercial Grade for £10"

https://www.youtube.com/watch?v=qBNmliH7PwI


https://github.com/3ative/IKEA-Air-Quality-Sensor


That worked great. Now have "IKEA Shed AQ" sensor added to my HA 


[17:09] Now need to add an post to my blog with details, screenshots and photos :)

https://rockyroadoffgrid.blogspot.com/2026/11/adding-ikea-air-quality-sensor-to-home.html




Wednesday, 7 October 2026

Replacing Sungrow RS485 monitors with ESPHome devices

(Weds 7th Oct 2026)

10:32  These don't seem to be working.

I will investigate today and maybe replace with ESPHome devices


Monday, 5 October 2026

Adding a MQTT device to RPi4 running Home Assistant

(Weds 7th Oct 2026)

SunGrow has been running for a few days with HA and doing great. Also local data access at:



Nice!



So yesterday (Sun 4th Oct 2026) I shutdown cottage laptop which was running Home Assistant in a docker container and installed a Home Assistant image on the a RPi4 (was muc in Kilnageer).

Things went well but now I would like to create some devices of my own based on their MQTT topics.

I can access the RPi HA at http://192.168.1.188/home/overview

And yesterday I added to it three air sensors but not sure of their status.

So what I need is HA Discovery. This video explains: https://www.youtube.com/watch?v=s7SKzYWNVS8

And in fact the https://github.com/jesseklm/sungrowmodbus2mqtt code running on sionnach (192.168.1.153) already has a https://github.com/jesseklm/sungrowmodbus2mqtt/blob/master/ha_discovery.py file.

So let's try using it!

(Mon 5th Oct 2026)

21:07 What is sionnach running currently...


(base) coderdojo@rhubarb:~$ !ssh
ssh -X pi@192.168.1.153
pi@192.168.1.153's password: 
Linux sionnach 6.12.93+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.93-1+rpt1 (2026-06-12) aarch64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Mon Oct  5 20:23:58 2026 from 192.168.1.191
pi@sionnach:~ $ 
pi@sionnach:~ $ date
Mon  5 Oct 21:09:24 IST 2026
pi@sionnach:~ $ sudo systemctl status pollSungrowInverter.service 
● pollSungrowInverter.service - Sungrow Hybrid Inverter Eth0 Modbus Monitor
     Loaded: loaded (/lib/systemd/system/pollSungrowInverter.service; enabled; preset: enabled)
     Active: active (running) since Mon 2026-10-05 16:09:11 IST; 5h 0min ago
   Main PID: 3146639 (python3)
      Tasks: 1 (limit: 8743)
        CPU: 24.825s
     CGroup: /system.slice/pollSungrowInverter.service
             └─3146639 /usr/local/bin/python3 /home/pi/sungrowmodbus2mqtt/sungrowmodbus2mqtt.py
Oct 05 16:09:11 sionnach systemd[1]: Started pollSungrowInverter.service - Sungrow Hybrid Inverter Eth0 Modbus Monitor.
Oct 05 16:09:12 sionnach python3[3146639]: 2026-10-05 16:09:12,041 - INFO - starting SungrowModbus2Mqtt v1.0.36.
Oct 05 16:09:12 sionnach python3[3146639]: 2026-10-05 16:09:12,155 - INFO - mqtt disconnected.
Oct 05 16:09:12 sionnach python3[3146639]: 2026-10-05 16:09:12,248 - INFO - modbus connected.
Oct 05 16:09:18 sionnach python3[3146639]: 2026-10-05 16:09:18,169 - INFO - mqtt connected.
pi@sionnach:~ $ cd sungrowmodbus2mqtt/
pi@sionnach:~/sungrowmodbus2mqtt $ ls
background_tasks.py         config.yaml.2026_09_17  modbus_handler.py  sungrowmodbus2mqtt.py
config.py                   config.yaml.backup      mqtt_handler.py    typescript_1_got_returned_values.txt
config.sh10rt.example.yaml  Dockerfile              __pycache__        uv.lock
config.sh20t.example.yaml   ha_discovery.py         pyproject.toml
config.yaml                 LICENSE                 README.md
pi@sionnach:~/sungrowmodbus2mqtt $ head config.yaml
mqtt_server: "192.168.1.150"
mqtt_port: 1883
mqtt_username: pi
mqtt_password: 2016TolaPark!
mqtt_topic: sungrowmodbus2mqtt/
ip: 169.254.12.12 # ip of Sungrow LAN-Port
slave_id: 0x01
update_rate: 2 # pull rate in seconds
pi@sionnach:~/sungrowmodbus2mqtt $ 


What does this MQTT publish?








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.