Skip to content

Commit a3bc4c8

Browse files
authored
Update full configs (#91)
* Update Full Configs * Update .bin files
1 parent e8dfd67 commit a3bc4c8

10 files changed

+86
-101
lines changed

airgradient-basic.bin

-1.16 KB
Binary file not shown.

airgradient-one.bin

-192 Bytes
Binary file not shown.

airgradient-open-air-o-1ppt.bin

-272 Bytes
Binary file not shown.

airgradient-open-air-o-1pst.bin

-240 Bytes
Binary file not shown.

airgradient-pro.bin

128 Bytes
Binary file not shown.

full_config/ag-basic.yaml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.1
2+
config_version: 4.0.6
33
co2_offset: '0'
44
name: ag-basic
55
friendly_name: AG Basic
@@ -10,7 +10,7 @@ esphome:
1010
name_add_mac_suffix: false
1111
project:
1212
name: mallocarray.airgradient
13-
version: 4.0.1
13+
version: 4.0.6
1414
min_version: 2024.6.0
1515
on_boot:
1616
- priority: 200.0
@@ -22,7 +22,7 @@ esphome:
2222
then:
2323
- http_request.post:
2424
url: !lambda |-
25-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
25+
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
2626
headers:
2727
Content-Type: application/json
2828
json:
@@ -195,35 +195,32 @@ sensor:
195195
id: pm_2_5_aqi
196196
update_interval: 5min
197197
device_class: aqi
198-
unit_of_measurement: AQI
199198
icon: mdi:air-filter
200199
accuracy_decimals: 0
201200
filters:
202201
- skip_initial: 1
203202
lambda: !lambda |-
203+
// 2024 update from EPA https://www.epa.gov/system/files/documents/2024-02/pm-naaqs-air-quality-index-fact-sheet.pdf
204204
// https://en.wikipedia.org/wiki/Air_quality_index#Computing_the_AQI
205205
// Borrowed from https://github.com/kylemanna/sniffer/blob/master/esphome/sniffer_common.yaml
206-
if (id(pm_2_5).state <= 12.0) {
206+
if (id(pm_2_5).state <= 9.0) {
207207
// good
208-
return((50.0 - 0.0) / (12.0 - 0.0) * (id(pm_2_5).state - 0.0) + 0.0);
208+
return((50.0 - 0.0) / (9.0 - 0.0) * (id(pm_2_5).state - 0.0) + 0.0);
209209
} else if (id(pm_2_5).state <= 35.4) {
210210
// moderate
211-
return((100.0 - 51.0) / (35.4 - 12.1) * (id(pm_2_5).state - 12.1) + 51.0);
211+
return((100.0 - 51.0) / (35.4 - 9.1) * (id(pm_2_5).state - 9.1) + 51.0);
212212
} else if (id(pm_2_5).state <= 55.4) {
213213
// usg
214214
return((150.0 - 101.0) / (55.4 - 35.5) * (id(pm_2_5).state - 35.5) + 101.0);
215-
} else if (id(pm_2_5).state <= 150.4) {
215+
} else if (id(pm_2_5).state <= 125.4) {
216216
// unhealthy
217-
return((200.0 - 151.0) / (150.4 - 55.5) * (id(pm_2_5).state - 55.5) + 151.0);
218-
} else if (id(pm_2_5).state <= 250.4) {
217+
return((200.0 - 151.0) / (125.4 - 55.5) * (id(pm_2_5).state - 55.5) + 151.0);
218+
} else if (id(pm_2_5).state <= 225.4) {
219219
// very unhealthy
220-
return((300.0 - 201.0) / (250.4 - 150.5) * (id(pm_2_5).state - 150.5) + 201.0);
221-
} else if (id(pm_2_5).state <= 350.4) {
220+
return((300.0 - 201.0) / (225.4 - 125.5) * (id(pm_2_5).state - 125.5) + 201.0);
221+
} else if (id(pm_2_5).state <= 325.4) {
222222
// hazardous
223-
return((400.0 - 301.0) / (350.4 - 250.5) * (id(pm_2_5).state - 250.5) + 301.0);
224-
} else if (id(pm_2_5).state <= 500.4) {
225-
// hazardous 2
226-
return((500.0 - 401.0) / (500.4 - 350.5) * (id(pm_2_5).state - 350.5) + 401.0);
223+
return((500.0 - 301.0) / (325.4 - 225.5) * (id(pm_2_5).state - 225.5) + 301.0);
227224
} else {
228225
return(500);
229226
}
@@ -551,7 +548,7 @@ interval:
551548
then:
552549
- http_request.post:
553550
url: !lambda |-
554-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
551+
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
555552
headers:
556553
Content-Type: application/json
557554
json:

full_config/ag-one.yaml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.1
2+
config_version: 4.0.6
33
co2_offset: '0'
44
voc_learning_time_offset_hours: '12'
55
nox_learning_time_offset_hours: '12'
@@ -16,7 +16,7 @@ esphome:
1616
name_add_mac_suffix: false
1717
project:
1818
name: mallocarray.airgradient
19-
version: 4.0.1
19+
version: 4.0.6
2020
min_version: 2024.6.0
2121
on_boot:
2222
- priority: 200.0
@@ -28,7 +28,7 @@ esphome:
2828
then:
2929
- http_request.post:
3030
url: !lambda |-
31-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
31+
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
3232
headers:
3333
Content-Type: application/json
3434
json:
@@ -207,35 +207,32 @@ sensor:
207207
id: pm_2_5_aqi
208208
update_interval: 5min
209209
device_class: aqi
210-
unit_of_measurement: AQI
211210
icon: mdi:air-filter
212211
accuracy_decimals: 0
213212
filters:
214213
- skip_initial: 1
215214
lambda: !lambda |-
215+
// 2024 update from EPA https://www.epa.gov/system/files/documents/2024-02/pm-naaqs-air-quality-index-fact-sheet.pdf
216216
// https://en.wikipedia.org/wiki/Air_quality_index#Computing_the_AQI
217217
// Borrowed from https://github.com/kylemanna/sniffer/blob/master/esphome/sniffer_common.yaml
218-
if (id(pm_2_5).state <= 12.0) {
218+
if (id(pm_2_5).state <= 9.0) {
219219
// good
220-
return((50.0 - 0.0) / (12.0 - 0.0) * (id(pm_2_5).state - 0.0) + 0.0);
220+
return((50.0 - 0.0) / (9.0 - 0.0) * (id(pm_2_5).state - 0.0) + 0.0);
221221
} else if (id(pm_2_5).state <= 35.4) {
222222
// moderate
223-
return((100.0 - 51.0) / (35.4 - 12.1) * (id(pm_2_5).state - 12.1) + 51.0);
223+
return((100.0 - 51.0) / (35.4 - 9.1) * (id(pm_2_5).state - 9.1) + 51.0);
224224
} else if (id(pm_2_5).state <= 55.4) {
225225
// usg
226226
return((150.0 - 101.0) / (55.4 - 35.5) * (id(pm_2_5).state - 35.5) + 101.0);
227-
} else if (id(pm_2_5).state <= 150.4) {
227+
} else if (id(pm_2_5).state <= 125.4) {
228228
// unhealthy
229-
return((200.0 - 151.0) / (150.4 - 55.5) * (id(pm_2_5).state - 55.5) + 151.0);
230-
} else if (id(pm_2_5).state <= 250.4) {
229+
return((200.0 - 151.0) / (125.4 - 55.5) * (id(pm_2_5).state - 55.5) + 151.0);
230+
} else if (id(pm_2_5).state <= 225.4) {
231231
// very unhealthy
232-
return((300.0 - 201.0) / (250.4 - 150.5) * (id(pm_2_5).state - 150.5) + 201.0);
233-
} else if (id(pm_2_5).state <= 350.4) {
232+
return((300.0 - 201.0) / (225.4 - 125.5) * (id(pm_2_5).state - 125.5) + 201.0);
233+
} else if (id(pm_2_5).state <= 325.4) {
234234
// hazardous
235-
return((400.0 - 301.0) / (350.4 - 250.5) * (id(pm_2_5).state - 250.5) + 301.0);
236-
} else if (id(pm_2_5).state <= 500.4) {
237-
// hazardous 2
238-
return((500.0 - 401.0) / (500.4 - 350.5) * (id(pm_2_5).state - 350.5) + 401.0);
235+
return((500.0 - 301.0) / (325.4 - 225.5) * (id(pm_2_5).state - 225.5) + 301.0);
239236
} else {
240237
return(500);
241238
}
@@ -805,7 +802,7 @@ display:
805802
lambda: !lambda |-
806803
it.printf(0, 0, id(open_sans_14), "ID:");
807804
it.printf(128, 0, id(open_sans_14), TextAlign::TOP_RIGHT, "%s", get_mac_address().c_str());
808-
it.printf(0, 21, id(open_sans_14), "Config Ver: 4.0.1");
805+
it.printf(0, 21, id(open_sans_14), "Config Ver: 4.0.6");
809806
it.printf(0, 42, id(open_sans_14), "AG One");
810807
- id: summary1
811808
lambda: !lambda |-
@@ -1114,7 +1111,7 @@ interval:
11141111
then:
11151112
- http_request.post:
11161113
url: !lambda |-
1117-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
1114+
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
11181115
headers:
11191116
Content-Type: application/json
11201117
json:
@@ -1151,10 +1148,10 @@ interval:
11511148
- interval: 150s
11521149
then:
11531150
- output.turn_on:
1154-
id: watchdog
1151+
id: external_watchdog
11551152
- delay: 20ms
11561153
- output.turn_off:
1157-
id: watchdog
1154+
id: external_watchdog
11581155
startup_delay: 0s
11591156
number:
11601157
- platform: template
@@ -1225,7 +1222,7 @@ http_request:
12251222
timeout: 5s
12261223
output:
12271224
- platform: gpio
1228-
id: watchdog
1225+
id: external_watchdog
12291226
pin:
12301227
number: 2
12311228
ignore_strapping_warning: true
@@ -1265,9 +1262,9 @@ binary_sensor:
12651262
then:
12661263
- logger.log:
12671264
format: Toggling display betwen C and F
1265+
tag: main
12681266
args: []
12691267
level: DEBUG
1270-
tag: main
12711268
- switch.toggle:
12721269
id: display_in_f
12731270
invalid_cooldown: 1s
@@ -1280,9 +1277,9 @@ binary_sensor:
12801277
then:
12811278
- logger.log:
12821279
format: Starting manual CO2 calibration
1280+
tag: main
12831281
args: []
12841282
level: DEBUG
1285-
tag: main
12861283
- senseair.background_calibration:
12871284
id: senseair_s8
12881285
- delay: 70s

full_config/ag-open-air-o-1ppt.yaml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.1
2+
config_version: 4.0.6
33
voc_learning_time_offset_hours: '12'
44
nox_learning_time_offset_hours: '12'
55
name: ag-open-air-o-1ppt
@@ -11,7 +11,7 @@ esphome:
1111
name_add_mac_suffix: false
1212
project:
1313
name: mallocarray.airgradient
14-
version: 4.0.1
14+
version: 4.0.6
1515
min_version: 2024.6.0
1616
on_boot:
1717
- priority: 200.0
@@ -23,7 +23,7 @@ esphome:
2323
then:
2424
- http_request.post:
2525
url: !lambda |-
26-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
26+
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
2727
headers:
2828
Content-Type: application/json
2929
json:
@@ -262,35 +262,32 @@ sensor:
262262
id: pm_2_5_aqi
263263
update_interval: 5min
264264
device_class: aqi
265-
unit_of_measurement: AQI
266265
icon: mdi:air-filter
267266
accuracy_decimals: 0
268267
filters:
269268
- skip_initial: 1
270269
lambda: !lambda |-
270+
// 2024 update from EPA https://www.epa.gov/system/files/documents/2024-02/pm-naaqs-air-quality-index-fact-sheet.pdf
271271
// https://en.wikipedia.org/wiki/Air_quality_index#Computing_the_AQI
272272
// Borrowed from https://github.com/kylemanna/sniffer/blob/master/esphome/sniffer_common.yaml
273-
if (id(pm_2_5).state <= 12.0) {
273+
if (id(pm_2_5).state <= 9.0) {
274274
// good
275-
return((50.0 - 0.0) / (12.0 - 0.0) * (id(pm_2_5).state - 0.0) + 0.0);
275+
return((50.0 - 0.0) / (9.0 - 0.0) * (id(pm_2_5).state - 0.0) + 0.0);
276276
} else if (id(pm_2_5).state <= 35.4) {
277277
// moderate
278-
return((100.0 - 51.0) / (35.4 - 12.1) * (id(pm_2_5).state - 12.1) + 51.0);
278+
return((100.0 - 51.0) / (35.4 - 9.1) * (id(pm_2_5).state - 9.1) + 51.0);
279279
} else if (id(pm_2_5).state <= 55.4) {
280280
// usg
281281
return((150.0 - 101.0) / (55.4 - 35.5) * (id(pm_2_5).state - 35.5) + 101.0);
282-
} else if (id(pm_2_5).state <= 150.4) {
282+
} else if (id(pm_2_5).state <= 125.4) {
283283
// unhealthy
284-
return((200.0 - 151.0) / (150.4 - 55.5) * (id(pm_2_5).state - 55.5) + 151.0);
285-
} else if (id(pm_2_5).state <= 250.4) {
284+
return((200.0 - 151.0) / (125.4 - 55.5) * (id(pm_2_5).state - 55.5) + 151.0);
285+
} else if (id(pm_2_5).state <= 225.4) {
286286
// very unhealthy
287-
return((300.0 - 201.0) / (250.4 - 150.5) * (id(pm_2_5).state - 150.5) + 201.0);
288-
} else if (id(pm_2_5).state <= 350.4) {
287+
return((300.0 - 201.0) / (225.4 - 125.5) * (id(pm_2_5).state - 125.5) + 201.0);
288+
} else if (id(pm_2_5).state <= 325.4) {
289289
// hazardous
290-
return((400.0 - 301.0) / (350.4 - 250.5) * (id(pm_2_5).state - 250.5) + 301.0);
291-
} else if (id(pm_2_5).state <= 500.4) {
292-
// hazardous 2
293-
return((500.0 - 401.0) / (500.4 - 350.5) * (id(pm_2_5).state - 350.5) + 401.0);
290+
return((500.0 - 301.0) / (325.4 - 225.5) * (id(pm_2_5).state - 225.5) + 301.0);
294291
} else {
295292
return(500);
296293
}
@@ -600,7 +597,7 @@ interval:
600597
then:
601598
- http_request.post:
602599
url: !lambda |-
603-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
600+
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
604601
headers:
605602
Content-Type: application/json
606603
body: !lambda |
@@ -653,10 +650,10 @@ interval:
653650
- interval: 150s
654651
then:
655652
- output.turn_on:
656-
id: watchdog
653+
id: external_watchdog
657654
- delay: 20ms
658655
- output.turn_off:
659-
id: watchdog
656+
id: external_watchdog
660657
startup_delay: 0s
661658
switch:
662659
- platform: template
@@ -675,7 +672,7 @@ http_request:
675672
timeout: 5s
676673
output:
677674
- platform: gpio
678-
id: watchdog
675+
id: external_watchdog
679676
pin:
680677
number: 2
681678
ignore_strapping_warning: true

0 commit comments

Comments
 (0)