Skip to content

Commit 80d3473

Browse files
committed
test sensor info
1 parent ffe1ef8 commit 80d3473

22 files changed

+124
-103
lines changed

docs/sensors/Honeywell.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
112112
```
113113

114114
``` man
115-
Honeywell HPMA115S0 sensor observations
116-
117-
time measurement time [seconds since epoch]
118-
pm25, pm10 PM2.5, PM10 [μg/m3]
119-
120-
String formats: pm (default), csv and header
115+
--8<-- "HPMA115S0.info"
121116
```
122117

123118
=== "serial"
@@ -167,12 +162,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
167162
```
168163

169164
``` man
170-
Honeywell HPMA115C0 sensor observations
171-
172-
time measurement time [seconds since epoch]
173-
pm01, pm25, pm04, pm10 PM1.0, PM2.5, PM4.0 PM10 [μg/m3]
174-
175-
String formats: pm (default), csv and header
165+
--8<-- "HPMA115C0.info"
176166
```
177167

178168
=== "serial"

docs/sensors/NovaFitness.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
117117
```
118118

119119
``` man
120-
NovaFitness SDS011, SDS018 and SDS021 sensor observations
121-
122-
time measurement time [seconds since epoch]
123-
pm25, pm10 PM2.5, PM10 [μg/m3]
124-
125-
String formats: pm (default), csv and header
120+
--8<-- "SDS01x.info"
126121
```
127122

128123
=== "serial"
@@ -172,12 +167,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
172167
```
173168

174169
``` man
175-
NovaFitness SDS198 sensor observations
176-
177-
time measurement time [seconds since epoch]
178-
pm100 PM100 [μg/m3]
179-
180-
String formats: pm (default), csv and header
170+
--8<-- "SDS198.info"
181171
```
182172

183173
=== "serial"

docs/sensors/Plantower.md

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
168168
```
169169

170170
``` man
171-
Plantower PMS3003 sensor observations
172-
173-
time measurement time [seconds since epoch]
174-
raw01, raw25, raw10 cf=1 PM estimates [μg/m3]
175-
pm01, pm25, pm10 PM1.0, PM2.5, PM10 [μg/m3]
176-
177-
String formats: pm (default), raw, cf, csv and header
171+
--8<-- "PMS3003.info"
178172
```
179173

180174
=== "serial"
@@ -224,14 +218,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
224218
```
225219

226220
``` man
227-
Plantower PMS1003, PMS5003, PMS7003 and PMSA003 sensor observations
228-
229-
time measurement time [seconds since epoch]
230-
raw01, raw25, raw10 cf=1 PM estimates [μg/m3]
231-
pm01, pm25, pm10 PM1.0, PM2.5, PM10 [μg/m3]
232-
n0_3, n0_5, n1_0, n2_5, n5_0, n10_0 number concentrations over X.Y um [#/cm3]
233-
234-
String formats: pm (default), raw, cf, num, csv and header
221+
--8<-- "PMSx003.info"
235222
```
236223

237224
=== "serial"
@@ -281,16 +268,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
281268
```
282269

283270
``` man
284-
Plantower PMS5003T sensor observations
285-
286-
time measurement time [seconds since epoch]
287-
raw01, raw25, raw10 cf=1 PM estimates [μg/m3]
288-
pm01, pm25, pm10 PM1.0, PM2.5, PM10 [μg/m3]
289-
n0_3, n0_5, n1_0, n2_5 number concentrations over X.Y um [#/cm3]
290-
temp temperature [°C]
291-
rhum relative humidity [%]
292-
293-
String formats: pm (default), raw, cf, num, atm, csv and header
271+
--8<-- "PMS5003T.info"
294272
```
295273

296274
=== "serial"
@@ -340,15 +318,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
340318
```
341319

342320
``` man
343-
Plantower PMS5003S sensor observations
344-
345-
time measurement time [seconds since epoch]
346-
raw01, raw25, raw10 cf=1 PM estimates [μg/m3]
347-
pm01, pm25, pm10 PM1.0, PM2.5, PM10 [μg/m3]
348-
n0_3, n0_5, n1_0, n2_5, n5_0, n10_0 number concentrations over X.Y um [#/cm3]
349-
HCHO formaldehyde concentration [mg/m3]
350-
351-
String formats: pm (default), raw, cf, num, hcho, csv and header
321+
--8<-- "PMS5003S.info"
352322
```
353323

354324
=== "serial"
@@ -398,17 +368,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
398368
```
399369

400370
``` man
401-
Plantower PMS5003ST sensor observations
402-
403-
time measurement time [seconds since epoch]
404-
raw01, raw25, raw10 cf=1 PM estimates [μg/m3]
405-
pm01, pm25, pm10 PM1.0, PM2.5, PM10 [μg/m3]
406-
n0_3, n0_5, n1_0, n2_5, n5_0, n10_0 number concentrations over X.Y um [#/cm3]
407-
HCHO formaldehyde concentration [mg/m3]
408-
temp temperature [°C]
409-
rhum relative humidity [%]
410-
411-
String formats: pm (default), raw, cf, num, hcho, atm, csv and header
371+
--8<-- "PMS5003ST.info"
412372
```
413373

414374
=== "serial"

docs/sensors/Sensirion.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,7 @@ Serial protocol is UART 115200 8N1 5V TTL :material-alert: 3.3V compatible.
9191
```
9292

9393
``` man
94-
Sensirion SPS30 sensor observations
95-
96-
time measurement time [seconds since epoch]
97-
pm01, pm25, pm04, pm10 PM1.0, PM2.5, PM4.0, PM10 [μg/m3]
98-
n0_5, n1_0, n2_5, n4_0, n10_0 number concentrations between 0.3 and X.Y um [#/cm3]
99-
diam typical particle size [μm]
100-
101-
String formats: pm (default), num, diam, csv and header
94+
--8<-- "SPS30.info"
10295
```
10396

10497
=== "serial"

docs/sensors/Winsen.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
119119
```
120120

121121
``` man
122-
Winsen MH-Z19B sensor observations
123-
124-
time measurement time [seconds since epoch]
125-
CO2 CO2 concentration [ppm]
126-
127-
String formats: co2 (default), csv and header
122+
--8<-- "MHZ19B.info"
128123
```
129124

130125
=== "serial"
@@ -175,12 +170,7 @@ Serial protocol is UART 9600 8N1 :material-alert: 3.3V TTL.
175170
```
176171

177172
``` csv
178-
Winsen ZH03B and ZH06-I sensor observations
179-
180-
time measurement time [seconds since epoch]
181-
pm01, pm25, pm10 PM1.0, PM2.5, PM10 [μg/m3]
182-
183-
String formats: pm (default), csv and header
173+
--8<-- "ZH0xx.info"
184174
```
185175

186176
=== "serial"

docs/sensors/mcu680.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,7 @@ Under factory settings, the serial protocol is UART 9600 8N1 3.3V/5V TTL.
9292
```
9393

9494
``` man
95-
Bosh Sensortec BME680 sensor observations
96-
97-
time measurement time [seconds since epoch]
98-
temp temperature [°C]
99-
rhum relative humidity [%]
100-
pres atmospheric pressure [hPa]
101-
IAQ_acc IAQ accuracy flag
102-
IAQ index of air quality [0--500]
103-
gas gas resistance [kΩ]
104-
alt altitude estimate [m above sea level]
105-
106-
String formats: atm, bme (default), bsec, csv and header
95+
--8<-- "MCU680.info"
10796
```
10897

10998
=== "serial"

src/pms/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def callback(
6565
)
6666

6767
logger.debug(f"PyPMS v{__version__}")
68-
ctx.obj = {"reader": SensorReader(model, port, seconds, samples)}
68+
obj = ctx.ensure_object(dict)
69+
obj.update(reader=SensorReader(model, port, seconds, samples))
6970

7071

7172
@main.command()

tests/captured_data/HPMA115C0.info

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Honeywell HPMA115C0 sensor observations
2+
3+
time measurement time [seconds since epoch]
4+
pm01, pm25, pm04, pm10 PM1.0, PM2.5, PM4.0 PM10 [μg/m3]
5+
6+
String formats: pm (default), csv and header

tests/captured_data/HPMA115S0.info

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Honeywell HPMA115S0 sensor observations
2+
3+
time measurement time [seconds since epoch]
4+
pm25, pm10 PM2.5, PM10 [μg/m3]
5+
6+
String formats: pm (default), csv and header

tests/captured_data/MCU680.info

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Bosh Sensortec BME680 sensor observations
2+
3+
time measurement time [seconds since epoch]
4+
temp temperature [°C]
5+
rhum relative humidity [%]
6+
pres atmospheric pressure [hPa]
7+
IAQ_acc IAQ accuracy flag
8+
IAQ index of air quality [0--500]
9+
gas gas resistance [kΩ]
10+
alt altitude estimate [m above sea level]
11+
12+
String formats: atm, bme (default), bsec, csv and header

0 commit comments

Comments
 (0)