MiAutomations

ELFIN - Porta HAN ModBUS

Feb 10th, 2022 (edited)
3,367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.46 KB | None | 0 0
  1. #Código gentilmente cedido e criado pela Comunidade Portuguesa de Home Assistant
  2.  
  3.  
  4. modbus:
  5.   - name: edpbox1
  6.     type: tcp
  7.     host: #Colocar Aqui o endereço IP do vosso Modem ELFIN
  8.     port: 9502
  9.     delay: 1
  10.     timeout: 5
  11.     retries: 5
  12.     retry_on_empty: true
  13.     message_wait_milliseconds: 200
  14.  
  15.     sensors:
  16.       - name: "EDP Box - Tensão" # 6C
  17.         slave: 1
  18.         address: 108
  19.         input_type: input
  20.         count: 1
  21.         data_type: uint16
  22.         precision: 1
  23.         scale: 0.1
  24.         unit_of_measurement: V
  25.         device_class: voltage
  26.         scan_interval: 5
  27.         offset: 0
  28.         # long unsigned
  29.         device_class: voltage
  30.  
  31.       - name: "EDP Box - Corrente" # 6D
  32.         slave: 1
  33.         address: 109
  34.         input_type: input
  35.         count: 1
  36.         data_type: uint16
  37.         precision: 1
  38.         scale: 0.1
  39.         unit_of_measurement: A
  40.         device_class: current
  41.         scan_interval: 30
  42.  
  43.       - name: "EDP Box - Potência Ativa" # 79
  44.         slave: 1
  45.         address: 121
  46.         input_type: input
  47.         count: 1
  48.         data_type: uint32
  49.         precision: 1
  50.         scale: 1
  51.         unit_of_measurement: W
  52.         device_class: power
  53.  
  54.       - name: "EDP Box Power Export" # 7A
  55.         slave: 1
  56.         address: 122
  57.         input_type: input
  58.         count: 1
  59.         data_type: uint32
  60.         precision: 0
  61.         scale: 1
  62.         unit_of_measurement: W
  63.         device_class: power
  64.         scan_interval: 30
  65.  
  66.       - name: "EDP Box - Fator de Potência" # 7B
  67.         slave: 1
  68.         address: 123
  69.         input_type: input
  70.         count: 1
  71.         data_type: uint16
  72.         precision: 3
  73.         scale: 0.001
  74.         unit_of_measurement: pu
  75.         device_class: power_factor
  76.         scan_interval: 30
  77.  
  78.       - name: "EDP Box - Frequência" # 7F
  79.         slave: 1
  80.         address: 127
  81.         input_type: input
  82.         count: 1
  83.         data_type: uint16
  84.         precision: 1
  85.         scale: 0.1
  86.         unit_of_measurement: Hz
  87.         scan_interval: 30
  88.  
  89.  
  90.       - name: "EDP Box - Total Vazio" # 26
  91.         slave: 1
  92.         address: 38
  93.         input_type: input
  94.         count: 1
  95.         data_type: uint32
  96.         precision: 3
  97.         scale: 0.001
  98.         unit_of_measurement: kWh
  99.         device_class: energy
  100.         scan_interval: 30
  101.  
  102.       - name: "EDP Box - Total Ponta" # 27
  103.         slave: 1
  104.         address: 39
  105.         input_type: input
  106.         count: 1
  107.         data_type: uint32
  108.         precision: 3
  109.         scale: 0.001
  110.         unit_of_measurement: kWh
  111.         device_class: energy
  112.         scan_interval: 30
  113.  
  114.       - name: "EDP Box - Total Cheia" # 28
  115.         slave: 1
  116.         address: 40
  117.         input_type: input
  118.         count: 1
  119.         data_type: uint32
  120.         precision: 3
  121.         scale: 0.001
  122.         unit_of_measurement: kWh
  123.         device_class: energy
  124.         scan_interval: 30
  125.  
  126.       - name: "EDP Box Import" # 16
  127.         slave: 1
  128.         address: 22
  129.         input_type: input
  130.         count: 1
  131.         data_type: uint32
  132.         precision: 3
  133.         scale: 0.001
  134.         unit_of_measurement: kWh
  135.         device_class: energy
  136.         scan_interval: 30
  137.  
  138.       - name: "EDP Box Export" # 17
  139.         slave: 1
  140.         address: 23
  141.         input_type: input
  142.         count: 1
  143.         data_type: uint32
  144.         precision: 3
  145.         scale: 0.001
  146.         unit_of_measurement: kWh
  147.         device_class: energy
  148.         scan_interval: 30
  149.  
  150.       - name: 'EDP Box State L1'
  151.         ## 0 para disconectado - 1 para conectado - 2 para preparado a reconectar
  152.         scan_interval: 5
  153.         slave: 1
  154.         address: 132
  155.         input_type: input
  156.         count: 1
  157.         data_type: custom
  158.         structure: ">Bx"
  159.  
  160.  
  161. ###
  162.  
  163.       - name: "EDP Box Q1"
  164.         slave: 1
  165.         address: 24
  166.         input_type: input
  167.         count: 1
  168.         data_type: uint32
  169.         precision: 3
  170.         scale: 0.001
  171.         unit_of_measurement: kVAr
  172.         scan_interval: 30
  173.  
  174. # for tariff template
  175.  
  176.       - name: "EDP Box Tariff L1" # Tariff
  177.         ## 1 para Vazio - 2 para Ponta - 3 para Cheia
  178.         slave: 1
  179.         address: 11
  180.         input_type: input
  181.         count: 1
  182.         data_type: custom
  183.         structure: ">Bx"
  184.         scan_interval: 30
  185.  
  186. # for testing
  187.  
  188.       - name: "EDP Box Firmware Core"
  189.         slave: 1
  190.         address: 4
  191.         input_type: input
  192.         count: 1
  193.         data_type: string
  194.         scan_interval: 30
Add Comment
Please, Sign In to add comment