Szukałem taniego, trójfazowego miernika energii który mógłbym wsadzić do rozdzielnicy, monitorować zużycie energii np. pompy i podpiąć do HA, najlepiej po sieci. Z pzem-04 to sporo zabawy, a efekt nie wszystkich zadowoli. W końcu trafiłem takie “cudo”- trójfazowe, ma modbus, wyświetlacz, jest tanie:
Din Rail LCD cyfrowy wyświetlacz watomierz zużycie energii licznik elektryczny 3 fazy 4 przewody kWh 5(80A) 230/400V 50/60Hz - AliExpress
Przez konwerter podłączyłem do nodemcu v3, wgrałem esphome i nawet działa. Dlatego dzielę się linkiem i kodem:
esphome:
name: "nodemcuv3"
friendly_name: "Garaż-NodemcuV3"
esp8266:
board: nodemcuv2
#esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "wygeneruj wlasny"
ota:
password: "wygeruj"
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
- ssid: !secret rep_wifi_ssid
password: !secret rep_wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Nodemcuv3 Fallback Hotspot"
password: "nodemcuv3fh"
captive_portal:
web_server:
port: 80
auth:
username: !secret web_username
password: !secret web_server_password
uart:
- id: mod_bus_dts
rx_pin: GPIO1 # TX
tx_pin: GPIO3 # RX
baud_rate: 9600
stop_bits: 1
dallas:
- pin: GPIO4 #D2
update_interval: 300s
modbus:
- id: modbus_dts
send_wait_time: 200ms
modbus_controller:
- id: DTS777
## the Modbus device addr
address: 0x2
modbus_id: modbus_dts
command_throttle: 100ms
setup_priority: -10
update_interval: 15s
sensor:
- platform: modbus_controller
id: faza_l1_napiecie_dts777
name: "Faza L1 napięcie PC"
state_class: measurement
device_class: voltage
register_type: read
address: 0x00
unit_of_measurement: "V"
value_type: S_WORD
accuracy_decimals: 1
# skip_updates: 60
filters:
- multiply: 0.1
- platform: modbus_controller
id: faza_l2_napiecie_dts777
name: "Faza L2 napięcie PC"
state_class: measurement
device_class: voltage
register_type: read
address: 0x01
unit_of_measurement: "V"
value_type: S_WORD
accuracy_decimals: 1
# skip_updates: 60
filters:
- multiply: 0.1
- platform: modbus_controller
id: faza_l3_napiecie_dts777
name: "Faza L3 napięcie PC"
address: 0x02
state_class: measurement
device_class: voltage
unit_of_measurement: "V"
register_type: read
value_type: S_WORD
accuracy_decimals: 1
# skip_updates: 60
filters:
- multiply: 0.1
- platform: modbus_controller
id: czestotliwosc_dts777
name: "Częstotliwość"
register_type: read
state_class: measurement
device_class: frequency
address: 0x1A
unit_of_measurement: "Hz"
value_type: S_WORD
accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 0.01
- platform: modbus_controller
id: faza_l1_prad_dts777
name: "Faza L1 prąd PC"
register_type: read
state_class: measurement
device_class: current
address: 0x03
unit_of_measurement: "A"
value_type: S_WORD
accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 0.0105
- platform: modbus_controller
id: faza_l2_prad_dts777
name: "Faza L2 prąd PC"
register_type: read
state_class: measurement
device_class: current
address: 0x04
unit_of_measurement: "A"
value_type: S_WORD
accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 0.01
- platform: modbus_controller
id: faza_l3_prad_dts777
name: "Faza L3 prąd PC"
register_type: read
state_class: measurement
device_class: current
address: 0x05
unit_of_measurement: "A"
value_type: S_WORD
accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 0.01
- platform: modbus_controller
id: faza_l1_moc_czynna_dts777
name: "Faza L1 moc czynna PC"
register_type: read
state_class: measurement
device_class: power
address: 0x08
unit_of_measurement: "W"
value_type: S_WORD
# accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 1.015
- platform: modbus_controller
id: faza_l2_moc_czynna_dts777
name: "Faza L2 moc czynna PC"
register_type: read
state_class: measurement
device_class: power
address: 0x09
unit_of_measurement: "W"
value_type: S_WORD
# accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 1
- platform: modbus_controller
id: faza_l3_moc_czynna_dts777
name: "Faza L3 moc czynna PC"
register_type: read
state_class: measurement
device_class: power
address: 0x0A
unit_of_measurement: "W"
value_type: S_WORD
# accuracy_decimals: 2
# skip_updates: 60
filters:
- multiply: 1
- platform: modbus_controller
id: energia_czynna_calkowita_dts777
name: "Energia czynna całkowita PC"
register_type: read
icon: mdi:circle-slice-3
device_class: energy
state_class: total_increasing
address: 0x001D
unit_of_measurement: "kWh"
value_type: U_DWORD
accuracy_decimals: 2
skip_updates: 180
filters:
- multiply: 0.01
- platform: modbus_controller
id: energia_czynna_pobrana_dts777
name: "Energia czynna pobrana PC"
register_type: read
icon: mdi:circle-slice-3
device_class: energy
state_class: total_increasing
address: 0x0027
unit_of_measurement: "kWh"
value_type: U_DWORD
accuracy_decimals: 2
skip_updates: 180
filters:
- multiply: 0.01
- platform: modbus_controller
id: energia_czynna_oddana_dts777
name: "Energia czynna oddana PC"
register_type: read
icon: mdi:circle-slice-3
device_class: energy
state_class: total_increasing
address: 0x0031
unit_of_measurement: "kWh"
value_type: U_DWORD
accuracy_decimals: 2
skip_updates: 180
filters:
- multiply: 0.01
#
- platform: modbus_controller
id: faza_l1_pf_dts777
name: "Faza L1 power factor PC"
register_type: read
state_class: measurement
address: 0x14
unit_of_measurement: ""
value_type: S_WORD
accuracy_decimals: 2
skip_updates: 5
filters:
- multiply: 0.001
- platform: modbus_controller
id: faza_l2_pf_dts777
name: "Faza L2 power factor PC"
register_type: read
state_class: measurement
address: 0x15
unit_of_measurement: ""
value_type: S_WORD
accuracy_decimals: 2
skip_updates: 5
filters:
- multiply: 0.001
- platform: modbus_controller
id: faza_l3_pf_dts777
name: "Faza L3 power factor PC"
register_type: read
state_class: measurement
address: 0x16
unit_of_measurement: ""
value_type: S_WORD
accuracy_decimals: 2
skip_updates: 5
filters:
- multiply: 0.001
# czas i temperatura
- platform: wifi_signal
name: "garaz WiFi signal"
update_interval: 60s
- platform: uptime
name: nodemcu Uptime
- platform: dallas
address: 0xfe9150770e64ff28
name: "Temperatura w piwnicy"
id: przy_nodemcuv3
filters:
- offset: -3
time:
- platform: homeassistant
id: hass_time
Standardowo do płytki dołożyłem ds-a, termometrów nigdy za wiele.
Ale przy okazji chciałem przetestować połączenie do D8 i D7 (bo miałem plan podłączenia dwóch urządzeń do jednej płytki) ale niestety nie działało. I nie wiem czy ja jakiś błąd robiłem czy ten typ tak ma ? Wklejam zdjęcie płytki: