-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmcu-irrigation-1.yaml
226 lines (212 loc) · 5.69 KB
/
mcu-irrigation-1.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
substitutions:
device: irrigation-1
name: Irrigation A
comment: "OBSOLETE | Outside, Well: Irrigation system"
esphome:
name: mcu-${device}
comment: ${comment}
# on_boot:
# priority: -10
# then:
# - switch.turn_off: relay_1
# - delay: 2s
# - switch.turn_off: relay_2
# - delay: 2s
# - switch.turn_off: relay_3
# - delay: 2s
# - switch.turn_off: relay_4
# - delay: 2s
# - switch.turn_off: relay_5
esp8266:
board: esp01_1m
packages:
common: !include common/common_esp8266.yaml
# api:
# services:
# - service: program_morning
# then:
# - switch.turn_on: relay_1
# - delay: 10minutes
# - switch.turn_off: relay_1
# - delay: 1minutes
# - switch.turn_on: relay_2
# - delay: 10minutes
# - switch.turn_off: relay_2
# - delay: 1minutes
# - switch.turn_on: relay_3
# - delay: 5minutes
# # - switch.turn_on: relay_4
# # - delay: 40minutes
# - switch.turn_off: relay_3
# - delay: 1minutes
# - switch.turn_on: relay_1
# - delay: 10minutes
# - switch.turn_off: relay_1
# - delay: 1minutes
# - switch.turn_on: relay_2
# - delay: 10minutes
# - switch.turn_off: relay_2
# - delay: 1minutes
# - switch.turn_on: relay_3
# - delay: 5minutes
# # - switch.turn_on: relay_4
# # - delay: 40minutes
# - switch.turn_off: relay_3
# - service: program_grass
# then:
# - switch.turn_on: relay_1
# - delay: 5minutes
# - switch.turn_off: relay_1
# - delay: 1minutes
# - switch.turn_on: relay_2
# - delay: 5minutes
# - switch.turn_off: relay_2
# - service: patio
# then:
# - switch.turn_on: relay_5
# - delay: 30sec
# - switch.turn_off: relay_5
i2c:
sda: 3
scl: 1
scan: true #false
# mcp23017:
# - id: 'mcp23017_hub'
# address: 0x20
pcf8574:
- id: 'relay_module'
address: 0x20
pcf8575: false
# SONOFF 4ch Pro! Not R2!
# GPIO_KEY1, // GPIO00 Button 1
# GPIO_USER, // GPIO01 Serial RXD and Optional sensor
# GPIO_USER, // GPIO02 Optional sensor
# GPIO_USER, // GPIO03 Serial TXD and Optional sensor
# GPIO_REL3, // GPIO04 Sonoff 4CH Red Led and Relay 3 (0 = Off, 1 = On)
# GPIO_REL2, // GPIO05 Sonoff 4CH Red Led and Relay 2 (0 = Off, 1 = On)
# // GPIO06 (SD_CLK Flash)
# // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
# // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
# GPIO_KEY2, // GPIO09 Button 2
# GPIO_KEY3, // GPIO10 Button 3
# // GPIO11 (SD_CMD Flash)
# GPIO_REL1, // GPIO12 Red Led and Relay 1 (0 = Off, 1 = On)
# GPIO_LED1_INV, // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
# GPIO_KEY4, // GPIO14 Button 4
# GPIO_REL4, // GPIO15 Red Led and Relay 4 (0 = Off, 1 = On)
# binary_sensor:
# - platform: gpio
# pin:
# number: GPIO0
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A1"
# id: button_1
# on_press:
# - switch.toggle: relay_1
# - platform: gpio
# pin:
# number: GPIO9
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A2"
# id: button_2
# on_press:
# - switch.toggle: relay_2
# - platform: gpio
# pin:
# number: GPIO10
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A3"
# id: button_3
# on_press:
# - switch.toggle: relay_3
# - platform: gpio
# pin:
# number: GPIO14
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A4"
# id: button_4
# on_press:
# - switch.toggle: relay_4
# sensor:
# - platform: dht
# pin: GPIO2
# temperature:
# name: "Well Shaft Temperature"
# id: 'well_temperature'
# humidity:
# name: "Well Shaft Humidity"
# id: 'well_humidity'
# model: 'DHT22'
# update_interval: 60s
# switch:
# - platform: gpio
# name: "Irrigation Valve A1"
# pin: GPIO12
# id: relay_1
# interlock: &interlock_group [relay_1, relay_2, relay_3, relay_4, relay_5, relay_6, relay_7, relay_8]
# - platform: gpio
# name: "Irrigation Valve A2"
# pin: GPIO5
# id: relay_2
# interlock: *interlock_group
# - platform: gpio
# name: "Irrigation Valve A3"
# pin: GPIO4
# id: relay_3
# interlock: *interlock_group
# - platform: gpio
# name: "Irrigation Valve A4"
# pin: GPIO15
# id: relay_4
# interlock: *interlock_group
# - platform: gpio
# name: "Irrigation Valve A5"
# id: relay_5
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 0
# mode: OUTPUT
# inverted: true
# - platform: gpio
# name: "Irrigation Valve A6"
# id: relay_6
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 1
# mode: OUTPUT
# inverted: true
# - platform: gpio
# name: "Irrigation Valve A7"
# id: relay_7
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 2
# mode: OUTPUT
# inverted: true
# - platform: gpio
# name: "Irrigation Valve A8"
# id: relay_8
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 3
# mode: OUTPUT
# inverted: true
# output:
# - platform: esp8266_pwm
# id: led_blue
# pin: GPIO13
# inverted: True
# light:
# - platform: monochromatic
# name: "Irrigation A Blue LED"
# output: led_blue
time:
- !include common/time/homeassistant.yaml