Advertisement
csstenersen

Modbus VTR configuration

Jan 4th, 2025
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 18.27 KB | None | 0 0
  1. ################################################################################
  2. # Modbus on SYSTEMAIR SAVE_VTR
  3. ################################################################################
  4. modbus:
  5.   name: VTR
  6.   type: tcp
  7.   host: 192.168.8.193 # User specific setting
  8.   port: 502 # User specific setting
  9.   timeout: 5 #Timeout for slave response in seconds (default=3)
  10.   delay: 3 #Time to sleep in seconds after connecting and before sending messages (defualt=0)
  11.   message_wait_milliseconds: 100
  12.  
  13.  
  14.  
  15.  
  16.   climates:
  17.     - name: VTR_TC_SP
  18.       slave: 1
  19.       address: 12102 #Supply Air Temperature sensor (standard)
  20.       input_type: holding
  21.       data_type: int16
  22.       max_temp: 30
  23.       min_temp: 12
  24.       offset: 0
  25.       precision: 1
  26.       scale: 0.1
  27.       #structure: ">f"
  28.       target_temp_register: 2000 #Temperature setpoint for the supply air temperature
  29.       temp_step: 0.5
  30.       temperature_unit: C
  31.  
  32.   sensors:
  33.    ## 2.2 USER modes ###
  34.  
  35.     - name: VTR_REG_USERMODE_FIREPLACE_TIME # Time delay setting for user mode Fire Place
  36.       # device_class:
  37.       slave: 1
  38.       address: 1102 #adress from modbus list - 1
  39.       input_type: holding
  40.       # unit_of_measurement:
  41.       scale: 1
  42.       offset: 0
  43.       precision: 0 #decimals
  44.       data_type: int16
  45.  
  46.     # - name: VTR_REG_USERMODE_REMAINING_TIME_s
  47.     #   slave: 1
  48.     #   address: 1110 #adress from modbus list - 1
  49.     #   input_type: holding
  50.     #   unit_of_measurement: "s"
  51.     #   count: 2
  52.     #   data_type: uint32
  53.  
  54.     - name: VTR_REG_USERMODE_FIREPLACE_AIRFLOW_ LEVEL_SAF #Fan speed level for mode Fire Place1: Minimum2: Low3: Normal
  55.       # device_class:
  56.       slave: 1
  57.       address: 1138 #adress from modbus list - 1
  58.       input_type: holding
  59.       # unit_of_measurement:
  60.       scale: 1
  61.       offset: 0
  62.       precision: 0 #decimals
  63.       data_type: int16
  64.  
  65.     - name: VTR_REG_USERMODE_FIREPLACE_AIRFLOW_ LEVEL_EAF #Fan speed level for mode Fire Place1: Minimum2: Low3: Normal
  66.       # device_class:
  67.       slave: 1
  68.       address: 1139 #adress from modbus list - 1
  69.       input_type: holding
  70.       # unit_of_measurement:
  71.       scale: 1
  72.       offset: 0
  73.       precision: 0 #decimals
  74.       data_type: int16
  75.  
  76.     - name: VTR_REG_USERMODE_COOKERHOOD_AIRFLOW_ LEVEL_SAF #Fan speed level for mode Fire Place1: Minimum2: Low3: Normal
  77.       # device_class:
  78.       slave: 1
  79.       address: 1144 #adress from modbus list - 1
  80.       input_type: holding
  81.       # unit_of_measurement:
  82.       scale: 1
  83.       offset: 0
  84.       precision: 0 #decimals
  85.       data_type: int16
  86.  
  87.     - name: VTR_REG_USERMODE_COOKERHOOD_AIRFLOW_ LEVEL_EAF #Fan speed level for mode Fire Place1: Minimum2: Low3: Normal
  88.       # device_class:
  89.       slave: 1
  90.       address: 1145 #adress from modbus list - 1
  91.       input_type: holding
  92.       # unit_of_measurement:
  93.       scale: 1
  94.       offset: 0
  95.       precision: 0 #decimals
  96.       data_type: int16
  97.  
  98.     - name:
  99.        vtr_usermode_mode
  100.         # Active User mode.
  101.         # 0: Auto
  102.         # 1: Manual
  103.         # 2: Crowded
  104.         # 3: Refresh
  105.         # 4: Fireplace
  106.         # 5: Away
  107.         # 6: Holiday
  108.         # 7: Cooker Hood
  109.         # 8: Vacuum Cleaner
  110.         # 9: CDI1
  111.         # 10: CDI2
  112.         # 11: CDI3
  113.         # 12: PressureGuard
  114.       # device_class:
  115.       slave: 1
  116.       address: 1160 #adress from modbus list - 1
  117.       input_type: holding
  118.       # unit_of_measurement:
  119.       scale: 1
  120.       offset: 0
  121.       precision: 0 #decimals
  122.       data_type: int16
  123.  
  124.     - name: REG_CDI_1_AIRFLOW_LEVEL_SAF #Fan speed level for configurable digital input 1.0: Off1: Minimum2: Low3: Normal4: High5: Maximum
  125.       # device_class:
  126.       slave: 1
  127.       address: 1170 #adress from modbus list - 1
  128.       input_type: holding
  129.       # unit_of_measurement:
  130.       scale: 1
  131.       offset: 0
  132.       precision: 0 #decimals
  133.       data_type: int16
  134.  
  135.     - name: REG_CDI_1_AIRFLOW_LEVEL_EAF #Fan speed level for configurable digital input 1.0: Off1: Minimum2: Low3: Normal4: High5: Maximum
  136.       # device_class:
  137.       slave: 1
  138.       address: 1171 #adress from modbus list - 1
  139.       input_type: holding
  140.       # unit_of_measurement:
  141.       scale: 1
  142.       offset: 0
  143.       precision: 0 #decimals
  144.       data_type: int16
  145.  
  146.     - name: REG_CDI_2_AIRFLOW_LEVEL_SAF #Fan speed level for configurable digital input 1.0: Off1: Minimum2: Low3: Normal4: High5: Maximum
  147.       # device_class:
  148.       slave: 1
  149.       address: 1172 #adress from modbus list - 1
  150.       input_type: holding
  151.       # unit_of_measurement:
  152.       scale: 1
  153.       offset: 0
  154.       precision: 0 #decimals
  155.       data_type: int16
  156.  
  157.     - name: REG_CDI_2_AIRFLOW_LEVEL_EAF #Fan speed level for configurable digital input 1.0: Off1: Minimum2: Low3: Normal4: High5: Maximum
  158.       # device_class:
  159.       slave: 1
  160.       address: 1173 #adress from modbus list - 1
  161.       input_type: holding
  162.       # unit_of_measurement:
  163.       scale: 1
  164.       offset: 0
  165.       precision: 0 #decimals
  166.       data_type: int16
  167.  
  168.     - name: REG_CDI_3_AIRFLOW_LEVEL_SAF #Fan speed level for configurable digital input 1.0: Off1: Minimum2: Low3: Normal4: High5: Maximum
  169.       # device_class:
  170.       slave: 1
  171.       address: 1174 #adress from modbus list - 1
  172.       input_type: holding
  173.       # unit_of_measurement:
  174.       scale: 1
  175.       offset: 0
  176.       precision: 0 #decimals
  177.       data_type: int16
  178.  
  179.     - name: REG_CDI_3_AIRFLOW_LEVEL_EAF #Fan speed level for configurable digital input 1.0: Off1: Minimum2: Low3: Normal4: High5: Maximum
  180.       # device_class:
  181.       slave: 1
  182.       address: 1175 #adress from modbus list - 1
  183.       input_type: holding
  184.       # unit_of_measurement:
  185.       scale: 1
  186.       offset: 0
  187.       precision: 0 #decimals
  188.       data_type: int16
  189.  
  190.     ## 2.3 Airflow control ###
  191.  
  192.     - name: VTR_REG_SENSOR_RPM_SAF #Supply Air Fan RPM indication from TACHO
  193.       #device_class: speed
  194.       slave: 1
  195.       address: 12400 #adress from modbus list - 1
  196.       input_type: holding
  197.       unit_of_measurement: rpm
  198.       scale: 1
  199.       offset: 0
  200.       precision: 0
  201.       data_type: int16
  202.  
  203.     - name: VTR_REG_SENSOR_RPM_EAF #Extract Air Fan RPM indication from TACHO
  204.       #device_class: speed
  205.       slave: 1
  206.       address: 12401 #adress from modbus list - 1
  207.       input_type: holding
  208.       unit_of_measurement: rpm
  209.       scale: 1
  210.       offset: 0
  211.       precision: 0
  212.       data_type: int16
  213.  
  214.     - name: VTR_REG_USERMODE_MANUAL_AIRFLOW_LEVEL_SAF #Fan speed level for mode Manual,
  215.       # 1:Off
  216.       # 2:Low
  217.       # 3:Normal
  218.       # 4:High
  219.       #device_class:
  220.       slave: 1
  221.       address: 1130 #adress from modbus list - 1
  222.       input_type: holding
  223.       unit_of_measurement: rpm
  224.       scale: 1
  225.       offset: 0
  226.       precision: 0
  227.       data_type: int16
  228.  
  229.     - name: VTR_REG_USERMODE_MANUAL_AIRFLOW_ LEVEL_EAF #Fan speed level for mode Manual, 1:Off 2:Low 3:Normal 4:High
  230.       #device_class:
  231.       slave: 1
  232.       address: 1131 #adress from modbus list - 1
  233.       input_type: holding
  234.       unit_of_measurement: rpm
  235.       scale: 1
  236.       offset: 0
  237.       precision: 0
  238.       data_type: int16
  239.  
  240.     - name: VTR_REG_FAN_LEVEL_SAF_MIN_RPM #Fan speed rpm
  241.       #device_class: speed
  242.       slave: 1
  243.       address: 1410 #adress from modbus list - 1
  244.       input_type: holding
  245.       unit_of_measurement: rpm
  246.       scale: 1
  247.       offset: 0
  248.       precision: 0
  249.       data_type: int16
  250.  
  251.     - name: VTR_REG_FAN_LEVEL_EAF_MIN_RPM #Fan speed rpm
  252.       #device_class: speed
  253.       slave: 1
  254.       address: 1411 #adress from modbus list - 1
  255.       input_type: holding
  256.       unit_of_measurement: rpm
  257.       scale: 1
  258.       offset: 0
  259.       precision: 0
  260.       data_type: int16
  261.  
  262.     - name: VTR_REG_FAN_LEVEL_SAF_LOW_RPM #Fan speed rpm
  263.       #device_class: speed
  264.       slave: 1
  265.       address: 1412 #adress from modbus list - 1
  266.       input_type: holding
  267.       unit_of_measurement: rpm
  268.       scale: 1
  269.       offset: 0
  270.       precision: 0
  271.       data_type: int16
  272.  
  273.     - name: VTR_REG_FAN_LEVEL_EAF_LOW_RPM #Fan speed rpm
  274.       #device_class: speed
  275.       slave: 1
  276.       address: 1413 #adress from modbus list - 1
  277.       input_type: holding
  278.       unit_of_measurement: rpm
  279.       scale: 1
  280.       offset: 0
  281.       precision: 0
  282.       data_type: int16
  283.  
  284.     - name: VTR_REG_FAN_LEVEL_SAF_NORMAL_RPM #Fan speed rpm
  285.       #device_class: speed
  286.       slave: 1
  287.       address: 1414 #adress from modbus list - 1
  288.       input_type: holding
  289.       unit_of_measurement: rpm
  290.       scale: 1
  291.       offset: 0
  292.       precision: 0
  293.       data_type: int16
  294.  
  295.     - name: VTR_REG_FAN_LEVEL_EAF_NORMAL_RPM #Fan speed rpm
  296.       #device_class: speed
  297.       slave: 1
  298.       address: 1415 #adress from modbus list - 1
  299.       input_type: holding
  300.       unit_of_measurement: rpm
  301.       scale: 1
  302.       offset: 0
  303.       precision: 0
  304.       data_type: int16
  305.  
  306.     - name: VTR_REG_FAN_LEVEL_SAF_HIGH_RPM #Fan speed rpm
  307.       #device_class: speed
  308.       slave: 1
  309.       address: 1416 #adress from modbus list - 1
  310.       input_type: holding
  311.       unit_of_measurement: rpm
  312.       scale: 1
  313.       offset: 0
  314.       precision: 0
  315.       data_type: int16
  316.  
  317.     - name: VTR_REG_FAN_LEVEL_EAF_HIGH_RPM #Fan speed rpm
  318.       #device_class: speed
  319.       slave: 1
  320.       address: 1417 #adress from modbus list - 1
  321.       input_type: holding
  322.       unit_of_measurement: rpm
  323.       scale: 1
  324.       offset: 0
  325.       precision: 0
  326.       data_type: int16
  327.  
  328.     - name: VTR_REG_FAN_LEVEL_SAF_MAX_RPM #Fan speed rpm
  329.       #device_class: speed
  330.       slave: 1
  331.       address: 1418 #adress from modbus list - 1
  332.       input_type: holding
  333.       unit_of_measurement: rpm
  334.       scale: 1
  335.       offset: 0
  336.       precision: 0
  337.       data_type: int16
  338.  
  339.     - name: VTR_REG_FAN_LEVEL_EAF_MAX_RPM #Fan speed rpm
  340.       #device_class: speed
  341.       slave: 1
  342.       address: 1419 #adress from modbus list - 1
  343.       input_type: holding
  344.       unit_of_measurement: rpm
  345.       scale: 1
  346.       offset: 0
  347.       precision: 0
  348.       data_type: int16
  349.  
  350.     - name: VTR_REG_OUTPUT_FAN_SPEED1 #READ Fan speed CONTROL SIGNAL%
  351.       device_class: power_factor
  352.       slave: 1
  353.       address: 14370 #adress from modbus list - 1
  354.       input_type: holding
  355.       unit_of_measurement: "%"
  356.       scale: 1
  357.       offset: 0
  358.       precision: 0
  359.       data_type: int16
  360.  
  361.     - name: VTR_REG_OUTPUT_FAN_SPEED2 #READ Fan speed CONTROL SIGNAL%
  362.       device_class: power_factor
  363.       slave: 1
  364.       address: 14371 #adress from modbus list - 1
  365.       input_type: holding
  366.       unit_of_measurement: "%"
  367.       scale: 1
  368.       offset: 0
  369.       precision: 0
  370.       data_type: int16
  371.  
  372.     - name: vtr_REG_TC_SP #Temperature setpoint for the supply air temperature
  373.       device_class: temperature
  374.       slave: 1
  375.       address: 2000 #adress from modbus list - 1
  376.       input_type: holding
  377.       unit_of_measurement: °C
  378.       scale: 0.1
  379.       offset: 0
  380.       precision: 1
  381.       data_type: int16
  382.  
  383.     - name: vtr_REG_TC_SP_SATC #Temperature setpoint for the supply air temperature
  384.       device_class: temperature
  385.       slave: 1
  386.       address: 2053 #adress from modbus list - 1
  387.       input_type: holding
  388.       unit_of_measurement: °C
  389.       scale: 0.1
  390.       offset: 0
  391.       precision: 1
  392.       data_type: int16
  393.  
  394.     - name: VTR_REG_SENSOR_OAT ## Outdoor temperature
  395.       device_class: temperature
  396.       slave: 1
  397.       address: 12101 #adress from modbus list - 1
  398.       scan_interval: 30
  399.       input_type: holding
  400.       unit_of_measurement: °C
  401.       scale: 0.1
  402.       offset: 0
  403.       precision: 1
  404.       data_type: int16
  405.  
  406.     # - name: VTR_REG_SENSOR_SAT ## Supply air temperature
  407.     #   device_class: temperature
  408.     #   slave: 1
  409.     #   address: 12102 #adress from modbus list - 1
  410.     #   input_type: holding
  411.     #   unit_of_measurement: °C
  412.     #   scale: 0.1
  413.     #   offset: 0
  414.     #   precision: 1
  415.     #   data_type: int16
  416.  
  417.     - name: VTR_REG_SENSOR_EAT ## extract air temeperature
  418.       device_class: temperature
  419.       slave: 1
  420.       address: 12543 #adress from modbus list - 1
  421.       input_type: holding
  422.       unit_of_measurement: °C
  423.       scale: 0.1
  424.       offset: 0
  425.       precision: 1
  426.       data_type: int16
  427.  
  428.     # Unit temperature control mode.
  429.     #   0: Supply,
  430.     #   1: Room,
  431.     #   2: Extract
  432.     - name: vtr_tc_contol_mode
  433.       slave: 1
  434.       address: 2030 #adress from modbus list - 1
  435.       input_type: holding
  436.       data_type: uint16
  437.  
  438.     - name: vtr_electric_heater_output #PWM TRIAC after manual override
  439.       device_class: power_factor
  440.       slave: 1
  441.       address: 2148 #adress from modbus list - 1
  442.       input_type: holding
  443.       unit_of_measurement: "%"
  444.       data_type: uint16
  445.  
  446.     - name: vtr_relative_moisture_extraction
  447.       #hub: vtr
  448.       device_class: humidity
  449.       slave: 1
  450.       address: 12135 #adress from modbus list - 1
  451.       input_type: holding
  452.       unit_of_measurement: "%"
  453.       data_type: uint16
  454.  
  455.     - name: vtr_heat_recovery
  456.       device_class: power_factor
  457.       slave: 1
  458.       address: 14102 #adress from modbus list - 1
  459.       input_type: holding
  460.       unit_of_measurement: "%"
  461.       data_type: uint16
  462.  
  463.     - name: vtr_setpoint_value
  464.       device_class: temperature
  465.       slave: 1
  466.       address: 2060 #adress from modbus list - 1
  467.       input_type: holding
  468.       unit_of_measurement: °C
  469.       scale: 0.1
  470.       offset: 0
  471.       precision: 1
  472.       data_type: int16
  473.  
  474.     - name: vtr_time_to_filter_replacement_s_low16bit
  475.       slave: 1
  476.       address: 7004 #adress from modbus list - 1
  477.       input_type: holding
  478.       unit_of_measurement: "s"
  479.       data_type: uint16
  480.  
  481.     - name: vtr_time_to_filter_replacement_s_high16bit
  482.       slave: 1
  483.       address: 7005 #adress from modbus list - 1
  484.       input_type: holding
  485.       unit_of_measurement: "s"
  486.       data_type: uint16
  487.  
  488.     - name:
  489.        vtr_filter_alarm
  490.         # Alarm active/inactive.
  491.         # 0: Inactive
  492.         # 1: Active
  493.         # 2: Waiting
  494.         # 3: Cleared Error Active
  495.       slave: 1
  496.       address: 15141 #adress from modbus list - 1
  497.       input_type: holding
  498.       data_type: uint16
  499.  
  500.   binary_sensors:
  501.     - name: vtr_eco_function_active
  502.       slave: 1
  503.       address: 2505 #adress from modbus list - 1
  504.       input_type: holding
  505.  
  506.     - name: VTR_REG_SENSOR_DI_PRESSURE_GUARD
  507.       slave: 1
  508.       address: 12315 #adress from modbus list - 1
  509.       input_type: holding
  510.  
  511.     - name: VTR_REG_SENSOR_DI_CDI_1
  512.       slave: 1
  513.       address: 12316 #adress from modbus list - 1
  514.       input_type: holding
  515.  
  516.     - name: VTR_REG_SENSOR_DI_CDI_2
  517.       slave: 1
  518.       address: 12317 #adress from modbus list - 1
  519.       input_type: holding
  520.  
  521.     - name: VTR_REG_SENSOR_DI_CDI_3
  522.       slave: 1
  523.       address: 12318 #adress from modbus list - 1
  524.       input_type: holding
  525.  
  526.   switches:
  527.     - name: VTR_REG_ECO_MODE_ON_OFF
  528.       slave: 1
  529.       address: 2504 #adress from modbus list - 1
  530.       write_type: holding
  531.       command_on: 1
  532.       command_off: 0
  533.       verify:
  534.         input_type: holding
  535.         address: 2504 #adress from modbus list - 1
  536.         state_on: 1
  537.         state_off: 0
  538.         delay: 1
  539.  
  540. #####################
  541. # Template Sensors
  542. #####################
  543. sensor:
  544.   - platform: template
  545.     sensors:
  546.       vtr_uker_til_filterskift:
  547.         friendly_name: "vtr_uker_til_filterskift"
  548.         value_template: "{{ ((((states('sensor.vtr_time_to_filter_replacement_s_low16bit') | int) | bitwise_or((states('sensor.vtr_time_to_filter_replacement_s_high16bit') | int) * 65536)) / 604800) | round(0))  }}"
  549.         unit_of_measurement: "uker"
  550.  
  551.       vtr_sekunder_til_filterskift:
  552.         friendly_name: "vtr_sekunder_til_filterskift"
  553.         value_template: "{{ (states('sensor.vtr_time_to_filter_replacement_s_low16bit') | int) | bitwise_or((states('sensor.vtr_time_to_filter_replacement_s_high16bit') | int) * 65536 ) }}"
  554.         unit_of_measurement: "s"
  555.  
  556.       vtr_recovery_rate:
  557.         value_template: "{{((((states('sensor.VTR_REG_SENSOR_SAT') | float ) - (states('sensor.VTR_REG_SENSOR_OAT') | float)) / ((states('sensor.VTR_REG_SENSOR_EAT') | float ) - (states('sensor.VTR_REG_SENSOR_OAT') | float))) * 100) | round(1) }}"
  558.         unit_of_measurement: "%"
  559.         friendly_name: "vtr_gjenvinningsgrad"
  560.  
  561.       vtr_regulation_mode:
  562.         friendly_name: "vtr_reguleringsmetode"
  563.         value_template: >-
  564.           {% if states('sensor.vtr_tc_contol_mode')|int == 0 %}
  565.             Tilluftsregulering
  566.           {% elif states('sensor.vtr_tc_contol_mode')|int == 1 %}
  567.             Romregulering
  568.           {% elif states('sensor.vtr_tc_contol_mode')|int == 2 %}
  569.             Avtrekksregulering
  570.           {% else %}
  571.             Stein død
  572.           {% endif %}
  573.  
  574.       vtr_usermode:
  575.         friendly_name: "vtr_brukermodus"
  576.         value_template: >-
  577.           {% if states('sensor.vtr_usermode_mode')|int == 0 %}
  578.             Auto
  579.           {% elif states('sensor.vtr_usermode_mode')|int == 1 %}
  580.             Manual
  581.           {% elif states('sensor.vtr_usermode_mode')|int == 2 %}
  582.             Crowded
  583.           {% elif states('sensor.vtr_usermode_mode')|int == 3 %}
  584.             Refresh
  585.           {% elif states('sensor.vtr_usermode_mode')|int == 4 %}
  586.             Fireplace
  587.           {% elif states('sensor.vtr_usermode_mode')|int == 5 %}
  588.             Away
  589.           {% elif states('sensor.vtr_usermode_mode')|int == 6 %}
  590.             Holiday
  591.           {% elif states('sensor.vtr_usermode_mode')|int == 7 %}
  592.             Cooker Hood
  593.           {% elif states('sensor.vtr_usermode_mode')|int == 8 %}
  594.             Vacuum Cleaner
  595.           {% elif states('sensor.vtr_usermode_mode')|int == 9 %}
  596.             CDI1        
  597.           {% elif states('sensor.vtr_usermode_mode')|int == 10 %}
  598.             CDI2
  599.           {% elif states('sensor.vtr_usermode_mode')|int == 11 %}
  600.             CDI3
  601.           {% elif states('sensor.vtr_usermode_mode')|int == 12 %}
  602.             Pressure Guard
  603.           {% else %}
  604.             Unknown
  605.           {% endif %}
  606.  
  607.       vtr_manual_usermode_airflow:
  608.         friendly_name: "vtr_brukermodus_manuell_hastighet"
  609.         value_template: >-
  610.           {% if states('sensor.VTR_REG_USERMODE_MANUAL_AIRFLOW_LEVEL_SAF')|int == 2 %}
  611.             Lav
  612.           {% elif states('sensor.VTR_REG_USERMODE_MANUAL_AIRFLOW_LEVEL_SAF')|int == 3 %}
  613.             Normal
  614.           {% elif states('sensor.VTR_REG_USERMODE_MANUAL_AIRFLOW_LEVEL_SAF')|int == 4 %}
  615.             Høy
  616.           {% else %}
  617.             Unknown
  618.           {% endif %}
  619.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement