Node-red-contrib-modbus 5.30.0 crashes NodeRed

I have a problem with the latest versions of NodeRed from the add-store. I am using modbus to read the power meters and since node-red-contrib-modbus 5.30.0 which is a default installed module. This was update a few days ago.
Switching back to version 3.26 difficult because it updates itself on starting NodeRed.

As soon as I plug in the USB 485 stick for reading the power meters NodeRed crashes and loops restarting and can’t be stopped, the line is: Service Node-RED exited with code 256 (by signal 11)

Module: /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_010CB351-if00-port0

10 Feb 11:53:57 - [info] [mqtt-broker:9255680dc37a4b40-eac38da33e235280] Connection failed to broker: mqtt://127.0.0.1:1883
10 Feb 11:53:57 - [info] [mqtt-broker:a5ea5aec0c8e78ef] Connection failed to broker: mqtt://127.0.0.1:1883
10 Feb 11:53:59 - [error] [function:Airco store] TypeError: Cannot read properties of undefined (reading 'toFixed')
10 Feb 11:53:59 - [warn] [modbus-getter:kWh-meter] Modbus Failure On State sending Get More About It By Logging
10 Feb 11:53:59 - [warn] [modbus-getter:kWh-meter] Modbus Failure On State sending Get More About It By Logging
10 Feb 11:53:59 - [error] [modbus-getter:kWh-meter] Error: Port Not Open
10 Feb 11:54:02 - [info] [ping:9255680dc37a4b40-296a6a1b8f9cfaa2] ping - Host '192.168.21.67' process timeout - sending SIGINT
[11:54:04] INFO: Service Node-RED exited with code 256 (by signal 11)
[11:54:05] TRACE: bashio::config.exists: max_old_space_size
[11:54:05] TRACE: bashio::config: max_old_space_size
[11:54:05] TRACE: bashio::addon.config
[11:54:05] TRACE: bashio::cache.exists: addons.self.options.config
[11:54:05] TRACE: bashio::fs.file_exists: /tmp/.bashio/addons.self.options.config.cache
[11:54:05] TRACE: bashio::cache.get: addons.self.options.config
[11:54:05] TRACE: bashio::cache.exists: addons.self.options.config
[11:54:05] TRACE: bashio::fs.file_exists: /tmp/.bashio/addons.self.options.config.cache
[11:54:05] TRACE: bashio::jq: {"theme":"default","http_node":{"username":"","password":""},"http_static":{"username":"","password":""},"ssl":false,"certfile":"fullchain.pem","keyfile":"privkey.pem","system_packages":[],"npm_packages":[],"init_commands":[],"log_level":"trace","leave_front_door_open":true} if (.max_old_space_size == null) then
            null
        elif (.max_old_space_size | type == "string") then
            .max_old_space_size // empty
        elif (.max_old_space_size | type == "boolean") then
            .max_old_space_size // false
        elif (.max_old_space_size | type == "array") then
            if (.max_old_space_size == []) then
                empty
            else
                .max_old_space_size[]
            end
        elif (.max_old_space_size | type == "object") then
            if (.max_old_space_size == {}) then
                empty
            else
                .max_old_space_size
            end
        else
            .max_old_space_size
        end
[11:54:05] TRACE: bashio::config.true: safe_mode
[11:54:05] TRACE: bashio::config: safe_mode
[11:54:05] TRACE: bashio::addon.config
[11:54:05] TRACE: bashio::cache.exists: addons.self.options.config
[11:54:05] TRACE: bashio::fs.file_exists: /tmp/.bashio/addons.self.options.config.cache
[11:54:05] TRACE: bashio::cache.get: addons.self.options.config
[11:54:05] TRACE: bashio::cache.exists: addons.self.options.config
[11:54:05] TRACE: bashio::fs.file_exists: /tmp/.bashio/addons.self.options.config.cache
[11:54:05] TRACE: bashio::jq: {"theme":"default","http_node":{"username":"","password":""},"http_static":{"username":"","password":""},"ssl":false,"certfile":"fullchain.pem","keyfile":"privkey.pem","system_packages":[],"npm_packages":[],"init_commands":[],"log_level":"trace","leave_front_door_open":true} if (.safe_mode == null) then
            null
        elif (.safe_mode | type == "string") then
            .safe_mode // empty
        elif (.safe_mode | type == "boolean") then
            .safe_mode // false
        elif (.safe_mode | type == "array") then
            if (.safe_mode == []) then
                empty
            else
                .safe_mode[]
            end
        elif (.safe_mode | type == "object") then
            if (.safe_mode == {}) then
                empty
            else
                .safe_mode
            end
        else
            .safe_mode
        end
[11:54:05] TRACE: bashio::var.true: null
[11:54:05] INFO: Starting Node-RED...

> start
> node $NODE_OPTIONS node_modules/node-red/red.js --settings /etc/node-red/config.js

10 Feb 11:54:06 - [info] 

Welcome to Node-RED

Using a RawspberryPI 5 4GB.

I have chosen not use modbus directly and evaded to using serial now for reading the Eastron kWh meters:

modbus:
  - name: modbus_hub
    type: serial
    port: /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_010CB351-if00-port0
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: E
    stopbits: 1

    delay: 0
    message_wait_milliseconds: 30
    timeout: 5
    
    sensors:
    - name: sdm220_1_voltage
      slave: 1
      address: 0
      input_type: input
      slave_count: 2
      precision: 2
      data_type: float32
      unit_of_measurement: V
      device_class: voltage

    - name: sdm220_2_voltage
      slave: 2
      address: 0
      input_type: input
      slave_count: 2
      precision: 2
      data_type: float32
      unit_of_measurement: V
      device_class: voltage

These are only the two voltage readings. Slave: allows read two physical separate meters on the same cable and new is that I had to use slave_count: instead of only count:.

I found this when reading the ModBus page: https://www.home-assistant.io/integrations/modbus/#parameters-usage-matrix

Count: can’t be used anymore when data_type: is float32.

I had to rewrite the NodeRed part to use the Event.stateNode available in NodeRed when running in in Home Assistant.

Cost me few days to work around this and some day looking frustrated at the computerscreen seen NodeRed crashing everytime I used the ModeBus stick.