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
71.14k stars 29.81k forks source link

Modbus component freezing lovelace #46994

Closed moskovskiy82 closed 3 years ago

moskovskiy82 commented 3 years ago

The problem

HA is running in the “unsupported environment” on top of Ubuntu 20.04 Server. Recently had one wire disconnected from the USB modbus adapter. For the modbus have a configured climates and several sensors. This should have been no fuss at all but HA behavior was extremely buggy and strange. Lovelace didn’t work. Stuck on please wait or black screen unless rebooted. After the reboot it showed up for 5 minutes and after that a black screen or please wait. After reconnecting the wire to the modbus everything is back to normal. I believe this is not a normal behavior as the component should have been ignored if faulty as others (using HA for almost 5 years already). Not much to show in the logs - just a standard error that the modbus adapter is not available and sensors couldn't be read (on timeout!)

What is version of Home Assistant Core has the issue?

latest

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Modbus

Link to integration documentation on our website

No response

Example YAML snippet

# Put your YAML below this line

Anything in the logs that might be useful for us?

# Put your logs below this line
probot-home-assistant[bot] commented 3 years ago

modbus documentation modbus source (message by IssueLinks)

spacegaier commented 3 years ago

Did you enable the debug logging for modbus to get more data (see docs on how to)? Based on the described Lovelace behavior it sounds as if the backend couldn't correctly start.

probot-home-assistant[bot] commented 3 years ago

Hey there @adamchengtkc, @janiversen, @vzahradnik, mind taking a look at this issue as its been labeled with an integration (modbus) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

janiversen commented 3 years ago

Yes it sounds like a startup problem, however the modbus integration should not block the rest. Lets have a debug log please.

JC-LB commented 3 years ago

I encounter the same kind of problem on HASSIO. I have a modbus double-flow mechanical ventilation, when it's really cold at night I have a relay powering off the whole system and thus making the modbus timeout.

Before 2020.4 it would freeze if the polling rate was high, like every minute and the gateway offline. Setting all modbus scan interval to 300 sec would let the system stable.

Starting from 2020.4, one batch of scan in timeout makes lovelace crash. I've enabled logger: logs: homeassistant.components.modbus: debug pymodbus.client: debug

Logically I see the timeout in logs, which is normal

2021-04-16 01:56:15 ERROR (SyncWorker_17) [pymodbus.client.sync] Connection to (192.168.0.207, 8888) failed: timed out
2021-04-16 01:56:15 ERROR (SyncWorker_16) [pymodbus.client.sync] Connection to (192.168.0.207, 8888) failed: [Errno 113] Host is unreachable
2021-04-16 01:56:18 ERROR (SyncWorker_35) [pymodbus.client.sync] Connection to (192.168.0.207, 8888) failed: timed out
2021-04-16 01:56:18 ERROR (SyncWorker_23) [pymodbus.client.sync] Connection to (192.168.0.207, 8888) failed: [Errno 113] Host is unreachable

Then lovelace crash. The port 8123 is still responding. I need to restart HA using ssh addon.

To reproduce, insert the following package in conf, restart, and see. This conf is using the former modbus syntax (except for climate). I will check if updating it change anything.

# VMC Domeo 210

# ModBus
modbus:
  name: VMCmodbus
  type: tcp
  host: 192.168.0.207
  port: 8888

# Modbus thermo by-pass
  climates:
    - name: VMC Température Extérieure By-pass
      slave: 1
      data_type: uint
      data_count: 1
      max_temp: 20
      min_temp: 11
      temp_step: 1
      target_temp_register: 22
      current_temp_register: 22
      scan_interval: 300

    - name: VMC Témpérature Intérieure By-pass
      slave: 1
      data_type: uint
      data_count: 1
      max_temp: 30
      min_temp: 21
      temp_step: 1
      target_temp_register: 23
      current_temp_register: 23
      scan_interval: 300

    - name: VMC durée filtre
      slave: 1
      data_type: uint
      data_count: 1
      max_temp: 24
      min_temp: 1
      temp_step: 1
      target_temp_register: 31
      current_temp_register: 31
      temperature_unit: mois
      scan_interval: 86000

    - name: VMC durée By-pass
      slave: 1
      data_type: uint
      data_count: 1
      max_temp: 24
      min_temp: 1
      temp_step: 1
      target_temp_register: 24
      current_temp_register: 24
      temperature_unit: h
      scan_interval: 86000

    - name: VMC Surpression
      slave: 1
      data_type: int
      data_count: 1
      max_temp: 15
      min_temp: 0
      temp_step: 1
      target_temp_register: 8
      current_temp_register: 8
      scan_interval: 300

sensor:
  - platform: modbus
    scan_interval: 243
    registers:

      - name: VMC état By-pass
        hub: VMCmodbus
        register: 25
        register_type: input

      - name: VMC état Boost
        hub: VMCmodbus 
        register: 15

      - name: VMC état Déphasage
        hub: VMCmodbus
        unit_of_measurement: "%"
        register: 8

      - name: VMC débit
        hub: VMCmodbus
        unit_of_measurement: m3/h
        register: 16
        register_type: input

      - name: VMC RPM Entrant
        hub: VMCmodbus
        register: 20
        register_type: input

      - name: VMC RPM Sortant
        hub: VMCmodbus
        register: 19
        register_type: input

      - name: VMC Aspiration
        hub: VMCmodbus
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
        register: 21
        register_type: input

      - name: VMC Extraction
        hub: VMCmodbus
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
        register: 22
        register_type: input

      - name: VMC Extérieur
        hub: VMCmodbus
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
        register: 23
        register_type: input

      - name: VMC Insufflation
        hub: VMCmodbus
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
        register: 24
        register_type: input

# VMC switch
switch:
- platform: modbus
  scan_interval: 312
  coils:
    - name: VMC By-pass Auto
      hub: VMCmodbus
      slave: 1
      coil: 8

    - name: VMC By-pass Manuel
      hub: VMCmodbus
      slave: 1
      coil: 9
# default holding, definir type pour input
  registers:
    - name: VMC Boost
      hub: VMCmodbus
      slave: 1
      register: 15
      command_on: 1
      command_off: 0
      #verify_register: 15
      #register_type: holding

    - name: VMC Boost Off
      hub: VMCmodbus
      slave: 1
      register: 15
      command_on: 0
      command_off: 0
janiversen commented 3 years ago

First of all, thanks for a very descriptive report !! Upgrading your configuration will not change anything around this problem.

Now I finally have something more concrete to go after. Can you please pass me the full log (up until where lovelace crashes) I need to see the timing of your timeouts :-) because it seems pymodbus (the third party library) could be blocking the task scheduler.

And just to confirm, what happens: Your system is working nicely no errors, no timeouts. You then decide to poweroff the modbus device (and other things) Then you get timeouts (normal) And a while later lovelace dies. Is that a correct summary ? (This is just to see if I can simulate your problem here).

zenoVerboom commented 3 years ago

I am experiencing the same problem. I installed a new server to investigate the problem with only the modbus integration.

modbus:
  - type: tcp
    host: 192.168.14.7
    port: 502
    name: solarsma
    delay: 2
    timeout: 2
    sensors:
    - name: SMA_Power_DC2
      unit_of_measurement: W
      slave: 3
      address: 30961
      count: 2
      data_type: int
    - name: SMA_Voltage_DC2
      unit_of_measurement: V
      slave: 3
      address: 30959
      count: 2
      data_type: int
    - name: SMA_Current_DC2
      unit_of_measurement: A
      slave: 3
      address: 30957
      count: 2
      data_type: int
    - name: SMA_Power_DC
      unit_of_measurement: W
      slave: 3
      address: 30773
      count: 2
      data_type: int
    - name: SMA_Voltage_DC
      unit_of_measurement: V
      slave: 3
      address: 30771
      count: 2
      data_type: int
    - name: SMA_Current_DC
      unit_of_measurement: A
      slave: 3
      address: 30769
      count: 2
      data_type: int
    - name: SMA_Power_AC
      unit_of_measurement: W
      slave: 3
      address: 30775
      count: 2
      data_type: int
    - name: PV_Daily_Yield
      unit_of_measurement: kWh
      slave: 3
      address: 30517
      scale: 0.001
      precision: 3
      count: 4
      data_type: uint
    - name: PV_Total_Production
      unit_of_measurement: MWh
      slave: 3
      address: 30513
      scale: 0.000001
      precision: 3
      count: 4
    - name: Grid_Voltage
      unit_of_measurement: V
      slave: 3 
      address: 30783
      count: 2
      scale: 0.01
      precision: 2
      data_type: uint
    - name: Grid_frequency
      unit_of_measurement: Hz
      slave: 3 
      address: 30803
      count: 2
      scale: 0.01
      precision: 2
      data_type: uint
    - name: SMA_temp
      unit_of_measurement: °C
      slave: 3
      address: 30953
      count: 2
      scale: 0.1
      precision: 1
      data_type: int
    - name: SMA_status
      slave: 3
      address: 30201
      count: 2
    - name: SMA_grid
      slave: 3
      address: 30217
      count: 2
    - name: Insulation
      slave: 3
      address: 30225
      count: 2
      scale: 0.001
      unit_of_measurement: kOhms
    - name: SMA_Residual_current
      slave: 3
      address: 31247
      count: 2
      scale: 1
      unit_of_measurement: mA
    - name: Apparent_Power
      unit_of_measurement: VA
      slave: 3
      address: 30813
      scale: 1
      precision: 0
      count: 2
      data_type: int
    - name: Reactive Power
      unit_of_measurement: VAr
      slave: 3
      address: 30805
      scale: 1
      precision: 0
      count: 2
      data_type: int

I also added a logger for debugging purposes

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

once I go to a lovelace with modbus entities the whole front-end becomes irresponsible. It keeps crashing and you have to reboot the HA core before any response. This happens when a modbus device times out or a modbus device isn't reachable (turned off). Once this error occurs all other HA sensors take longer then the scheduled update interval resulting in a slow irresponsible system. Log:

2021-04-20 13:52:49 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating rpi_power binary_sensor took longer than the scheduled update interval 0:00:30
2021-04-20 13:52:49 ERROR (SyncWorker_46) [pymodbus.client.sync] Connection to (192.168.14.7, 502) failed: timed out
2021-04-20 13:52:50 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 192.168.0.201 for /api/hassio/supervisor/logs using bearer token
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/hassio/supervisor/logs to 192.168.0.201 (auth: True)
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [548108068848] Received {'type': 'supervisor/api', 'endpoint': '/core/stats', 'method': 'get', 'id': 62}
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [548108068848] Received {'type': 'supervisor/api', 'endpoint': '/supervisor/stats', 'method': 'get', 'id': 63}
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [548108068848] Received {'type': 'supervisor/api', 'method': 'GET', 'endpoint': '/network/info', 'id': 64}
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [548108068848] Sending {"id": 64, "type": "result", "success": true, "result": {"interfaces": [{"interface": "eth0", "type": "ethernet", "enabled": true, "connected": true, "primary": true, "ipv4": {"method": "auto", "address": ["192.168.0.243/24"], "nameservers": ["195.130.131.4", "195.130.130.4"], "gateway": "192.168.0.1"}, "ipv6": {"method": "auto", "address": ["2a02:1810:342c:7200:f2c0:eb36:11c3:9b20/64", "fe80::a65c:a77c:e7bc:1a5f/64"], "nameservers": ["2a02:1800:100::44:1", "2a02:1800:100::44:2"], "gateway": "fe80::3a43:7dff:fe31:cc65"}, "wifi": null, "vlan": null}, {"interface": "wlan0", "type": "wireless", "enabled": false, "connected": false, "primary": false, "ipv4": {"method": "disabled", "address": [], "nameservers": [], "gateway": null}, "ipv6": {"method": "disabled", "address": [], "nameservers": [], "gateway": null}, "wifi": null, "vlan": null}], "docker": {"interface": "hassio", "address": "172.30.32.0/23", "gateway": "172.30.32.1", "dns": "172.30.32.3"}, "host_internet": true, "supervisor_internet": true}}
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 192.168.0.201 for /api/hassio/supervisor/logs using bearer token
2021-04-20 13:52:50 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/hassio/supervisor/logs to 192.168.0.201 (auth: True)
2021-04-20 13:52:51 ERROR (SyncWorker_47) [pymodbus.client.sync] Connection to (192.168.14.7, 502) failed: timed out
2021-04-20 13:52:51 DEBUG (MainThread)

Version info:

Version | core-2021.4.6
-- | --
Installation Type | Home Assistant OS
Supervisor | true
Docker | true
Python Version | 3.8.7
Operating System Family | Linux
Operating System Version | 5.4.83-v8
CPU Architecture | aarch64
o-s-e commented 3 years ago

I have a similar issue since the last upgrade. I run HA in docker on a rasperry pi. First I thought it was because I switched to the new configuration syntax, but it's the same after reverting the config to the old style. What I see in the logs are a lot of instances of "[pymodbus.client.sync] New Transaction state 'SENDING'"

Log excerpt:

homeassistant    | 2021-04-20 15:22:15 INFO (MainThread) [homeassistant.components.traccar.device_tracker] Connection to Traccar restored
homeassistant    | 2021-04-20 15:22:18 DEBUG (SyncWorker_45) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:18 DEBUG (SyncWorker_46) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:18 INFO (MainThread) [hass_nabucasa.iot] Connection closed
homeassistant    | 2021-04-20 15:22:21 DEBUG (SyncWorker_46) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:24 DEBUG (SyncWorker_15) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:24 DEBUG (SyncWorker_17) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:27 DEBUG (SyncWorker_18) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:27 DEBUG (SyncWorker_19) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:30 DEBUG (SyncWorker_20) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:33 DEBUG (SyncWorker_14) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:33 DEBUG (SyncWorker_47) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:36 DEBUG (SyncWorker_48) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:36 DEBUG (SyncWorker_48) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:39 DEBUG (SyncWorker_50) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:42 DEBUG (SyncWorker_51) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:42 DEBUG (SyncWorker_52) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:45 DEBUG (SyncWorker_53) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:48 DEBUG (SyncWorker_54) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:48 DEBUG (SyncWorker_55) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:50 WARNING (MainThread) [pytraccar.api] Timeouterror connecting to Traccar,
homeassistant    | 2021-04-20 15:22:51 DEBUG (SyncWorker_56) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:54 DEBUG (SyncWorker_57) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:54 DEBUG (SyncWorker_58) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:57 DEBUG (SyncWorker_59) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:57 DEBUG (SyncWorker_3) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:22:58 WARNING (MainThread) [pytraccar.api] Timeouterror connecting to Traccar,
homeassistant    | 2021-04-20 15:23:01 DEBUG (SyncWorker_5) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:04 DEBUG (SyncWorker_21) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:04 DEBUG (SyncWorker_0) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:06 WARNING (MainThread) [pytraccar.api] Timeouterror connecting to Traccar,
homeassistant    | 2021-04-20 15:23:07 DEBUG (SyncWorker_6) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:08 INFO (MainThread) [homeassistant.components.generic_thermostat.climate] Keep-alive - Turning off heater switch.actuatoronoff
homeassistant    | 2021-04-20 15:23:10 DEBUG (SyncWorker_22) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:10 DEBUG (SyncWorker_22) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:13 DEBUG (SyncWorker_24) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:13 DEBUG (SyncWorker_23) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:16 DEBUG (SyncWorker_60) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:19 DEBUG (SyncWorker_61) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:19 DEBUG (SyncWorker_62) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:22 DEBUG (SyncWorker_63) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:25 DEBUG (SyncWorker_25) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:25 DEBUG (SyncWorker_26) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:28 DEBUG (SyncWorker_27) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:31 DEBUG (SyncWorker_28) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 15:23:31 DEBUG (SyncWorker_29) [pymodbus.client.sync] New Transaction state 'SENDING'

My config:

modbus:
  - name: hub1
    host: 192.168.99.185
    port: 9999
    type: tcp

sensor:
  platform: modbus
  registers:
    - name: EPEver_Battery
      hub: hub1
      unit_of_measurement: V
      slave: 01
      register: 13082
      register_type: input
      scale: 0.01
      precision: 2
    - name: EPEver_Solar #3100
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 12544
      register_type: input
      scale: 0.01
    - name: EPEver_Solar_Power_L # 3102
      hub: hub1
      unit_of_measurement: W
      slave: 01
      register: 12546
      register_type: input
      scale: 0.01
    - name: EPEver_Solar_Current # 3101
      hub: hub1
      unit_of_measurement: A
      slave: 01
      register: 12545
      register_type: input
      scale: 0.01
      precision: 2
    - name: EPEver_Load # 310E
      hub: hub1
      unit_of_measurement: W
      slave: 01
      register: 12558
      register_type: input
      scale: 0.01
    - name: EPEver_Battery_Temperature
      hub: hub1
      unit_of_measurement: Celsius
      slave: 01
      register: 12560
      register_type: input
      scale: 0.01
    - name: EPEver_Battery_SOC
      hub: hub1
      unit_of_measurement: Percent
      slave: 01
      register: 12570
      register_type: input
    - name: EPEver_Battery_Status
      hub: hub1
      slave: 1
      register: 12800
      register_type: input
      scale: 1
      precision: 0
    - name: PV Maximum Battery Voltage Today #0x003302
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 13058
      register_type: input
      scale: 0.01
      precision: 2
    - name: PV Minimum Battery Voltage Today #0x003303
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 13059
      register_type: input
      scale: 0.01
      precision: 2
    - name: PV Consumed Energy Today #0x003304 and 0x003305
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13060
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Consumed Energy This Month #0x003306 and 07
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13062
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Consumed Energy This Year #0x003308 & 09
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13064
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Total Consumed Energy #0x00330A & 0B
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13066
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Generated Energy Today #0x00330C & 0D
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13068
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Generated Energy This Month #0x00330E & 0F
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13070
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Generated Energy This Year #0x003310 & 11
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13072
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Total Generated Energy #0x003312 & 13
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13074
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: PV Battery Voltage #0x00331A
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 13082
      register_type: input
      scale: 0.01
      precision: 2
    - name: PV Battery Current #0x00331B & 1C
      hub: hub1
      unit_of_measurement: A
      slave: 1
      register: 13083
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true

It makes the whole mainthread freeze and the UI unresponsive.

If you need more information or even want a live peak into the system, please reach out to me.

janiversen commented 3 years ago

There are clearly a problem when the modbus device becomes unavailable, I am not sure that it is solved with the PR that are merged but not released.

@o-s-e what you see is the modbus device not being reachable so there are many many retries.

I will try to make a test setup and test with the new version of pymodbus (which was merged earlier today).

o-s-e commented 3 years ago

@janiversen , but the modbus device is available and the entities in lovelace are updated, until the UI gets unresponsive after a while. The whole setup worked until I updated to 2021.4.6

janiversen commented 3 years ago

you can see in the log when ha receive updates and clearly it does not in the end where there are only “sending”

I am not sure how you determine your device is available, according to the log it dies not respond.

zenoVerboom commented 3 years ago

I think I noticed the same, when the lovelace page is left open, some modbus sensor values still update. But you aren't able to navigate any longer.

I tried upgrading to the dev version but no luck there, same result. When the device becomes unavailable the gui crashes.

o-s-e commented 3 years ago

I'm not sure about this. All sensors referenced in the config are updated in the UI after a restart: image But there is still only the sending debug message and nothing else in the log:

Attaching to homeassistant
homeassistant    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
homeassistant    | [s6-init] ensuring user provided files have correct perms...exited 0.
homeassistant    | [fix-attrs.d] applying ownership & permissions fixes...
homeassistant    | [fix-attrs.d] done.
homeassistant    | [cont-init.d] executing container initialization scripts...
homeassistant    | [cont-init.d] udev.sh: executing... 
homeassistant    | [15:59:38] INFO:  Setup udev backend inside container
homeassistant    | starting version 3.2.9
homeassistant    | [15:59:38] INFO:  Update udev information
homeassistant    | [cont-init.d] udev.sh: exited 0.
homeassistant    | [cont-init.d] done.
homeassistant    | [services.d] starting services
homeassistant    | [services.d] done.
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.0 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up http
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.1 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up system_log
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.2 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 1: {'api', 'device_automation', 'search', 'person', 'auth', 'config', 'image', 'cloud', 'frontend', 'http', 'webhook', 'alexa', 'lovelace', 'onboarding', 'analytics', 'websocket_api', 'system_log'}
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up api
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up device_automation
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain device_automation took 0.0 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up auth
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain auth took 0.0 seconds
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up config
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setting up webhook
homeassistant    |  2021-04-20 15:59:48 INFO (MainThread) [homeassistant.setup] Setup of domain webhook took 0.0 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up alexa
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain alexa took 0.0 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up lovelace
homeassistant    |   2021-04-20 15:59:49 WARNING (MainThread) [homeassistant.components.lovelace] Lovelace is running in storage mode. Define resources via user interface
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.8 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up image
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up search
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain search took 0.0 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up analytics
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain lovelace took 0.6 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain image took 0.5 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setup of domain analytics took 0.0 seconds
homeassistant    |  2021-04-20 15:59:49 INFO (SyncWorker_2) [homeassistant.loader] Loaded camera from homeassistant.components.camera
homeassistant    |  2021-04-20 15:59:49 INFO (SyncWorker_3) [homeassistant.loader] Loaded google_assistant from homeassistant.components.google_assistant
homeassistant    |  2021-04-20 15:59:49 INFO (MainThread) [homeassistant.setup] Setting up person
homeassistant    |  2021-04-20 15:59:49 INFO (SyncWorker_0) [homeassistant.loader] Loaded media_player from homeassistant.components.media_player
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.setup] Setting up cloud
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.setup] Setup of domain person took 1.0 seconds
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.setup] Setting up onboarding
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.helpers.storage] Migrating onboarding storage from 3 to 4
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.setup] Setup of domain onboarding took 0.1 seconds
homeassistant    |  2021-04-20 15:59:50 INFO (SyncWorker_3) [homeassistant.loader] Loaded hassio from homeassistant.components.hassio
homeassistant    |  2021-04-20 15:59:50 INFO (SyncWorker_1) [homeassistant.loader] Loaded panel_custom from homeassistant.components.panel_custom
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.setup] Setting up frontend
homeassistant    |  2021-04-20 15:59:50 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds
homeassistant    |  2021-04-20 15:59:51 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 1.3 seconds
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'input_select', 'updater', 'sun', 'input_number', 'tts', 'ssdp', 'input_boolean', 'system_health', 'sensor', 'zeroconf', 'pi_hole', 'media_source', 'counter', 'logbook', 'my', 'influxdb', 'kodi', 'history', 'group', 'dhcp', 'default_config', 'blueprint', 'device_tracker', 'met', 'climate', 'script', 'switch', 'input_datetime', 'automation', 'input_text', 'wled', 'mqtt', 'trace', 'tag', 'timer', 'scene', 'speedtestdotnet', 'mobile_app', 'zone', 'map', 'modbus'}
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up input_select
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up updater
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up sun
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.0 seconds
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up input_number
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up input_boolean
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up system_health
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up sensor
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.0 seconds
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up pi_hole
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setup of domain pi_hole took 0.0 seconds
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up media_source
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up counter
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up logbook
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setting up my
homeassistant    |  2021-04-20 15:59:52 INFO (MainThread) [homeassistant.setup] Setup of domain my took 0.0 seconds
homeassistant    |  2021-04-20 15:59:54 INFO (MainThread) [homeassistant.setup] Setting up influxdb
homeassistant    |  2021-04-20 15:59:54 INFO (MainThread) [homeassistant.setup] Setting up history
homeassistant    |  2021-04-20 15:59:54 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds
homeassistant    |  2021-04-20 15:59:54 INFO (MainThread) [homeassistant.setup] Setting up group
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up dhcp
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain dhcp took 0.0 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up blueprint
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain blueprint took 0.0 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up met
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain met took 0.0 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (SyncWorker_3) [homeassistant.loader] Loaded generic_thermostat from homeassistant.components.generic_thermostat
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up input_datetime
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up input_text
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up trace
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain trace took 0.0 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up tag
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up timer
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up scene
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up speedtestdotnet
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain speedtestdotnet took 0.0 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up zone
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up map
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up modbus
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
homeassistant    |  2021-04-20 15:59:57 INFO (SyncWorker_3) [homeassistant.loader] Loaded binary_sensor from homeassistant.components.binary_sensor
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [hass_nabucasa.iot] Connected
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [snitun.utils.aiohttp_client] AioHTTP snitun client started on 127.0.0.1:59511
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain system_health took 5.4 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (SyncWorker_4) [homeassistant.loader] Loaded google_translate from homeassistant.components.google_translate
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setting up zeroconf
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain media_source took 5.2 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 5.2 seconds
homeassistant    |  2021-04-20 15:59:57 INFO (MainThread) [homeassistant.setup] Setup of domain group took 2.7 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setting up switch
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain input_number took 6.7 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain input_select took 6.8 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.0 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain counter took 6.5 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setting up mqtt
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setting up script
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain input_datetime took 1.7 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain input_text took 1.7 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain tag took 1.7 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain influxdb took 4.0 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain timer took 1.7 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain modbus took 1.6 seconds
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setting up tts
homeassistant    |  2021-04-20 15:59:58 INFO (MainThread) [homeassistant.setup] Setup of domain zeroconf took 1.4 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up climate
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up kodi
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain kodi took 0.0 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up wled
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain wled took 0.0 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.components.climate] Setting up climate.generic_thermostat
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.modbus
homeassistant    |  2021-04-20 15:59:59 INFO (SyncWorker_2) [homeassistant.loader] Loaded stt from homeassistant.components.stt
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 2.1 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.updater
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.cloud
homeassistant    |   2021-04-20 15:59:59 WARNING (MainThread) [homeassistant.components.modbus.sensor] Sensor configuration is deprecated, will be removed in a future release
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain scene took 2.2 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up stt
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain stt took 0.0 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (SyncWorker_3) [homeassistant.loader] Loaded notify from homeassistant.components.notify
homeassistant    |  2021-04-20 15:59:59 INFO (SyncWorker_5) [homeassistant.loader] Loaded traccar from homeassistant.components.traccar
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 7.5 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up ssdp
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain ssdp took 0.0 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up automation
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.speedtestdotnet
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.9 seconds
homeassistant    |  2021-04-20 15:59:59 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.pi_hole
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.components.switch] Setting up switch.pi_hole
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 0.2 seconds
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setting up notify
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.0 seconds
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setting up media_player
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.1 seconds
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setting up traccar
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.setup] Setup of domain traccar took 0.0 seconds
homeassistant    |  2021-04-20 16:00:00 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.kodi
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.wled
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.switch] Setting up switch.wled
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.wled
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.switch] Setting up switch.wled
homeassistant    |  2021-04-20 16:00:01 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
homeassistant    |  2021-04-20 16:00:02 INFO (SyncWorker_1) [homeassistant.loader] Loaded light from homeassistant.components.light
homeassistant    |  2021-04-20 16:00:02 INFO (SyncWorker_2) [homeassistant.loader] Loaded weather from homeassistant.components.weather
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 2.7 seconds
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.traccar
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.setup] Setting up light
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.setup] Setting up weather
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.setup] Setup of domain weather took 0.0 seconds
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.switch] Setting up switch.mqtt
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mqtt
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Masterlight Wi-Fi BSSID because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Masterlight Wi-Fi Channel because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Masterlight Wi-Fi RSSI because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Masterlight Wi-Fi Signal because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Kitchenlight Wi-Fi BSSID because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Kitchenlight Wi-Fi Channel because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Kitchenlight Wi-Fi RSSI because it's disabled
homeassistant    |  2021-04-20 16:00:02 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Kitchenlight Wi-Fi Signal because it's disabled
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.6 seconds
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.components.weather] Setting up weather.met
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.setup] Setting up default_config
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [snitun.utils.aiohttp_client] AioHTTP snitun client connected to: eu-west-2.ui.nabu.casa:443
homeassistant    |  2021-04-20 16:00:03 INFO (SyncWorker_4) [homeassistant.loader] Loaded stream from homeassistant.components.stream
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.components.light] Setting up light.wled
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.components.light] Setting up light.wled
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.components.switch] Setting up switch.mqtt
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.components.weather] Not adding entity Van Hourly because it's disabled
homeassistant    |  2021-04-20 16:00:03 INFO (MainThread) [homeassistant.setup] Setting up stream
homeassistant    |  2021-04-20 16:00:04 INFO (MainThread) [homeassistant.setup] Setup of domain stream took 0.0 seconds
homeassistant    |  2021-04-20 16:00:04 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mqtt
homeassistant    |  2021-04-20 16:00:04 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.2 seconds
homeassistant    |  2021-04-20 16:00:04 INFO (MainThread) [homeassistant.components.traccar.device_tracker] Connection to Traccar restored
homeassistant    |  2021-04-20 16:00:04 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 4.2 seconds
homeassistant    |  2021-04-20 16:00:04 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app
homeassistant    |  2021-04-20 16:00:06 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 20.07s
homeassistant    |  2021-04-20 16:00:06 INFO (MainThread) [homeassistant.core] Starting Home Assistant
homeassistant    |  2021-04-20 16:00:06 INFO (MainThread) [homeassistant.core] Timer:starting
homeassistant    |  2021-04-20 16:00:07 INFO (SyncWorker_1) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
homeassistant    |  2021-04-20 16:00:07 INFO (MainThread) [homeassistant.components.automation.update_location] Initialized trigger update location
homeassistant    |  2021-04-20 16:00:07 INFO (MainThread) [homeassistant.components.automation.auto_heater] Initialized trigger Auto heater
homeassistant    |  2021-04-20 16:00:07 INFO (MainThread) [homeassistant.components.automation.zone_notification] Initialized trigger Zone Notification
homeassistant    | 2021-04-20 16:00:14 DEBUG (SyncWorker_2) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:14 ERROR (MainThread) [homeassistant.components.speedtestdotnet] Error fetching speedtestdotnet data: 
homeassistant    | 2021-04-20 16:00:17 DEBUG (SyncWorker_4) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:20 DEBUG (SyncWorker_1) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:20 DEBUG (SyncWorker_6) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:23 DEBUG (SyncWorker_3) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:26 DEBUG (SyncWorker_0) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:26 DEBUG (SyncWorker_7) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:29 DEBUG (SyncWorker_8) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:32 DEBUG (SyncWorker_9) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:32 DEBUG (SyncWorker_10) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:35 DEBUG (SyncWorker_11) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:38 DEBUG (SyncWorker_12) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:38 DEBUG (SyncWorker_13) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:41 DEBUG (SyncWorker_14) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:41 DEBUG (SyncWorker_15) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    |  2021-04-20 16:00:42 INFO (MainThread) [homeassistant.components.generic_thermostat.climate] Obtained current and target temperature. Generic thermostat active. 23.5, 20.0
homeassistant    | 2021-04-20 16:00:44 DEBUG (SyncWorker_16) [pymodbus.client.sync] New Transaction state 'SENDING'
homeassistant    | 2021-04-20 16:00:44 DEBUG (SyncWorker_17) [pymodbus.client.sync] New Transaction state 'SENDING'

So there is no receiving message, but the sensors are clearly updated.

janiversen commented 3 years ago

I have merged PR #49481 that should solve part of the problem if this is applied alongside my other PR, then sensors etc should become “Unavailable” when the problem occurs, if they do not then the pymodbus library is hanging.

with 2021.5 there should be a new version of pymodbus.