-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyytank_minder.yaml
149 lines (132 loc) · 3.51 KB
/
yytank_minder.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
# -------------------------------------
# ---- Implemented on D1 mini on side of external water tank ----
# ---- v1.2
# -------------------------------------
substitutions:
devicename: tank_minder
esphome:
name: ${devicename}
platform: ESP8266
board: esp01_1m
wifi:
#power_save_mode: light # power reduced from ?.?w to ?.?w
#fast_connect: true
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
hidden: True
manual_ip:
static_ip: !secret ip_tank_minder
gateway: !secret ip_gateway
subnet: 255.255.255.0
domain: .homelan
ap: # Enable fallback hotspot (captive portal) in case wifi connection fails
ssid: "${devicename} Hotspot"
password: !secret password
captive_portal:
#mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# reboot_timeout: 0s # Dont reboot..
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret password
reboot_timeout: 0s # Dont reboot..
ota:
password: !secret password
web_server:
port: 80
auth:
username: admin
password: !secret password
i2c:
sda: GPIO4
scl: GPIO5
id: bus_a
# scan: True
ads1115: #https://esphome.io/components/sensor/ads1115.html
- address: 0x48
dallas:
- pin: GPIO12
# Used a '5V DC Pressure Transducer Sensor 0-1.2 MPa Oil Fuel Diesel Gas Water Air' = 174psi - 60PSI would prbably be ok but use a 100PSI just in case
sensor:
- platform: ads1115
id: adclevel
multiplexer: 'A0_GND'
# gain: 6.144 #(measures up to 6.144V)
# gain: 4.096 #(measures up to 4.096V) # Full hose pressure is around 3.1v (100PSI)
gain: 2.048 #(measures up to 2.048V) # Full hose pressure is just shy of 2v (1.2MPa)
# gain: 1.024 #(measures up to 1.024V)
# gain: 0.512 #(measures up to 0.512V)
# gain: 0.256 #(measures up to 0.256V)
name: "Water Tank Level"
icon: "mdi:cup-water"
accuracy_decimals: 0
unit_of_measurement: "L"
# update_interval: 2min
update_interval: 30s
filters:
- calibrate_linear: # https://esphome.io/components/sensor/index.html#sensor-filters
# - 0.490 -> 0.0 # Empty Value (100PSI)
# - 0.848 -> 3000.0 # Full Value (100PSI)
- 0.490 -> 0.0 # Empty Value (1.2MPa)
- 0.548 -> 3000.0 # Full Value (1.2MPa)
# - median:
# window_size: 10
# send_every: 5
- platform: template
name: "Water Tank Status"
update_interval: 2min
unit_of_measurement: '%'
icon: "mdi:water-percent"
accuracy_decimals: 0
lambda: |-
return ((id(adclevel).state / 3000) * 100.00);
- platform: dallas
address: 0xDE3C01D607548128
name: "Outside Temperature"
#binary_sensor:
# - platform: gpio
# pin:
# number: GPIO14
# mode: INPUT_PULLUP
# inverted: True
# name: "Water Tank Pump On"
# device_class: moisture
# filters:
# - delayed_on: 10ms
# - delayed_off: 10ms
#
# - platform: gpio
# pin:
# number: GPIO12
# mode: INPUT_PULLUP
# inverted: True
# name: "Water Tank Rain Water"
# filters:
# - delayed_on: 10ms
# - delayed_off: 10ms
#
# - platform: gpio
# pin:
# number: GPIO13
# mode: INPUT_PULLUP
# inverted: True
# name: "Water Tank Mains Water"
# filters:
# - delayed_on: 10ms
# - delayed_off: 10ms
#
# - platform: gpio
# pin:
# number: GPIO15
# mode: INPUT_PULLUP
# inverted: True
# name: "Water Tank Warning"
# device_class: safety
# filters:
# - delayed_on: 10ms
# - delayed_off: 10ms