core: Modbus broken in 0.108b

The problem

Modbus configuration no longer works in 0.108b3. Error message: “Not Importing deprecated clients. Dependency Twisted is not Installed”

Environment

  • Home Assistant Core release with the issue: 0.108.3
  • Last working Home Assistant Core release (if known): 0.106.6
  • Operating environment (Home Assistant/Supervised/Docker/venv): hassio, supervisor v. 214
  • Integration causing this issue: Modbus
  • Link to integration documentation on our website: https://rc.home-assistant.io/integrations/modbus/

Problem-relevant configuration.yaml

#Modbus TCP
modbus:
  - name: toplotna
    type: tcp
    host: 192.168.1.8
    port: 502
    timeout: 10
  - name: lopa
    type: tcp
    host: 192.168.1.7
    port: 502
    timeout: 10

Traceback/Error logs

Log Details (WARNING)
Logger: pymodbus.client.asynchronous
Source: components/modbus/__init__.py:5
First occurred: 8:41:27 PM (1 occurrences)
Last logged: 8:41:27 PM

Not Importing deprecated clients. Dependency Twisted is not Installed

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 42 (27 by maintainers)

Most upvoted comments

my pleasure, the reason some of your sensors are slowly at times, is because your device does not respond and thus leaves a transaction open. The patch I provided secures the integrations “survives”, but I have another planned that will speed up responses in this case.

We are continuing in issue #33873, please let me see the logs “looks the same” cannot really be, there should be differences due to my fix.

@frenck, @thehaxxa I would like if you both could verify the patch makes it work for you, thanks in advance.

Let it run for something like 5 minutes after the problem occurs, so I can see retries etc.

logger:
  logs:
    homeassistant.components.modbus: debug
    pymodbus.client: debug