Witam, mam w sieci dwa liczniki DTS-1946. Każdy jest połączony przez swoją bramkę RTUoverTCP. Jeden jest w złączu kablowym i został uruchomiony jako pierwszy i działa normalnie. Drugi uruchomiłem ostatnio na pompę ciepła i coś robię nie tak, bo nie widzę nowych encji.
Ogólnie to początki zabawy z HA, ale szukam i kombinuję ile wlezie i czasami nie wiem już co zrobić. Poniżej zamieszam wnętrze pliku modbus.yaml
Z góry dzięki za pomoc!
####-Konfiguracja dla konwertera przewodowego - dla ZK #########################
- name: modbus_hub
type: rtuovertcp
host: 192.168.0.205
port: 502
timeout: 5
sensors:
- name: U L1
unit_of_measurement: V
unique_id: “L1_napiecie”
device_class: power
slave: 1
address: 0x0
input_type: input
data_type: float32
precision: 2
- name: U L2
unit_of_measurement: V
unique_id: “L2_napiecie”
device_class: power
slave: 1
address: 0x2
input_type: input
data_type: float32
precision: 2
- name: U L3
unit_of_measurement: V
unique_id: “L3_napiecie”
device_class: power
slave: 1
address: 0x4
input_type: input
data_type: float32
precision: 2
- name: Częstotliwość
unique_id: “herce”
device_class: frequency
slave: 1
address: 0x032
unit_of_measurement: "Hz"
data_type: float32
precision: 2
- name: Moc pobrana
unique_id: “mocpobrana”
device_class: energy
state_class: total_increasing
address: 0x034
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc oddana
unique_id: “mocoddana”
device_class: energy
state_class: total_increasing
address: 0x036
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc chwilowa
unit_of_measurement: W
unique_id: “mocchwilowa”
device_class: power
slave: 1
address: 0x18
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L1
unit_of_measurement: W
unique_id: “L1_moc”
device_class: power
slave: 1
address: 0x12
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L2
unique_id: “L2_moc”
unit_of_measurement: W
device_class: power
slave: 1
address: 0x14
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L3
unique_id: “L3_moc”
unit_of_measurement: W
device_class: power
slave: 1
address: 0x16
input_type: input
data_type: float32
precision: 2
scale: 1000
####-Konfiguracja dla konwertera przewodowego - dla Pompy ciepła################
- name: modbus_hub1
type: rtuovertcp
host: 192.168.0.206
port: 503
timeout: 5
sensors:
- name: U L1
unit_of_measurement: V
unique_id: “L1_napiecie”
device_class: power
slave: 2
address: 0x0
input_type: input
data_type: float32
precision: 2
- name: U L2
unit_of_measurement: V
unique_id: “L2_napiecie”
device_class: power
slave: 2
address: 0x2
input_type: input
data_type: float32
precision: 2
- name: U L3
unit_of_measurement: V
unique_id: “L3_napiecie”
device_class: power
slave: 2
address: 0x4
input_type: input
data_type: float32
precision: 2
- name: Częstotliwość
unique_id: “herce”
device_class: frequency
slave: 2
address: 0x032
unit_of_measurement: "Hz"
data_type: float32
precision: 2
- name: Moc pobrana
unique_id: “mocpobrana”
device_class: energy
slave: 2
state_class: total_increasing
address: 0x034
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc oddana
unique_id: “mocoddana”
device_class: energy
slave: 2
state_class: total_increasing
address: 0x036
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc chwilowa
unit_of_measurement: W
unique_id: “mocchwilowa”
device_class: power
slave: 2
address: 0x18
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L1
unit_of_measurement: W
unique_id: “L1_moc”
device_class: power
slave: 2
address: 0x12
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L2
unique_id: “L2_moc”
unit_of_measurement: W
device_class: power
slave: 2
address: 0x14
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L3
unique_id: “L3_moc”
unit_of_measurement: W
device_class: power
slave: 2
address: 0x16
input_type: input
data_type: float32
precision: 2
scale: 1000
Edit:
Hejka! Powalczyłem, pozmieniałem i działa. Błąd był w tych samych “nazwach”.
Poniżej zmodyfikowany kod - usunąłem to czego nie potrzebuję monitorować:
####-Konfiguracja dla konwertera przewodowego - dla ZK #########################
- name: modbus_hub
type: rtuovertcp
host: 192.168.0.205
port: 502
timeout: 5
sensors:
- name: U L1
unit_of_measurement: V
unique_id: “L1_napiecie”
device_class: power
slave: 1
address: 0x0
input_type: input
data_type: float32
precision: 2
- name: U L2
unit_of_measurement: V
unique_id: “L2_napiecie”
device_class: power
slave: 1
address: 0x2
input_type: input
data_type: float32
precision: 2
- name: U L3
unit_of_measurement: V
unique_id: “L3_napiecie”
device_class: power
slave: 1
address: 0x4
input_type: input
data_type: float32
precision: 2
- name: Częstotliwość
unique_id: “herce”
device_class: frequency
slave: 1
address: 0x032
unit_of_measurement: "Hz"
data_type: float32
precision: 2
- name: Moc pobrana
unique_id: “mocpobrana”
device_class: energy
state_class: total_increasing
address: 0x034
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc oddana
unique_id: “mocoddana”
device_class: energy
state_class: total_increasing
address: 0x036
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc chwilowa
unit_of_measurement: W
unique_id: “mocchwilowa”
device_class: power
slave: 1
address: 0x18
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L1
unit_of_measurement: W
unique_id: “L1_moc”
device_class: power
slave: 1
address: 0x12
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L2
unique_id: “L2_moc”
unit_of_measurement: W
device_class: power
slave: 1
address: 0x14
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P L3
unique_id: “L3_moc”
unit_of_measurement: W
device_class: power
slave: 1
address: 0x16
input_type: input
data_type: float32
precision: 2
scale: 1000
####-Konfiguracja dla konwertera przewodowego - dla Pompy ciepła################
- name: modbus_hub1
type: rtuovertcp
host: 192.168.0.206
port: 503
timeout: 5
sensors:
- name: Pompa ciepła zużycie
unique_id: “moc_pobrana”
device_class: energy
slave: 2
state_class: total_increasing
address: 0x034
unit_of_measurement: "kWh"
data_type: float32
precision: 2
- name: Moc_chwilowa
unit_of_measurement: W
unique_id: “moc_chwilowa”
device_class: power
slave: 2
address: 0x18
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P_L1
unit_of_measurement: W
unique_id: “moc_L1”
device_class: power
slave: 2
address: 0x12
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P_L2
unique_id: “moc_L2”
unit_of_measurement: W
device_class: power
slave: 2
address: 0x14
input_type: input
data_type: float32
precision: 2
scale: 1000
- name: P_L3
unique_id: “moc_L3”
unit_of_measurement: W
device_class: power
slave: 2
address: 0x16
input_type: input
data_type: float32
precision: 2
scale: 1000