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
70.14k stars 29.18k forks source link

Modbus is failing in all possible ways #50073

Closed prilly-dev closed 3 years ago

prilly-dev commented 3 years ago

The problem

Modbus is causing HA to crash/halt/slowdown eventualy brings ha to a effective stop. this started as soon as modbus was modified. EVERYTHING WAS WORKING PERFECTLY FINE UNTIL 2021.03.

After the modbus havoc started i have seen absolutly all possible error messages HA can produce, after soon two months with this hell and it currently seems this is going to continue, it has to be stopped before the rest of HA is destroyed.

What is version of Home Assistant Core has the issue?

ALL VERSION AFTER 2021.03 including DEV

What was the last working version of Home Assistant Core?

2021.03

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Modbus

Link to integration documentation on our website

https://www.home-assistant.io/integrations/modbus

Example YAML snippet

# Systemair VTR250 - NEW CONFIG STYLE - 00
modbus:
  - name: VTR250
    type: tcp
    host: 192.168.1.70
    port: 502
    #delay: 1
    #timeout: 1

############################################### SWITCHES ###############################################
    switches:

#-----------------------------------VTR250 MANUELL VIFTE STOPP TILLATT ON/OFF----------------

      - name: vtr250_manuell_stopp_tillatt
        address: 1352
        slave: 1
        scan_interval: 15
        command_on: 1 
        command_off: 0 
        input_type: holding

#-----------------------------------VTR250 FUKTOVERFORING ON/OFF-----------------------------

      - name: vtr250_fuktoverforing
        address: 2203
        slave: 1
        scan_interval: 10
        command_on: 1 
        command_off: 0 
        input_type: holding

#-----------------------------------VTR250 ECO MODE ON/OFF------------------------------------

      - name: vtr250_eco_modus
        address: 2504
        slave: 1
        scan_interval: 10
        command_on: 1 
        command_off: 0 
        input_type: holding

#-----------------------------------VTR250 REG MODE: TILLUFT/ROM/AVTREKK ----------------------
#   0 = Tilluft reg., 1 = rom reg. (krever rom temp. sensor, derfor NA), 2 = Avtrekks reg.

      - name: vtr250_reg_metode
        address: 2030
        slave: 1
        scan_interval: 10
        command_on: 0
        command_off: 2
        input_type: holding

################################################ SENSORS ###############################################

  - name: VTR250_1
    type: tcp
    host: 192.168.1.70
    port: 502
    #delay: 1
    #timeout: 1

    sensors:

#------------------------- VTR250 - Tilluftstemp -------------------------------------------- 

      - name: vtr250_tillufts_temperatur
        device_class: temperature
        slave: 1
        address: 12102
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Inntakstemp  -------------------------------------------- 

      - name: vtr250_inntaks_temperatur
        device_class: temperature
        slave: 1
        address: 12101
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: int

#------------------------- VTR250 - Avtrekkstemp -------------------------------------------- 

      - name: vtr250_avtrekks_temperatur
        device_class: temperature
        slave: 1
        address: 12543 #2050   #NB!EAT/RAT used for extract air controller, benyttes pga. avtrekk AI er "ekstrautstyr" 
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Temp. etter El. kolbe ----------------------------------- 

      - name: vtr250_overhetingstemperatur_tilluft
        device_class: temperature
        slave: 1
        address: 12107
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint  

#------------------------- VTR250 - Fukt avtrekk --------------------------------------------- 

      - name: vtr250_relativ_fukt_avtrekk
        device_class: humidity
        slave: 1
        address: 12135
        input_type: holding
        unit_of_measurement: '%RF'
        count: 1
        data_type: uint

#------------------------- VTR250 - Ønsket tilluftstemp. -------------------------------------
# Avlesning Ønsket settpunkt tilluft ved vinter/avtrekks reg. 

      - name: vtr250_tilluft_sp
        device_class: temperature       
        slave: 1
        address: 2000
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Ønsket avtrekkstemp. -------------------------------------
# Avlesning Ønsket settpunkt avtrekksluft ved sommer/kaskade reg.

      - name: vtr250_avtrekksluft_sp
        device_class: temperature
        slave: 1
        address: 2012
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Min/nedre grense avtrekkstemp. --------------------------
# Avlesning Ønsket min settpunkt avtrekksluft ved sommer/kaskade reg. 

      - name: vtr250_avtrekksluft_min_sp
        device_class: temperature
        slave: 1
        address: 2020 # eksisterer ikke i dokumentasjon
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Mix/øvre grense avtrekkstemp.  --------------------------
# Avlesning Ønsket max settpunkt avtrekksluft ved sommer/kaskade reg.

      - name: vtr250_avtrekksluft_max_sp
        device_class: temperature
        slave: 1
        address: 2021 # eksisterer ikke i dokumentasjon
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Ønsket offset ved Eco drift ------------------------------

      - name: vtr250_eco_varme_offset
        device_class: temperature
        slave: 1
        address: 2503 #Temp. offset før varme element starter i Eco modus
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Tilluftsvifte pådrag -------------------------------------

      - name: vtr250_tilluftsvifte 
        device_class: power_factor
        slave: 1
        address: 14000
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: uint

#------------------------- VTR250 - Avtrekksvifte pådrag ------------------------------------- 

      - name: vtr250_avtrekksvifte 
        device_class: power_factor        
        slave: 1
        address: 14001
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: uint

#------------------------- VTR250 - El.kolbe pådrag ------------------------------------------

      - name: vtr250_el_kolbe_padrag #TRIAC pådrag
        device_class: power_factor        
        slave: 1
        address: 2148
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: uint

#------------------------- VTR250 - El.kolbe Av/På -------------------------------------------

      - name: vtr250_el_kolbe_av_pa  #TRIAC
        slave: 1
        address: 14380
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Varmegjenvinner pådrag -----------------------------------

      - name: vtr250_varmegjenvinner
        device_class: power_factor        
        slave: 1
        address: 14102
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: uint

#------------------------- VTR250 - Trykkvakt status -----------------------------------------

      - name: vtr250_komfyravtrekk_trykkvakt_av_pa 
        slave: 1
        address: 12020 
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Modus status register  -----------------------------------

      - name: vtr250_modus_status_register
        slave: 1
        address: 1160 #0=Auto,1=Man,2=Crowded,3=Refresh,4=Fireplace,5=Away,6=Holiday,7-12 not applicable
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Reguleringmetode  ----------------------------------------
# Avlesning Regulerings metode 
# 0 = Tillufts reg., 1 = Rom reg.(krever rom temp sensor, derfor NA), 2 = Avtrekks reg.

      - name: vtr250_tilluft_rom_avtrekk_reg
        slave: 1
        address: 2030 # eksisterer ikke i dokumentasjon
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Modus - Manuell kommando register  -----------------------

      - name: vtr250_manuell_modus_kommando_register
        slave: 1
        address: 1130 #0=Man Stopp (value Off only allowed if contents of register REG_FAN_MANUAL_STOP_ALLOWED is 1),2=Man Lav,3=Man Normal,4=Man Høy
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Intern UR - Year ----------------------------------------- 

      - name: vtr250_time_year
        slave: 1
        address: 6000
        input_type: holding
        unit_of_measurement: År
        count: 1
        data_type: uint   

#------------------------- VTR250 - Intern UR - Month ---------------------------------------- 

      - name: vtr250_time_md
        slave: 1
        address: 6001
        input_type: holding
        unit_of_measurement: md
        count: 1
        data_type: uint  

#------------------------- VTR250 - Intern UR - Day ------------------------------------------ 

      - name: vtr250_time_day
        slave: 1
        address: 6002
        input_type: holding
        unit_of_measurement: dag
        count: 1
        data_type: uint

#------------------------- VTR250 - Intern UR - Hour ----------------------------------------- 

      - name: vtr250_time_hour
        slave: 1
        address: 6003
        input_type: holding
        unit_of_measurement: t
        count: 1
        data_type: uint 

#------------------------- VTR250 - Intern UR - Minute --------------------------------------- 

      - name: vtr250_time_min
        slave: 1
        address: 6004
        input_type: holding
        unit_of_measurement: min
        count: 1
        data_type: uint 

#------------------------- VTR250 - Intern UR - Second --------------------------------------- 

      - name: vtr250_time_sec
        slave: 1
        address: 6005
        input_type: holding
        unit_of_measurement: sek
        count: 1
        data_type: uint 

#------------------------- VTR250 - Temperature offset during active week schedule (Auto mode) ------------------------------------------------ MODBUS SENSOR --------------------???????????????????????

      - name: vtr250_sch_active_temp_offset
        slave: 1
        address: 5000
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Temperature offset during inactive week schedule (Auto mode) ---------------------------------------------- MODBUS SENSOR --------------------???????????????????????

      - name: vtr250_sch_inactive_temp_offset
        slave: 1
        address: 5001
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: uint

#------------------------- VTR250 - Schedule day 1, prd.1, start hour (Auto mode) ------------------------------------------------------------ MODBUS SENSOR --------------------

      - name: vtr250_sch_prd1_day1_start_h
        slave: 1
        address: 5002
        input_type: holding
        unit_of_measurement: t
        count: 1
        data_type: uint

#------------------------- VTR250 - Schedule day 1, prd.1, start minute (Auto mode) ----------------------------------------------------------- MODBUS SENSOR --------------------???????????????????????

      - name: vtr250_sch_prd1_day1_start_m
        slave: 1
        address: 5003
        input_type: holding
        unit_of_measurement: m
        count: 1
        data_type: uint

#------------------------- VTR250 - Schedule day 1, prd.1, end hour (Auto mode) --------------------------------------------------------------- MODBUS SENSOR --------------------???????????????????????

      - name: vtr250_sch_prd1_day1_end_h
        slave: 1
        address: 5004
        input_type: holding
        unit_of_measurement: t
        count: 1
        data_type: uint

#------------------------- VTR250 - Schedule day 1, prd.1, end minute (Auto mode) ------------------------------------------------------------- MODBUS SENSOR --------------------???????????????????????

      - name: vtr250_sch_prd1_day1_end_m
        slave: 1
        address: 5005
        input_type: holding
        unit_of_measurement: m
        count: 1
        data_type: uint

#------------------------- VTR250 - Kalkulert fukt avtrekk ------------------------------------------------------------------------------------- MODBUS SENSOR--------------------!!!!!!!!!!!!!!!!!FJERNES????!!!!!!!!!!!

      - name: vtr250_kalkulert_fukt_avtrekk
        device_class: humidity
        slave: 1
        address: 2210
        input_type: holding
        unit_of_measurement: '%RF'
        count: 1
        data_type: uint

#------------------------- VTR250 - Kalulert fukt inntak ---------------------------------------------------------------------------------------- MODBUS SENSOR--------------------!!!!!!!!!!!!!!!!!FJERNES????!!!!!!!!!!!

      - name: vtr250_kalkulert_fukt_inntak
        device_class: humidity
        slave: 1
        address: 2211
        input_type: holding
        unit_of_measurement: '%RF'
        count: 1
        data_type: uint

#------------------------- VTR250 - Somme/Vinterdrift  ------------------------------------------------------------------------------------------- MODBUS SENSOR -------------------- OMGJØRES TIL TEXT!!!!!!!!!!!!

      - name: vtr250_sommerdrift_vinterdrift #0=sommerdrift, 1=Vinterdrift (status basert på fukt i inntak)
        slave: 1
        address: 1038  # Denne er det noe galt med
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Alarm - Filterbytte ------------------------------------------------------------------------------------------ MODBUS SENSOR --------------------

      - name: vtr250_filterbytte_alm
        slave: 1
        address: 7006
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Filterbytte intervall  --------------------------------------------------------------------------------------- MODBUS SENSOR --------------------
# Settpunkt (kun for avlesning her) md mellom hvert filterskift før alarm

      - name: vtr250_filterbytte_md_intervall
        slave: 1
        address: 7000
        input_type: holding
        unit_of_measurement: 'md'
        count: 1
        data_type: int

#------------------------- VTR250 - Alarm -  ----------------------------------------------------------------------------------------------------- MODBUS SENSOR-------------------- FJERNES????????????????????????????
# Må sjekkes nærmere, DBL INT?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 

      - name: Filterbytte test 1
        slave: 1
        address: 7002
        input_type: holding
        unit_of_measurement: 's'
        count: 2
        #reverse_order: true
        data_type: uint

#------------------------- VTR250 - Filterbytte nedtelling  -------------------------------------------------------------------------------------- MODBUS SENSOR --------------------
# Gjenstående tid til neste filterskifte i sek.

      - name: vtr250_tid_til_filter_bytte_s
        slave: 1
        address: 7005
        input_type: holding
        unit_of_measurement: 's'
        count: 2
        #reverse_order: false
        data_type: uint

#------------------------- VTR250 - Nedtelling modus tid for Ferie/Borte/Ildsted/Party ----------------------------------------------------------- MODBUS SENSOR --------------------

      - name: vtr250_nedtelling_modus_tid_s
        slave: 1
        address: 1110
        input_type: holding
        unit_of_measurement: s
        count: 1
        data_type: uint

#------------------------- VTR250 - Ferie modus - Ønsket varighet -------------------------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!FJERNE`???????????????????????
#------ Avlest settpunkt

      - name: vtr250_ferie_modus_varighet
        slave: 1
        address: 1100
        input_type: holding
        unit_of_measurement: d
        count: 1
        data_type: uint 

#------------------------- VTR250 - Borte modus - Ønsket varighet -------------------------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!FJERNE`???????????????????????
#------ Avlest settpunkt

      - name: vtr250_borte_modus_varighet
        slave: 1
        address: 1101
        input_type: holding
        unit_of_measurement: t
        count: 1
        data_type: uint 

#------------------------- VTR250 - Ildsted modus - Ønsket varighet ------------------------------------------------------------------------------ MODBUS SENSOR --------------------!!!!!!!!!!!!!FJERNE`???????????????????????
#------ Avlest settpunkt

      - name: vtr250_ildsted_modus_varighet
        slave: 1
        address: 1102
        input_type: holding
        unit_of_measurement: min
        count: 1
        data_type: uint

#------------------------- VTR250 - Boost modus - Ønsket varighet -------------------------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!FJERNE`???????????????????????
#------ Avlest settpunkt

      - name: vtr250_boost_modus_varighet
        slave: 1
        address: 1103
        input_type: holding
        unit_of_measurement: min
        count: 1
        data_type: uint

#------------------------- VTR250 - Party modus - Ønsket varighet -------------------------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!FJERNE`???????????????????????
#------ Avlest settpunkt

      - name: vtr250_party_modus_varighet
        slave: 1
        address: 1104
        input_type: holding
        unit_of_measurement: t
        count: 1
        data_type: uint

#------------------------- VTR250 - Fuktoverføring rf - Ønsket settpunkt ------------------------------------------------------------------------------ MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!

      - name: vtr250_fuktoverforing_sp
        device_class: humidity
        slave: 1
        address: 2202
        input_type: holding
        unit_of_measurement: '%RF'
        count: 1
        data_type: uint

#------------------------- VTR250 - Utekompensering - Aktuell kompensering vifte hastighet sommer/vinter -------------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!???????????????????????????
#------ Kun avlest verdi

      - name: vtr250_vifte_hast_komp_avlest
        device_class: power_factor
        slave: 1
        address: 1254
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: int

#------------------------- VTR250 - Utekompensering - Vifte hastighet kompensering vinter (Y0) ------------------------------------------------------------------ MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!
#------ 0% til 50% pådrags kompensering (nedreglulering av hastighet)

      - name: vtr250_vifte_hast_komp_vinter
        device_class: power_factor
        slave: 1
        address: 1251
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: int

#------------------------- VTR250 - Utekompensering - Utetemp vinter (X1) for start vifte kompensering (Y0) ------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!
#------ 0 til -30°C

      - name: vtr250_vifte_hast_komp_vinter_start_temp
        device_class: power_factor
        slave: 1
        address: 1255
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1  
        data_type: int

#------------------------- VTR250 - Utekompensering - Utetemp vinter (X0) for maks vifte kompensering (Y0) ------------------------------------------------------------------ MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!
#------ 0 til -30°C

      - name: vtr250_vifte_hast_komp_vinter_max_temp
        device_class: power_factor
        slave: 1
        address: 1253
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1  
        data_type: int

#------------------------- VTR250 - Utekompensering - ?????????????????????????????????????????????????????? ------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!UKJENT HVA DETTE ER!!!!!
#------ 0 til -30°C

      - name: vtr250_vifte_hast_komp_sjekkes
        device_class: power_factor
        slave: 1
        address: 1252
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1  
        data_type: int 

#------------------------- VTR250 - Utekompensering - Vifte hastighet kompensering sommer (Y1) ----------------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!
#------ 0% til 50% pådrags kompensering (oppreglulering av hastighet)

      - name: vtr250_vifte_hast_komp_sommer
        device_class: power_factor
        slave: 1
        address: 1258
        input_type: holding
        unit_of_measurement: '%'
        count: 1
        data_type: int

#------------------------- VTR250 - Utekompensering - Utetemp sommer (X2) for start vifte kompensering (Y1) ------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!
#------ 0 til -30°C

      - name: vtr250_vifte_hast_komp_sommer_start_temp
        device_class: power_factor
        slave: 1
        address: 1256
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1  
        data_type: int

#------------------------- VTR250 - Utekompensering - Utetemp sommer (X3) for max vifte kompensering (Y1) ------------------------------------------------------------- MODBUS SENSOR --------------------!!!!!!!!!!!!!SETTPUNKT ENDRES SENERE!!!!!
#------ 0 til -30°C

      - name: vtr250_vifte_hast_komp_sommer_max_temp
        device_class: power_factor
        slave: 1
        address: 1257
        input_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1  
        data_type: int

#------------------------- VTR250 - A-Alarm ------------------------------------------------------------------------------------------------------ MODBUS SENSOR --------------------

      - name: vtr250_a_alm
        slave: 1
        address: 15900
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - B-Alarm ------------------------------------------------------------------------------------------------------ MODBUS SENSOR --------------------

      - name: vtr250_b_alm
        slave: 1
        address: 15901
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - C-Alarm ------------------------------------------------------------------------------------------------------ MODBUS SENSOR --------------------

      - name: vtr250_c_alm
        slave: 1
        address: 15902
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Alarm - Filterbytte forvarsel -------------------------------------------------------------------------------- MODBUS SENSOR --------------------

      - name: vtr250_filter_wrn_alm
        slave: 1
        address: 15543
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Alarm - Filterbytte  ----------------------------------------------------------------------------------------- MODBUS SENSOR --------------------

      - name: vtr250_filter_alm
        slave: 1
        address: 15141
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Alarm - Tilluftstemp. Lav ------------------------------------------------------------------------------------ MODBUS SENSOR --------------------

      - name: vtr250_tilluftstemp_lav_alm
        slave: 1
        address: 15176
        input_type: holding
        count: 1
        data_type: uint

#------------------------- VTR250 - Alarm - Antall kviterte filteralarmer uten at filter er skiftet  --------------------------------------------- MODBUS SENSOR--------------------

      - name: vtr250_filter_wrn_cnt_alm
        slave: 1
        address: 15548
        input_type: holding
        count: 1
        data_type: uint

Anything in the logs that might be useful for us?

2021-05-04 18:00:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration easee which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-05-04 18:00:47 WARNING (SyncWorker_1) [homeassistant.components.modbus.modbus] Parameter delay is accepted but not used in this version
2021-05-04 18:00:47 WARNING (SyncWorker_1) [homeassistant.components.modbus.modbus] Parameter delay is accepted but not used in this version
2021-05-04 18:00:47 WARNING (MainThread) [homeassistant.loader] You are using a custom integration nordpool which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-05-04 18:00:57 WARNING (MainThread) [homeassistant.setup] Setup of nissan_leaf is taking over 10 seconds.
2021-05-04 18:00:59 WARNING (SyncWorker_0) [homeassistant.components.nissan_leaf] WARNING: This may poll your Leaf too often, and drain the 12V battery.  If you drain your cars 12V battery it WILL NOT START as the drive train battery won't connect. Don't set the intervals too low
2021-05-04 18:01:07 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{((((states.sensor.vtr250_tillufts_temperatur.state | float ) - (states.sensor.vtr250_inntaks_temperatur.state | float)) / ((states.sensor.vtr250_avtrekks_temperatur.state | float ) - (states.sensor.vtr250_inntaks_temperatur.state | float))) * 100) | round(1) }}")
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 389, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1359, in _render_with_context
    return template.render(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 505, in async_render_to_info
    render_info._result = self.async_render(variables, strict=strict, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 391, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ZeroDivisionError: float division by zero
2021-05-04 18:01:07 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ZeroDivisionError: float division by zero') while processing template 'Template("{{((((states.sensor.vtr250_tillufts_temperatur.state | float ) - (states.sensor.vtr250_inntaks_temperatur.state | float)) / ((states.sensor.vtr250_avtrekks_temperatur.state | float ) - (states.sensor.vtr250_inntaks_temperatur.state | float))) * 100) | round(1) }}")' for attribute '_state' in entity 'sensor.vtr250_gjenvinningsgrad'
2021-05-04 18:01:28 ERROR (SyncWorker_34) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:28 ERROR (SyncWorker_15) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:33 ERROR (SyncWorker_55) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:38 ERROR (SyncWorker_44) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:01:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:01:48 ERROR (SyncWorker_19) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:48 ERROR (SyncWorker_13) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:48 ERROR (SyncWorker_28) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:58 ERROR (SyncWorker_58) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:01:58 ERROR (SyncWorker_16) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:03 ERROR (SyncWorker_44) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:08 ERROR (SyncWorker_22) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:08 ERROR (SyncWorker_24) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:18 ERROR (SyncWorker_29) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:18 ERROR (SyncWorker_47) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:28 ERROR (SyncWorker_45) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:33 ERROR (SyncWorker_20) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:38 ERROR (SyncWorker_25) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:48 ERROR (SyncWorker_32) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:02:58 ERROR (SyncWorker_34) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:03 ERROR (SyncWorker_23) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:18 ERROR (SyncWorker_47) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:18 ERROR (SyncWorker_58) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:28 ERROR (SyncWorker_45) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:38 ERROR (SyncWorker_27) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:03:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:03:48 ERROR (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:48 ERROR (SyncWorker_37) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:03:58 ERROR (SyncWorker_27) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:08 ERROR (SyncWorker_7) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:08 ERROR (SyncWorker_29) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:18 ERROR (SyncWorker_47) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:18 ERROR (SyncWorker_45) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:28 ERROR (SyncWorker_26) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:33 ERROR (SyncWorker_30) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:38 ERROR (SyncWorker_50) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:48 ERROR (SyncWorker_26) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:48 ERROR (SyncWorker_40) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:58 ERROR (SyncWorker_36) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:04:58 ERROR (SyncWorker_52) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:08 ERROR (SyncWorker_11) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:08 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:05:08 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:05:08 ERROR (SyncWorker_58) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:18 ERROR (SyncWorker_22) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:28 ERROR (SyncWorker_41) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:38 ERROR (SyncWorker_58) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:48 ERROR (SyncWorker_17) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:48 ERROR (SyncWorker_45) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:05:58 ERROR (SyncWorker_6) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:08 ERROR (SyncWorker_25) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:08 ERROR (SyncWorker_60) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:18 ERROR (SyncWorker_2) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:18 ERROR (SyncWorker_12) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:28 ERROR (SyncWorker_47) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:38 ERROR (SyncWorker_30) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:38 ERROR (SyncWorker_50) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:48 ERROR (SyncWorker_39) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:48 ERROR (SyncWorker_48) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:58 ERROR (SyncWorker_7) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:06:58 ERROR (SyncWorker_52) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:08 ERROR (SyncWorker_43) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:08 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:07:08 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:07:08 ERROR (SyncWorker_5) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:18 ERROR (SyncWorker_52) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:18 ERROR (SyncWorker_38) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:18 ERROR (SyncWorker_32) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:28 ERROR (SyncWorker_10) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:28 ERROR (SyncWorker_43) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:38 ERROR (SyncWorker_50) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:07:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:07:38 ERROR (SyncWorker_5) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:48 ERROR (SyncWorker_49) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:48 ERROR (SyncWorker_59) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:48 ERROR (SyncWorker_20) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:07:58 ERROR (SyncWorker_46) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:08 ERROR (SyncWorker_29) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:18 ERROR (SyncWorker_18) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:28 ERROR (SyncWorker_41) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:28 ERROR (SyncWorker_11) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:38 ERROR (SyncWorker_43) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:48 ERROR (SyncWorker_60) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:48 ERROR (SyncWorker_6) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:58 ERROR (SyncWorker_54) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:08:58 ERROR (SyncWorker_52) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:08 ERROR (SyncWorker_33) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:18 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:28 ERROR (SyncWorker_44) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:38 ERROR (SyncWorker_46) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:09:38 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:09:38 ERROR (SyncWorker_34) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:48 ERROR (SyncWorker_5) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:58 ERROR (SyncWorker_14) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:09:58 ERROR (SyncWorker_13) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:10:08 ERROR (SyncWorker_33) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:10:08 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] vtr250 eco temp offset - Oppdater slider: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['value']
2021-05-04 18:10:08 ERROR (MainThread) [homeassistant.components.automation.vtr250_eco_temp_offset_oppdater_slider] Error while executing automation automation.vtr250_eco_temp_offset_oppdater_slider: expected float for dictionary value @ data['value']
2021-05-04 18:10:08 ERROR (SyncWorker_22) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:10:18 ERROR (SyncWorker_31) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:10:28 ERROR (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:10:38 ERROR (SyncWorker_56) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)
2021-05-04 18:10:48 ERROR (SyncWorker_15) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)

Additional information

currently running core-2021.5.0b7

Lovelace gui stops respondig, seems like webserver is crashed sometimes, disable modbus, everything fine!

bilde

All modbus related switches, sensors and so on is blinking unavailable/available sensor variables, but this is probably related to loglines: slavebusy, this is a new one, never seen that before, AND WHAT EVER YOU DO, DONT CLAIM THAT THE THE SLAVE HAD RESPONSPROBLEMS BEFORE MESSING WITH MODBUS CODE, that is 100% ruled out.

Regarding the new modbus config style, same problem exists on both formats, it even seems worse with the old style.

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

modbus documentation modbus source (message by IssueLinks)

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

Do you really expect that your language motivates anyone to help you ?

First of all, instead of having a HELL, downgrade ! Others including myself do that all the time.

Secondly if you do not like the official modbus integration, do not use it, copy the 2021.3 modbus which you seem to like, and make a custom component, with the changes you want to have. That is the best way for you not to be affected with what you do not like.

Finally “breaking in all possible ways” is a rather imprecise error description, which are useless.

I prefer not to comment the actual problems I see, since you directly state you do not want us to mess with the modbus code.

I am decoupling myself from the issue and wish you luck finding a solution.

prilly-dev commented 3 years ago

Hey you, now i think you should calm down here, it seems you have issues with alot of guys here.

First of, why the HELL are you messing with the OFFICAL WORKING modbus integration? Why havent you made a new integration for your modbus experiment?

You should have done the same with this integration as how zwave was fixed, parallell integration, whenbits stable we can switch. This way you dont mess up ha for everyone using modbus?

As i have stated before EVERYTHING was working perfect before you started messing with modbus, now you require alot og folks to fix this issues that has progressed for months,

Do you think this is the right way to introduce this kind of heavy changes when you know it will result in problems?

I hope you decouple from ha, not just modbus, i will reintroduce other for this issues. I dont know if you are familiar with the FORK of ha that is discussed recently, i hope the mess in this project can be solved so we can avoid this fragmentations.

@MartinHjelmare Are you looking at what is going on with modbus? And how this contributor is attacking ticket submitters? We cant have it this way, i know that there are alot of frustrations regarding how modbus has become. Why dont move this new contributions into a new integration?

Anyway, i hope that someone with controll of ha can put the breaks on here. This is NOT what HA needs right now.

janiversen commented 3 years ago

Just for the record, I have been maintaining modbus since march 2020, so the modbus in 2021.3 contains quite large parts from me. We are a small team (of 2) that actively maintain modbus, and we have made it a custom to review each others work on top of the review from the maintainers. We have successfully solved many problems and I believe the modbus is in a better shape now than a year ago.

It is correct that modbus are haunted by a stability issue, related to device disconnecting, which frustrates me because I cannot reproduce it (I am testing with a modbus server, where I can simulate disconnect etc). I believe it is a timing issue so logs with many integrations does not help a lot, because the HA calls are not predictable.

I did not and do not want to attack you or anybody else. I made some serious suggestions in order to help you.

prilly-dev commented 3 years ago

Just for the record, I have been maintaining modbus since march 2020, so the modbus in 2021.3 contains quite large parts from me. We are a small team (of 2) that actively maintain modbus, and we have made it a custom to review each others work on top of the review from the maintainers. We have successfully solved many problems and I believe the modbus is in a better shape now than a year ago.

It is correct that modbus are haunted by a stability issue, related to device disconnecting, which frustrates me because I cannot reproduce it (I am testing with a modbus server, where I can simulate disconnect etc). I believe it is a timing issue so logs with many integrations does not help a lot, because the HA calls are not predictable.

I did not and do not want to attack you or anybody else. I made some serious suggestions in order to help you.

Now we are moving in the right direction, first of i have to thank you and the other guy for your contribution to ha and modbus, good work.

It might be a timing issue, but to me it seems like multiple issues of some sort. I have noticed async is always a part of the problem.

I have a docker container running in a xen VM on my dell t630 home server connected to a systemair modbus iam module with tcp. I suspect i have the issue unfolding here, are there anything i can provide you with or be at assistant?

janiversen commented 3 years ago

Yes I see multiple problems in your log, including a division by zero, that securely influences the overall performance.

The message

2021-05-04 18:04:48 ERROR (SyncWorker_26) [homeassistant.components.modbus.modbus] Pymodbus: Exception Response(131, 3, SlaveBusy)

Is a modbus message (look in the modbus standard for “exception response”) where your device tells it is busy. A typical cause for this problem is scan being too fast (scan_interval needs to have a larger value).

The old modbus did not use SCAN_INTERVAL correctly that was changed earlier first in climate/cover then later in all platforms (actually that part is not my code/idea). With SCAN_INTERVAL working correctly, the integration is a lot faster in responding than it used to be and that of course puts a higher demand on the devices.

I am looking for a debug log including pymodbus as described in the ha modbus documentation, from a system with a device disconnect problem, where the configuration only contains modbus (and lovelace to confirm if it becomes unresponsive), no templates no “real” integration. Such a configuration allows me to determine where pymodbus “hangs” and thus isolate the problem.

MartinHjelmare commented 3 years ago

@prilly-dev Attacking an integration maintainer, or anyone else for that matter, like you did here is a violation of our Code of Conduct. It will not be accepted in our community.

If you want to continue interacting with our community, please stay civil and follow our Code of Conduct. Otherwise we're not interested in interacting with you, and will issue a permanent ban.