-
Notifications
You must be signed in to change notification settings - Fork 0
/
ESPHome config file for wood pellet stove.yaml
210 lines (192 loc) · 5.16 KB
/
ESPHome config file for wood pellet stove.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
#----------------------------------------------------------
# No physical mods required to the display to use this file other than to get it to flash this code.
# Adds local sensors for all attributes previously in Tuya cloud
# changed datapoint for use with Nemaxx Px
substitutions:
device_name: "pellet-ofen"
device_description: Pellet Ofen mit ESPHome
friendly_name: Pellet Ofen
location: SOMEWHERE
#----------------------------------------------------------
#external_components:
# - source: github://pr#4032
# components: tuya
# refresh: 0s
globals:
- id: power_select_lastvalue
type: int
restore_value: yes
esphome:
name: ${device_name}
comment: ${device_description}
platform: ESP8266
board: esp01_1m
# Enable Home Assistant API
api:
encryption:
key: "YOURKEY"
ota:
password: "YOURPASSWORD"
wifi:
use_address: 192.168.123.51 # use when renaming this node
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Org-Stove Fallback Hotspot"
password: "6WMrrpI2KGCd"
captive_portal:
time:
- platform: homeassistant
id: time_homeassistant
on_time_sync:
- component.update: sensor_uptime_timestamp
# Enable logging
logger:
level: DEBUG
# baud_rate: 0
uart:
rx_pin: GPIO13
tx_pin: GPIO15
baud_rate: 9600
select:
- platform: "tuya"
tuya_id: "${location}"
name: "${location} Stove Power Select"
id: power_select
enum_datapoint: 4
options:
0: P1-High
1: P2-Med High
2: P3-Med Low
3: P4-Low
on_value: #store lat value so it can be restored on power/boot up
- lambda: id(power_select_lastvalue) = i;
#
- platform: "tuya"
tuya_id: "${location}"
name: "${location} Stove ECO Select"
id: eco_mode
enum_datapoint: 101
options:
0: ECO1 - Heat then OFF
1: ECO2 - Px then P4
##DATA POINT VALUES
#1 - Power on (Heat)
#2 - Set Temp
#3 - Current Temp
#4 - Mode P1/P2/P3P4
#101 - ECO1/ECO2
#104 - Error Code
#106 -
#107 -
#108 - Pipe Temp
#109 - Protect Temp
#-----------------
#Datapoint 1: switch (value: ON)
#Datapoint 2: int value (value: 20) in °C
#Datapoint 3: int value (value: 19) in °C
#Datapoint 4: enum (value: 2)
#Datapoint 101: enum (value: 0)
#Datapoint 102: int value (value: 123) in °C
#Datapoint 103: int value (value: 25) in °C
#Datapoint 104: bitmask (value: 0)
#GPIO Configuration: status: pin 5, reset: pin 0
#Product: 'k5dWTKaI3Z9llDEA1.0.0'
#Datapoint 105: enum (value: 0)
#Datapoint 106: int value (value: 68)
#Datapoint 107: int value (value: 64)
#Datapoint 108: int value (value: 68)
#Datapoint 109: int value (value: 72)
# Register the Tuya MCU connection
tuya:
id: "${location}"
#These arent needed but greatly help in debugging
sensor:
- platform: "tuya"
name: "${location} Stove-Power On"
sensor_datapoint: 1
id: stove_on
- platform: "tuya"
name: "${location} Stove-Error Code"
id: error_code
sensor_datapoint: 104
- platform: "tuya"
name: "${location} Stove-Power Mode"
sensor_datapoint: 4
- platform: "tuya"
name: "${location} Stove-Set Temp"
sensor_datapoint: 2
- platform: "tuya"
id: current_temp
name: "${location} Stove-Current Temp"
sensor_datapoint: 3
filters:
- exponential_moving_average: #this sensor is NOISY!
alpha: 0.07
- platform: "tuya"
name: "${location} Stove-Pipe Temp"
id: stove_pipe_temp
sensor_datapoint: 102
- platform: "tuya"
name: "${location} Stove-Protect Temp"
sensor_datapoint: 103
- platform: uptime
internal: false
name: ${friendly_name} Uptime
id: uptime_s
update_interval: 10s
- platform: "tuya"
name: "${location} Stove-ECO Mode"
sensor_datapoint: 101
#
- platform: uptime
id: sensor_uptime
#
- platform: wifi_signal
name: "${location} Stove WiFi Signal db"
update_interval: 10s
id: wifi_signal_db
#
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: "${location} Stove WiFi Signal %"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: " %"
entity_category: "diagnostic"
- platform: template
id: sensor_uptime_timestamp
name: "${location} Stove Uptime"
device_class: "timestamp"
accuracy_decimals: 0
update_interval: never
lambda: |-
static float timestamp = (
id(time_homeassistant).utcnow().timestamp - id(sensor_uptime).state
);
return timestamp;
#
text_sensor:
- platform: template
name: "${location} Stove Uptime (formatted)"
lambda: |-
uint32_t dur = id(uptime_s).state;
int dys = dur / 86400;
dur %= 86400;
int hrs = dur / 3600;
dur %= 3600;
int mnts = dur / 60;
dur %= 60;
return str_sprintf("%ud %02uh %02um %02us", dys, hrs, mnts, dur);
icon: mdi:clock-start
update_interval: 30s
#
climate:
- platform: tuya
reports_fahrenheit: false #bug in these stoves required this fix
name: "${location} Stove"
id: tuya_climate
switch_datapoint: 1
target_temperature_datapoint: 2
current_temperature_datapoint: 3