-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurrent.yaml
146 lines (134 loc) · 2.93 KB
/
current.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
esphome:
name: current
platform: ESP8266
#board: d1
board: d1_mini_pro
wifi:
ssid: "iot"
domain: ".lan.0x20.be"
password: !secret wifipassword
logger:
ota:
mqtt:
broker: mqtt.lan.0x20.be
topic_prefix: "hsg/current"
i2c:
sda: GPIO4
scl: GPIO5
scan: true
# esphome docs indicate max of 800kHz
# ADS1115 indicate a max of 100kHz in standard and 400kHz in fast mode
# and a max of 3.4MHz on request by activating high-speed mode
frequency: 3.4MHz # 100kHz gets glitchy on d1_mini_pro, 3.4MHz seems to work
ads1115:
- address: 0x48
id: ads1115_48
continuous_mode: on
- address: 0x49
id: ads1115_49
continuous_mode: on
sensor:
- platform: ads1115
ads1115_id: ads1115_48
update_interval: never
multiplexer: "A0_A3"
gain: 0.256
name: "A0_1"
id: "A0_1"
- platform: ads1115
ads1115_id: ads1115_48
update_interval: never
multiplexer: "A1_A3"
gain: 0.256
name: "A1_1"
id: "A1_1"
- platform: ads1115
ads1115_id: ads1115_48
update_interval: never
multiplexer: "A2_A3"
gain: 0.256
name: "A2_1"
id: "A2_1"
- platform: ads1115
ads1115_id: ads1115_49
update_interval: never
multiplexer: "A0_A3"
gain: 0.256
name: "A0_2"
id: "A0_2"
- platform: ads1115
ads1115_id: ads1115_49
update_interval: never
multiplexer: "A1_A3"
gain: 0.256
name: "A1_2"
id: "A1_2"
- platform: ads1115
ads1115_id: ads1115_49
update_interval: never
multiplexer: "A2_A3"
gain: 0.256
name: "A2_2"
id: "A2_2"
# total current, higher gain and unused inputs
- platform: ct_clamp
sensor: A0_1
name: "channel 0"
sample_duration: 400ms
update_interval: 1s
accuracy_decimals: 5
filters:
- calibrate_linear:
- 0.000015 -> 0
- 0.007575 -> 0.50
- platform: ct_clamp
sensor: A1_1
name: "channel 1"
sample_duration: 400ms
update_interval: 1s
accuracy_decimals: 5
filters:
- calibrate_linear:
- 0 -> 0
- 0.011 -> 0.32
- platform: ct_clamp
sensor: A2_1
name: "channel 2"
sample_duration: 400ms
update_interval: 1s
accuracy_decimals: 5
filters:
- calibrate_linear:
- 0 -> 0
- 1 -> 1
# three times the same clamp
- platform: ct_clamp
sensor: A0_2
name: "channel 3"
sample_duration: 400ms
update_interval: 1s
accuracy_decimals: 5
filters:
- calibrate_linear:
- 0.000015 -> 0
- 0.007575 -> 0.50
- platform: ct_clamp
sensor: A1_2
name: "channel 4"
sample_duration: 400ms
update_interval: 1s
accuracy_decimals: 5
filters:
- calibrate_linear:
- 0.000015 -> 0
- 0.007575 -> 0.50
- platform: ct_clamp
sensor: A2_2
name: "channel 5"
sample_duration: 400ms
update_interval: 1s
accuracy_decimals: 5
filters:
- calibrate_linear:
- 0.000015 -> 0
- 0.007575 -> 0.50