forked from nldroid/CustomP1UartComponent
-
Notifications
You must be signed in to change notification settings - Fork 2
/
read_p1.yaml
121 lines (111 loc) · 3.63 KB
/
read_p1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
esphome:
name: esp_dsmr
platform: ESP32
board: wemos_d1_mini32
includes:
- dsmr_p1_uart.h
libraries:
- "Dsmr"
wifi:
ssid: wifissid
password: wifipass
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "esp_dsmr_uart Fallback Hotspot"
password: ""
captive_portal:
# Enable logging
logger:
level: DEBUG
# esp8266_store_log_strings_in_flash: False
# Enable Home Assistant API
api:
password: ""
ota:
password: ""
uart:
- rx_pin: GPIO21
baud_rate: 115200
id: uart_bus
sensor:
- platform: custom
lambda: |-
auto dsmr_p1_sensor = new CustomP1UartComponent(id(uart_bus));
App.register_component(dsmr_p1_sensor);
return {dsmr_p1_sensor->s_energy_delivered_tariff1, dsmr_p1_sensor->s_energy_delivered_tariff2, dsmr_p1_sensor->s_energy_returned_tariff1, dsmr_p1_sensor->s_energy_returned_tariff2, dsmr_p1_sensor->s_power_delivered, dsmr_p1_sensor->s_power_returned, dsmr_p1_sensor->s_voltage_l1, dsmr_p1_sensor->s_voltage_l2, dsmr_p1_sensor->s_voltage_l3, dsmr_p1_sensor->s_current_l1, dsmr_p1_sensor->s_current_l2, dsmr_p1_sensor->s_current_l3, dsmr_p1_sensor->s_power_delivered_l1, dsmr_p1_sensor->s_power_delivered_l2, dsmr_p1_sensor->s_power_delivered_l3, dsmr_p1_sensor->s_power_returned_l1, dsmr_p1_sensor->s_power_returned_l2, dsmr_p1_sensor->s_power_returned_l3, dsmr_p1_sensor->s_gas_device_type, dsmr_p1_sensor->s_gas_valve_position, dsmr_p1_sensor->s_gas_delivered};
sensors:
- name: "Consumption Low Tarif Sensor"
unit_of_measurement: kWh
accuracy_decimals: 3
- name: "Consumption High Tarif Sensor"
unit_of_measurement: kWh
accuracy_decimals: 3
- name: "Return Low Tarif Sensor"
unit_of_measurement: kWh
accuracy_decimals: 3
- name: "Return High Tarif Sensor"
unit_of_measurement: kWh
accuracy_decimals: 3
- name: "Actual Consumption Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Actual Delivery Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Instant Voltage L1 Sensor"
unit_of_measurement: V
accuracy_decimals: 3
- name: "Instant Voltage L2 Sensor"
unit_of_measurement: V
accuracy_decimals: 3
- name: "Instant Voltage L3 Sensor"
unit_of_measurement: V
accuracy_decimals: 3
- name: "Instant Current L1 Sensor"
unit_of_measurement: A
accuracy_decimals: 3
- name: "Instant Current L2 Sensor"
unit_of_measurement: A
accuracy_decimals: 3
- name: "Instant Current L3 Sensor"
unit_of_measurement: A
accuracy_decimals: 3
- name: "Power Delivered L1 Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Power Delivered L2 Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Power Delivered L3 Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Power Returned L1 Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Power Returned L2 Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Power Returned L3 Sensor"
unit_of_measurement: W
accuracy_decimals: 3
filters:
- multiply: 1000
- name: "Gas device type Sensor"
- name: "Gas valve position Sensor"
- name: "Gas Meter M3 Sensor"
unit_of_measurement: m3
accuracy_decimals: 3