-
Notifications
You must be signed in to change notification settings - Fork 0
/
device.shed-controller.yaml
200 lines (180 loc) · 4.42 KB
/
device.shed-controller.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
#
# Extensible Lilygo T-Relay-8 ESP32 controller for the shed
#
substitutions:
device_id: shed_controller
device_name: shed-controller
friendly_name: Shed Controller
esphome:
name: "${device_name}"
comment: "${friendly_name}"
esp32:
board: esp32dev
<<:
!include {
file: "common/networking.yaml",
vars:
{
device_id: "${device_id}",
wifi_ssid: !secret wifi_ssid,
wifi_password: !secret wifi_password,
wifi_ap_password: !secret wifi_ap_password,
encryption_key: !secret shed_controller_encryption_key,
ota_password: !secret shed_controller_ota_password,
},
}
logger:
baud_rate: 0 # Disable UART logging
external_components:
# This is a fork of https://github.com/KinDR007/VictronMPPT-ESPHOME
# so I can bring in patches and make improvements as needed (before
# they are contributed back)
- source: github://yoannchaudet/VictronMPPT-ESPHOME
refresh: 0s # Check for new version each time
victron:
# SmartShunt (battery interface)
- uart_id: smartshunt_uart
id: smartshunt
throttle: 10s
# SmartSolar (MPTT controller)
- uart_id: smartsolar_uart
id: smartsolar
throttle: 10s
uart:
# SmartShunt (battery interface)
- id: smartshunt_uart
rx_pin: GPIO35
baud_rate: 19200
rx_buffer_size: 512
# SmartSolar (MPTT controller)
- id: smartsolar_uart
rx_pin: GPIO14
baud_rate: 19200
rx_buffer_size: 512
status_led:
#
# Status led
#
pin:
number: GPIO25
switch:
#
# Relays
#
- platform: gpio
pin: GPIO33
id: "${device_id}_relay_1"
name: "${friendly_name} Relay 1"
- platform: gpio
pin: GPIO32
id: "${device_id}_relay_2"
name: "${friendly_name} Relay 2"
- platform: gpio
pin: GPIO13
id: "${device_id}_relay_3"
name: "${friendly_name} Relay 3"
- platform: gpio
pin: GPIO12
id: "${device_id}_relay_4"
name: "${friendly_name} Relay 4"
- platform: gpio
pin: GPIO21
id: "${device_id}_relay_5"
name: "${friendly_name} Relay 5"
- platform: gpio
pin: GPIO19
id: "${device_id}_relay_6"
name: "${friendly_name} Shed Outdoor String Light"
- platform: gpio
pin: GPIO18
id: "${device_id}_relay_7"
name: "${friendly_name} Relay 7"
- platform: gpio
pin: GPIO5
id: "${device_id}_relay_8"
name: "${friendly_name} Battery Warmer"
- platform: template
id: "${device_id}_inverter"
name: "${friendly_name} Inverter"
turn_on_action:
- switch.turn_on: "${device_id}_relay_7"
- delay: 500ms
- switch.turn_off: "${device_id}_relay_7"
sensor:
#
# Common: wifi + uptime
#
- !include ./common/sensor.wifi_signal.yaml
- !include ./common/sensor.uptime.yaml
#
# Victron
#
# SmartShunt (battery interface)
- platform: victron
victron_id: smartshunt
battery_voltage:
name: "${friendly_name} battery voltage"
battery_current:
name: "${friendly_name} battery current"
battery_temperature:
name: "${friendly_name} battery temperature"
instantaneous_power:
name: "${friendly_name} instantaneous power"
consumed_amp_hours:
name: "${friendly_name} consumed amp hours"
state_of_charge:
name: "${friendly_name} state of charge"
time_to_go:
name: "${friendly_name} time to go"
last_full_charge:
name: "${friendly_name} last full charge"
# SmartSolar (MPTT controller)
- platform: victron
victron_id: smartsolar
yield_today:
name: "${friendly_name} yield today"
panel_voltage:
name: "${friendly_name} panel voltage"
panel_power:
name: "${friendly_name} panel power"
battery_current:
name: "${friendly_name} panel current"
battery_voltage:
name: "${friendly_name} battery voltage"
text_sensor:
#
# Common: ESPHome version
#
- !include ./common/text_sensor.version.yaml
#
# Victron
#
# SmartSolar (MPTT controller)
- platform: victron
victron_id: smartsolar
charging_mode:
name: "${friendly_name} charging mode"
error:
name: "${friendly_name} error"
tracking_mode:
name: "${friendly_name} tracking mode"
binary_sensor:
#
# Inverter remote
#
- platform: gpio
pin:
number: GPIO22
inverted: true
mode:
input: true
pullup: true
name: inverter-on
- platform: gpio
pin:
number: GPIO26
inverted: true
mode:
input: true
pullup: true
name: inverter-error