-
Notifications
You must be signed in to change notification settings - Fork 0
/
multical603.yaml
191 lines (163 loc) · 4.18 KB
/
multical603.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
globals:
- id: meter_read
type: int
restore_value: yes
initial_value: "1800000"
esphome:
name: "multical603"
name_add_mac_suffix: false
includes:
- kmp.h
- multical402.h
project:
name: casperghst42.multical603
version: "1.0"
esp32:
board: wemos_d1_mini32
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret ha_key
ota:
platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Multical 603 Fallback Hotspot"
password: !secret ap_password
captive_portal:
web_server:
port: 80
uart:
id: ir
tx_pin: 17
rx_pin: 16
baud_rate: 1200
stop_bits: 1
external_components:
- source: github://oxan/esphome-stream-server
stream_server:
uart_id: ir
port: 3434
# Karmstrup Custom Sensor (first variable is update interval in ms; 3600000 is 1 hour)
# Reading every 30 minutes
# Value set at the top of the file (variable: meter_read)
custom_component:
- lambda: |-
auto Multical603 = new Multical402(
id(meter_read),
id(ir),
id(m_energy),
id(m_power),
id(m_tin),
id(m_tout),
id(m_tdiff),
id(m_flow),
id(m_volume));
App.register_component(Multical603);
return {Multical603};
components:
- id: Multical603
sensor:
#Karmstrup Custom Sensors
- name: "Multical 603 Energy"
platform: template
id: m_energy
icon: "mdi:lightning-bolt"
unit_of_measurement: 'MWh'
accuracy_decimals: 0
state_class: "total_increasing"
device_class: "energy"
- name: "Multical 603 Volume"
platform: template
id: m_volume
unit_of_measurement: 'm3'
accuracy_decimals: 2
state_class: "measurement"
- name: "Multical 603 Temperature In"
platform: template
id: m_tin
icon: "mdi:thermometer"
unit_of_measurement: '°C'
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
- name: "Multical 603 Temperature Out"
platform: template
id: m_tout
icon: "mdi:thermometer"
unit_of_measurement: '°C'
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
- name: "Multical 603 Temperature Diff"
platform: template
id: m_tdiff
icon: "mdi:thermometer"
unit_of_measurement: '°C'
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
- name: "Multical 603 Power"
platform: template
id: m_power
icon: "mdi:flash"
unit_of_measurement: 'kW'
accuracy_decimals: 1
state_class: "measurement"
device_class: "power"
- name: "Multical 603 Flow"
platform: template
id: m_flow
unit_of_measurement: 'l/h'
accuracy_decimals: 0
state_class: "measurement"
- name: "Multical 603 Uptime"
platform: template
id: m_hourcounter
icon: "mdi:clock-time-five-outline"
unit_of_measurement: "h"
state_class: "total_increasing"
accuracy_decimals: 0
# --------------------------------------------------
# Wifi signal sensors
# --------------------------------------------------
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
name: "Diag : WiFi Signal dB"
id: wifi_signal_db
update_interval: 60s
entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: "Diag : WiFi Signal Percent"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "Signal %"
entity_category: "diagnostic"
# --------------------------------------------------
# Reset button
# --------------------------------------------------
button:
# Create a button on web to reset device
- platform: restart
name: "Device Restart"
text_sensor:
- platform: wifi_info
ip_address:
name: "Diag : IP Address"
mac_address:
name: "Diag : Mac Address"
ssid:
name: "Diag : Connected SSID"
bssid:
name: "Diag : BSSID"
- platform: version
name: "ESPHome Version"
hide_timestamp: true