forked from esphome-econet/esphome-econet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
econet_base.yaml
233 lines (231 loc) · 5.68 KB
/
econet_base.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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
---
substitutions:
name: "econet"
friendly_name: "Econet Device"
device_description: "Rheem Device"
tx_pin: GPIO19
rx_pin: GPIO22
platform: esp32
board: esp32dev
variant: esp32
framework: esp-idf
github_ref: main
external_components_source: github://esphome-econet/esphome-econet@${github_ref}
logger_level: WARN
econet_update_interval: 30s
econet_alarm_update_interval: 30s
econet_alarm_history_update_interval: 60s
wifi_module_address: "0x340"
esphome:
name: ${name}
friendly_name: ${friendly_name}
comment: ${device_description}
min_version: "2024.6.0"
project:
name: "esphome-econet.esphome-econet"
version: v2.2.0
${platform}:
board: ${board}
variant: ${variant}
framework:
type: ${framework}
preferences:
flash_write_interval: "24h"
wifi:
ap:
captive_portal:
api:
services:
- service: read
variables:
datapoint_id: string
then:
- lambda: id(econet_id).homeassistant_read(datapoint_id);
- service: read_from_address
variables:
datapoint_id: string
address: int
then:
- lambda: id(econet_id).homeassistant_read(datapoint_id, address);
- service: write_enum
variables:
datapoint_id: string
value: int
then:
- lambda: id(econet_id).homeassistant_write(datapoint_id, (uint8_t) value);
- service: write_enum_from_address
variables:
datapoint_id: string
value: int
address: int
then:
- lambda: id(econet_id).homeassistant_write(datapoint_id, (uint8_t) value, address);
- service: write_float
variables:
datapoint_id: string
value: float
then:
- lambda: id(econet_id).homeassistant_write(datapoint_id, value);
- service: write_float_from_address
variables:
datapoint_id: string
value: float
address: int
then:
- lambda: id(econet_id).homeassistant_write(datapoint_id, value, address);
ota:
platform: esphome
logger:
level: ${logger_level}
tx_buffer_size: 1024
external_components:
- source: ${external_components_source}
uart:
id: econet_uart
baud_rate: 38400
rx_buffer_size: 1500
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
econet:
id: econet_id
uart_id: econet_uart
update_interval: ${econet_update_interval}
request_mod_update_intervals:
1: ${econet_alarm_update_interval}
2: ${econet_alarm_history_update_interval}
3: ${econet_alarm_history_update_interval}
src_address: ${wifi_module_address}
sensor:
- platform: econet
name: "Active Alerts"
id: alarm_count
sensor_datapoint: ALRMALRT
request_mod: 1
accuracy_decimals: 0
icon: "mdi:alert"
state_class: "measurement"
- platform: wifi_signal
name: "WiFi Signal Strength"
id: wifi_signal_sensor
entity_category: "diagnostic"
text_sensor:
- platform: econet
name: "Alarm 1"
id: alarm_1
sensor_datapoint: ALARM_01
request_mod: 1
icon: "mdi:alert"
entity_category: "diagnostic"
- platform: econet
name: "Alarm 2"
id: alarm_2
sensor_datapoint: ALARM_02
request_mod: 1
icon: "mdi:alert"
entity_category: "diagnostic"
- platform: econet
name: "Alarm 3"
id: alarm_3
sensor_datapoint: ALARM_03
request_mod: 1
icon: "mdi:alert"
entity_category: "diagnostic"
- platform: econet
name: "Alarm 4"
id: alarm_4
sensor_datapoint: ALARM_04
request_mod: 1
icon: "mdi:alert"
entity_category: "diagnostic"
- platform: econet
name: "Alarm History 1"
id: alarm_history_1
sensor_datapoint: ALARMH01
request_mod: 2
icon: "mdi:alert"
entity_category: "diagnostic"
- platform: econet
name: "Alarm History 2"
id: alarm_history_2
sensor_datapoint: ALARMH02
request_mod: 2
icon: "mdi:alert"
entity_category: "diagnostic"
- platform: econet
name: "Software Version Number"
id: sw_version
sensor_datapoint: SW_VERSN
request_mod: 4
request_once: true
icon: "mdi:information-box"
entity_category: "diagnostic"
switch:
- platform: econet
name: "Beep On Alarm"
id: alarm_beep
switch_datapoint: ALRMBEEP
request_mod: 4
icon: "mdi:alarm-note"
entity_category: "config"
- platform: econet
name: "Screen Adjustment Lock"
id: screen_lock
switch_datapoint: SCRNLOCK
request_mod: 4
icon: "mdi:gesture-tap-button"
entity_category: "config"
- platform: econet
name: "Screen Unit in °C"
id: display_unit
switch_datapoint: DISPUNIT
request_mod: 4
icon: "mdi:temperature-celsius"
entity_category: "config"
- platform: econet
id: resetdev
switch_datapoint: RESETDEV
request_mod: none
internal: true
- platform: econet
id: alreset
switch_datapoint: ALRESET
request_mod: none
internal: true
- platform: econet
id: alhisclr
switch_datapoint: ALHISCLR
request_mod: none
internal: true
button:
- platform: restart
name: "Restart ESP"
id: restart_esp
icon: "mdi:restart"
entity_category: "config"
- platform: template
name: "Restart Microcontroller"
id: restart_mcu
icon: "mdi:restart"
entity_category: "config"
on_press:
- switch.turn_on: resetdev
- delay: 1s
- switch.turn_off: resetdev
- platform: template
name: "Alarm Reset"
id: alarm_reset
icon: "mdi:restart-alert"
entity_category: "config"
on_press:
- switch.turn_on: alreset
- delay: 1s
- switch.turn_off: alreset
- platform: template
name: "Alarm History Reset"
id: alarm_history_reset
icon: "mdi:restart-alert"
entity_category: "config"
on_press:
- switch.turn_on: alhisclr
- delay: 1s
- switch.turn_off: alhisclr