The 2024.11 Update broke my modbus

so here is my config:

#EPEver eBox-Wifi-01 modbus
modbus:
  - type: rtuovertcp
    name: Solar2
    host: 10.0.0.69
    port: 8088
    delay: 5
    timeout: 10
    retries: 20
    message_wait_milliseconds: 30

here is the error:

here are the logs

2024-11-07 16:00:48.556 ERROR (MainThread) [homeassistant.config] Invalid config for 'modbus' at configuration.yaml, line 43: required key 'baudrate' not provided, please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 43: required key 'bytesize' not provided, please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 43: required key 'method' not provided, please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 43: required key 'parity' not provided, please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 43: required key 'stopbits' not provided, please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 44: not a valid value for dictionary value 'modbus->0->type', got 'rtuovertcp', please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 45: 'host' is an invalid option for 'modbus', check: modbus->0->host, please check the docs at https://www.home-assistant.io/integrations/modbus
Invalid config for 'modbus' at configuration.yaml, line 49: 'retries' is an invalid option for 'modbus', check: modbus->0->retries, please check the docs at https://www.home-assistant.io/integrations/modbus
2024-11-07 16:00:48.556 ERROR (MainThread) [homeassistant.setup] Setup failed for 'modbus': Invalid config.

here is why this matters
when i cannot read the battery-charge state the inverter does not turn off draining the battery

i dont see what is wrong with the config suddenly? i did not change it.compairing it to the documentation… it looks fine… i read the last few update-notes, but could not find, whats wrong…

help please!

So it seems the Documentation is under construction… maybe some parameters changed?

Configuring a TCP-RTU connection

type: rtuovertcp is required. Used for devices providing a TCP/IP interface directly.

This is typically used, when communicating with a modbus-forwarder, a device that has a TCP/IP connection upwards, and one or more serial connections downwards*lets also write more here, to see if the error moves.*

Seems like a bug to me, It does not recognise the type and seems to revert to serial. I’d report it at github.

yeah, will do… i just wanted to know whether i am the only one affected by that…?

That is what we’re here for :slight_smile: I participated in the beta release but I do not use modbus myself, so I did not experioence this problem and I can’t confirm or deny.

a similar problem killed my lead acid battery in 2022. that was my reason to go from raspy to two raspis… one pnly being a lab/staging-installation, and later to a server-solution and to do updates on a staging server first…

Commented the “retries” parameter and now it works, no more errors.

1 Like

It’s not a bug, retries was deprecated a year or so ago and it was fully removed in 2024.7.

This is Awkward…

i removed the retries-option. it works.

But this is still a BUG!

Depricating an option and not ignoring or removing it from a config or pointing to the depricated option as the problem, but at stuff that does not matter… is a bug!
I wrote SMTP-Servercode that had do parse customers configurations and also be backward-compatible.
No one in his right mind would let an option - even a faulty one - create an error, that points to other options as faulty if they are still valid…

BUG!

I would in general propose to check the config against a Config-Schema like you would with a XML-Schema…
If an Option is mis-configured or invalid, this check can point at the misconfiguration or ask for the removal of depricated options.

I understand Homeassistant to be thought to serve any person setting up home automation. How many of those can be expected to read the Release-Notes in all detail?

1 Like

It did point to it for months in your logs. Now that it’s removed, the warning is gone. Sorry, it’s not a bug.

How HA works, during deprecation periods a repair or warning will appear in your logs telling you to remove the yaml option. If you ignore that warning, when the option is finally removed after the 6 (or more) month grace period, you will get errors. This is what’s happening to you now. The only bug that could be argued is that the error should say “retries is an invalid option for modbus type rtuovertcp”

i am totally going to argue for it being a BUG :wink:

Dont take me too serious. I am happy it works now and since i am using a staging system anyways since another Modbus-Problem in 2022 killed a 5KWH Battery, nothing serious happened…

i just have to manually change a few “customers” configs also… which is why i still think homeassitant should - if it does not delete the option - after that grace-period gracefully comment it out…

Have at it, but no one will fix it. HA does not modify yaml configs and I doubt the core team would let a PR do that either.

remove modbus from the first line in the modbus yaml and all works.

nope, just got hit here also!

you should have known!! :point_up:
Its not a feature, but no bug, no no… so…

So, in general a lot of people dont read their logs… :rofl:

English please

@Nukular : Hast du eine eigene modbus.yaml - Datei?
Dann darf dort kein modbus: am anfang stehen.
Hast du in deiner modbus-Konfiguration einen Parameter retries stehen, dann mußt du den löschen,. da es ihn nicht mehr gibt und der die Konfiguration stört.

dont worry, dont flag this.
Its german and just says:

Do you have a dedicated modbus.yaml-file?
Make sure there is no modbus: at the start
Make sure your modbus-config does not include a retries-parameter.
If so, remove it. It disturbes the config.

Nukulars is not that proficiant in englisch, so he wrote in german.
Not everybody uses translation-tools or gpt yet.

Thanks:
this is my modbus.yaml


modbus:
  - name: KostalWR
    type: tcp
    host: 192.168.178.63
    port: 1502
    delay: 0
    message_wait_milliseconds: 30
    timeout: 5
    sensors:
    - name: Totalactivepower
      slave: 71
      address: 252
      input_type: input
      unit_of_measurement: W
      state_class: measurement
      count: 2
      scale: 0.1
      precision: 1
      data_type: uint32

if i remove this word “modbus” i `ll get other errors

and this is my config:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# https://www.home-assistant.io/docs/configuration/basic/
homeassistant:
### The following installs all package files
packages: !include_dir_named packages
#light: !include light_switch.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
modbus: !include modbus.yaml

i quess you have to correct all intentations in all following lines, after deleting the modbus:
did you do that?