home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.06k stars 31.08k forks source link

2024.11 kills modbus TCP #129984

Closed rvdgaag closed 1 hour ago

rvdgaag commented 3 weeks ago

The problem

Moving to 2024.11, Modbus tcp does not start since the core expects baudrate, parity etc ?

What version of Home Assistant Core has the issue?

2024.11

What was the last working version of Home Assistant Core?

2024.10.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Modbus

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 weeks ago

modbus documentation modbus source

flabbamann commented 3 weeks ago

Hi @rvdgaag, sounds like this is the same problem as in #127458. Please review your config and see if you can fix it. If not post it here.

rvdgaag commented 3 weeks ago

@flabbamann yes it is exactly the same issue, still haven’t fixed so I restored the previous core version

benchristian88 commented 3 weeks ago

same issue for me. debug log shows

2024-11-08 10:39:06.360 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: HUBNAME: Error: device: 2 address: 3 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.1.10:502]

EDIT: went into dev tools and reloaded modbus, and things are working again. weird but happy now

thrhymes commented 3 weeks ago

same problem:

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: image|690x196

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!

harisahai commented 3 weeks ago

Removing the "retries" parameter seems to help

Petro31 commented 3 weeks ago

retries was deprecated in 2024.1, that's what's causing the problem. The error isn't very clear on that, however there was a deprecation warning in your logs since release 2024.1 telling everyone to remove that key from your configuration. If I recall correctly, its now hardcoded to 3 retries.

mstu01 commented 3 weeks ago

Removing the "retries" parameter seems to help

after removing the parameter, it works again.

issue-triage-workflows[bot] commented 1 week ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.