Compare commits

..

102 Commits

Author SHA1 Message Date
566f8a63b4 Prepare 3.1.13 release 2024-11-27 13:35:26 +07:00
9e4d52454b Merge pull request #266 from airgradienthq/fix/openmetrics
Fix measurements value in prometheus metrics endpoints
2024-11-27 03:38:57 +07:00
5f5e985309 Fix openmetrics esp8266 based 2024-11-27 00:43:03 +07:00
d638573ca7 Fix open metrics for OneOpenAir 2024-11-27 00:15:32 +07:00
79fbd901bd Merge branch 'develop' 2024-11-19 18:45:31 +07:00
3644dc43fe Prepared to release 3.1.12 2024-11-19 18:44:23 +07:00
03fa62d8f0 Merge pull request #263 from airgradienthq/fix/correction
Fix EPA compensated on top of SLR correction
2024-11-19 02:20:51 +07:00
902a768f28 Handle parsing invalid json string 2024-11-19 01:45:50 +07:00
1de9344f43 Fix typo on docs 2024-11-18 22:50:36 +07:00
46f6309b77 Fix use the right function 2024-11-18 22:42:43 +07:00
a6b48acb41 CO2 led bar indicator sync fix 2024-11-18 21:24:47 +07:00
1b4d89e1a1 fix correction on top of compensation 2024-11-18 19:53:28 +07:00
0d2b0fb657 Fix typo on local-server.md
Fix curl correction command example typos
2024-11-17 11:18:39 +07:00
9f08af44b0 Prepared to release 3.1.11 2024-11-11 20:04:47 +07:00
6b661cdeb7 Merge pull request #261 from airgradienthq/feat/allavg
Values on display and led bar using measurement average values
2024-11-11 12:40:48 +07:00
dc299c4b54 Fix pm2.5 not using getAverage for ledbar 2024-11-10 19:20:09 +07:00
2f595b4e41 Update local server docs correction examples 2024-11-10 04:26:54 +07:00
a30535f75f Use avg value for display and led bar 2024-11-10 04:13:58 +07:00
a513943cba New agvalue member to get avg values 2024-11-09 23:27:29 +07:00
96bb6952fb correction function return raw if algorithm is none 2024-11-09 21:28:33 +07:00
10653bfe26 Fix pms5003 correction default value 2024-11-09 20:55:41 +07:00
c7f89fa7b7 Decrease period length moving average to 80% 2024-11-09 20:53:52 +07:00
b11c461b60 Merge pull request #260 from airgradienthq/fix/led-flicker
Fix flicker on led bar led state change
2024-11-09 20:42:01 +07:00
404c14aad2 Fix typo and comment 2024-11-07 22:08:36 +07:00
bfbae680fd Fix led bar flicker when state change
clear only neccessary led
2024-11-07 22:03:01 +07:00
3ae5982380 Merge remote-tracking branch 'origin/develop' into develop 2024-11-04 13:21:46 +07:00
db2c2ef052 Prepared to release 3.1.10 2024-11-04 13:21:20 +07:00
593547cdbe Updated version number for 3.1.10 and enabled debug mode for verbose log messages 2024-11-03 14:38:37 +07:00
673c46950d Merge pull request #251 from airgradienthq/feat/ledbar-sensor-indicator
Update led bar indicator for CO2 and PM2 sensor level
2024-11-03 14:13:56 +07:00
ae0b4038d4 Merge branch 'develop' into feat/ledbar-sensor-indicator 2024-11-03 14:12:57 +07:00
cac0bd5355 Merge pull request #259 from airgradienthq/feat/pm-correction
Low Readings correction for Plantower PMS5003
2024-11-03 14:08:51 +07:00
3d6203dabf Fix some grammar on docs 2024-11-03 14:06:32 +07:00
1db8fbefe9 Corrections from local server
Tidy some things
2024-11-02 18:44:44 +07:00
d850d27dc1 Clear slr when not avail 2024-11-02 17:31:05 +07:00
f49e4a4b37 Fix casting enum issue
Previously if algo is slr, it's always consider new update
2024-11-02 17:23:15 +07:00
75f88b0009 Remove slr correction for pms5003t 2024-11-02 16:15:46 +07:00
c6961b3ca8 Validate raw pm before correction 2024-11-02 16:11:47 +07:00
ade72ff3b8 Apply correction to transmission payload
Only for indoor
2024-11-02 16:11:00 +07:00
9fbbea22ff Fix typo 2024-11-02 14:52:58 +07:00
7b0381dea3 Apply pm correction to display and led bar 2024-11-02 14:44:32 +07:00
5867d0f1d5 Fix pmcorrection member datatype
Log using printlog
Function to check if correction is not none
2024-11-02 14:40:35 +07:00
a98d77e0c3 slr pm2.5 correction implementation 2024-11-02 11:02:36 +07:00
641003f9d1 Get pm config function 2024-11-02 10:41:01 +07:00
0275aee370 Copy correction object to jconfig 2024-11-02 10:34:35 +07:00
ea46b812c1 Handle saving back to eeprom
rename the function
2024-11-02 00:53:33 +07:00
16c932962a Handle pm correction algorithm from ag server config 2024-11-02 00:10:08 +07:00
f90b2e1a07 Merge pull request #258 from airgradienthq/feat/particle-count
Include PMS particle count 0.5 and 5.0
2024-11-01 18:46:19 +07:00
3a9bb16c09 Change json key name for particle count 2.5 and 5.0 2024-11-01 17:46:58 +07:00
bb754edc51 Add other sensor json key field as const 2024-11-01 17:44:11 +07:00
1d991b1004 json key field from constants 2024-11-01 17:26:18 +07:00
3ebcc584a4 Update localserver docs 2024-10-31 21:19:46 +07:00
4d40ae421c Comment data to post
Payload already print out on toString() measurement
2024-10-31 21:17:28 +07:00
3004a82e7e pms disconnected log 2024-10-31 21:16:29 +07:00
4af5ca2665 Update local server docs 2024-10-31 21:12:29 +07:00
e6696f3d41 New particle count 0.5 and 5.0 2024-10-29 23:51:19 +07:00
2b33823162 Merge pull request #257 from airgradienthq/feat/pms-data
Send all particle counts and standard particle values provided by the PMS sensor
2024-10-23 20:57:58 +07:00
bf0768c7da Comment description to invalidValue variable 2024-10-23 20:55:45 +07:00
33e2977eb4 Fix comments 2024-10-23 11:18:18 +07:00
85e779cfc2 Use camel case for transmission payload 2024-10-23 11:05:16 +07:00
4783684443 Update local server payloads 2024-10-22 18:37:56 +07:00
3b0c77ca4d New measurements add to transmission payload 2024-10-22 18:28:56 +07:00
eeba41f497 Include other PMS data to measurements 2024-10-22 17:13:15 +07:00
fd1f35f6d8 Getter to get other PMS sensor data 2024-10-22 15:28:58 +07:00
eb76eff403 Merge pull request #256 from airgradienthq/restructure-agvalue
Restructure Measurements class
2024-10-22 13:40:50 +07:00
4673999dda Fix var type 2024-10-22 12:50:43 +07:00
83aa6a4502 Apply for other monitor series 2024-10-22 00:11:58 +07:00
8a87b865e6 Handle consecutive invalid value update
Set measurements type average value to invalid when invalidCounter reached max period
2024-10-21 22:37:44 +07:00
c3068be6e9 Fix calculation PPT compensated PM2.5 2024-10-21 22:00:47 +07:00
63bb5f8ddb Compensate function use float data type 2024-10-21 01:49:01 +07:00
8548d3e9f4 Optional to debug every measurement update value 2024-10-21 00:43:04 +07:00
f7e1363da9 Rename function 2024-10-21 00:22:50 +07:00
2ffe0a62aa Reduce update interval for max period to 50% 2024-10-21 00:15:59 +07:00
2cda36ed0d set measurement max period as function 2024-10-20 23:27:27 +07:00
7de2d0cc30 Set proper max period for moving average based on update interval
SHT read set to 6s
2024-10-20 23:20:16 +07:00
f478dd16c8 get value function consume 2024-10-20 22:30:49 +07:00
43ca0a2c2e get and getFloat function specific for latest value
Update functions comments
2024-10-20 20:04:07 +07:00
84884d0c15 Move average member value to update struct 2024-10-20 19:20:17 +07:00
f36f860c2e Switch to moving average for sensor data
average value to floating points
2024-10-20 19:01:41 +07:00
e47a9057ea Update AQI breakpoints to 2024 values (#208)
* Update breakpoints to 2024 standard

* Update formula to match Wikipedia
https://en.wikipedia.org/wiki/Air_quality_index#Computing_the_AQI

---------

Co-authored-by: Samuel Siburian <samuelbles07@gmail.com>
2024-10-19 14:55:08 +07:00
399b4ca1dc Other related class use new AgValue structure 2024-10-19 01:35:36 +07:00
2e4f4643fa maxUpdate 2024-10-19 01:33:00 +07:00
0ccf46c219 Rename AgValueType to MeasurementType
Just use plain enum instead of enum class
Remove unecessary legacy variables and function
2024-10-19 01:32:41 +07:00
76a2f332d7 Fix rhum precission on buildIndoor measurements 2024-10-17 12:08:00 +07:00
ed344d3e1a measurement toString
Tested on I-9PSL monitor
Update OneOpenAir post and mqtt to use new measurement toString
2024-10-17 00:53:49 +07:00
2082a2fa93 Fix missing line when commit 2024-10-14 02:14:10 +07:00
e145d32714 First test, console
Working average from main only
2024-10-14 02:05:30 +07:00
a2c19438c0 validateChannel implementation 2024-10-14 01:54:55 +07:00
ac838efdb5 validate measurement type channel 2024-10-14 01:25:35 +07:00
751d4e8380 Get value from each data type 2024-10-14 01:22:44 +07:00
6925b1ac9a Provide channel for neccessary ValueType
To support OA that have 2 PMS sensor
2024-10-13 23:30:03 +07:00
77a23b4202 Always increment bootcount when send measurements data is scheduled (#255) 2024-10-13 15:46:41 +07:00
ea91cf9b6c New function to set max update before averaging
Rename enum member
2024-10-11 22:47:43 +07:00
467b3e8637 Tidy up 2024-10-11 22:11:26 +07:00
2a5cf78b68 updateValue return bool to indicate max average is set or not
Add more comments
Update naming
2024-10-11 22:05:03 +07:00
9c09b82efd The data structure and update value function 2024-10-11 20:54:05 +07:00
60d01c0d94 First init the data structure 2024-10-10 22:51:37 +07:00
e7a91c53bc Update PM ledbar threshold 2024-10-08 00:34:29 +07:00
4e41fd5d71 Fix default for ledBarMode (#252) 2024-10-07 21:31:24 +07:00
fe4389bff4 Fix color under <4000 for co2 2024-09-30 22:43:08 +07:00
9325830fad Replace orange to yellow for ledbar co2 indicator 2024-09-30 22:38:52 +07:00
b86f0d45e3 Update PM2 level ledbar indicator 2024-09-30 22:33:52 +07:00
210f0a5ff9 Update CO2 level ledbar indicator 2024-09-30 22:27:45 +07:00
51 changed files with 2579 additions and 42078 deletions

View File

@ -1,231 +0,0 @@
14:06:10:414 -> No PM sensor detected on Serial1
14:06:10:414 -> Firmware Mode: 0-1PS
14:06:10:435 -> Set S8 AbcDays successful
14:06:10:435 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
14:06:10:435 -> [ApiClient] Info: begin
14:06:10:482 -> [WifiConnector] Info: Connecting to WiFi...
14:06:10:482 -> *wm:AutoConnect
14:06:10:482 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
14:06:10:985 -> E (10415) wifi:sta is connecting, return error
14:06:10:986 -> [ 10170][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
14:06:18:400 -> *wm:AutoConnect: SUCCESS
14:06:18:401 -> *wm:STA IP Address: 192.168.100.127
14:06:18:401 -> [WifiConnector] Info: Wait for configure portal
14:06:18:401 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:06:18:417 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:06:21:033 -> MQTT is not configured, skipping initialization of MQTT client
14:06:21:033 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:06:21:033 -> [ApiClient] Info: DATA: {"wifi":-58,"boot":0}
14:06:21:033 -> [ApiClient] Info: Return code: 200
14:06:27:034 ->
14:06:27:034 -> firmwareCheckForUpdate:
14:06:27:034 -> firmwareCheckForUpdate: Perform
14:06:27:034 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:06:27:625 -> Firmware update skipped, the server returned 400
14:06:27:627 -> 3
14:06:27:627 -> OTA message:
14:06:27:627 ->
14:06:28:212 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:06:28:212 -> [ApiClient] Info: Return code: 200
14:06:28:213 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:06:28:213 -> [Configure] Info: Parse configure success
14:06:28:214 -> [Configure] Info: Detected new firmware version: 3.1.9
14:06:28:276 -> CO2 (ppm): 0
14:06:32:296 -> CO2 (ppm): 0
14:06:36:317 -> CO2 (ppm): 448
14:06:40:338 -> CO2 (ppm): 436
14:06:44:359 -> CO2 (ppm): 425
14:06:48:381 -> CO2 (ppm): 423
14:06:52:401 -> CO2 (ppm): 420
14:06:56:422 -> CO2 (ppm): 411
14:07:00:443 -> CO2 (ppm): 409
14:07:01:786 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:07:01:786 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":409,"boot":0,"bootCount":0}
14:07:01:786 -> [ApiClient] Info: Return code: 200
14:07:01:787 ->
14:07:01:787 -> Online mode and isPostToAirGradient = true: watchdog reset
14:07:01:787 ->
14:07:01:812 -> External watchdog feed!
14:07:04:464 -> CO2 (ppm): 405
14:07:08:485 -> CO2 (ppm): 405
14:07:16:527 -> CO2 (ppm): 405
14:07:16:527 -> CO2 (ppm): 405
14:07:20:548 -> CO2 (ppm): 405
14:07:24:569 -> CO2 (ppm): 404
14:07:30:051 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:07:30:052 -> [ApiClient] Info: Return code: 200
14:07:30:053 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:07:30:054 -> [Configure] Info: Parse configure success
14:07:30:055 -> [Configure] Info: Detected new firmware version: 3.1.9
14:07:30:099 -> CO2 (ppm): 404
14:07:34:120 -> CO2 (ppm): 403
14:07:38:141 -> CO2 (ppm): 403
14:07:42:161 -> CO2 (ppm): 402
14:07:46:183 -> CO2 (ppm): 401
14:07:50:203 -> CO2 (ppm): 401
14:07:54:224 -> CO2 (ppm): 402
14:07:58:245 -> CO2 (ppm): 403
14:08:02:757 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:08:02:758 -> [ApiClient] Info: DATA: {"wifi":-70,"rco2":403,"boot":1,"bootCount":1}
14:08:02:758 -> [ApiClient] Info: Return code: 200
14:08:02:758 ->
14:08:02:758 -> Online mode and isPostToAirGradient = true: watchdog reset
14:08:02:758 ->
14:08:02:780 -> CO2 (ppm): 404
14:08:02:805 -> External watchdog feed!
14:08:06:801 -> CO2 (ppm): 403
14:08:10:822 -> CO2 (ppm): 403
14:08:14:843 -> CO2 (ppm): 402
14:08:18:864 -> CO2 (ppm): 401
14:08:22:885 -> CO2 (ppm): 401
14:08:26:906 -> CO2 (ppm): 400
14:08:30:768 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:08:30:768 -> [ApiClient] Info: Return code: 200
14:08:30:769 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:08:30:771 -> [Configure] Info: Parse configure success
14:08:30:771 -> [Configure] Info: Detected new firmware version: 3.1.9
14:08:30:927 -> CO2 (ppm): 398
14:08:34:948 -> CO2 (ppm): 397
14:08:38:968 -> CO2 (ppm): 397
14:08:42:989 -> CO2 (ppm): 396
14:08:47:010 -> CO2 (ppm): 396
14:08:51:031 -> CO2 (ppm): 395
14:08:55:052 -> CO2 (ppm): 395
14:09:03:684 -> CO2 (ppm): 395
14:09:03:684 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:09:03:684 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":395,"boot":2,"bootCount":2}
14:09:03:684 -> [ApiClient] Info: Return code: 200
14:09:03:685 ->
14:09:03:686 -> Online mode and isPostToAirGradient = true: watchdog reset
14:09:03:686 ->
14:09:03:707 -> CO2 (ppm): 395
14:09:03:732 -> External watchdog feed!
14:09:07:728 -> CO2 (ppm): 395
14:09:11:797 -> CO2 (ppm): 394
14:09:19:839 -> CO2 (ppm): 394
14:09:19:839 -> CO2 (ppm): 396
14:09:23:860 -> CO2 (ppm): 397
14:09:27:881 -> CO2 (ppm): 397
14:09:31:392 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:09:31:392 -> [ApiClient] Info: Return code: 200
14:09:31:394 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:09:31:396 -> [Configure] Info: Parse configure success
14:09:31:396 -> [Configure] Info: co2CalibrationRequested: True
14:09:31:396 -> [Configure] Info: Detected new firmware version: 3.1.9
14:09:31:398 -> [StateMachine] Info: CO2 Calibration
14:09:31:398 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:09:32:398 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:09:33:398 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:09:35:398 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:09:35:398 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:09:38:406 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:09:38:420 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:09:38:429 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:09:38:442 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:09:38:443 -> [StateMachine] Info: CO2 Calibration: success
14:09:39:443 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:09:39:451 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:39:463 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:39:464 -> Flags: 0
14:09:40:472 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:40:485 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:40:485 -> Flags: 0
14:09:41:493 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:41:506 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:41:506 -> Flags: 0
14:09:42:514 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:42:527 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:42:527 -> Flags: 0
14:09:43:535 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:43:548 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:43:548 -> Flags: 0
14:09:44:556 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:44:569 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:44:569 -> Flags: 0
14:09:45:577 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:45:590 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:45:590 -> Flags: 0
14:09:46:598 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:46:610 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:46:611 -> Flags: 0
14:09:47:619 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:47:631 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:47:632 -> Flags: 0
14:09:48:640 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:48:652 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:48:652 -> Flags: 0
14:09:49:661 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:49:674 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:49:674 -> Flags: 0
14:09:50:682 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:50:694 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:50:695 -> Flags: 0
14:09:51:703 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:51:715 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:51:716 -> Flags: 0
14:09:52:724 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:57:724 -> Get Acknowladgement Response > 0x00 0xFF
14:09:57:724 -> Error getting acknowledgement flags!
14:09:58:733 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:58:745 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:58:746 -> Flags: 0
14:09:59:754 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:09:59:766 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:09:59:767 -> Flags: 0
14:10:00:775 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:00:787 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:00:788 -> Flags: 0
14:10:01:795 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:01:808 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:01:809 -> Flags: 0
14:10:02:817 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:02:829 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:02:829 -> Flags: 0
14:10:03:838 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:03:850 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:03:851 -> Flags: 0
14:10:04:859 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:04:871 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:04:871 -> Flags: 0
14:10:05:880 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:05:893 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:05:893 -> Flags: 0
14:10:06:901 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:06:914 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:06:914 -> Flags: 0
14:10:07:923 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:07:935 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:07:936 -> Flags: 0
14:10:08:944 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:08:956 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:08:956 -> Flags: 0
14:10:09:964 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:09:977 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:09:978 -> Flags: 0
14:10:10:985 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:10:998 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:10:998 -> Flags: 0
14:10:12:006 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:12:019 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:12:019 -> Flags: 0
14:10:13:027 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:13:040 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:13:041 -> Flags: 0
14:10:14:048 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:14:061 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:14:061 -> Flags: 0
14:10:15:069 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:15:082 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:15:082 -> Flags: 0
14:10:16:090 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:16:103 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:16:104 -> Flags: 0
14:10:17:111 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:17:123 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:17:124 -> Flags: 0
14:10:18:132 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:18:144 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:18:145 -> Flags: 0
14:10:19:153 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:10:19:166 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:10:19:166 -> Flags: 0

View File

@ -1,400 +0,0 @@
14:10:32:936 -> No PM sensor detected on Serial0
14:10:32:936 -> initializing PM sensor
14:10:32:936 -> cleared 0 byte(s)
14:10:32:936 -> setting active mode
14:10:32:936 -> 7 byte(s) written
14:10:36:936 -> No PM sensor detected on Serial1
14:10:36:936 -> Firmware Mode: 0-1PS
14:10:36:957 -> Set S8 AbcDays successful
14:10:36:958 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
14:10:36:958 -> [ApiClient] Info: begin
14:10:37:002 -> [WifiConnector] Info: Connecting to WiFi...
14:10:37:003 -> *wm:AutoConnect
14:10:37:003 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
14:10:37:505 -> E (10413) wifi:sta is connecting, return error
14:10:37:506 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
14:10:44:921 -> *wm:AutoConnect: SUCCESS
14:10:44:921 -> *wm:STA IP Address: 192.168.100.127
14:10:44:921 -> [WifiConnector] Info: Wait for configure portal
14:10:44:921 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:10:44:934 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:10:47:498 -> MQTT is not configured, skipping initialization of MQTT client
14:10:47:498 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:10:47:498 -> [ApiClient] Info: DATA: {"wifi":-64,"boot":0}
14:10:47:498 -> [ApiClient] Info: Return code: 200
14:10:53:500 ->
14:10:53:500 -> firmwareCheckForUpdate:
14:10:53:500 -> firmwareCheckForUpdate: Perform
14:10:53:501 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:10:54:326 -> Firmware update skipped, the server returned 400
14:10:54:327 -> 3
14:10:54:327 -> OTA message:
14:10:54:327 ->
14:10:54:950 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:10:54:950 -> [ApiClient] Info: Return code: 200
14:10:54:951 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:10:54:953 -> [Configure] Info: Parse configure success
14:10:54:954 -> [Configure] Info: Detected new firmware version: 3.1.9
14:10:59:968 -> Get CO2 failed: 1
14:11:03:989 -> CO2 (ppm): 432
14:11:08:011 -> CO2 (ppm): 420
14:11:12:031 -> CO2 (ppm): 413
14:11:16:052 -> CO2 (ppm): 409
14:11:20:073 -> CO2 (ppm): 406
14:11:24:094 -> CO2 (ppm): 401
14:11:28:332 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:11:28:332 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":401,"boot":0,"bootCount":0}
14:11:28:332 -> [ApiClient] Info: Return code: 200
14:11:28:333 ->
14:11:28:333 -> Online mode and isPostToAirGradient = true: watchdog reset
14:11:28:333 ->
14:11:28:355 -> CO2 (ppm): 402
14:11:28:380 -> External watchdog feed!
14:11:32:376 -> CO2 (ppm): 395
14:11:36:397 -> CO2 (ppm): 393
14:11:40:418 -> CO2 (ppm): 393
14:11:44:439 -> CO2 (ppm): 393
14:11:48:460 -> CO2 (ppm): 393
14:11:52:481 -> CO2 (ppm): 393
14:11:55:569 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:11:55:569 -> [ApiClient] Info: Return code: 200
14:11:55:570 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:11:55:572 -> [Configure] Info: Parse configure success
14:11:55:572 -> [Configure] Info: Detected new firmware version: 3.1.9
14:11:56:501 -> CO2 (ppm): 393
14:12:00:523 -> CO2 (ppm): 393
14:12:04:543 -> CO2 (ppm): 392
14:12:08:565 -> CO2 (ppm): 392
14:12:12:585 -> CO2 (ppm): 392
14:12:16:606 -> CO2 (ppm): 392
14:12:20:627 -> CO2 (ppm): 392
14:12:24:648 -> CO2 (ppm): 392
14:12:29:363 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:12:29:363 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":392,"boot":1,"bootCount":1}
14:12:29:363 -> [ApiClient] Info: Return code: 200
14:12:29:364 ->
14:12:29:364 -> Online mode and isPostToAirGradient = true: watchdog reset
14:12:29:364 ->
14:12:29:386 -> CO2 (ppm): 392
14:12:29:411 -> External watchdog feed!
14:12:33:407 -> CO2 (ppm): 392
14:12:37:428 -> CO2 (ppm): 392
14:12:41:449 -> CO2 (ppm): 391
14:12:45:470 -> CO2 (ppm): 391
14:12:49:491 -> CO2 (ppm): 391
14:12:53:512 -> CO2 (ppm): 391
14:12:56:195 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:12:56:195 -> [ApiClient] Info: Return code: 200
14:12:56:202 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:12:56:203 -> [Configure] Info: Parse configure success
14:12:56:203 -> [Configure] Info: Detected new firmware version: 3.1.9
14:12:57:533 -> CO2 (ppm): 391
14:13:01:553 -> CO2 (ppm): 391
14:13:05:574 -> CO2 (ppm): 391
14:13:09:596 -> CO2 (ppm): 391
14:13:13:617 -> CO2 (ppm): 391
14:13:17:638 -> CO2 (ppm): 391
14:13:21:658 -> CO2 (ppm): 391
14:13:25:679 -> CO2 (ppm): 392
14:13:30:353 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:13:30:353 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":392,"boot":2,"bootCount":2}
14:13:30:353 -> [ApiClient] Info: Return code: 200
14:13:30:354 ->
14:13:30:354 -> Online mode and isPostToAirGradient = true: watchdog reset
14:13:30:354 ->
14:13:30:375 -> CO2 (ppm): 392
14:13:30:400 -> External watchdog feed!
14:13:34:396 -> CO2 (ppm): 392
14:13:38:417 -> CO2 (ppm): 392
14:13:42:438 -> CO2 (ppm): 392
14:13:46:459 -> CO2 (ppm): 392
14:13:50:480 -> CO2 (ppm): 393
14:13:54:501 -> CO2 (ppm): 393
14:13:56:811 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:13:56:811 -> [ApiClient] Info: Return code: 200
14:13:56:813 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:13:56:814 -> [Configure] Info: Parse configure success
14:13:56:815 -> [Configure] Info: Detected new firmware version: 3.1.9
14:13:58:522 -> CO2 (ppm): 393
14:14:02:543 -> CO2 (ppm): 393
14:14:06:564 -> CO2 (ppm): 392
14:14:10:642 -> CO2 (ppm): 392
14:14:14:663 -> CO2 (ppm): 392
14:14:18:684 -> CO2 (ppm): 392
14:14:22:705 -> CO2 (ppm): 392
14:14:26:726 -> CO2 (ppm): 392
14:14:31:321 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:14:31:321 -> [ApiClient] Info: DATA: {"wifi":-51,"rco2":392,"boot":3,"bootCount":3}
14:14:31:321 -> [ApiClient] Info: Return code: 200
14:14:31:322 ->
14:14:31:322 -> Online mode and isPostToAirGradient = true: watchdog reset
14:14:31:322 ->
14:14:31:342 -> CO2 (ppm): 392
14:14:31:367 -> External watchdog feed!
14:14:35:363 -> CO2 (ppm): 392
14:14:39:384 -> CO2 (ppm): 392
14:14:43:405 -> CO2 (ppm): 394
14:14:47:426 -> CO2 (ppm): 398
14:14:51:447 -> CO2 (ppm): 399
14:14:55:468 -> CO2 (ppm): 399
14:14:57:431 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:14:57:431 -> [ApiClient] Info: Return code: 200
14:14:57:433 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:14:57:434 -> [Configure] Info: Parse configure success
14:14:57:435 -> [Configure] Info: co2CalibrationRequested: True
14:14:57:435 -> [Configure] Info: Detected new firmware version: 3.1.9
14:14:57:437 -> [StateMachine] Info: CO2 Calibration
14:14:57:437 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:14:58:437 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:14:59:437 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:15:00:437 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:15:01:437 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:15:04:445 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:15:04:459 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:15:04:467 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:15:04:482 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:15:04:482 -> [StateMachine] Info: CO2 Calibration: success
14:15:05:482 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:15:05:490 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:05:504 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:05:505 -> Flags: 0
14:15:06:512 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:06:525 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:06:525 -> Flags: 0
14:15:07:533 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:07:546 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:07:546 -> Flags: 0
14:15:08:554 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:08:567 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:08:567 -> Flags: 0
14:15:09:575 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:09:587 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:09:588 -> Flags: 0
14:15:10:596 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:10:608 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:10:609 -> Flags: 0
14:15:11:617 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:11:630 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:11:630 -> Flags: 0
14:15:12:638 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:12:651 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:12:651 -> Flags: 0
14:15:13:659 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:13:671 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:13:672 -> Flags: 0
14:15:14:680 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:14:693 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:14:693 -> Flags: 0
14:15:15:701 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:15:713 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:15:714 -> Flags: 0
14:15:16:722 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:16:734 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:16:735 -> Flags: 0
14:15:17:743 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:17:755 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:17:756 -> Flags: 0
14:15:18:764 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:18:776 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:18:777 -> Flags: 0
14:15:19:785 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:19:797 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:19:798 -> Flags: 0
14:15:20:806 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:20:818 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:20:819 -> Flags: 0
14:15:21:827 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:21:839 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:21:840 -> Flags: 0
14:15:22:848 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:22:860 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:22:861 -> Flags: 0
14:15:23:869 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:23:881 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:23:882 -> Flags: 0
14:15:24:890 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:24:902 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:24:903 -> Flags: 0
14:15:25:911 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:25:923 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:25:923 -> Flags: 0
14:15:26:933 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:26:944 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:26:945 -> Flags: 0
14:15:27:953 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:27:965 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:27:966 -> Flags: 0
14:15:28:974 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:28:986 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:28:987 -> Flags: 0
14:15:29:995 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:30:007 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:30:008 -> Flags: 0
14:15:31:016 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:31:028 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:31:029 -> Flags: 0
14:15:32:037 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:32:049 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:32:050 -> Flags: 0
14:15:33:058 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:33:070 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:33:070 -> Flags: 0
14:15:34:079 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:34:091 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:34:092 -> Flags: 0
14:15:35:100 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:35:112 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:35:112 -> Flags: 0
14:15:36:121 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:36:133 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:36:133 -> Flags: 0
14:15:37:141 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:37:154 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:37:154 -> Flags: 0
14:15:38:163 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:38:175 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:38:176 -> Flags: 0
14:15:39:184 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:39:196 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:39:196 -> Flags: 0
14:15:40:205 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:40:217 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:40:217 -> Flags: 0
14:15:41:226 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:41:238 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:41:238 -> Flags: 0
14:15:42:247 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:42:259 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:42:259 -> Flags: 0
14:15:43:268 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:43:280 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:43:281 -> Flags: 0
14:15:44:288 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:44:301 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:44:301 -> Flags: 0
14:15:45:310 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:45:322 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:45:323 -> Flags: 0
14:15:46:331 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:46:370 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:46:370 -> Flags: 0
14:15:47:378 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:47:391 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:47:392 -> Flags: 0
14:15:48:400 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:48:412 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:48:413 -> Flags: 0
14:15:49:420 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:49:433 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:49:433 -> Flags: 0
14:15:50:441 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:50:454 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:50:454 -> Flags: 0
14:15:51:463 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:51:475 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:51:475 -> Flags: 0
14:15:52:484 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:52:496 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:52:496 -> Flags: 0
14:15:53:505 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:53:517 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:53:517 -> Flags: 0
14:15:54:525 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:54:538 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:54:539 -> Flags: 0
14:15:55:547 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:55:559 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:55:559 -> Flags: 0
14:15:56:567 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:56:580 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:56:580 -> Flags: 0
14:15:57:588 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:57:601 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:57:601 -> Flags: 0
14:15:58:609 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:58:622 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:58:622 -> Flags: 0
14:15:59:631 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:15:59:643 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:15:59:643 -> Flags: 0
14:16:00:651 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:00:664 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:00:664 -> Flags: 0
14:16:01:672 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:01:685 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:01:685 -> Flags: 0
14:16:02:693 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:02:706 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:02:706 -> Flags: 0
14:16:03:714 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:03:727 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:03:727 -> Flags: 0
14:16:04:736 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:04:748 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:04:748 -> Flags: 0
14:16:05:756 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:05:769 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:05:770 -> Flags: 0
14:16:06:777 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:06:790 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:06:790 -> Flags: 0
14:16:07:798 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:07:811 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:07:811 -> Flags: 0
14:16:08:819 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:08:832 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:08:832 -> Flags: 0
14:16:09:840 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:09:853 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:09:853 -> Flags: 0
14:16:10:861 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:10:874 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:10:874 -> Flags: 0
14:16:11:882 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:11:895 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:11:895 -> Flags: 0
14:16:12:903 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:12:916 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:12:916 -> Flags: 0
14:16:13:924 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:13:937 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:13:937 -> Flags: 0
14:16:14:945 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:14:958 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:14:958 -> Flags: 0
14:16:15:966 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:15:978 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:15:979 -> Flags: 0
14:16:16:987 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:17:000 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:17:000 -> Flags: 0
14:16:18:008 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:18:021 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:18:021 -> Flags: 0
14:16:19:029 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:19:041 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:19:042 -> Flags: 0
14:16:20:050 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:20:063 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:20:063 -> Flags: 0
14:16:21:071 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:21:083 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:21:084 -> Flags: 0
14:16:22:092 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:22:104 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:22:105 -> Flags: 0
14:16:23:113 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:23:126 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:23:126 -> Flags: 0
14:16:24:134 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:24:147 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:24:147 -> Flags: 0
14:16:25:155 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:25:167 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:25:168 -> Flags: 0
14:16:26:176 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:26:189 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:26:189 -> Flags: 0
14:16:27:197 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:16:27:210 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:16:27:210 -> Flags: 0

View File

@ -1,251 +0,0 @@
14:16:36:451 -> Detected OPEN_AIR_OUTDOOR
14:16:36:451 -> Firmware Version: 3.1.9-dirty
14:16:36:597 -> Found S8 on Serial1
14:16:36:597 -> Init SGP41 failuire
14:16:36:597 -> SGP sensor not found
14:16:36:597 -> Can not detect SGP run mode 'O-1PS'
14:16:36:598 -> initializing PM sensor
14:16:36:598 -> cleared 0 byte(s)
14:16:36:598 -> setting active mode
14:16:36:598 -> 7 byte(s) written
14:16:40:598 -> No PM sensor detected on Serial0
14:16:40:598 -> initializing PM sensor
14:16:40:598 -> cleared 0 byte(s)
14:16:40:598 -> setting active mode
14:16:40:598 -> 7 byte(s) written
14:16:44:597 -> No PM sensor detected on Serial1
14:16:44:598 -> Firmware Mode: 0-1PS
14:16:44:618 -> Set S8 AbcDays successful
14:16:44:619 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
14:16:44:619 -> [ApiClient] Info: begin
14:16:44:664 -> [WifiConnector] Info: Connecting to WiFi...
14:16:44:664 -> *wm:AutoConnect
14:16:44:664 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
14:16:45:167 -> E (10413) wifi:sta is connecting, return error
14:16:45:167 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
14:16:52:584 -> *wm:AutoConnect: SUCCESS
14:16:52:584 -> *wm:STA IP Address: 192.168.100.127
14:16:52:584 -> [WifiConnector] Info: Wait for configure portal
14:16:52:584 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:16:52:597 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:16:52:598 -> MQTT is not configured, skipping initialization of MQTT client
14:16:55:092 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:16:55:092 -> [ApiClient] Info: DATA: {"wifi":-67,"boot":0}
14:16:55:093 -> [ApiClient] Info: Return code: 200
14:17:01:093 ->
14:17:01:093 -> firmwareCheckForUpdate:
14:17:01:093 -> firmwareCheckForUpdate: Perform
14:17:01:094 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:17:01:737 -> Firmware update skipped, the server returned 400
14:17:01:738 -> 3
14:17:01:738 -> OTA message:
14:17:01:738 ->
14:17:02:371 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:17:02:371 -> [ApiClient] Info: Return code: 200
14:17:02:372 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:17:02:374 -> [Configure] Info: Parse configure success
14:17:02:375 -> [Configure] Info: Detected new firmware version: 3.1.9
14:17:07:390 -> Get CO2 failed: 1
14:17:11:410 -> CO2 (ppm): 469
14:17:19:479 -> CO2 (ppm): 448
14:17:19:479 -> CO2 (ppm): 442
14:17:27:521 -> CO2 (ppm): 428
14:17:27:521 -> CO2 (ppm): 422
14:17:31:542 -> CO2 (ppm): 423
14:17:36:092 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:17:36:092 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":423,"boot":0,"bootCount":0}
14:17:36:092 -> [ApiClient] Info: Return code: 200
14:17:36:093 ->
14:17:36:093 -> Online mode and isPostToAirGradient = true: watchdog reset
14:17:36:093 ->
14:17:36:115 -> CO2 (ppm): 417
14:17:36:140 -> External watchdog feed!
14:17:40:136 -> CO2 (ppm): 418
14:17:44:157 -> CO2 (ppm): 417
14:17:48:178 -> CO2 (ppm): 417
14:17:52:199 -> CO2 (ppm): 415
14:17:56:220 -> CO2 (ppm): 414
14:18:00:241 -> CO2 (ppm): 413
14:18:02:980 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:18:02:980 -> [ApiClient] Info: Return code: 200
14:18:02:981 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:18:02:983 -> [Configure] Info: Parse configure success
14:18:02:984 -> [Configure] Info: Detected new firmware version: 3.1.9
14:18:04:262 -> CO2 (ppm): 410
14:18:08:282 -> CO2 (ppm): 407
14:18:12:303 -> CO2 (ppm): 406
14:18:16:325 -> CO2 (ppm): 404
14:18:20:345 -> CO2 (ppm): 404
14:18:24:366 -> CO2 (ppm): 405
14:18:28:387 -> CO2 (ppm): 407
14:18:32:408 -> CO2 (ppm): 408
14:18:37:079 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:18:37:079 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":408,"boot":1,"bootCount":1}
14:18:37:079 -> [ApiClient] Info: Return code: 200
14:18:37:080 ->
14:18:37:080 -> Online mode and isPostToAirGradient = true: watchdog reset
14:18:37:080 ->
14:18:37:103 -> CO2 (ppm): 408
14:18:37:127 -> External watchdog feed!
14:18:41:123 -> CO2 (ppm): 408
14:18:45:144 -> CO2 (ppm): 407
14:18:49:165 -> CO2 (ppm): 406
14:18:53:186 -> CO2 (ppm): 406
14:18:57:207 -> CO2 (ppm): 405
14:19:01:228 -> CO2 (ppm): 404
14:19:03:610 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:19:03:610 -> [ApiClient] Info: Return code: 200
14:19:03:612 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:19:03:614 -> [Configure] Info: Parse configure success
14:19:03:615 -> [Configure] Info: Detected new firmware version: 3.1.9
14:19:05:249 -> CO2 (ppm): 403
14:19:09:269 -> CO2 (ppm): 402
14:19:13:290 -> CO2 (ppm): 401
14:19:17:311 -> CO2 (ppm): 400
14:19:21:332 -> CO2 (ppm): 399
14:19:29:374 -> CO2 (ppm): 398
14:19:29:374 -> CO2 (ppm): 398
14:19:33:395 -> CO2 (ppm): 397
14:19:38:110 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:19:38:110 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":397,"boot":2,"bootCount":2}
14:19:38:110 -> [ApiClient] Info: Return code: 200
14:19:38:111 ->
14:19:38:111 -> Online mode and isPostToAirGradient = true: watchdog reset
14:19:38:111 ->
14:19:38:133 -> CO2 (ppm): 398
14:19:38:158 -> External watchdog feed!
14:19:42:154 -> CO2 (ppm): 397
14:19:46:175 -> CO2 (ppm): 398
14:19:54:217 -> CO2 (ppm): 397
14:19:54:217 -> CO2 (ppm): 397
14:19:58:238 -> CO2 (ppm): 396
14:20:02:259 -> CO2 (ppm): 396
14:20:04:259 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:20:04:259 -> [ApiClient] Info: Return code: 200
14:20:04:260 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:20:04:262 -> [Configure] Info: Parse configure success
14:20:04:262 -> [Configure] Info: Detected new firmware version: 3.1.9
14:20:10:300 -> CO2 (ppm): 396
14:20:10:300 -> CO2 (ppm): 396
14:20:14:322 -> CO2 (ppm): 405
14:20:18:342 -> CO2 (ppm): 412
14:20:22:363 -> CO2 (ppm): 415
14:20:26:384 -> CO2 (ppm): 417
14:20:30:405 -> CO2 (ppm): 418
14:20:34:426 -> CO2 (ppm): 417
14:20:39:140 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:20:39:140 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":417,"boot":3,"bootCount":3}
14:20:39:140 -> [ApiClient] Info: Return code: 200
14:20:39:141 ->
14:20:39:141 -> Online mode and isPostToAirGradient = true: watchdog reset
14:20:39:141 ->
14:20:39:163 -> CO2 (ppm): 413
14:20:39:188 -> External watchdog feed!
14:20:43:184 -> CO2 (ppm): 410
14:20:47:205 -> CO2 (ppm): 408
14:20:51:226 -> CO2 (ppm): 406
14:20:55:247 -> CO2 (ppm): 404
14:20:59:268 -> CO2 (ppm): 404
14:21:03:289 -> CO2 (ppm): 403
14:21:04:849 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:21:04:849 -> [ApiClient] Info: Return code: 200
14:21:04:850 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:21:04:852 -> [Configure] Info: Parse configure success
14:21:04:853 -> [Configure] Info: Detected new firmware version: 3.1.9
14:21:07:310 -> CO2 (ppm): 408
14:21:11:331 -> CO2 (ppm): 414
14:21:15:352 -> CO2 (ppm): 418
14:21:19:373 -> CO2 (ppm): 420
14:21:27:414 -> CO2 (ppm): 420
14:21:27:414 -> CO2 (ppm): 420
14:21:31:436 -> CO2 (ppm): 418
14:21:35:456 -> CO2 (ppm): 417
14:21:40:170 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:21:40:170 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":417,"boot":4,"bootCount":4}
14:21:40:170 -> [ApiClient] Info: Return code: 200
14:21:40:171 ->
14:21:40:171 -> Online mode and isPostToAirGradient = true: watchdog reset
14:21:40:171 ->
14:21:40:193 -> CO2 (ppm): 415
14:21:40:218 -> External watchdog feed!
14:21:44:214 -> CO2 (ppm): 413
14:21:48:235 -> CO2 (ppm): 410
14:21:52:256 -> CO2 (ppm): 409
14:21:56:277 -> CO2 (ppm): 407
14:22:00:298 -> CO2 (ppm): 405
14:22:04:319 -> CO2 (ppm): 429
14:22:05:564 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:22:05:564 -> [ApiClient] Info: Return code: 200
14:22:05:566 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:22:05:567 -> [Configure] Info: Parse configure success
14:22:05:567 -> [Configure] Info: co2CalibrationRequested: True
14:22:05:568 -> [Configure] Info: Detected new firmware version: 3.1.9
14:22:05:570 -> [StateMachine] Info: CO2 Calibration
14:22:05:570 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:22:06:570 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:22:07:570 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:22:08:570 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:22:09:570 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:22:12:578 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:22:12:592 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:22:12:600 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:22:12:614 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:22:12:614 -> [StateMachine] Info: CO2 Calibration: success
14:22:13:614 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:22:13:622 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:13:636 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:13:636 -> Flags: 0
14:22:14:644 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:14:656 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:14:657 -> Flags: 0
14:22:15:665 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:15:677 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:15:678 -> Flags: 0
14:22:16:686 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:16:699 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:16:699 -> Flags: 0
14:22:17:707 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:17:720 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:17:720 -> Flags: 0
14:22:18:728 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:18:741 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:18:741 -> Flags: 0
14:22:19:749 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:19:762 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:19:762 -> Flags: 0
14:22:20:770 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:20:783 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:20:783 -> Flags: 0
14:22:21:791 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:21:804 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:21:804 -> Flags: 0
14:22:22:812 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:22:825 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:22:826 -> Flags: 0
14:22:23:833 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:23:846 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:23:846 -> Flags: 0
14:22:24:854 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:24:866 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:24:867 -> Flags: 0
14:22:25:875 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:25:887 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:25:888 -> Flags: 0
14:22:26:896 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:26:908 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:26:909 -> Flags: 0
14:22:27:917 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:27:929 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:27:930 -> Flags: 0
14:22:28:938 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:28:950 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:28:951 -> Flags: 0
14:22:29:959 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:29:971 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:29:972 -> Flags: 0
14:22:30:980 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:30:992 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:30:993 -> Flags: 0
14:22:32:001 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:22:32:013 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:22:32:013 -> Flags: 0

View File

@ -1,293 +0,0 @@
14:22:56:536 -> *wm:AutoConnect: SUCCESS
14:22:56:536 -> *wm:STA IP Address: 192.168.100.127
14:22:56:537 -> [WifiConnector] Info: Wait for configure portal
14:22:56:537 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:22:56:550 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:22:56:550 -> MQTT is not configured, skipping initialization of MQTT client
14:22:59:122 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:22:59:122 -> [ApiClient] Info: DATA: {"wifi":-58,"boot":0}
14:22:59:122 -> [ApiClient] Info: Return code: 200
14:23:05:123 ->
14:23:05:123 -> firmwareCheckForUpdate:
14:23:05:123 -> firmwareCheckForUpdate: Perform
14:23:05:124 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:23:05:767 -> Firmware update skipped, the server returned 400
14:23:05:768 -> 3
14:23:05:768 -> OTA message:
14:23:05:768 ->
14:23:06:391 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:23:06:391 -> [ApiClient] Info: Return code: 200
14:23:06:392 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:23:06:393 -> [Configure] Info: Parse configure success
14:23:06:394 -> [Configure] Info: Detected new firmware version: 3.1.9
14:23:11:409 -> Get CO2 failed: 1
14:23:16:439 -> [StateMachine] Info: Setting S8 from off to 8 days successful
14:23:16:465 -> CO2 (ppm): 0
14:23:20:486 -> CO2 (ppm): 634
14:23:24:507 -> CO2 (ppm): 582
14:23:28:528 -> CO2 (ppm): 546
14:23:32:548 -> CO2 (ppm): 515
14:23:36:570 -> CO2 (ppm): 498
14:23:39:977 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:23:39:977 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":498,"boot":0,"bootCount":0}
14:23:39:977 -> [ApiClient] Info: Return code: 200
14:23:39:978 ->
14:23:39:979 -> Online mode and isPostToAirGradient = true: watchdog reset
14:23:39:979 ->
14:23:40:003 -> External watchdog feed!
14:23:40:591 -> CO2 (ppm): 478
14:23:44:611 -> CO2 (ppm): 462
14:23:48:633 -> CO2 (ppm): 456
14:23:52:653 -> CO2 (ppm): 444
14:23:56:674 -> CO2 (ppm): 443
14:24:00:695 -> CO2 (ppm): 442
14:24:04:716 -> CO2 (ppm): 438
14:24:07:011 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:24:07:012 -> [ApiClient] Info: Return code: 200
14:24:07:013 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:24:07:014 -> [Configure] Info: Parse configure success
14:24:07:015 -> [Configure] Info: Detected new firmware version: 3.1.9
14:24:08:737 -> CO2 (ppm): 453
14:24:12:758 -> CO2 (ppm): 485
14:24:16:779 -> CO2 (ppm): 516
14:24:20:800 -> CO2 (ppm): 533
14:24:24:822 -> CO2 (ppm): 539
14:24:28:842 -> CO2 (ppm): 536
14:24:32:863 -> CO2 (ppm): 527
14:24:36:884 -> CO2 (ppm): 516
14:24:41:007 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:24:41:008 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":516,"boot":1,"bootCount":1}
14:24:41:008 -> [ApiClient] Info: Return code: 200
14:24:41:009 ->
14:24:41:009 -> Online mode and isPostToAirGradient = true: watchdog reset
14:24:41:009 ->
14:24:41:031 -> CO2 (ppm): 503
14:24:41:055 -> External watchdog feed!
14:24:45:052 -> CO2 (ppm): 490
14:24:49:073 -> CO2 (ppm): 478
14:24:53:093 -> CO2 (ppm): 466
14:24:57:115 -> CO2 (ppm): 457
14:25:01:135 -> CO2 (ppm): 447
14:25:05:156 -> CO2 (ppm): 440
14:25:07:641 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:25:07:641 -> [ApiClient] Info: Return code: 200
14:25:07:642 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:25:07:643 -> [Configure] Info: Parse configure success
14:25:07:644 -> [Configure] Info: Detected new firmware version: 3.1.9
14:25:09:177 -> CO2 (ppm): 433
14:25:13:198 -> CO2 (ppm): 428
14:25:17:219 -> CO2 (ppm): 424
14:25:21:240 -> CO2 (ppm): 418
14:25:25:261 -> CO2 (ppm): 414
14:25:29:282 -> CO2 (ppm): 412
14:25:33:303 -> CO2 (ppm): 410
14:25:37:324 -> CO2 (ppm): 408
14:25:42:048 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:25:42:048 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":408,"boot":2,"bootCount":2}
14:25:42:062 -> [ApiClient] Info: Return code: 200
14:25:42:063 ->
14:25:42:063 -> Online mode and isPostToAirGradient = true: watchdog reset
14:25:42:063 ->
14:25:42:072 -> CO2 (ppm): 405
14:25:42:097 -> External watchdog feed!
14:25:46:093 -> CO2 (ppm): 405
14:25:50:114 -> CO2 (ppm): 406
14:25:54:135 -> CO2 (ppm): 406
14:25:58:156 -> CO2 (ppm): 405
14:26:02:176 -> CO2 (ppm): 405
14:26:06:197 -> CO2 (ppm): 404
14:26:08:252 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:26:08:252 -> [ApiClient] Info: Return code: 200
14:26:08:253 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:26:08:255 -> [Configure] Info: Parse configure success
14:26:08:255 -> [Configure] Info: Detected new firmware version: 3.1.9
14:26:14:239 -> CO2 (ppm): 404
14:26:14:239 -> CO2 (ppm): 403
14:26:18:260 -> CO2 (ppm): 402
14:26:26:302 -> CO2 (ppm): 403
14:26:26:302 -> CO2 (ppm): 403
14:26:30:323 -> CO2 (ppm): 403
14:26:34:344 -> CO2 (ppm): 403
14:26:38:365 -> CO2 (ppm): 403
14:26:43:018 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:26:43:018 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":403,"boot":3,"bootCount":3}
14:26:43:018 -> [ApiClient] Info: Return code: 200
14:26:43:019 ->
14:26:43:019 -> Online mode and isPostToAirGradient = true: watchdog reset
14:26:43:019 ->
14:26:43:041 -> CO2 (ppm): 403
14:26:43:066 -> External watchdog feed!
14:26:47:062 -> CO2 (ppm): 403
14:26:51:083 -> CO2 (ppm): 404
14:26:55:103 -> CO2 (ppm): 445
14:26:59:125 -> CO2 (ppm): 488
14:27:03:145 -> CO2 (ppm): 524
14:27:07:166 -> CO2 (ppm): 547
14:27:08:871 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:27:08:871 -> [ApiClient] Info: Return code: 200
14:27:08:873 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:27:08:874 -> [Configure] Info: Parse configure success
14:27:08:875 -> [Configure] Info: Detected new firmware version: 3.1.9
14:27:11:187 -> CO2 (ppm): 563
14:27:15:209 -> CO2 (ppm): 603
14:27:19:229 -> CO2 (ppm): 654
14:27:23:250 -> CO2 (ppm): 712
14:27:27:271 -> CO2 (ppm): 746
14:27:31:292 -> CO2 (ppm): 753
14:27:35:313 -> CO2 (ppm): 741
14:27:39:334 -> CO2 (ppm): 719
14:27:43:946 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:27:43:946 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":719,"boot":4,"bootCount":4}
14:27:43:946 -> [ApiClient] Info: Return code: 200
14:27:43:968 ->
14:27:43:968 -> Online mode and isPostToAirGradient = true: watchdog reset
14:27:43:968 ->
14:27:43:968 -> CO2 (ppm): 692
14:27:43:993 -> External watchdog feed!
14:27:47:989 -> CO2 (ppm): 660
14:27:52:010 -> CO2 (ppm): 630
14:27:56:031 -> CO2 (ppm): 600
14:28:00:052 -> CO2 (ppm): 574
14:28:04:073 -> CO2 (ppm): 555
14:28:08:094 -> CO2 (ppm): 548
14:28:09:493 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:28:09:493 -> [ApiClient] Info: Return code: 200
14:28:09:494 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:28:09:497 -> [Configure] Info: Parse configure success
14:28:12:115 -> [Configure] Info: Detected new firmware version: 3.1.9
14:28:12:115 -> CO2 (ppm): 551
14:28:16:136 -> CO2 (ppm): 553
14:28:20:157 -> CO2 (ppm): 550
14:28:24:178 -> CO2 (ppm): 543
14:28:28:199 -> CO2 (ppm): 534
14:28:32:220 -> CO2 (ppm): 523
14:28:36:240 -> CO2 (ppm): 511
14:28:40:261 -> CO2 (ppm): 498
14:28:44:917 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:28:44:917 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":498,"boot":5,"bootCount":5}
14:28:44:917 -> [ApiClient] Info: Return code: 200
14:28:44:918 ->
14:28:44:918 -> Online mode and isPostToAirGradient = true: watchdog reset
14:28:44:918 ->
14:28:44:940 -> CO2 (ppm): 476
14:28:44:965 -> External watchdog feed!
14:28:48:961 -> CO2 (ppm): 466
14:28:52:982 -> CO2 (ppm): 458
14:28:57:003 -> CO2 (ppm): 450
14:29:01:024 -> CO2 (ppm): 442
14:29:05:045 -> CO2 (ppm): 435
14:29:09:066 -> CO2 (ppm): 432
14:29:10:114 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:29:10:114 -> [ApiClient] Info: Return code: 200
14:29:10:115 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:29:10:117 -> [Configure] Info: Parse configure success
14:29:10:117 -> [Configure] Info: co2CalibrationRequested: True
14:29:10:118 -> [Configure] Info: Detected new firmware version: 3.1.9
14:29:10:119 -> [StateMachine] Info: CO2 Calibration
14:29:10:120 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:29:11:119 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:29:12:119 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:29:13:119 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:29:14:119 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:29:17:128 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:29:17:141 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:29:17:150 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:29:17:164 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:29:17:165 -> [StateMachine] Info: CO2 Calibration: success
14:29:18:165 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:29:18:173 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:18:186 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:18:186 -> Flags: 0
14:29:19:195 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:19:207 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:19:208 -> Flags: 0
14:29:20:215 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:20:228 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:20:228 -> Flags: 0
14:29:21:237 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:21:249 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:21:249 -> Flags: 0
14:29:22:258 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:22:270 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:22:270 -> Flags: 0
14:29:23:279 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:23:291 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:23:291 -> Flags: 0
14:29:24:300 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:24:312 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:24:313 -> Flags: 0
14:29:25:320 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:25:333 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:25:333 -> Flags: 0
14:29:26:341 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:26:354 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:26:354 -> Flags: 0
14:29:27:362 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:27:375 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:27:375 -> Flags: 0
14:29:28:384 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:28:396 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:28:396 -> Flags: 0
14:29:29:404 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:29:417 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:29:417 -> Flags: 0
14:29:30:425 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:30:438 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:30:438 -> Flags: 0
14:29:31:446 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:31:459 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:31:459 -> Flags: 0
14:29:32:468 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:32:480 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:32:480 -> Flags: 0
14:29:33:489 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:33:501 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:33:501 -> Flags: 0
14:29:34:509 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:34:522 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:34:522 -> Flags: 0
14:29:35:530 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:35:543 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:35:543 -> Flags: 0
14:29:36:551 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:36:564 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:36:564 -> Flags: 0
14:29:37:574 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:37:585 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:37:585 -> Flags: 0
14:29:38:594 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:38:606 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:38:606 -> Flags: 0
14:29:39:614 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:39:627 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:39:627 -> Flags: 0
14:29:40:635 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:40:650 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:40:650 -> Flags: 0
14:29:41:656 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:41:669 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:41:675 -> Flags: 0
14:29:42:677 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:42:690 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:42:690 -> Flags: 0
14:29:43:698 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:43:711 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:43:711 -> Flags: 0
14:29:44:719 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:44:732 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:44:732 -> Flags: 0
14:29:45:740 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:45:753 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:45:753 -> Flags: 0
14:29:46:761 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:46:774 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:46:774 -> Flags: 0
14:29:47:782 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:47:795 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:47:795 -> Flags: 0
14:29:48:803 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:48:816 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:48:816 -> Flags: 0
14:29:49:824 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:29:49:837 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:29:49:838 -> Flags: 0

View File

@ -1,445 +0,0 @@
14:30:01:902 -> No PM sensor detected on Serial0
14:30:01:902 -> initializing PM sensor
14:30:01:902 -> cleared 0 byte(s)
14:30:01:903 -> setting active mode
14:30:01:903 -> 7 byte(s) written
14:30:05:902 -> No PM sensor detected on Serial1
14:30:05:902 -> Firmware Mode: 0-1PS
14:30:05:922 -> Set S8 AbcDays successful
14:30:05:923 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
14:30:05:923 -> [ApiClient] Info: begin
14:30:05:968 -> [WifiConnector] Info: Connecting to WiFi...
14:30:05:968 -> *wm:AutoConnect
14:30:05:968 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
14:30:06:471 -> E (10413) wifi:sta is connecting, return error
14:30:06:472 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
14:30:13:787 -> *wm:AutoConnect: SUCCESS
14:30:13:787 -> *wm:STA IP Address: 192.168.100.127
14:30:13:787 -> [WifiConnector] Info: Wait for configure portal
14:30:13:787 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:30:13:801 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:30:16:300 -> MQTT is not configured, skipping initialization of MQTT client
14:30:16:301 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:30:16:301 -> [ApiClient] Info: DATA: {"wifi":-56,"boot":0}
14:30:16:301 -> [ApiClient] Info: Return code: 200
14:30:22:301 ->
14:30:22:301 -> firmwareCheckForUpdate:
14:30:22:301 -> firmwareCheckForUpdate: Perform
14:30:22:302 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:30:22:963 -> Firmware update skipped, the server returned 400
14:30:22:965 -> 3
14:30:22:965 -> OTA message:
14:30:22:965 ->
14:30:23:557 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:30:23:557 -> [ApiClient] Info: Return code: 200
14:30:23:558 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:30:23:560 -> [Configure] Info: Parse configure success
14:30:23:560 -> [Configure] Info: Detected new firmware version: 3.1.9
14:30:23:588 -> CO2 (ppm): 411
14:30:27:608 -> CO2 (ppm): 407
14:30:31:630 -> CO2 (ppm): 408
14:30:35:650 -> CO2 (ppm): 406
14:30:39:672 -> CO2 (ppm): 406
14:30:43:692 -> CO2 (ppm): 406
14:30:47:713 -> CO2 (ppm): 406
14:30:51:734 -> CO2 (ppm): 406
14:30:55:761 -> CO2 (ppm): 406
14:30:57:334 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:30:57:335 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":406,"boot":0,"bootCount":0}
14:30:57:335 -> [ApiClient] Info: Return code: 200
14:30:57:335 ->
14:30:57:335 -> Online mode and isPostToAirGradient = true: watchdog reset
14:30:57:335 ->
14:30:57:352 -> External watchdog feed!
14:30:59:776 -> CO2 (ppm): 406
14:31:03:797 -> CO2 (ppm): 406
14:31:07:818 -> CO2 (ppm): 406
14:31:11:856 -> CO2 (ppm): 405
14:31:15:860 -> CO2 (ppm): 405
14:31:19:881 -> CO2 (ppm): 405
14:31:24:154 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:31:24:154 -> [ApiClient] Info: Return code: 200
14:31:24:156 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:31:24:157 -> [Configure] Info: Parse configure success
14:31:24:158 -> [Configure] Info: Detected new firmware version: 3.1.9
14:31:24:202 -> CO2 (ppm): 405
14:31:28:223 -> CO2 (ppm): 411
14:31:32:244 -> CO2 (ppm): 424
14:31:40:286 -> CO2 (ppm): 433
14:31:40:286 -> CO2 (ppm): 438
14:31:48:327 -> CO2 (ppm): 441
14:31:48:327 -> CO2 (ppm): 441
14:31:52:348 -> CO2 (ppm): 439
14:31:56:368 -> CO2 (ppm): 437
14:31:58:357 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:31:58:357 -> [ApiClient] Info: DATA: {"wifi":-61,"rco2":437,"boot":1,"bootCount":1}
14:31:58:357 -> [ApiClient] Info: Return code: 200
14:31:58:358 ->
14:31:58:358 -> Online mode and isPostToAirGradient = true: watchdog reset
14:31:58:358 ->
14:31:58:383 -> External watchdog feed!
14:32:00:389 -> CO2 (ppm): 434
14:32:04:410 -> CO2 (ppm): 430
14:32:08:431 -> CO2 (ppm): 427
14:32:12:452 -> CO2 (ppm): 424
14:32:16:473 -> CO2 (ppm): 422
14:32:20:494 -> CO2 (ppm): 419
14:32:24:775 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:32:24:775 -> [ApiClient] Info: Return code: 200
14:32:24:776 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:32:24:778 -> [Configure] Info: Parse configure success
14:32:24:779 -> [Configure] Info: Detected new firmware version: 3.1.9
14:32:24:823 -> CO2 (ppm): 418
14:32:28:844 -> CO2 (ppm): 416
14:32:32:865 -> CO2 (ppm): 414
14:32:36:886 -> CO2 (ppm): 412
14:32:40:907 -> CO2 (ppm): 411
14:32:44:928 -> CO2 (ppm): 410
14:32:48:948 -> CO2 (ppm): 409
14:32:56:991 -> CO2 (ppm): 408
14:32:56:991 -> CO2 (ppm): 407
14:32:59:387 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:32:59:387 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":407,"boot":2,"bootCount":2}
14:32:59:388 -> [ApiClient] Info: Return code: 200
14:32:59:389 ->
14:32:59:389 -> Online mode and isPostToAirGradient = true: watchdog reset
14:32:59:389 ->
14:32:59:413 -> External watchdog feed!
14:33:01:011 -> CO2 (ppm): 407
14:33:05:032 -> CO2 (ppm): 406
14:33:09:053 -> CO2 (ppm): 405
14:33:13:073 -> CO2 (ppm): 405
14:33:17:094 -> CO2 (ppm): 405
14:33:21:115 -> CO2 (ppm): 405
14:33:25:394 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:33:25:394 -> [ApiClient] Info: Return code: 200
14:33:25:396 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:33:25:397 -> [Configure] Info: Parse configure success
14:33:25:398 -> [Configure] Info: Detected new firmware version: 3.1.9
14:33:25:442 -> CO2 (ppm): 404
14:33:29:463 -> CO2 (ppm): 405
14:33:33:484 -> CO2 (ppm): 405
14:33:37:504 -> CO2 (ppm): 405
14:33:41:525 -> CO2 (ppm): 405
14:33:45:546 -> CO2 (ppm): 405
14:33:49:568 -> CO2 (ppm): 405
14:33:53:588 -> CO2 (ppm): 405
14:33:57:609 -> CO2 (ppm): 405
14:34:00:416 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:34:00:416 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":405,"boot":3,"bootCount":3}
14:34:00:416 -> [ApiClient] Info: Return code: 200
14:34:00:417 ->
14:34:00:417 -> Online mode and isPostToAirGradient = true: watchdog reset
14:34:00:417 ->
14:34:00:442 -> External watchdog feed!
14:34:01:630 -> CO2 (ppm): 405
14:34:05:651 -> CO2 (ppm): 404
14:34:09:672 -> CO2 (ppm): 404
14:34:13:693 -> CO2 (ppm): 404
14:34:17:714 -> CO2 (ppm): 404
14:34:26:015 -> CO2 (ppm): 404
14:34:26:015 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:34:26:016 -> [ApiClient] Info: Return code: 200
14:34:26:017 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:34:26:018 -> [Configure] Info: Parse configure success
14:34:26:019 -> [Configure] Info: Detected new firmware version: 3.1.9
14:34:26:063 -> CO2 (ppm): 404
14:34:30:084 -> CO2 (ppm): 403
14:34:34:105 -> CO2 (ppm): 403
14:34:42:147 -> CO2 (ppm): 403
14:34:42:147 -> CO2 (ppm): 403
14:34:46:168 -> CO2 (ppm): 403
14:34:50:189 -> CO2 (ppm): 403
14:34:54:209 -> CO2 (ppm): 403
14:34:58:230 -> CO2 (ppm): 403
14:35:01:448 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:35:01:449 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":403,"boot":4,"bootCount":4}
14:35:01:449 -> [ApiClient] Info: Return code: 200
14:35:01:450 ->
14:35:01:450 -> Online mode and isPostToAirGradient = true: watchdog reset
14:35:01:450 ->
14:35:01:475 -> External watchdog feed!
14:35:02:251 -> CO2 (ppm): 403
14:35:06:272 -> CO2 (ppm): 403
14:35:10:293 -> CO2 (ppm): 403
14:35:10:293 -> CO2 (ppm): 403
14:35:10:293 -> CO2 (ppm): 403
14:35:12:664 -> CO2 (ppm): 403
14:35:16:960 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:35:16:960 -> [ApiClient] Info: Return code: 200
14:35:16:962 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:35:16:963 -> [Configure] Info: Parse configure success
14:35:16:963 -> [Configure] Info: co2CalibrationRequested: True
14:35:16:964 -> [Configure] Info: Detected new firmware version: 3.1.9
14:35:16:966 -> [StateMachine] Info: CO2 Calibration
14:35:16:966 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:35:17:966 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:35:18:966 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:35:19:966 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:35:20:966 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:35:23:974 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:35:23:988 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:35:23:996 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:35:24:011 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:35:24:011 -> [StateMachine] Info: CO2 Calibration: success
14:35:25:019 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:35:25:019 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:35:25:032 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x20 0xAD 0x88
14:35:25:032 -> Flags: 20
14:35:25:032 -> Waiting getAcknowlagdement
14:35:25:032 -> [StateMachine] Info: CO2 Calibration: finish after 0 sec
14:35:27:075 -> CO2 (ppm): 401
14:35:31:096 -> CO2 (ppm): 401
14:35:40:112 -> Get CO2 failed: 1
14:35:44:125 -> CO2 (ppm): 0
14:35:48:146 -> CO2 (ppm): 577
14:35:52:784 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:35:52:784 -> [ApiClient] Info: DATA: {"wifi":-50,"rco2":577,"boot":5,"bootCount":5}
14:35:52:785 -> [ApiClient] Info: Return code: 200
14:35:52:785 ->
14:35:52:785 -> Online mode and isPostToAirGradient = true: watchdog reset
14:35:52:786 ->
14:35:52:807 -> CO2 (ppm): 552
14:35:52:833 -> External watchdog feed!
14:35:56:828 -> CO2 (ppm): 525
14:36:00:849 -> CO2 (ppm): 512
14:36:04:871 -> CO2 (ppm): 493
14:36:08:892 -> CO2 (ppm): 480
14:36:12:912 -> CO2 (ppm): 468
14:36:16:934 -> CO2 (ppm): 460
14:36:20:955 -> CO2 (ppm): 447
14:36:27:600 -> CO2 (ppm): 446
14:36:27:600 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:36:27:601 -> [ApiClient] Info: Return code: 200
14:36:27:602 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:36:27:603 -> [Configure] Info: Parse configure success
14:36:27:604 -> [Configure] Info: Detected new firmware version: 3.1.9
14:36:28:996 -> CO2 (ppm): 445
14:36:37:038 -> CO2 (ppm): 443
14:36:37:038 -> CO2 (ppm): 437
14:36:45:080 -> CO2 (ppm): 433
14:36:45:080 -> CO2 (ppm): 429
14:36:49:101 -> CO2 (ppm): 425
14:36:53:768 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:36:53:768 -> [ApiClient] Info: DATA: {"wifi":-50,"rco2":425,"boot":6,"bootCount":6}
14:36:53:768 -> [ApiClient] Info: Return code: 200
14:36:53:768 ->
14:36:53:768 -> Online mode and isPostToAirGradient = true: watchdog reset
14:36:53:768 ->
14:36:53:787 -> CO2 (ppm): 420
14:36:53:812 -> External watchdog feed!
14:36:57:808 -> CO2 (ppm): 417
14:37:01:828 -> CO2 (ppm): 416
14:37:05:849 -> CO2 (ppm): 414
14:37:09:870 -> CO2 (ppm): 413
14:37:13:891 -> CO2 (ppm): 412
14:37:17:912 -> CO2 (ppm): 410
14:37:21:935 -> CO2 (ppm): 410
14:37:25:954 -> CO2 (ppm): 410
14:37:28:223 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:37:28:223 -> [ApiClient] Info: Return code: 200
14:37:28:225 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:37:28:227 -> [Configure] Info: Parse configure success
14:37:28:227 -> [Configure] Info: Detected new firmware version: 3.1.9
14:37:29:974 -> CO2 (ppm): 410
14:37:33:996 -> CO2 (ppm): 410
14:37:38:016 -> CO2 (ppm): 410
14:37:42:037 -> CO2 (ppm): 410
14:37:46:058 -> CO2 (ppm): 410
14:37:50:079 -> CO2 (ppm): 411
14:37:54:736 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:37:54:736 -> [ApiClient] Info: DATA: {"wifi":-51,"rco2":411,"boot":7,"bootCount":7}
14:37:54:737 -> [ApiClient] Info: Return code: 200
14:37:54:738 ->
14:37:54:738 -> Online mode and isPostToAirGradient = true: watchdog reset
14:37:54:738 ->
14:37:54:759 -> CO2 (ppm): 412
14:37:54:784 -> External watchdog feed!
14:37:58:780 -> CO2 (ppm): 412
14:38:02:801 -> CO2 (ppm): 413
14:38:06:822 -> CO2 (ppm): 413
14:38:10:842 -> CO2 (ppm): 412
14:38:14:863 -> CO2 (ppm): 412
14:38:18:884 -> CO2 (ppm): 412
14:38:22:905 -> CO2 (ppm): 411
14:38:26:926 -> CO2 (ppm): 411
14:38:28:842 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:38:28:842 -> [ApiClient] Info: Return code: 200
14:38:28:843 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"14:38:28:844 -> [Configure] Info: Parse configure success
pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:38:28:845 -> [Configure] Info: Detected new firmware version: 3.1.9
14:38:30:947 -> CO2 (ppm): 411
14:38:34:968 -> CO2 (ppm): 410
14:38:38:989 -> CO2 (ppm): 409
14:38:43:010 -> CO2 (ppm): 409
14:38:47:031 -> CO2 (ppm): 408
14:38:51:052 -> CO2 (ppm): 407
14:38:55:613 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:38:55:613 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":407,"boot":8,"bootCount":8}
14:38:55:613 -> [ApiClient] Info: Return code: 200
14:38:55:614 ->
14:38:55:614 -> Online mode and isPostToAirGradient = true: watchdog reset
14:38:55:614 ->
14:38:55:636 -> CO2 (ppm): 407
14:38:55:665 -> External watchdog feed!
14:38:59:657 -> CO2 (ppm): 407
14:39:03:679 -> CO2 (ppm): 407
14:39:07:700 -> CO2 (ppm): 407
14:39:15:742 -> CO2 (ppm): 406
14:39:15:742 -> CO2 (ppm): 406
14:39:19:762 -> CO2 (ppm): 405
14:39:23:783 -> CO2 (ppm): 405
14:39:27:804 -> CO2 (ppm): 404
14:39:29:462 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:39:29:462 -> [ApiClient] Info: Return code: 200
14:39:29:463 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:39:29:465 -> [Configure] Info: Parse configure success
14:39:29:465 -> [Configure] Info: Detected new firmware version: 3.1.9
14:39:31:825 -> CO2 (ppm): 405
14:39:35:846 -> CO2 (ppm): 404
14:39:39:867 -> CO2 (ppm): 404
14:39:43:888 -> CO2 (ppm): 404
14:39:47:909 -> CO2 (ppm): 404
14:39:51:931 -> CO2 (ppm): 404
14:39:56:548 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:39:56:548 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":404,"boot":9,"bootCount":9}
14:39:56:548 -> [ApiClient] Info: Return code: 200
14:39:56:549 ->
14:39:56:549 -> Online mode and isPostToAirGradient = true: watchdog reset
14:39:56:549 ->
14:39:56:570 -> CO2 (ppm): 404
14:39:56:595 -> External watchdog feed!
14:40:00:591 -> CO2 (ppm): 404
14:40:04:612 -> CO2 (ppm): 404
14:40:08:667 -> CO2 (ppm): 404
14:40:12:688 -> CO2 (ppm): 404
14:40:16:709 -> CO2 (ppm): 404
14:40:20:730 -> CO2 (ppm): 404
14:40:24:751 -> CO2 (ppm): 404
14:40:28:772 -> CO2 (ppm): 404
14:40:30:082 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:40:30:082 -> [ApiClient] Info: Return code: 200
14:40:30:083 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:40:30:085 -> [Configure] Info: Parse configure success
14:40:30:086 -> [Configure] Info: Detected new firmware version: 3.1.9
14:40:32:792 -> CO2 (ppm): 404
14:40:36:813 -> CO2 (ppm): 404
14:40:40:834 -> CO2 (ppm): 404
14:40:44:855 -> CO2 (ppm): 404
14:40:48:876 -> CO2 (ppm): 404
14:40:52:898 -> CO2 (ppm): 404
14:40:57:525 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:40:57:525 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":404,"boot":10,"bootCount":10}
14:40:57:525 -> [ApiClient] Info: Return code: 200
14:40:57:527 ->
14:40:57:527 -> Online mode and isPostToAirGradient = true: watchdog reset
14:40:57:527 ->
14:40:57:548 -> CO2 (ppm): 404
14:40:57:573 -> External watchdog feed!
14:41:01:569 -> CO2 (ppm): 408
14:41:05:590 -> CO2 (ppm): 432
14:41:09:611 -> CO2 (ppm): 458
14:41:13:632 -> CO2 (ppm): 481
14:41:17:653 -> CO2 (ppm): 501
14:41:21:674 -> CO2 (ppm): 510
14:41:25:695 -> CO2 (ppm): 512
14:41:29:716 -> CO2 (ppm): 508
14:41:30:715 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:41:30:715 -> [ApiClient] Info: Return code: 200
14:41:30:716 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:41:30:717 -> [Configure] Info: Parse configure success
14:41:30:717 -> [Configure] Info: co2CalibrationRequested: True
14:41:30:717 -> [Configure] Info: Detected new firmware version: 3.1.9
14:41:30:719 -> [StateMachine] Info: CO2 Calibration
14:41:30:719 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:41:31:720 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:41:32:720 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:41:33:720 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:41:34:720 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:41:37:728 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:41:37:741 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:41:37:750 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:41:37:763 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:41:37:763 -> [StateMachine] Info: CO2 Calibration: success
14:41:38:764 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:41:38:772 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:38:784 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:38:784 -> Flags: 0
14:41:39:793 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:39:805 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:39:805 -> Flags: 0
14:41:40:814 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:40:826 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:40:827 -> Flags: 0
14:41:41:834 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:41:847 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:41:847 -> Flags: 0
14:41:42:855 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:42:868 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:42:868 -> Flags: 0
14:41:43:876 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:43:889 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:43:889 -> Flags: 0
14:41:44:898 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:44:910 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:44:910 -> Flags: 0
14:41:45:918 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:45:931 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:45:931 -> Flags: 0
14:41:46:939 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:46:952 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:46:952 -> Flags: 0
14:41:47:960 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:47:973 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:47:973 -> Flags: 0
14:41:48:981 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:48:994 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:48:994 -> Flags: 0
14:41:50:002 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:50:015 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:50:015 -> Flags: 0
14:41:51:023 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:51:036 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:51:036 -> Flags: 0
14:41:52:044 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:52:057 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:52:057 -> Flags: 0
14:41:53:066 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:53:078 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:53:078 -> Flags: 0
14:41:54:087 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:54:099 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:54:099 -> Flags: 0
14:41:55:108 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:55:120 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:55:120 -> Flags: 0
14:41:56:128 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:56:141 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:56:141 -> Flags: 0
14:41:57:149 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:57:162 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:57:162 -> Flags: 0
14:41:58:170 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:58:183 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:58:183 -> Flags: 0
14:41:59:192 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:41:59:204 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:41:59:204 -> Flags: 0
14:42:00:213 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:42:00:225 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:42:00:225 -> Flags: 0
14:42:01:233 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:42:01:239 -> Get Acknowladgement Response > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90
14:42:01:239 -> Error getting acknowledgement flags!
14:42:02:247 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:42:07:248 -> Get Acknowladgement Response > 0x05 0xFE
14:42:07:249 -> Error getting acknowledgement flags!
14:42:08:256 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:42:08:269 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:42:08:270 -> Flags: 0
14:42:09:277 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:42:09:290 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:42:09:290 -> Flags: 0
14:42:10:298 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:42:10:311 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:42:10:311 -> Flags: 0

View File

@ -1,250 +0,0 @@
14:46:28:033 -> No PM sensor detected on Serial0
14:46:28:033 -> initializing PM sensor
14:46:28:033 -> cleared 0 byte(s)
14:46:28:034 -> setting active mode
14:46:28:034 -> 7 byte(s) written
14:46:32:033 -> No PM sensor detected on Serial1
14:46:32:034 -> Firmware Mode: 0-1PS
14:46:32:054 -> Set S8 AbcDays successful
14:46:32:055 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
14:46:32:055 -> [ApiClient] Info: begin
14:46:32:101 -> [WifiConnector] Info: Connecting to WiFi...
14:46:32:101 -> *wm:AutoConnect
14:46:32:101 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
14:46:32:604 -> E (10414) wifi:sta is connecting, return error
14:46:32:605 -> [ 10168][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
14:46:40:017 -> *wm:AutoConnect: SUCCESS
14:46:40:018 -> *wm:STA IP Address: 192.168.100.127
14:46:40:018 -> [WifiConnector] Info: Wait for configure portal
14:46:40:018 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:46:40:031 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:46:42:613 -> MQTT is not configured, skipping initialization of MQTT client
14:46:42:614 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:46:42:614 -> [ApiClient] Info: DATA: {"wifi":-62,"boot":0}
14:46:42:614 -> [ApiClient] Info: Return code: 200
14:46:48:614 ->
14:46:48:615 -> firmwareCheckForUpdate:
14:46:48:615 -> firmwareCheckForUpdate: Perform
14:46:48:615 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:46:49:207 -> Firmware update skipped, the server returned 400
14:46:49:208 -> 3
14:46:49:208 -> OTA message:
14:46:49:208 ->
14:46:49:780 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:46:49:780 -> [ApiClient] Info: Return code: 200
14:46:49:781 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:46:49:782 -> [Configure] Info: Parse configure success
14:46:49:783 -> [Configure] Info: Detected new firmware version: 3.1.9
14:46:54:798 -> Get CO2 failed: 1
14:46:58:819 -> CO2 (ppm): 594
14:47:02:840 -> CO2 (ppm): 556
14:47:06:862 -> CO2 (ppm): 530
14:47:10:882 -> CO2 (ppm): 508
14:47:14:903 -> CO2 (ppm): 487
14:47:18:924 -> CO2 (ppm): 475
14:47:23:471 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:47:23:471 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":475,"boot":0,"bootCount":0}
14:47:23:471 -> [ApiClient] Info: Return code: 200
14:47:23:472 ->
14:47:23:472 -> Online mode and isPostToAirGradient = true: watchdog reset
14:47:23:472 ->
14:47:23:493 -> CO2 (ppm): 462
14:47:23:518 -> External watchdog feed!
14:47:27:514 -> CO2 (ppm): 457
14:47:31:535 -> CO2 (ppm): 452
14:47:35:556 -> CO2 (ppm): 452
14:47:39:577 -> CO2 (ppm): 452
14:47:43:598 -> CO2 (ppm): 452
14:47:47:619 -> CO2 (ppm): 452
14:47:50:400 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:47:50:402 -> [ApiClient] Info: Return code: 200
14:47:50:402 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:47:50:403 -> [Configure] Info: Parse configure success
14:47:50:404 -> [Configure] Info: Detected new firmware version: 3.1.9
14:47:51:640 -> CO2 (ppm): 450
14:47:55:661 -> CO2 (ppm): 445
14:47:59:682 -> CO2 (ppm): 442
14:48:03:714 -> CO2 (ppm): 437
14:48:07:723 -> CO2 (ppm): 433
14:48:11:744 -> CO2 (ppm): 430
14:48:15:765 -> CO2 (ppm): 428
14:48:19:786 -> CO2 (ppm): 425
14:48:24:450 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:48:24:451 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":425,"boot":1,"bootCount":1}
14:48:24:451 -> [ApiClient] Info: Return code: 200
14:48:24:451 ->
14:48:24:452 -> Online mode and isPostToAirGradient = true: watchdog reset
14:48:24:452 ->
14:48:24:473 -> CO2 (ppm): 420
14:48:24:498 -> External watchdog feed!
14:48:28:494 -> CO2 (ppm): 419
14:48:32:515 -> CO2 (ppm): 419
14:48:36:536 -> CO2 (ppm): 417
14:48:44:578 -> CO2 (ppm): 416
14:48:44:578 -> CO2 (ppm): 414
14:48:48:598 -> CO2 (ppm): 414
14:48:51:022 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:48:51:022 -> [ApiClient] Info: Return code: 200
14:48:51:023 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:48:51:025 -> [Configure] Info: Parse configure success
14:48:52:619 -> [Configure] Info: Detected new firmware version: 3.1.9
14:48:52:619 -> CO2 (ppm): 413
14:48:56:640 -> CO2 (ppm): 412
14:49:00:662 -> CO2 (ppm): 412
14:49:04:682 -> CO2 (ppm): 410
14:49:08:703 -> CO2 (ppm): 409
14:49:12:724 -> CO2 (ppm): 409
14:49:16:745 -> CO2 (ppm): 410
14:49:20:766 -> CO2 (ppm): 409
14:49:25:427 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:49:25:427 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":409,"boot":2,"bootCount":2}
14:49:25:428 -> [ApiClient] Info: Return code: 200
14:49:25:429 ->
14:49:25:429 -> Online mode and isPostToAirGradient = true: watchdog reset
14:49:25:429 ->
14:49:25:451 -> CO2 (ppm): 420
14:49:25:476 -> External watchdog feed!
14:49:29:472 -> CO2 (ppm): 442
14:49:33:493 -> CO2 (ppm): 465
14:49:37:514 -> CO2 (ppm): 483
14:49:41:535 -> CO2 (ppm): 495
14:49:45:556 -> CO2 (ppm): 499
14:49:49:576 -> CO2 (ppm): 502
14:49:51:651 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:49:51:651 -> [ApiClient] Info: Return code: 200
14:49:51:652 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:49:51:653 -> [Configure] Info: Parse configure success
14:49:51:654 -> [Configure] Info: Detected new firmware version: 3.1.9
14:49:53:598 -> CO2 (ppm): 526
14:50:01:639 -> CO2 (ppm): 558
14:50:01:639 -> CO2 (ppm): 582
14:50:05:660 -> CO2 (ppm): 593
14:50:09:681 -> CO2 (ppm): 594
14:50:13:702 -> CO2 (ppm): 589
14:50:17:723 -> CO2 (ppm): 577
14:50:21:744 -> CO2 (ppm): 564
14:50:26:458 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:50:26:458 -> [ApiClient] Info: DATA: {"wifi":-50,"rco2":564,"boot":3,"bootCount":3}
14:50:26:458 -> [ApiClient] Info: Return code: 200
14:50:26:459 ->
14:50:26:459 -> Online mode and isPostToAirGradient = true: watchdog reset
14:50:26:459 ->
14:50:26:481 -> CO2 (ppm): 550
14:50:26:506 -> External watchdog feed!
14:50:30:502 -> CO2 (ppm): 536
14:50:34:523 -> CO2 (ppm): 522
14:50:38:544 -> CO2 (ppm): 509
14:50:42:565 -> CO2 (ppm): 496
14:50:46:586 -> CO2 (ppm): 485
14:50:50:606 -> CO2 (ppm): 477
14:50:52:262 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:50:52:262 -> [ApiClient] Info: Return code: 200
14:50:52:263 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:50:52:265 -> [Configure] Info: Parse configure success
14:50:52:266 -> [Configure] Info: Detected new firmware version: 3.1.9
14:50:54:628 -> CO2 (ppm): 468
14:50:58:648 -> CO2 (ppm): 461
14:51:02:669 -> CO2 (ppm): 455
14:51:06:691 -> CO2 (ppm): 449
14:51:10:711 -> CO2 (ppm): 443
14:51:14:732 -> CO2 (ppm): 439
14:51:18:754 -> CO2 (ppm): 436
14:51:22:775 -> CO2 (ppm): 432
14:51:27:488 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:51:27:488 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":432,"boot":4,"bootCount":4}
14:51:27:488 -> [ApiClient] Info: Return code: 200
14:51:27:489 ->
14:51:27:489 -> Online mode and isPostToAirGradient = true: watchdog reset
14:51:27:489 ->
14:51:27:511 -> CO2 (ppm): 427
14:51:27:536 -> External watchdog feed!
14:51:31:532 -> CO2 (ppm): 424
14:51:35:553 -> CO2 (ppm): 422
14:51:39:574 -> CO2 (ppm): 421
14:51:43:595 -> CO2 (ppm): 421
14:51:47:616 -> CO2 (ppm): 419
14:51:51:637 -> CO2 (ppm): 419
14:51:52:882 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:51:52:882 -> [ApiClient] Info: Return code: 200
14:51:52:884 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:51:52:885 -> [Configure] Info: Parse configure success
14:51:52:886 -> [Configure] Info: Detected new firmware version: 3.1.9
14:51:55:658 -> CO2 (ppm): 418
14:51:59:679 -> CO2 (ppm): 418
14:52:03:700 -> CO2 (ppm): 417
14:52:07:720 -> CO2 (ppm): 416
14:52:11:742 -> CO2 (ppm): 415
14:52:15:762 -> CO2 (ppm): 414
14:52:19:783 -> CO2 (ppm): 413
14:52:23:804 -> CO2 (ppm): 413
14:52:28:458 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:52:28:458 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":413,"boot":5,"bootCount":5}
14:52:28:458 -> [ApiClient] Info: Return code: 200
14:52:28:459 ->
14:52:28:459 -> Online mode and isPostToAirGradient = true: watchdog reset
14:52:28:459 ->
14:52:28:481 -> CO2 (ppm): 412
14:52:28:506 -> External watchdog feed!
14:52:32:502 -> CO2 (ppm): 411
14:52:36:523 -> CO2 (ppm): 411
14:52:40:544 -> CO2 (ppm): 410
14:52:44:565 -> CO2 (ppm): 410
14:52:48:586 -> CO2 (ppm): 409
14:52:52:607 -> CO2 (ppm): 409
14:52:53:503 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:52:53:503 -> [ApiClient] Info: Return code: 200
14:52:53:504 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:52:53:506 -> [Configure] Info: Parse configure success
14:52:53:506 -> [Configure] Info: co2CalibrationRequested: True
14:52:53:507 -> [Configure] Info: Detected new firmware version: 3.1.9
14:52:53:508 -> [StateMachine] Info: CO2 Calibration
14:52:53:509 -> [StateMachine] Info: Start CO2 calib after 5 sec
14:52:54:509 -> [StateMachine] Info: Start CO2 calib after 4 sec
14:52:55:509 -> [StateMachine] Info: Start CO2 calib after 3 sec
14:52:56:509 -> [StateMachine] Info: Start CO2 calib after 2 sec
14:52:57:509 -> [StateMachine] Info: Start CO2 calib after 1 sec
14:53:00:517 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:53:00:530 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
14:53:00:539 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:53:00:553 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
14:53:00:554 -> [StateMachine] Info: CO2 Calibration: success
14:53:01:554 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
14:53:01:562 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:01:574 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:01:575 -> Flags: 0
14:53:02:583 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:02:595 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:02:595 -> Flags: 0
14:53:03:605 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:03:617 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:03:617 -> Flags: 0
14:53:04:625 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:04:638 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:04:638 -> Flags: 0
14:53:05:646 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:05:659 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:05:659 -> Flags: 0
14:53:06:667 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:06:680 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:06:681 -> Flags: 0
14:53:07:688 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:07:701 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:07:701 -> Flags: 0
14:53:08:710 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:08:722 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:08:722 -> Flags: 0
14:53:09:731 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:09:743 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:09:743 -> Flags: 0
14:53:10:751 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:10:764 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:10:764 -> Flags: 0
14:53:11:773 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:11:785 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:11:785 -> Flags: 0
14:53:12:793 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:12:806 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:12:806 -> Flags: 0
14:53:13:814 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
14:53:13:827 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
14:53:13:827 -> Flags: 0

View File

@ -1,292 +0,0 @@
14:53:30:502 -> No PM sensor detected on Serial0
14:53:30:502 -> initializing PM sensor
14:53:30:502 -> cleared 0 byte(s)
14:53:30:503 -> setting active mode
14:53:30:503 -> 7 byte(s) written
14:53:34:501 -> No PM sensor detected on Serial1
14:53:34:501 -> Firmware Mode: 0-1PS
14:53:44:517 -> Set S8 AbcDays failure
14:53:44:517 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
14:53:44:517 -> [ApiClient] Info: begin
14:53:44:564 -> [WifiConnector] Info: Connecting to WiFi...
14:53:44:565 -> *wm:AutoConnect
14:53:44:565 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
14:53:45:067 -> E (20635) wifi:sta is connecting, return error
14:53:45:068 -> [ 20164][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
14:53:52:483 -> *wm:AutoConnect: SUCCESS
14:53:52:484 -> *wm:STA IP Address: 192.168.100.127
14:53:52:484 -> [WifiConnector] Info: Wait for configure portal
14:53:52:484 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
14:53:52:497 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
14:53:52:497 -> MQTT is not configured, skipping initialization of MQTT client
14:53:54:987 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:53:54:987 -> [ApiClient] Info: DATA: {"wifi":-60,"boot":0}
14:53:54:987 -> [ApiClient] Info: Return code: 200
14:54:00:988 ->
14:54:00:988 -> firmwareCheckForUpdate:
14:54:00:988 -> firmwareCheckForUpdate: Perform
14:54:00:989 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
14:54:01:633 -> Firmware update skipped, the server returned 400
14:54:01:634 -> 3
14:54:01:634 -> OTA message:
14:54:01:634 ->
14:54:02:214 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:54:02:214 -> [ApiClient] Info: Return code: 200
14:54:02:215 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:54:02:217 -> [Configure] Info: Parse configure success
14:54:02:218 -> [Configure] Info: Detected new firmware version: 3.1.9
14:54:07:232 -> Get CO2 failed: 1
14:54:11:274 -> CO2 (ppm): 585
14:54:15:294 -> CO2 (ppm): 556
14:54:19:315 -> CO2 (ppm): 517
14:54:23:336 -> CO2 (ppm): 497
14:54:25:868 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:54:25:868 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":497,"boot":0,"bootCount":0}
14:54:25:868 -> [ApiClient] Info: Return code: 200
14:54:25:869 ->
14:54:25:869 -> Online mode and isPostToAirGradient = true: watchdog reset
14:54:25:869 ->
14:54:25:894 -> External watchdog feed!
14:54:27:357 -> CO2 (ppm): 487
14:54:35:399 -> CO2 (ppm): 472
14:54:35:399 -> CO2 (ppm): 469
14:54:39:420 -> CO2 (ppm): 464
14:54:43:441 -> CO2 (ppm): 464
14:54:47:462 -> CO2 (ppm): 462
14:54:51:483 -> CO2 (ppm): 459
14:54:55:504 -> CO2 (ppm): 455
14:54:59:525 -> CO2 (ppm): 451
14:55:02:834 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:55:02:834 -> [ApiClient] Info: Return code: 200
14:55:02:835 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:55:02:836 -> [Configure] Info: Parse configure success
14:55:02:837 -> [Configure] Info: Detected new firmware version: 3.1.9
14:55:03:545 -> CO2 (ppm): 449
14:55:07:567 -> CO2 (ppm): 468
14:55:11:587 -> CO2 (ppm): 484
14:55:15:608 -> CO2 (ppm): 493
14:55:19:629 -> CO2 (ppm): 497
14:55:23:657 -> CO2 (ppm): 501
14:55:26:899 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:55:26:900 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":501,"boot":1,"bootCount":1}
14:55:26:900 -> [ApiClient] Info: Return code: 200
14:55:26:900 ->
14:55:26:900 -> Online mode and isPostToAirGradient = true: watchdog reset
14:55:26:900 ->
14:55:26:925 -> External watchdog feed!
14:55:27:671 -> CO2 (ppm): 501
14:55:31:692 -> CO2 (ppm): 499
14:55:35:713 -> CO2 (ppm): 495
14:55:39:734 -> CO2 (ppm): 491
14:55:43:755 -> CO2 (ppm): 485
14:55:47:776 -> CO2 (ppm): 480
14:55:51:797 -> CO2 (ppm): 473
14:55:55:818 -> CO2 (ppm): 467
14:55:59:839 -> CO2 (ppm): 460
14:56:03:454 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:56:03:454 -> [ApiClient] Info: Return code: 200
14:56:03:456 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:56:03:457 -> [Configure] Info: Parse configure success
14:56:03:458 -> [Configure] Info: Detected new firmware version: 3.1.9
14:56:03:860 -> CO2 (ppm): 454
14:56:07:880 -> CO2 (ppm): 447
14:56:11:901 -> CO2 (ppm): 442
14:56:15:923 -> CO2 (ppm): 438
14:56:19:944 -> CO2 (ppm): 433
14:56:23:965 -> CO2 (ppm): 430
14:56:27:929 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:56:27:929 -> [ApiClient] Info: DATA: {"wifi":-50,"rco2":430,"boot":2,"bootCount":2}
14:56:27:929 -> [ApiClient] Info: Return code: 200
14:56:27:930 ->
14:56:27:931 -> Online mode and isPostToAirGradient = true: watchdog reset
14:56:27:931 ->
14:56:27:955 -> External watchdog feed!
14:56:27:985 -> CO2 (ppm): 427
14:56:32:006 -> CO2 (ppm): 424
14:56:36:027 -> CO2 (ppm): 422
14:56:40:048 -> CO2 (ppm): 420
14:56:44:069 -> CO2 (ppm): 417
14:56:52:111 -> CO2 (ppm): 417
14:56:52:111 -> CO2 (ppm): 416
14:56:56:133 -> CO2 (ppm): 415
14:57:00:153 -> CO2 (ppm): 414
14:57:04:075 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:57:04:075 -> [ApiClient] Info: Return code: 200
14:57:04:077 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:57:04:078 -> [Configure] Info: Parse configure success
14:57:04:079 -> [Configure] Info: Detected new firmware version: 3.1.9
14:57:04:174 -> CO2 (ppm): 414
14:57:08:195 -> CO2 (ppm): 414
14:57:12:216 -> CO2 (ppm): 415
14:57:16:237 -> CO2 (ppm): 416
14:57:20:258 -> CO2 (ppm): 415
14:57:28:960 -> CO2 (ppm): 416
14:57:28:960 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:57:28:961 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":416,"boot":3,"bootCount":3}
14:57:28:961 -> [ApiClient] Info: Return code: 200
14:57:28:962 ->
14:57:28:962 -> Online mode and isPostToAirGradient = true: watchdog reset
14:57:28:962 ->
14:57:28:984 -> CO2 (ppm): 416
14:57:29:008 -> External watchdog feed!
14:57:33:004 -> CO2 (ppm): 416
14:57:37:026 -> CO2 (ppm): 416
14:57:41:046 -> CO2 (ppm): 416
14:57:45:067 -> CO2 (ppm): 416
14:57:53:109 -> CO2 (ppm): 415
14:57:53:109 -> CO2 (ppm): 415
14:57:57:130 -> CO2 (ppm): 415
14:58:01:151 -> CO2 (ppm): 414
14:58:04:695 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:58:04:696 -> [ApiClient] Info: Return code: 200
14:58:04:697 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:58:04:698 -> [Configure] Info: Parse configure success
14:58:04:699 -> [Configure] Info: Detected new firmware version: 3.1.9
14:58:05:172 -> CO2 (ppm): 414
14:58:09:193 -> CO2 (ppm): 413
14:58:13:214 -> CO2 (ppm): 413
14:58:17:235 -> CO2 (ppm): 413
14:58:21:255 -> CO2 (ppm): 412
14:58:25:277 -> CO2 (ppm): 422
14:58:30:089 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:58:30:089 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":422,"boot":4,"bootCount":4}
14:58:30:090 -> [ApiClient] Info: Return code: 200
14:58:30:091 ->
14:58:30:091 -> Online mode and isPostToAirGradient = true: watchdog reset
14:58:30:091 ->
14:58:30:112 -> CO2 (ppm): 451
14:58:30:137 -> External watchdog feed!
14:58:34:134 -> CO2 (ppm): 482
14:58:38:155 -> CO2 (ppm): 503
14:58:42:175 -> CO2 (ppm): 517
14:58:46:197 -> CO2 (ppm): 520
14:58:50:217 -> CO2 (ppm): 519
14:58:54:237 -> CO2 (ppm): 513
14:58:58:258 -> CO2 (ppm): 506
14:59:02:279 -> CO2 (ppm): 500
14:59:05:317 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
14:59:05:317 -> [ApiClient] Info: Return code: 200
14:59:05:319 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
14:59:05:320 -> [Configure] Info: Parse configure success
14:59:05:321 -> [Configure] Info: Detected new firmware version: 3.1.9
14:59:06:299 -> CO2 (ppm): 492
14:59:10:321 -> CO2 (ppm): 484
14:59:14:342 -> CO2 (ppm): 475
14:59:18:362 -> CO2 (ppm): 467
14:59:22:384 -> CO2 (ppm): 460
14:59:26:439 -> CO2 (ppm): 455
14:59:31:051 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
14:59:31:051 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":455,"boot":5,"bootCount":5}
14:59:31:051 -> [ApiClient] Info: Return code: 200
14:59:31:052 ->
14:59:31:052 -> Online mode and isPostToAirGradient = true: watchdog reset
14:59:31:052 ->
14:59:31:074 -> CO2 (ppm): 447
14:59:31:099 -> External watchdog feed!
14:59:35:095 -> CO2 (ppm): 443
14:59:39:116 -> CO2 (ppm): 438
14:59:43:136 -> CO2 (ppm): 436
14:59:47:157 -> CO2 (ppm): 433
14:59:51:178 -> CO2 (ppm): 431
14:59:55:199 -> CO2 (ppm): 431
14:59:59:220 -> CO2 (ppm): 432
15:00:03:241 -> CO2 (ppm): 432
15:00:05:937 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:00:05:937 -> [ApiClient] Info: Return code: 200
15:00:05:939 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:00:05:940 -> [Configure] Info: Parse configure success
15:00:05:941 -> [Configure] Info: co2CalibrationRequested: True
15:00:05:941 -> [Configure] Info: Detected new firmware version: 3.1.9
15:00:05:943 -> [StateMachine] Info: CO2 Calibration
15:00:05:943 -> [StateMachine] Info: Start CO2 calib after 5 sec
15:00:06:943 -> [StateMachine] Info: Start CO2 calib after 4 sec
15:00:07:943 -> [StateMachine] Info: Start CO2 calib after 3 sec
15:00:08:943 -> [StateMachine] Info: Start CO2 calib after 2 sec
15:00:09:943 -> [StateMachine] Info: Start CO2 calib after 1 sec
15:00:12:952 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:00:12:965 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:00:12:973 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:00:12:988 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:00:12:988 -> [StateMachine] Info: CO2 Calibration: success
15:00:13:988 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
15:00:13:996 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:14:009 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:14:009 -> Flags: 0
15:00:15:017 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:15:030 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:15:030 -> Flags: 0
15:00:16:038 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:16:051 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:16:051 -> Flags: 0
15:00:17:059 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:17:072 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:17:072 -> Flags: 0
15:00:18:080 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:18:093 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:18:093 -> Flags: 0
15:00:19:101 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:19:114 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:19:114 -> Flags: 0
15:00:20:122 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:20:135 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:20:135 -> Flags: 0
15:00:21:143 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:21:156 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:21:156 -> Flags: 0
15:00:22:164 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:22:177 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:22:177 -> Flags: 0
15:00:23:185 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:23:198 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:23:198 -> Flags: 0
15:00:24:206 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:24:219 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:24:219 -> Flags: 0
15:00:25:227 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:25:240 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:25:240 -> Flags: 0
15:00:26:248 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:26:285 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:26:286 -> Flags: 0
15:00:27:294 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:27:306 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:27:307 -> Flags: 0
15:00:28:315 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:28:327 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:28:328 -> Flags: 0
15:00:29:336 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:29:349 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:29:349 -> Flags: 0
15:00:30:357 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:30:370 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:30:370 -> Flags: 0
15:00:31:378 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:31:390 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:31:391 -> Flags: 0
15:00:32:399 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:32:411 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:32:412 -> Flags: 0
15:00:33:420 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:33:432 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:33:433 -> Flags: 0
15:00:34:441 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:34:453 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:34:454 -> Flags: 0
15:00:35:462 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:35:474 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:35:475 -> Flags: 0
15:00:36:483 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:36:495 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:36:496 -> Flags: 0
15:00:37:504 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:37:516 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:37:517 -> Flags: 0
15:00:38:525 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:38:537 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:38:538 -> Flags: 0
15:00:39:546 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:39:558 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:39:559 -> Flags: 0
15:00:40:567 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:00:40:579 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:00:40:579 -> Flags: 0

View File

@ -1,225 +0,0 @@
15:01:40:282 -> Detected OPEN_AIR_OUTDOOR
15:01:40:282 -> Firmware Version: 3.1.9-dirty
15:01:40:428 -> Found S8 on Serial1
15:01:40:429 -> Init SGP41 failuire
15:01:40:429 -> SGP sensor not found
15:01:40:429 -> Can not detect SGP run mode 'O-1PS'
15:01:40:429 -> initializing PM sensor
15:01:40:429 -> cleared 0 byte(s)
15:01:40:429 -> setting active mode
15:01:40:429 -> 7 byte(s) written
15:01:44:429 -> No PM sensor detected on Serial0
15:01:44:429 -> initializing PM sensor
15:01:44:429 -> cleared 0 byte(s)
15:01:44:429 -> setting active mode
15:01:44:429 -> 7 byte(s) written
15:01:48:428 -> No PM sensor detected on Serial1
15:01:48:428 -> Firmware Mode: 0-1PS
15:01:48:450 -> Set S8 AbcDays successful
15:01:48:450 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
15:01:48:450 -> [ApiClient] Info: begin
15:01:48:497 -> [WifiConnector] Info: Connecting to WiFi...
15:01:48:497 -> *wm:AutoConnect
15:01:48:498 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
15:01:49:000 -> E (10415) wifi:sta is connecting, return error
15:01:49:000 -> [ 10169][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
15:01:56:416 -> *wm:AutoConnect: SUCCESS
15:01:56:416 -> *wm:STA IP Address: 192.168.100.127
15:01:56:416 -> [WifiConnector] Info: Wait for configure portal
15:01:56:416 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
15:01:56:429 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
15:01:58:980 -> MQTT is not configured, skipping initialization of MQTT client
15:01:58:981 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:01:58:981 -> [ApiClient] Info: DATA: {"wifi":-51,"boot":0}
15:01:58:981 -> [ApiClient] Info: Return code: 200
15:02:04:980 ->
15:02:04:980 -> firmwareCheckForUpdate:
15:02:04:980 -> firmwareCheckForUpdate: Perform
15:02:04:981 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
15:02:05:632 -> Firmware update skipped, the server returned 400
15:02:05:633 -> 3
15:02:05:634 -> OTA message:
15:02:05:634 ->
15:02:06:256 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:02:06:256 -> [ApiClient] Info: Return code: 200
15:02:06:265 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:02:06:266 -> [Configure] Info: Parse configure success
15:02:06:266 -> [Configure] Info: Detected new firmware version: 3.1.9
15:02:06:288 -> CO2 (ppm): 617
15:02:10:309 -> CO2 (ppm): 585
15:02:14:330 -> CO2 (ppm): 557
15:02:22:372 -> CO2 (ppm): 531
15:02:22:372 -> CO2 (ppm): 529
15:02:26:393 -> CO2 (ppm): 521
15:02:30:413 -> CO2 (ppm): 511
15:02:34:435 -> CO2 (ppm): 501
15:02:38:455 -> CO2 (ppm): 491
15:02:39:844 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:02:39:844 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":491,"boot":0,"bootCount":0}
15:02:39:845 -> [ApiClient] Info: Return code: 200
15:02:39:871 ->
15:02:39:871 -> Online mode and isPostToAirGradient = true: watchdog reset
15:02:39:871 ->
15:02:39:872 -> External watchdog feed!
15:02:42:476 -> CO2 (ppm): 481
15:02:46:496 -> CO2 (ppm): 472
15:02:50:517 -> CO2 (ppm): 465
15:02:54:594 -> CO2 (ppm): 457
15:02:58:613 -> CO2 (ppm): 450
15:03:02:633 -> CO2 (ppm): 440
15:03:06:877 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:03:06:877 -> [ApiClient] Info: Return code: 200
15:03:06:879 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:03:06:880 -> [Configure] Info: Parse configure success
15:03:06:881 -> [Configure] Info: Detected new firmware version: 3.1.9
15:03:06:925 -> CO2 (ppm): 436
15:03:10:946 -> CO2 (ppm): 433
15:03:14:967 -> CO2 (ppm): 430
15:03:18:988 -> CO2 (ppm): 436
15:03:23:008 -> CO2 (ppm): 445
15:03:27:029 -> CO2 (ppm): 455
15:03:31:050 -> CO2 (ppm): 460
15:03:35:071 -> CO2 (ppm): 463
15:03:39:092 -> CO2 (ppm): 463
15:03:40:875 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:03:40:875 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":463,"boot":1,"bootCount":1}
15:03:40:875 -> [ApiClient] Info: Return code: 200
15:03:40:876 ->
15:03:40:876 -> Online mode and isPostToAirGradient = true: watchdog reset
15:03:40:876 ->
15:03:40:900 -> External watchdog feed!
15:03:43:113 -> CO2 (ppm): 460
15:03:47:134 -> CO2 (ppm): 458
15:03:51:155 -> CO2 (ppm): 453
15:03:55:175 -> CO2 (ppm): 450
15:03:59:196 -> CO2 (ppm): 446
15:04:03:217 -> CO2 (ppm): 442
15:04:07:497 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:04:07:497 -> [ApiClient] Info: Return code: 200
15:04:07:499 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:04:07:500 -> [Configure] Info: Parse configure success
15:04:07:501 -> [Configure] Info: Detected new firmware version: 3.1.9
15:04:07:545 -> CO2 (ppm): 437
15:04:11:566 -> CO2 (ppm): 433
15:04:15:587 -> CO2 (ppm): 430
15:04:19:607 -> CO2 (ppm): 428
15:04:23:628 -> CO2 (ppm): 425
15:04:27:649 -> CO2 (ppm): 423
15:04:31:670 -> CO2 (ppm): 421
15:04:35:691 -> CO2 (ppm): 419
15:04:39:712 -> CO2 (ppm): 418
15:04:41:898 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:04:41:898 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":418,"boot":2,"bootCount":2}
15:04:41:898 -> [ApiClient] Info: Return code: 200
15:04:41:899 ->
15:04:41:899 -> Online mode and isPostToAirGradient = true: watchdog reset
15:04:41:899 ->
15:04:41:924 -> External watchdog feed!
15:04:47:754 -> CO2 (ppm): 417
15:04:47:754 -> CO2 (ppm): 415
15:04:51:775 -> CO2 (ppm): 415
15:04:55:796 -> CO2 (ppm): 414
15:04:59:817 -> CO2 (ppm): 414
15:05:03:838 -> CO2 (ppm): 413
15:05:08:118 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:05:08:118 -> [ApiClient] Info: Return code: 200
15:05:08:119 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:05:08:121 -> [Configure] Info: Parse configure success
15:05:08:122 -> [Configure] Info: Detected new firmware version: 3.1.9
15:05:08:166 -> CO2 (ppm): 413
15:05:12:187 -> CO2 (ppm): 412
15:05:16:208 -> CO2 (ppm): 412
15:05:20:229 -> CO2 (ppm): 412
15:05:24:249 -> CO2 (ppm): 412
15:05:28:271 -> CO2 (ppm): 413
15:05:32:291 -> CO2 (ppm): 415
15:05:36:312 -> CO2 (ppm): 418
15:05:40:333 -> CO2 (ppm): 418
15:05:42:937 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:05:42:937 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":418,"boot":3,"bootCount":3}
15:05:42:938 -> [ApiClient] Info: Return code: 200
15:05:42:939 ->
15:05:42:939 -> Online mode and isPostToAirGradient = true: watchdog reset
15:05:42:939 ->
15:05:42:963 -> External watchdog feed!
15:05:44:354 -> CO2 (ppm): 420
15:05:48:375 -> CO2 (ppm): 420
15:05:56:416 -> CO2 (ppm): 420
15:05:56:416 -> CO2 (ppm): 421
15:06:00:437 -> CO2 (ppm): 421
15:06:04:458 -> CO2 (ppm): 420
15:06:08:741 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:06:08:741 -> [ApiClient] Info: Return code: 200
15:06:08:742 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:06:08:744 -> [Configure] Info: Parse configure success
15:06:08:744 -> [Configure] Info: Detected new firmware version: 3.1.9
15:06:08:789 -> CO2 (ppm): 420
15:06:12:810 -> CO2 (ppm): 419
15:06:16:831 -> CO2 (ppm): 418
15:06:24:872 -> CO2 (ppm): 418
15:06:24:872 -> CO2 (ppm): 417
15:06:28:894 -> CO2 (ppm): 415
15:06:32:915 -> CO2 (ppm): 415
15:06:36:936 -> CO2 (ppm): 415
15:06:40:957 -> CO2 (ppm): 415
15:06:43:965 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:06:43:966 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":415,"boot":4,"bootCount":4}
15:06:43:966 -> [ApiClient] Info: Return code: 200
15:06:43:972 ->
15:06:43:972 -> Online mode and isPostToAirGradient = true: watchdog reset
15:06:43:972 ->
15:06:43:991 -> External watchdog feed!
15:06:44:979 -> CO2 (ppm): 461
15:06:49:000 -> CO2 (ppm): 498
15:06:53:020 -> CO2 (ppm): 526
15:06:57:041 -> CO2 (ppm): 543
15:07:01:062 -> CO2 (ppm): 549
15:07:05:083 -> CO2 (ppm): 548
15:07:09:360 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:07:09:360 -> [ApiClient] Info: Return code: 200
15:07:09:362 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:07:09:363 -> [Configure] Info: Parse configure success
15:07:09:363 -> [Configure] Info: co2CalibrationRequested: True
15:07:09:364 -> [Configure] Info: Detected new firmware version: 3.1.9
15:07:09:366 -> [StateMachine] Info: CO2 Calibration
15:07:09:366 -> [StateMachine] Info: Start CO2 calib after 5 sec
15:07:10:366 -> [StateMachine] Info: Start CO2 calib after 4 sec
15:07:11:366 -> [StateMachine] Info: Start CO2 calib after 3 sec
15:07:12:366 -> [StateMachine] Info: Start CO2 calib after 2 sec
15:07:13:366 -> [StateMachine] Info: Start CO2 calib after 1 sec
15:07:16:374 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:07:16:388 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:07:16:396 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:07:16:411 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:07:16:411 -> [StateMachine] Info: CO2 Calibration: success
15:07:17:411 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
15:07:17:419 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:17:432 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:17:432 -> Flags: 0
15:07:18:440 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:18:452 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:18:453 -> Flags: 0
15:07:19:468 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:19:474 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:19:474 -> Flags: 0
15:07:20:482 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:20:494 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:20:502 -> Flags: 0
15:07:21:503 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:21:516 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:21:516 -> Flags: 0
15:07:22:524 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:22:536 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:22:537 -> Flags: 0
15:07:23:545 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:23:558 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:23:558 -> Flags: 0
15:07:24:566 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:24:579 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:24:579 -> Flags: 0
15:07:25:587 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:25:599 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:25:600 -> Flags: 0
15:07:26:608 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:07:26:621 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:07:26:621 -> Flags: 0

View File

@ -1,216 +0,0 @@
15:07:35:085 -> Detected OPEN_AIR_OUTDOOR
15:07:35:085 -> Firmware Version: 3.1.9-dirty
15:07:35:231 -> Found S8 on Serial1
15:07:35:233 -> Init SGP41 failuire
15:07:35:233 -> SGP sensor not found
15:07:35:233 -> Can not detect SGP run mode 'O-1PS'
15:07:35:233 -> initializing PM sensor
15:07:35:233 -> cleared 0 byte(s)
15:07:35:233 -> setting active mode
15:07:35:233 -> 7 byte(s) written
15:07:39:231 -> No PM sensor detected on Serial0
15:07:39:231 -> initializing PM sensor
15:07:39:231 -> cleared 0 byte(s)
15:07:39:231 -> setting active mode
15:07:39:231 -> 7 byte(s) written
15:07:43:231 -> No PM sensor detected on Serial1
15:07:43:231 -> Firmware Mode: 0-1PS
15:07:43:252 -> Set S8 AbcDays successful
15:07:43:253 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
15:07:43:253 -> [ApiClient] Info: begin
15:07:43:298 -> [WifiConnector] Info: Connecting to WiFi...
15:07:43:298 -> *wm:AutoConnect
15:07:43:298 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
15:07:43:801 -> E (10413) wifi:sta is connecting, return error
15:07:43:802 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
15:07:51:216 -> *wm:AutoConnect: SUCCESS
15:07:51:216 -> *wm:STA IP Address: 192.168.100.127
15:07:51:216 -> [WifiConnector] Info: Wait for configure portal
15:07:51:216 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
15:07:51:231 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
15:07:51:231 -> MQTT is not configured, skipping initialization of MQTT client
15:07:53:804 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:07:53:804 -> [ApiClient] Info: DATA: {"wifi":-51,"boot":0}
15:07:53:805 -> [ApiClient] Info: Return code: 200
15:07:59:805 ->
15:07:59:806 -> firmwareCheckForUpdate:
15:07:59:806 -> firmwareCheckForUpdate: Perform
15:07:59:806 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
15:08:00:449 -> Firmware update skipped, the server returned 400
15:08:00:450 -> 3
15:08:00:450 -> OTA message:
15:08:00:450 ->
15:08:01:075 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:08:01:075 -> [ApiClient] Info: Return code: 200
15:08:01:076 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:08:01:077 -> [Configure] Info: Parse configure success
15:08:01:078 -> [Configure] Info: Detected new firmware version: 3.1.9
15:08:01:106 -> CO2 (ppm): 608
15:08:05:127 -> CO2 (ppm): 577
15:08:09:148 -> CO2 (ppm): 556
15:08:13:169 -> CO2 (ppm): 528
15:08:17:190 -> CO2 (ppm): 527
15:08:21:211 -> CO2 (ppm): 520
15:08:25:232 -> CO2 (ppm): 511
15:08:29:253 -> CO2 (ppm): 501
15:08:33:274 -> CO2 (ppm): 491
15:08:34:658 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:08:34:658 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":491,"boot":0,"bootCount":0}
15:08:34:659 -> [ApiClient] Info: Return code: 200
15:08:34:660 ->
15:08:34:660 -> Online mode and isPostToAirGradient = true: watchdog reset
15:08:34:660 ->
15:08:34:684 -> External watchdog feed!
15:08:37:295 -> CO2 (ppm): 482
15:08:41:316 -> CO2 (ppm): 474
15:08:45:337 -> CO2 (ppm): 468
15:08:49:396 -> CO2 (ppm): 460
15:08:53:417 -> CO2 (ppm): 452
15:08:57:438 -> CO2 (ppm): 442
15:09:01:691 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:09:01:692 -> [ApiClient] Info: Return code: 200
15:09:01:693 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:09:01:694 -> [Configure] Info: Parse configure success
15:09:01:695 -> [Configure] Info: Detected new firmware version: 3.1.9
15:09:01:740 -> CO2 (ppm): 439
15:09:05:761 -> CO2 (ppm): 437
15:09:09:783 -> CO2 (ppm): 451
15:09:13:803 -> CO2 (ppm): 472
15:09:17:825 -> CO2 (ppm): 490
15:09:21:846 -> CO2 (ppm): 503
15:09:25:866 -> CO2 (ppm): 509
15:09:29:887 -> CO2 (ppm): 509
15:09:35:639 -> CO2 (ppm): 505
15:09:35:639 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:09:35:639 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":505,"boot":1,"bootCount":1}
15:09:35:639 -> [ApiClient] Info: Return code: 200
15:09:35:640 ->
15:09:35:641 -> Online mode and isPostToAirGradient = true: watchdog reset
15:09:35:641 ->
15:09:35:665 -> External watchdog feed!
15:09:37:929 -> CO2 (ppm): 500
15:09:41:950 -> CO2 (ppm): 493
15:09:45:971 -> CO2 (ppm): 485
15:09:49:992 -> CO2 (ppm): 478
15:09:54:013 -> CO2 (ppm): 472
15:09:58:034 -> CO2 (ppm): 466
15:10:02:313 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:10:02:313 -> [ApiClient] Info: Return code: 200
15:10:02:315 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:10:02:316 -> [Configure] Info: Parse configure success
15:10:02:317 -> [Configure] Info: Detected new firmware version: 3.1.9
15:10:02:362 -> CO2 (ppm): 460
15:10:06:383 -> CO2 (ppm): 455
15:10:10:403 -> CO2 (ppm): 451
15:10:14:425 -> CO2 (ppm): 446
15:10:18:446 -> CO2 (ppm): 442
15:10:22:467 -> CO2 (ppm): 438
15:10:26:487 -> CO2 (ppm): 434
15:10:30:508 -> CO2 (ppm): 432
15:10:34:529 -> CO2 (ppm): 428
15:10:36:819 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:10:36:819 -> [ApiClient] Info: DATA: {"wifi":-52,"rco2":428,"boot":2,"bootCount":2}
15:10:36:819 -> [ApiClient] Info: Return code: 200
15:10:36:820 ->
15:10:36:821 -> Online mode and isPostToAirGradient = true: watchdog reset
15:10:36:821 ->
15:10:36:845 -> External watchdog feed!
15:10:38:550 -> CO2 (ppm): 427
15:10:42:571 -> CO2 (ppm): 425
15:10:46:592 -> CO2 (ppm): 423
15:10:50:613 -> CO2 (ppm): 421
15:10:54:634 -> CO2 (ppm): 418
15:10:58:655 -> CO2 (ppm): 417
15:11:02:933 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:11:02:933 -> [ApiClient] Info: Return code: 200
15:11:02:934 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:11:02:936 -> [Configure] Info: Parse configure success
15:11:02:937 -> [Configure] Info: Detected new firmware version: 3.1.9
15:11:02:981 -> CO2 (ppm): 416
15:11:07:001 -> CO2 (ppm): 417
15:11:11:022 -> CO2 (ppm): 416
15:11:15:042 -> CO2 (ppm): 416
15:11:19:063 -> CO2 (ppm): 416
15:11:27:105 -> CO2 (ppm): 416
15:11:27:105 -> CO2 (ppm): 416
15:11:31:126 -> CO2 (ppm): 416
15:11:35:147 -> CO2 (ppm): 417
15:11:37:792 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:11:37:792 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":417,"boot":3,"bootCount":3}
15:11:37:792 -> [ApiClient] Info: Return code: 200
15:11:37:793 ->
15:11:37:793 -> Online mode and isPostToAirGradient = true: watchdog reset
15:11:37:793 ->
15:11:37:818 -> External watchdog feed!
15:11:39:168 -> CO2 (ppm): 420
15:11:43:189 -> CO2 (ppm): 426
15:11:47:210 -> CO2 (ppm): 430
15:11:51:231 -> CO2 (ppm): 434
15:11:55:252 -> CO2 (ppm): 436
15:11:59:273 -> CO2 (ppm): 437
15:12:03:554 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:12:03:555 -> [ApiClient] Info: Return code: 200
15:12:03:555 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:12:03:557 -> [Configure] Info: Parse configure success
15:12:03:558 -> [Configure] Info: Detected new firmware version: 3.1.9
15:12:03:602 -> CO2 (ppm): 437
15:12:07:623 -> CO2 (ppm): 438
15:12:11:643 -> CO2 (ppm): 437
15:12:15:665 -> CO2 (ppm): 437
15:12:19:686 -> CO2 (ppm): 435
15:12:23:707 -> CO2 (ppm): 433
15:12:27:727 -> CO2 (ppm): 431
15:12:31:748 -> CO2 (ppm): 428
15:12:35:769 -> CO2 (ppm): 427
15:12:38:780 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:12:38:781 -> [ApiClient] Info: DATA: {"wifi":-51,"rco2":427,"boot":4,"bootCount":4}
15:12:38:781 -> [ApiClient] Info: Return code: 200
15:12:38:781 ->
15:12:38:781 -> Online mode and isPostToAirGradient = true: watchdog reset
15:12:38:781 ->
15:12:38:806 -> External watchdog feed!
15:12:39:790 -> CO2 (ppm): 425
15:12:43:811 -> CO2 (ppm): 424
15:12:47:832 -> CO2 (ppm): 424
15:12:51:853 -> CO2 (ppm): 428
15:12:55:877 -> CO2 (ppm): 456
15:12:59:895 -> CO2 (ppm): 501
15:13:04:175 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:13:04:175 -> [ApiClient] Info: Return code: 200
15:13:04:176 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:13:04:178 -> [Configure] Info: Parse configure success
15:13:04:178 -> [Configure] Info: co2CalibrationRequested: True
15:13:04:179 -> [Configure] Info: Detected new firmware version: 3.1.9
15:13:04:180 -> [StateMachine] Info: CO2 Calibration
15:13:04:181 -> [StateMachine] Info: Start CO2 calib after 5 sec
15:13:05:181 -> [StateMachine] Info: Start CO2 calib after 4 sec
15:13:06:181 -> [StateMachine] Info: Start CO2 calib after 3 sec
15:13:07:181 -> [StateMachine] Info: Start CO2 calib after 2 sec
15:13:08:181 -> [StateMachine] Info: Start CO2 calib after 1 sec
15:13:11:189 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:13:11:202 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:13:11:211 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:13:11:224 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:13:11:225 -> [StateMachine] Info: CO2 Calibration: success
15:13:12:225 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
15:13:12:233 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:12:245 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:12:246 -> Flags: 0
15:13:13:254 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:13:266 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:13:267 -> Flags: 0
15:13:14:275 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:14:288 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:14:288 -> Flags: 0
15:13:15:296 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:15:308 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:15:309 -> Flags: 0
15:13:16:317 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:16:329 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:16:330 -> Flags: 0
15:13:17:338 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:17:350 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:17:351 -> Flags: 0
15:13:18:359 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:13:18:371 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:13:18:372 -> Flags: 0

View File

@ -1,257 +0,0 @@
15:13:31:259 -> No PM sensor detected on Serial0
15:13:31:259 -> initializing PM sensor
15:13:31:259 -> cleared 0 byte(s)
15:13:31:260 -> setting active mode
15:13:31:260 -> 7 byte(s) written
15:13:35:259 -> No PM sensor detected on Serial1
15:13:35:259 -> Firmware Mode: 0-1PS
15:13:35:280 -> Set S8 AbcDays successful
15:13:35:280 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
15:13:35:280 -> [ApiClient] Info: begin
15:13:35:326 -> [WifiConnector] Info: Connecting to WiFi...
15:13:35:327 -> *wm:AutoConnect
15:13:35:327 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
15:13:35:829 -> E (10414) wifi:sta is connecting, return error
15:13:35:830 -> [ 10168][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
15:13:43:346 -> *wm:AutoConnect: SUCCESS
15:13:43:346 -> *wm:STA IP Address: 192.168.100.127
15:13:43:346 -> [WifiConnector] Info: Wait for configure portal
15:13:43:347 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
15:13:43:360 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
15:13:45:896 -> MQTT is not configured, skipping initialization of MQTT client
15:13:45:897 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:13:45:897 -> [ApiClient] Info: DATA: {"wifi":-58,"boot":0}
15:13:45:897 -> [ApiClient] Info: Return code: 200
15:13:51:897 ->
15:13:51:897 -> firmwareCheckForUpdate:
15:13:51:897 -> firmwareCheckForUpdate: Perform
15:13:51:898 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
15:13:52:543 -> Firmware update skipped, the server returned 400
15:13:52:544 -> 3
15:13:52:544 -> OTA message:
15:13:52:544 ->
15:13:53:122 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:13:53:122 -> [ApiClient] Info: Return code: 200
15:13:53:123 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:13:53:125 -> [Configure] Info: Parse configure success
15:13:53:125 -> [Configure] Info: Detected new firmware version: 3.1.9
15:13:53:153 -> CO2 (ppm): 0
15:13:57:175 -> CO2 (ppm): 491
15:14:01:196 -> CO2 (ppm): 479
15:14:05:217 -> CO2 (ppm): 466
15:14:09:238 -> CO2 (ppm): 457
15:14:13:259 -> CO2 (ppm): 455
15:14:21:300 -> CO2 (ppm): 447
15:14:21:300 -> CO2 (ppm): 444
15:14:25:321 -> CO2 (ppm): 438
15:14:25:684 -> External watchdog feed!
15:14:26:709 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:14:26:709 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":438,"boot":0,"bootCount":0}
15:14:26:710 -> [ApiClient] Info: Return code: 200
15:14:26:711 ->
15:14:26:711 -> Online mode and isPostToAirGradient = true: watchdog reset
15:14:26:711 ->
15:14:29:342 -> CO2 (ppm): 438
15:14:33:363 -> CO2 (ppm): 437
15:14:37:428 -> CO2 (ppm): 437
15:14:41:449 -> CO2 (ppm): 436
15:14:45:470 -> CO2 (ppm): 433
15:14:49:491 -> CO2 (ppm): 432
15:14:53:765 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:14:53:766 -> [ApiClient] Info: Return code: 200
15:14:53:766 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:14:53:768 -> [Configure] Info: Parse configure success
15:14:53:769 -> [Configure] Info: Detected new firmware version: 3.1.9
15:14:53:812 -> CO2 (ppm): 429
15:15:01:855 -> CO2 (ppm): 428
15:15:01:855 -> CO2 (ppm): 425
15:15:05:875 -> CO2 (ppm): 422
15:15:09:896 -> CO2 (ppm): 421
15:15:13:917 -> CO2 (ppm): 420
15:15:17:938 -> CO2 (ppm): 419
15:15:21:959 -> CO2 (ppm): 418
15:15:25:707 -> External watchdog feed!
15:15:25:980 -> CO2 (ppm): 418
15:15:27:739 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:15:27:739 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":418,"boot":1,"bootCount":1}
15:15:27:739 -> [ApiClient] Info: Return code: 200
15:15:27:740 ->
15:15:27:740 -> Online mode and isPostToAirGradient = true: watchdog reset
15:15:27:740 ->
15:15:30:001 -> CO2 (ppm): 419
15:15:34:022 -> CO2 (ppm): 419
15:15:38:043 -> CO2 (ppm): 420
15:15:42:064 -> CO2 (ppm): 420
15:15:46:085 -> CO2 (ppm): 419
15:15:50:106 -> CO2 (ppm): 418
15:15:54:496 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:15:54:496 -> [ApiClient] Info: Return code: 200
15:15:54:498 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:15:54:499 -> [Configure] Info: Parse configure success
15:15:54:544 -> [Configure] Info: Detected new firmware version: 3.1.9
15:15:54:544 -> CO2 (ppm): 418
15:15:58:565 -> CO2 (ppm): 417
15:16:02:585 -> CO2 (ppm): 417
15:16:06:606 -> CO2 (ppm): 416
15:16:10:627 -> CO2 (ppm): 417
15:16:14:648 -> CO2 (ppm): 417
15:16:18:669 -> CO2 (ppm): 417
15:16:22:690 -> CO2 (ppm): 417
15:16:25:730 -> External watchdog feed!
15:16:26:711 -> CO2 (ppm): 417
15:16:28:769 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:16:28:769 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":417,"boot":2,"bootCount":2}
15:16:28:769 -> [ApiClient] Info: Return code: 200
15:16:28:770 ->
15:16:28:770 -> Online mode and isPostToAirGradient = true: watchdog reset
15:16:28:770 ->
15:16:30:732 -> CO2 (ppm): 417
15:16:34:753 -> CO2 (ppm): 417
15:16:38:774 -> CO2 (ppm): 417
15:16:42:795 -> CO2 (ppm): 417
15:16:46:816 -> CO2 (ppm): 417
15:16:50:837 -> CO2 (ppm): 418
15:16:55:085 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:16:55:085 -> [ApiClient] Info: Return code: 200
15:16:55:086 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:16:55:088 -> [Configure] Info: Parse configure success
15:16:55:089 -> [Configure] Info: Detected new firmware version: 3.1.9
15:16:55:132 -> CO2 (ppm): 418
15:16:59:154 -> CO2 (ppm): 418
15:17:03:174 -> CO2 (ppm): 418
15:17:07:195 -> CO2 (ppm): 420
15:17:11:215 -> CO2 (ppm): 423
15:17:15:236 -> CO2 (ppm): 427
15:17:19:257 -> CO2 (ppm): 434
15:17:23:278 -> CO2 (ppm): 451
15:17:25:755 -> External watchdog feed!
15:17:27:300 -> CO2 (ppm): 502
15:17:29:729 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:17:29:729 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":502,"boot":3,"bootCount":3}
15:17:29:729 -> [ApiClient] Info: Return code: 200
15:17:29:730 ->
15:17:29:730 -> Online mode and isPostToAirGradient = true: watchdog reset
15:17:29:730 ->
15:17:31:320 -> CO2 (ppm): 580
15:17:35:341 -> CO2 (ppm): 677
15:17:39:362 -> CO2 (ppm): 771
15:17:43:383 -> CO2 (ppm): 850
15:17:47:404 -> CO2 (ppm): 910
15:17:51:425 -> CO2 (ppm): 962
15:17:55:705 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:17:55:705 -> [ApiClient] Info: Return code: 200
15:17:55:707 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:17:55:708 -> [Configure] Info: Parse configure success
15:17:55:709 -> [Configure] Info: Detected new firmware version: 3.1.9
15:17:55:754 -> CO2 (ppm): 1006
15:17:59:775 -> CO2 (ppm): 1008
15:18:03:796 -> CO2 (ppm): 983
15:18:07:817 -> CO2 (ppm): 943
15:18:11:838 -> CO2 (ppm): 888
15:18:15:859 -> CO2 (ppm): 831
15:18:19:880 -> CO2 (ppm): 774
15:18:23:901 -> CO2 (ppm): 721
15:18:25:777 -> External watchdog feed!
15:18:27:922 -> CO2 (ppm): 675
15:18:30:726 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:18:30:727 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":675,"boot":4,"bootCount":4}
15:18:30:727 -> [ApiClient] Info: Return code: 200
15:18:30:728 ->
15:18:30:728 -> Online mode and isPostToAirGradient = true: watchdog reset
15:18:30:728 ->
15:18:31:943 -> CO2 (ppm): 634
15:18:35:964 -> CO2 (ppm): 597
15:18:39:984 -> CO2 (ppm): 564
15:18:44:005 -> CO2 (ppm): 538
15:18:48:026 -> CO2 (ppm): 514
15:18:52:047 -> CO2 (ppm): 495
15:18:56:326 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:18:56:326 -> [ApiClient] Info: Return code: 200
15:18:56:328 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:18:56:329 -> [Configure] Info: Parse configure success
15:18:56:330 -> [Configure] Info: Detected new firmware version: 3.1.9
15:18:56:374 -> CO2 (ppm): 480
15:19:00:395 -> CO2 (ppm): 467
15:19:04:416 -> CO2 (ppm): 457
15:19:08:437 -> CO2 (ppm): 447
15:19:12:458 -> CO2 (ppm): 440
15:19:16:479 -> CO2 (ppm): 433
15:19:20:500 -> CO2 (ppm): 429
15:19:24:521 -> CO2 (ppm): 425
15:19:25:800 -> External watchdog feed!
15:19:28:542 -> CO2 (ppm): 422
15:19:31:706 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:19:31:706 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":422,"boot":5,"bootCount":5}
15:19:31:707 -> [ApiClient] Info: Return code: 200
15:19:31:708 ->
15:19:31:708 -> Online mode and isPostToAirGradient = true: watchdog reset
15:19:31:708 ->
15:19:32:607 -> CO2 (ppm): 419
15:19:36:627 -> CO2 (ppm): 415
15:19:40:648 -> CO2 (ppm): 412
15:19:44:670 -> CO2 (ppm): 410
15:19:48:690 -> CO2 (ppm): 408
15:19:52:712 -> CO2 (ppm): 408
15:19:57:457 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:19:57:458 -> [ApiClient] Info: Return code: 200
15:19:57:459 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:19:57:460 -> [Configure] Info: Parse configure success
15:19:57:461 -> [Configure] Info: co2CalibrationRequested: True
15:19:57:461 -> [Configure] Info: Detected new firmware version: 3.1.9
15:19:57:463 -> [StateMachine] Info: CO2 Calibration
15:19:57:463 -> [StateMachine] Info: Start CO2 calib after 5 sec
15:19:58:463 -> [StateMachine] Info: Start CO2 calib after 4 sec
15:19:59:463 -> [StateMachine] Info: Start CO2 calib after 3 sec
15:20:00:463 -> [StateMachine] Info: Start CO2 calib after 2 sec
15:20:01:463 -> [StateMachine] Info: Start CO2 calib after 1 sec
15:20:04:471 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:20:04:520 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:20:04:529 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:20:04:543 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:20:04:543 -> [StateMachine] Info: CO2 Calibration: success
15:20:05:543 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
15:20:05:552 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:05:564 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:05:564 -> Flags: 0
15:20:06:572 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:06:585 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:06:585 -> Flags: 0
15:20:07:593 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:07:606 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:07:606 -> Flags: 0
15:20:08:614 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:08:627 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:08:627 -> Flags: 0
15:20:09:635 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:09:648 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:09:648 -> Flags: 0
15:20:10:657 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:10:669 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:10:669 -> Flags: 0
15:20:11:677 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:11:690 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:11:690 -> Flags: 0
15:20:12:698 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:12:711 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:12:711 -> Flags: 0
15:20:13:719 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:13:732 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:13:732 -> Flags: 0
15:20:14:740 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:14:753 -> Get Acknowladgement Response > 15:20:14:753 -> Flags: 0
15:20:15:761 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:15:774 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:15:774 -> Flags: 0
15:20:16:782 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:16:795 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:16:795 -> Flags: 0
15:20:17:803 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:17:816 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:17:816 -> Flags: 0
15:20:18:824 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:18:837 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:18:837 -> Flags: 0
15:20:19:845 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:20:19:858 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:20:19:858 -> Flags: 0

View File

@ -1,279 +0,0 @@
15:35:52:096 -> Detected OPEN_AIR_OUTDOOR
15:35:52:096 -> Firmware Version: 3.1.9-dirty
15:35:52:241 -> Found S8 on Serial1
15:35:52:242 -> Init SGP41 failuire
15:35:52:242 -> SGP sensor not found
15:35:52:242 -> Can not detect SGP run mode 'O-1PS'
15:35:52:242 -> initializing PM sensor
15:35:52:243 -> cleared 0 byte(s)
15:35:52:243 -> setting active mode
15:35:52:243 -> 7 byte(s) written
15:35:56:242 -> No PM sensor detected on Serial0
15:35:56:242 -> initializing PM sensor
15:35:56:242 -> cleared 0 byte(s)
15:35:56:242 -> setting active mode
15:35:56:242 -> 7 byte(s) written
15:36:00:242 -> No PM sensor detected on Serial1
15:36:00:242 -> Firmware Mode: 0-1PS
15:36:00:263 -> Set S8 AbcDays successful
15:36:00:264 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
15:36:00:264 -> [ApiClient] Info: begin
15:36:00:309 -> [WifiConnector] Info: Connecting to WiFi...
15:36:00:309 -> *wm:AutoConnect
15:36:00:309 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
15:36:00:812 -> E (10413) wifi:sta is connecting, return error
15:36:00:812 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
15:36:08:326 -> *wm:AutoConnect: SUCCESS
15:36:08:326 -> *wm:STA IP Address: 192.168.100.127
15:36:08:326 -> [WifiConnector] Info: Wait for configure portal
15:36:08:326 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
15:36:08:339 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
15:36:08:340 -> MQTT is not configured, skipping initialization of MQTT client
15:36:11:073 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:36:11:073 -> [ApiClient] Info: DATA: {"wifi":-55,"boot":0}
15:36:11:074 -> [ApiClient] Info: Return code: 200
15:36:17:074 ->
15:36:17:074 -> firmwareCheckForUpdate:
15:36:17:074 -> firmwareCheckForUpdate: Perform
15:36:17:075 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-dirty
15:36:17:721 -> Firmware update skipped, the server returned 400
15:36:17:722 -> 3
15:36:17:722 -> OTA message:
15:36:17:722 ->
15:36:18:347 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:36:18:347 -> [ApiClient] Info: Return code: 200
15:36:18:348 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:36:18:349 -> [Configure] Info: Parse configure success
15:36:18:351 -> [Configure] Info: Detected new firmware version: 3.1.9
15:36:18:378 -> CO2 (ppm): 495
15:36:22:399 -> CO2 (ppm): 481
15:36:26:420 -> CO2 (ppm): 473
15:36:30:441 -> CO2 (ppm): 463
15:36:34:501 -> CO2 (ppm): 463
15:36:38:522 -> CO2 (ppm): 466
15:36:42:543 -> CO2 (ppm): 469
15:36:46:564 -> CO2 (ppm): 468
15:36:50:585 -> CO2 (ppm): 464
15:36:51:629 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:36:51:629 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":464,"boot":0,"bootCount":0}
15:36:51:629 -> [ApiClient] Info: Return code: 200
15:36:51:630 ->
15:36:51:630 -> Online mode and isPostToAirGradient = true: watchdog reset
15:36:51:630 ->
15:36:51:655 -> External watchdog feed!
15:36:54:606 -> CO2 (ppm): 460
15:36:58:627 -> CO2 (ppm): 455
15:37:02:648 -> CO2 (ppm): 452
15:37:06:668 -> CO2 (ppm): 447
15:37:10:688 -> CO2 (ppm): 444
15:37:14:709 -> CO2 (ppm): 440
15:37:18:964 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:37:18:965 -> [ApiClient] Info: Return code: 200
15:37:18:966 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:37:18:967 -> [Configure] Info: Parse configure success
15:37:18:968 -> [Configure] Info: Detected new firmware version: 3.1.9
15:37:19:012 -> CO2 (ppm): 436
15:37:23:033 -> CO2 (ppm): 432
15:37:31:075 -> CO2 (ppm): 429
15:37:31:075 -> CO2 (ppm): 426
15:37:35:096 -> CO2 (ppm): 425
15:37:39:117 -> CO2 (ppm): 423
15:37:43:138 -> CO2 (ppm): 421
15:37:47:159 -> CO2 (ppm): 420
15:37:51:179 -> CO2 (ppm): 420
15:37:52:659 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:37:52:659 -> [ApiClient] Info: DATA: {"wifi":-53,"rco2":420,"boot":1,"bootCount":1}
15:37:52:659 -> [ApiClient] Info: Return code: 200
15:37:52:659 ->
15:37:52:660 -> Online mode and isPostToAirGradient = true: watchdog reset
15:37:52:660 ->
15:37:52:685 -> External watchdog feed!
15:37:55:201 -> CO2 (ppm): 419
15:37:59:222 -> CO2 (ppm): 420
15:38:03:242 -> CO2 (ppm): 431
15:38:07:263 -> CO2 (ppm): 477
15:38:11:285 -> CO2 (ppm): 498
15:38:15:307 -> CO2 (ppm): 507
15:38:19:589 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:38:19:589 -> [ApiClient] Info: Return code: 200
15:38:19:590 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:38:19:592 -> [Configure] Info: Parse configure success
15:38:19:592 -> [Configure] Info: Detected new firmware version: 3.1.9
15:38:19:636 -> CO2 (ppm): 506
15:38:23:658 -> CO2 (ppm): 501
15:38:27:678 -> CO2 (ppm): 495
15:38:31:700 -> CO2 (ppm): 488
15:38:35:720 -> CO2 (ppm): 479
15:38:39:742 -> CO2 (ppm): 471
15:38:43:762 -> CO2 (ppm): 463
15:38:47:783 -> CO2 (ppm): 457
15:38:51:804 -> CO2 (ppm): 451
15:38:53:685 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:38:53:685 -> [ApiClient] Info: DATA: {"wifi":-54,"rco2":451,"boot":2,"bootCount":2}
15:38:53:685 -> [ApiClient] Info: Return code: 200
15:38:53:686 ->
15:38:53:686 -> Online mode and isPostToAirGradient = true: watchdog reset
15:38:53:686 ->
15:38:53:711 -> External watchdog feed!
15:38:55:825 -> CO2 (ppm): 445
15:38:59:846 -> CO2 (ppm): 440
15:39:03:867 -> CO2 (ppm): 436
15:39:07:887 -> CO2 (ppm): 434
15:39:11:908 -> CO2 (ppm): 431
15:39:15:929 -> CO2 (ppm): 428
15:39:20:208 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:39:20:208 -> [ApiClient] Info: Return code: 200
15:39:20:209 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:39:20:210 -> [Configure] Info: Parse configure success
15:39:20:211 -> [Configure] Info: Detected new firmware version: 3.1.9
15:39:24:277 -> CO2 (ppm): 426
15:39:24:277 -> CO2 (ppm): 425
15:39:28:297 -> CO2 (ppm): 424
15:39:32:318 -> CO2 (ppm): 424
15:39:36:339 -> CO2 (ppm): 425
15:39:40:360 -> CO2 (ppm): 423
15:39:44:381 -> CO2 (ppm): 423
15:39:48:402 -> CO2 (ppm): 422
15:39:52:423 -> CO2 (ppm): 421
15:39:54:655 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:39:54:655 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":421,"boot":3,"bootCount":3}
15:39:54:655 -> [ApiClient] Info: Return code: 200
15:39:54:656 ->
15:39:54:656 -> Online mode and isPostToAirGradient = true: watchdog reset
15:39:54:656 ->
15:39:54:680 -> External watchdog feed!
15:39:56:444 -> CO2 (ppm): 421
15:40:00:465 -> CO2 (ppm): 421
15:40:04:486 -> CO2 (ppm): 420
15:40:08:507 -> CO2 (ppm): 420
15:40:16:549 -> CO2 (ppm): 419
15:40:16:549 -> CO2 (ppm): 418
15:40:20:828 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:40:20:828 -> [ApiClient] Info: Return code: 200
15:40:20:830 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:40:20:831 -> [Configure] Info: Parse configure success
15:40:20:876 -> [Configure] Info: Detected new firmware version: 3.1.9
15:40:20:876 -> CO2 (ppm): 418
15:40:24:897 -> CO2 (ppm): 417
15:40:28:928 -> CO2 (ppm): 417
15:40:32:939 -> CO2 (ppm): 417
15:40:36:960 -> CO2 (ppm): 417
15:40:40:981 -> CO2 (ppm): 417
15:40:45:002 -> CO2 (ppm): 417
15:40:49:023 -> CO2 (ppm): 417
15:40:53:043 -> CO2 (ppm): 417
15:40:55:588 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:40:55:588 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":417,"boot":4,"bootCount":4}
15:40:55:588 -> [ApiClient] Info: Return code: 200
15:40:55:589 ->
15:40:55:589 -> Online mode and isPostToAirGradient = true: watchdog reset
15:40:55:590 ->
15:40:55:614 -> External watchdog feed!
15:40:57:064 -> CO2 (ppm): 416
15:41:01:085 -> CO2 (ppm): 416
15:41:05:107 -> CO2 (ppm): 417
15:41:09:127 -> CO2 (ppm): 416
15:41:13:148 -> CO2 (ppm): 416
15:41:17:169 -> CO2 (ppm): 416
15:41:21:448 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:41:21:448 -> [ApiClient] Info: Return code: 200
15:41:21:450 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:41:21:451 -> [Configure] Info: Parse configure success
15:41:21:452 -> [Configure] Info: Detected new firmware version: 3.1.9
15:41:21:496 -> CO2 (ppm): 415
15:41:25:517 -> CO2 (ppm): 415
15:41:29:538 -> CO2 (ppm): 415
15:41:33:559 -> CO2 (ppm): 420
15:41:37:580 -> CO2 (ppm): 435
15:41:41:601 -> CO2 (ppm): 472
15:41:45:621 -> CO2 (ppm): 509
15:41:49:684 -> CO2 (ppm): 524
15:41:53:704 -> CO2 (ppm): 529
15:41:56:574 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:41:56:574 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":529,"boot":5,"bootCount":5}
15:41:56:574 -> [ApiClient] Info: Return code: 200
15:41:56:600 ->
15:41:56:600 -> Online mode and isPostToAirGradient = true: watchdog reset
15:41:56:600 ->
15:41:56:600 -> External watchdog feed!
15:41:57:725 -> CO2 (ppm): 524
15:42:01:746 -> CO2 (ppm): 518
15:42:05:767 -> CO2 (ppm): 510
15:42:09:788 -> CO2 (ppm): 501
15:42:13:809 -> CO2 (ppm): 490
15:42:17:830 -> CO2 (ppm): 480
15:42:22:068 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:42:22:068 -> [ApiClient] Info: Return code: 200
15:42:22:070 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:42:22:071 -> [Configure] Info: Parse configure success
15:42:22:072 -> [Configure] Info: Detected new firmware version: 3.1.9
15:42:22:116 -> CO2 (ppm): 469
15:42:26:137 -> CO2 (ppm): 460
15:42:30:158 -> CO2 (ppm): 453
15:42:34:179 -> CO2 (ppm): 446
15:42:38:200 -> CO2 (ppm): 442
15:42:42:220 -> CO2 (ppm): 437
15:42:46:241 -> CO2 (ppm): 434
15:42:50:262 -> CO2 (ppm): 431
15:42:54:283 -> CO2 (ppm): 430
15:42:57:601 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
15:42:57:601 -> [ApiClient] Info: DATA: {"wifi":-55,"rco2":430,"boot":6,"bootCount":6}
15:42:57:601 -> [ApiClient] Info: Return code: 200
15:42:57:602 ->
15:42:57:602 -> Online mode and isPostToAirGradient = true: watchdog reset
15:42:57:602 ->
15:42:57:626 -> External watchdog feed!
15:42:58:304 -> CO2 (ppm): 434
15:43:02:325 -> CO2 (ppm): 439
15:43:06:345 -> CO2 (ppm): 444
15:43:10:366 -> CO2 (ppm): 447
15:43:14:387 -> CO2 (ppm): 449
15:43:18:408 -> CO2 (ppm): 483
15:43:22:745 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
15:43:22:746 -> [ApiClient] Info: Return code: 200
15:43:22:747 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
15:43:22:748 -> [Configure] Info: Parse configure success
15:43:22:748 -> [Configure] Info: co2CalibrationRequested: True
15:43:22:749 -> [Configure] Info: Detected new firmware version: 3.1.9
15:43:22:751 -> [StateMachine] Info: CO2 Calibration
15:43:22:751 -> [StateMachine] Info: Start CO2 calib after 5 sec
15:43:23:751 -> [StateMachine] Info: Start CO2 calib after 4 sec
15:43:24:751 -> [StateMachine] Info: Start CO2 calib after 3 sec
15:43:25:751 -> [StateMachine] Info: Start CO2 calib after 2 sec
15:43:26:751 -> [StateMachine] Info: Start CO2 calib after 1 sec
15:43:29:759 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:43:29:772 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
15:43:29:781 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:43:29:794 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
15:43:29:801 -> [StateMachine] Info: CO2 Calibration: success
15:43:30:795 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
15:43:30:803 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:30:815 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:30:816 -> Flags: 0
15:43:31:824 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:31:842 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:31:842 -> Flags: 0
15:43:32:845 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:32:860 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:32:860 -> Flags: 0
15:43:33:866 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:33:878 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:33:884 -> Flags: 0
15:43:34:887 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:34:899 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:34:900 -> Flags: 0
15:43:35:908 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:35:920 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:35:921 -> Flags: 0
15:43:36:929 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:36:941 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:36:942 -> Flags: 0
15:43:37:950 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:37:962 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:37:963 -> Flags: 0
15:43:38:971 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:38:983 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:38:984 -> Flags: 0
15:43:39:992 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
15:43:40:004 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
15:43:40:005 -> Flags: 0

View File

@ -1,631 +0,0 @@
16:20:28:694 -> Found S8 on Serial1
16:20:28:694 -> Init SGP41 failuire
16:20:28:694 -> SGP sensor not found
16:20:28:694 -> Can not detect SGP run mode 'O-1PS'
16:20:28:695 -> initializing PM sensor
16:20:28:695 -> cleared 0 byte(s)
16:20:28:695 -> setting active mode
16:20:28:695 -> 7 byte(s) written
16:20:32:695 -> No PM sensor detected on Serial0
16:20:32:695 -> initializing PM sensor
16:20:32:695 -> cleared 0 byte(s)
16:20:32:695 -> setting active mode
16:20:32:695 -> 7 byte(s) written
16:20:36:695 -> No PM sensor detected on Serial1
16:20:36:695 -> Firmware Mode: 0-1PS
16:20:36:715 -> Set S8 AbcDays successful
16:20:36:716 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
16:20:36:716 -> [ApiClient] Info: begin
16:20:36:761 -> [WifiConnector] Info: Connecting to WiFi...
16:20:36:761 -> *wm:AutoConnect
16:20:36:761 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
16:20:37:264 -> E (10414) wifi:sta is connecting, return error
16:20:37:265 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
16:20:44:678 -> *wm:AutoConnect: SUCCESS
16:20:44:679 -> *wm:STA IP Address: 192.168.100.127
16:20:44:679 -> [WifiConnector] Info: Wait for configure portal
16:20:44:680 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
16:20:44:692 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
16:20:47:282 -> MQTT is not configured, skipping initialization of MQTT client
16:20:47:282 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:20:47:282 -> [ApiClient] Info: DATA: {"wifi":-61,"boot":0}
16:20:47:282 -> [ApiClient] Info: Return code: 200
16:20:53:283 ->
16:20:53:283 -> firmwareCheckForUpdate:
16:20:53:283 -> firmwareCheckForUpdate: Perform
16:20:53:283 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-1-g4691500-dirty
16:20:53:934 -> Firmware update skipped, the server returned 400
16:20:53:935 -> 3
16:20:53:936 -> OTA message:
16:20:53:936 ->
16:20:54:559 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:20:54:559 -> [ApiClient] Info: Return code: 200
16:20:54:560 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:20:54:561 -> [Configure] Info: Parse configure success
16:20:54:562 -> [Configure] Info: Detected new firmware version: 3.1.9
16:20:54:590 -> CO2 (ppm): 337
16:20:58:612 -> CO2 (ppm): 317
16:21:02:632 -> CO2 (ppm): 302
16:21:06:653 -> CO2 (ppm): 285
16:21:10:674 -> CO2 (ppm): 283
16:21:14:695 -> CO2 (ppm): 283
16:21:22:737 -> CO2 (ppm): 282
16:21:22:737 -> CO2 (ppm): 308
16:21:26:810 -> CO2 (ppm): 329
16:21:27:120 -> External watchdog feed!
16:21:28:145 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:21:28:145 -> [ApiClient] Info: DATA: {"wifi":-61,"rco2":329,"boot":0,"bootCount":0}
16:21:28:146 -> [ApiClient] Info: Return code: 200
16:21:28:147 ->
16:21:28:147 -> Online mode and isPostToAirGradient = true: watchdog reset
16:21:28:147 ->
16:21:30:831 -> CO2 (ppm): 340
16:21:34:852 -> CO2 (ppm): 337
16:21:38:873 -> CO2 (ppm): 328
16:21:42:893 -> CO2 (ppm): 317
16:21:46:915 -> CO2 (ppm): 307
16:21:50:935 -> CO2 (ppm): 296
16:21:55:178 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:21:55:179 -> [ApiClient] Info: Return code: 200
16:21:55:186 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:21:55:186 -> [Configure] Info: Parse configure success
16:21:55:186 -> [Configure] Info: Detected new firmware version: 3.1.9
16:21:55:226 -> CO2 (ppm): 286
16:21:59:247 -> CO2 (ppm): 278
16:22:03:274 -> CO2 (ppm): 270
16:22:07:289 -> CO2 (ppm): 271
16:22:15:331 -> CO2 (ppm): 273
16:22:15:331 -> CO2 (ppm): 271
16:22:19:352 -> CO2 (ppm): 270
16:22:23:373 -> CO2 (ppm): 267
16:22:27:143 -> External watchdog feed!
16:22:27:394 -> CO2 (ppm): 263
16:22:29:106 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:22:29:106 -> [ApiClient] Info: DATA: {"wifi":-61,"rco2":263,"boot":1,"bootCount":1}
16:22:29:106 -> [ApiClient] Info: Return code: 200
16:22:29:107 ->
16:22:29:107 -> Online mode and isPostToAirGradient = true: watchdog reset
16:22:29:107 ->
16:22:31:414 -> CO2 (ppm): 261
16:22:35:435 -> CO2 (ppm): 260
16:22:39:456 -> CO2 (ppm): 257
16:22:43:477 -> CO2 (ppm): 254
16:22:47:498 -> CO2 (ppm): 252
16:22:51:519 -> CO2 (ppm): 251
16:22:55:799 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:22:55:799 -> [ApiClient] Info: Return code: 200
16:22:55:801 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:22:55:803 -> [Configure] Info: Parse configure success
16:22:55:804 -> [Configure] Info: Detected new firmware version: 3.1.9
16:22:55:847 -> CO2 (ppm): 251
16:22:59:867 -> CO2 (ppm): 255
16:23:03:888 -> CO2 (ppm): 255
16:23:07:909 -> CO2 (ppm): 254
16:23:11:930 -> CO2 (ppm): 253
16:23:15:951 -> CO2 (ppm): 252
16:23:19:971 -> CO2 (ppm): 250
16:23:23:992 -> CO2 (ppm): 248
16:23:27:166 -> External watchdog feed!
16:23:28:013 -> CO2 (ppm): 246
16:23:30:657 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:23:30:658 -> [ApiClient] Info: DATA: {"wifi":-59,"rco2":246,"boot":2,"bootCount":2}
16:23:30:658 -> [ApiClient] Info: Return code: 200
16:23:30:659 ->
16:23:30:659 -> Online mode and isPostToAirGradient = true: watchdog reset
16:23:30:659 ->
16:23:32:034 -> CO2 (ppm): 245
16:23:36:055 -> CO2 (ppm): 245
16:23:40:075 -> CO2 (ppm): 244
16:23:44:097 -> CO2 (ppm): 243
16:23:52:138 -> CO2 (ppm): 242
16:23:52:138 -> CO2 (ppm): 241
16:23:56:419 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:23:56:419 -> [ApiClient] Info: Return code: 200
16:23:56:420 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:23:56:422 -> [Configure] Info: Parse configure success
16:23:56:422 -> [Configure] Info: Detected new firmware version: 3.1.9
16:23:56:466 -> CO2 (ppm): 241
16:24:00:487 -> CO2 (ppm): 240
16:24:04:508 -> CO2 (ppm): 240
16:24:08:529 -> CO2 (ppm): 239
16:24:12:550 -> CO2 (ppm): 238
16:24:16:571 -> CO2 (ppm): 238
16:24:20:592 -> CO2 (ppm): 238
16:24:24:613 -> CO2 (ppm): 238
16:24:27:189 -> External watchdog feed!
16:24:28:634 -> CO2 (ppm): 237
16:24:31:576 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:24:31:576 -> [ApiClient] Info: DATA: {"wifi":-63,"rco2":237,"boot":3,"bootCount":3}
16:24:31:577 -> [ApiClient] Info: Return code: 200
16:24:31:577 ->
16:24:31:577 -> Online mode and isPostToAirGradient = true: watchdog reset
16:24:31:577 ->
16:24:32:655 -> CO2 (ppm): 237
16:24:36:676 -> CO2 (ppm): 237
16:24:40:697 -> CO2 (ppm): 237
16:24:44:718 -> CO2 (ppm): 237
16:24:48:739 -> CO2 (ppm): 237
16:24:52:760 -> CO2 (ppm): 237
16:24:57:040 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:24:57:041 -> [ApiClient] Info: Return code: 200
16:24:57:042 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:24:57:044 -> [Configure] Info: Parse configure success
16:24:57:044 -> [Configure] Info: Detected new firmware version: 3.1.9
16:24:57:088 -> CO2 (ppm): 237
16:25:01:109 -> CO2 (ppm): 237
16:25:05:130 -> CO2 (ppm): 237
16:25:09:151 -> CO2 (ppm): 237
16:25:13:179 -> CO2 (ppm): 236
16:25:17:193 -> CO2 (ppm): 237
16:25:21:214 -> CO2 (ppm): 237
16:25:25:234 -> CO2 (ppm): 238
16:25:27:212 -> External watchdog feed!
16:25:29:255 -> CO2 (ppm): 238
16:25:32:573 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:25:32:574 -> [ApiClient] Info: DATA: {"wifi":-64,"rco2":238,"boot":4,"bootCount":4}
16:25:32:574 -> [ApiClient] Info: Return code: 200
16:25:32:574 ->
16:25:32:574 -> Online mode and isPostToAirGradient = true: watchdog reset
16:25:32:574 ->
16:25:33:276 -> CO2 (ppm): 238
16:25:41:318 -> CO2 (ppm): 239
16:25:41:318 -> CO2 (ppm): 239
16:25:45:339 -> CO2 (ppm): 239
16:25:49:360 -> CO2 (ppm): 239
16:25:53:381 -> CO2 (ppm): 240
16:25:57:660 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:25:57:660 -> [ApiClient] Info: Return code: 200
16:25:57:662 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:25:57:663 -> [Configure] Info: Parse configure success
16:25:57:664 -> [Configure] Info: Detected new firmware version: 3.1.9
16:25:57:708 -> CO2 (ppm): 239
16:26:01:729 -> CO2 (ppm): 239
16:26:05:750 -> CO2 (ppm): 239
16:26:09:771 -> CO2 (ppm): 238
16:26:13:792 -> CO2 (ppm): 237
16:26:17:811 -> CO2 (ppm): 237
16:26:21:832 -> CO2 (ppm): 237
16:26:25:853 -> CO2 (ppm): 237
16:26:27:235 -> External watchdog feed!
16:26:29:874 -> CO2 (ppm): 237
16:26:33:604 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:26:33:604 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":237,"boot":5,"bootCount":5}
16:26:33:605 -> [ApiClient] Info: Return code: 200
16:26:33:605 ->
16:26:33:605 -> Online mode and isPostToAirGradient = true: watchdog reset
16:26:33:605 ->
16:26:33:895 -> CO2 (ppm): 237
16:26:37:916 -> CO2 (ppm): 237
16:26:41:937 -> CO2 (ppm): 237
16:26:45:958 -> CO2 (ppm): 237
16:26:49:979 -> CO2 (ppm): 237
16:26:54:000 -> CO2 (ppm): 236
16:26:58:281 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:26:58:281 -> [ApiClient] Info: Return code: 200
16:26:58:283 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:26:58:284 -> [Configure] Info: Parse configure success
16:26:58:285 -> [Configure] Info: Detected new firmware version: 3.1.9
16:26:58:329 -> CO2 (ppm): 236
16:27:02:350 -> CO2 (ppm): 236
16:27:06:371 -> CO2 (ppm): 236
16:27:10:392 -> CO2 (ppm): 236
16:27:14:413 -> CO2 (ppm): 236
16:27:18:434 -> CO2 (ppm): 236
16:27:22:455 -> CO2 (ppm): 236
16:27:26:476 -> CO2 (ppm): 236
16:27:27:258 -> External watchdog feed!
16:27:30:496 -> CO2 (ppm): 236
16:27:34:568 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:27:34:568 -> [ApiClient] Info: DATA: {"wifi":-59,"rco2":236,"boot":6,"bootCount":6}
16:27:34:569 -> [ApiClient] Info: Return code: 200
16:27:34:570 ->
16:27:34:570 -> Online mode and isPostToAirGradient = true: watchdog reset
16:27:34:570 ->
16:27:34:591 -> CO2 (ppm): 236
16:27:38:613 -> CO2 (ppm): 237
16:27:42:633 -> CO2 (ppm): 237
16:27:46:654 -> CO2 (ppm): 239
16:27:50:674 -> CO2 (ppm): 243
16:27:54:695 -> CO2 (ppm): 244
16:27:58:935 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:27:58:935 -> [ApiClient] Info: Return code: 200
16:27:58:937 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:27:58:939 -> [Configure] Info: Parse configure success
16:27:58:939 -> [Configure] Info: Detected new firmware version: 3.1.9
16:27:58:983 -> CO2 (ppm): 245
16:28:03:004 -> CO2 (ppm): 247
16:28:07:025 -> CO2 (ppm): 248
16:28:11:046 -> CO2 (ppm): 248
16:28:15:067 -> CO2 (ppm): 247
16:28:19:088 -> CO2 (ppm): 247
16:28:23:109 -> CO2 (ppm): 246
16:28:27:130 -> CO2 (ppm): 245
16:28:27:282 -> External watchdog feed!
16:28:31:151 -> CO2 (ppm): 282
16:28:35:666 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:28:35:667 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":282,"boot":7,"bootCount":7}
16:28:35:667 -> [ApiClient] Info: Return code: 200
16:28:35:670 ->
16:28:35:670 -> Online mode and isPostToAirGradient = true: watchdog reset
16:28:35:670 ->
16:28:35:702 -> CO2 (ppm): 327
16:28:39:709 -> CO2 (ppm): 354
16:28:43:729 -> CO2 (ppm): 362
16:28:47:750 -> CO2 (ppm): 359
16:28:51:771 -> CO2 (ppm): 352
16:28:55:792 -> CO2 (ppm): 342
16:28:59:523 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:28:59:523 -> [ApiClient] Info: Return code: 200
16:28:59:525 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:28:59:526 -> [Configure] Info: Parse configure success
16:28:59:526 -> [Configure] Info: Detected new firmware version: 3.1.9
16:28:59:813 -> CO2 (ppm): 340
16:29:03:841 -> CO2 (ppm): 347
16:29:07:855 -> CO2 (ppm): 347
16:29:11:876 -> CO2 (ppm): 341
16:29:15:897 -> CO2 (ppm): 332
16:29:19:918 -> CO2 (ppm): 356
16:29:23:939 -> CO2 (ppm): 383
16:29:27:305 -> External watchdog feed!
16:29:27:960 -> CO2 (ppm): 395
16:29:31:981 -> CO2 (ppm): 394
16:29:36:719 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:29:36:719 -> [ApiClient] Info: DATA: {"wifi":-61,"rco2":394,"boot":8,"bootCount":8}
16:29:36:720 -> [ApiClient] Info: Return code: 200
16:29:36:721 ->
16:29:36:721 -> Online mode and isPostToAirGradient = true: watchdog reset
16:29:36:721 ->
16:29:36:742 -> CO2 (ppm): 371
16:29:40:763 -> CO2 (ppm): 356
16:29:44:783 -> CO2 (ppm): 343
16:29:48:804 -> CO2 (ppm): 330
16:29:52:825 -> CO2 (ppm): 317
16:29:56:846 -> CO2 (ppm): 306
16:30:00:755 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:30:00:755 -> [ApiClient] Info: Return code: 200
16:30:00:757 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:30:00:758 -> [Configure] Info: Parse configure success
16:30:00:759 -> [Configure] Info: Detected new firmware version: 3.1.9
16:30:00:867 -> CO2 (ppm): 309
16:30:04:888 -> CO2 (ppm): 314
16:30:08:909 -> CO2 (ppm): 313
16:30:12:930 -> CO2 (ppm): 308
16:30:16:951 -> CO2 (ppm): 301
16:30:20:972 -> CO2 (ppm): 304
16:30:24:993 -> CO2 (ppm): 309
16:30:27:328 -> External watchdog feed!
16:30:29:014 -> CO2 (ppm): 307
16:30:33:035 -> CO2 (ppm): 302
16:30:37:724 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:30:37:725 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":302,"boot":9,"bootCount":9}
16:30:37:725 -> [ApiClient] Info: Return code: 200
16:30:37:726 ->
16:30:37:726 -> Online mode and isPostToAirGradient = true: watchdog reset
16:30:37:726 ->
16:30:37:747 -> CO2 (ppm): 295
16:30:41:768 -> CO2 (ppm): 288
16:30:45:789 -> CO2 (ppm): 281
16:30:49:812 -> CO2 (ppm): 275
16:30:53:831 -> CO2 (ppm): 270
16:30:57:852 -> CO2 (ppm): 264
16:31:01:379 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:31:01:380 -> [ApiClient] Info: Return code: 200
16:31:01:381 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:31:01:382 -> [Configure] Info: Parse configure success
16:31:01:382 -> [Configure] Info: co2CalibrationRequested: True
16:31:01:382 -> [Configure] Info: Detected new firmware version: 3.1.9
16:31:01:384 -> [StateMachine] Info: CO2 Calibration
16:31:01:386 -> [StateMachine] Info: Start CO2 calib after 5 sec
16:31:02:385 -> [StateMachine] Info: Start CO2 calib after 4 sec
16:31:03:384 -> [StateMachine] Info: Start CO2 calib after 3 sec
16:31:04:384 -> [StateMachine] Info: Start CO2 calib after 2 sec
16:31:05:384 -> [StateMachine] Info: Start CO2 calib after 1 sec
16:31:08:393 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
16:31:08:406 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
16:31:08:415 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
16:31:08:428 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
16:31:08:429 -> [StateMachine] Info: CO2 Calibration: success
16:31:09:428 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
16:31:09:437 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:09:449 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:09:450 -> Flags: 0
16:31:10:458 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:10:470 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:10:471 -> Flags: 0
16:31:11:479 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:11:491 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:11:492 -> Flags: 0
16:31:12:499 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:12:512 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:12:513 -> Flags: 0
16:31:13:520 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:13:537 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:13:537 -> Flags: 0
16:31:14:541 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:14:565 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:14:566 -> Flags: 0
16:31:15:562 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:15:575 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:15:576 -> Flags: 0
16:31:16:583 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:16:596 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:16:596 -> Flags: 0
16:31:17:604 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:17:617 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:17:619 -> Flags: 0
16:31:18:625 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:18:638 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:18:638 -> Flags: 0
16:31:19:646 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:19:659 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:19:660 -> Flags: 0
16:31:20:667 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:20:680 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:20:680 -> Flags: 0
16:31:21:688 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:21:701 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:21:702 -> Flags: 0
16:31:22:709 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:22:722 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:22:722 -> Flags: 0
16:31:23:730 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:23:743 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:23:744 -> Flags: 0
16:31:24:751 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:24:764 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:24:764 -> Flags: 0
16:31:25:772 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:25:785 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:25:785 -> Flags: 0
16:31:26:793 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:26:806 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:26:808 -> Flags: 0
16:31:27:814 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:27:827 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:27:828 -> Flags: 0
16:31:28:835 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:28:848 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:28:848 -> Flags: 0
16:31:29:856 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:29:869 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:29:870 -> Flags: 0
16:31:30:877 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:30:890 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:30:890 -> Flags: 0
16:31:31:898 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:31:911 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:31:911 -> Flags: 0
16:31:32:919 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:32:932 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:32:933 -> Flags: 0
16:31:33:940 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:33:953 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:33:954 -> Flags: 0
16:31:34:969 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:34:974 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:34:974 -> Flags: 0
16:31:35:982 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:36:016 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:36:017 -> Flags: 0
16:31:37:003 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:37:016 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:37:017 -> Flags: 0
16:31:38:024 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:38:037 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:38:037 -> Flags: 0
16:31:39:045 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:39:058 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:39:058 -> Flags: 0
16:31:40:066 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:40:078 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:40:079 -> Flags: 0
16:31:41:087 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:41:099 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:41:100 -> Flags: 0
16:31:42:108 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:42:121 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:42:122 -> Flags: 0
16:31:43:129 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:43:141 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:43:142 -> Flags: 0
16:31:44:150 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:44:162 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:44:163 -> Flags: 0
16:31:45:171 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:45:184 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:45:184 -> Flags: 0
16:31:46:192 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:46:205 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:46:205 -> Flags: 0
16:31:47:213 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:47:226 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:47:226 -> Flags: 0
16:31:48:234 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:48:246 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:48:247 -> Flags: 0
16:31:49:255 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:49:267 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:49:268 -> Flags: 0
16:31:50:276 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:50:288 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:50:289 -> Flags: 0
16:31:51:297 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:51:310 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:51:311 -> Flags: 0
16:31:52:318 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:52:330 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:52:331 -> Flags: 0
16:31:53:339 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:53:351 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:53:353 -> Flags: 0
16:31:54:360 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:54:372 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:54:373 -> Flags: 0
16:31:55:381 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:55:393 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:55:394 -> Flags: 0
16:31:56:402 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:56:414 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:56:414 -> Flags: 0
16:31:57:423 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:57:435 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:57:435 -> Flags: 0
16:31:58:451 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:58:456 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:58:457 -> Flags: 0
16:31:59:465 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:31:59:477 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:31:59:497 -> Flags: 0
16:32:00:486 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:00:498 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:00:499 -> Flags: 0
16:32:01:506 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:01:519 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:01:519 -> Flags: 0
16:32:02:527 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:02:540 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:02:540 -> Flags: 0
16:32:03:549 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:03:561 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:03:562 -> Flags: 0
16:32:04:569 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:04:583 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:04:583 -> Flags: 0
16:32:05:591 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:05:603 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:05:604 -> Flags: 0
16:32:06:611 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:06:624 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:06:624 -> Flags: 0
16:32:07:633 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:07:645 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:07:646 -> Flags: 0
16:32:08:654 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:08:666 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:08:668 -> Flags: 0
16:32:09:675 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:09:687 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:09:687 -> Flags: 0
16:32:10:696 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:10:708 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:10:709 -> Flags: 0
16:32:11:716 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:11:729 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:11:730 -> Flags: 0
16:32:12:737 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:12:750 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:12:750 -> Flags: 0
16:32:13:758 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:13:771 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:13:772 -> Flags: 0
16:32:14:780 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:14:792 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:14:793 -> Flags: 0
16:32:15:801 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:15:813 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:15:814 -> Flags: 0
16:32:16:822 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:16:835 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:16:836 -> Flags: 0
16:32:17:843 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:17:855 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:17:856 -> Flags: 0
16:32:18:864 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:18:876 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:18:877 -> Flags: 0
16:32:19:885 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:19:897 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:19:898 -> Flags: 0
16:32:20:906 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:20:929 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:20:929 -> Flags: 0
16:32:21:926 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:21:939 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:21:941 -> Flags: 0
16:32:22:947 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:22:960 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:22:961 -> Flags: 0
16:32:23:969 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:23:981 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:23:982 -> Flags: 0
16:32:24:989 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:25:002 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:25:003 -> Flags: 0
16:32:26:010 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:26:023 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:26:024 -> Flags: 0
16:32:27:031 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:27:044 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:27:045 -> Flags: 0
16:32:28:053 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:28:065 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:28:066 -> Flags: 0
16:32:29:073 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:29:086 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:29:087 -> Flags: 0
16:32:30:094 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:30:107 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:30:108 -> Flags: 0
16:32:31:116 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:31:128 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:31:130 -> Flags: 0
16:32:32:136 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:32:149 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:32:150 -> Flags: 0
16:32:33:157 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:33:170 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:33:171 -> Flags: 0
16:32:34:178 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:34:191 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:34:192 -> Flags: 0
16:32:35:199 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:35:212 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:35:212 -> Flags: 0
16:32:36:221 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:36:233 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:36:233 -> Flags: 0
16:32:37:241 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:37:254 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:37:255 -> Flags: 0
16:32:38:262 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:38:275 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:38:275 -> Flags: 0
16:32:39:283 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:39:296 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:39:296 -> Flags: 0
16:32:40:304 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:40:317 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:40:317 -> Flags: 0
16:32:41:325 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:41:338 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:41:339 -> Flags: 0
16:32:42:346 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:42:359 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:42:359 -> Flags: 0
16:32:43:367 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:43:380 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:43:380 -> Flags: 0
16:32:44:396 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:44:401 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:44:401 -> Flags: 0
16:32:45:409 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:45:422 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:45:422 -> Flags: 0
16:32:46:430 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:46:443 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:46:443 -> Flags: 0
16:32:47:451 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:47:464 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:47:465 -> Flags: 0
16:32:48:472 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:48:485 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:48:485 -> Flags: 0
16:32:49:493 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:49:505 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:49:506 -> Flags: 0
16:32:50:514 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:50:527 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:50:527 -> Flags: 0
16:32:51:535 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:32:51:547 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:32:51:548 -> Flags: 0

View File

@ -1,232 +0,0 @@
16:32:59:558 -> Detected OPEN_AIR_OUTDOOR
16:32:59:559 -> Firmware Version: 3.1.9-1-g4691500-dirty
16:32:59:704 -> Found S8 on Serial1
16:32:59:704 -> Init SGP41 failuire
16:32:59:704 -> SGP sensor not found
16:32:59:704 -> Can not detect SGP run mode 'O-1PS'
16:32:59:705 -> initializing PM sensor
16:32:59:705 -> cleared 0 byte(s)
16:32:59:705 -> setting active mode
16:32:59:705 -> 7 byte(s) written
16:33:03:705 -> No PM sensor detected on Serial0
16:33:03:705 -> initializing PM sensor
16:33:03:705 -> cleared 0 byte(s)
16:33:03:705 -> setting active mode
16:33:03:705 -> 7 byte(s) written
16:33:07:705 -> No PM sensor detected on Serial1
16:33:07:705 -> Firmware Mode: 0-1PS
16:33:07:726 -> Set S8 AbcDays successful
16:33:07:726 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
16:33:07:726 -> [ApiClient] Info: begin
16:33:07:771 -> [WifiConnector] Info: Connecting to WiFi...
16:33:07:771 -> *wm:AutoConnect
16:33:07:772 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
16:33:08:274 -> E (10414) wifi:sta is connecting, return error
16:33:08:275 -> [ 10167][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
16:33:15:690 -> *wm:AutoConnect: SUCCESS
16:33:15:690 -> *wm:STA IP Address: 192.168.100.127
16:33:15:692 -> [WifiConnector] Info: Wait for configure portal
16:33:15:692 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
16:33:15:704 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
16:33:18:046 -> MQTT is not configured, skipping initialization of MQTT client
16:33:18:047 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:33:18:047 -> [ApiClient] Info: DATA: {"wifi":-59,"boot":0}
16:33:18:047 -> [ApiClient] Info: Return code: 200
16:33:24:047 ->
16:33:24:048 -> firmwareCheckForUpdate:
16:33:24:048 -> firmwareCheckForUpdate: Perform
16:33:24:048 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-1-g4691500-dirty
16:33:24:678 -> Firmware update skipped, the server returned 400
16:33:24:679 -> 3
16:33:24:679 -> OTA message:
16:33:24:679 ->
16:33:25:252 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:33:25:252 -> [ApiClient] Info: Return code: 200
16:33:25:254 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:33:25:256 -> [Configure] Info: Parse configure success
16:33:25:256 -> [Configure] Info: Detected new firmware version: 3.1.9
16:33:25:284 -> CO2 (ppm): 367
16:33:29:305 -> CO2 (ppm): 347
16:33:33:325 -> CO2 (ppm): 333
16:33:37:346 -> CO2 (ppm): 309
16:33:41:367 -> CO2 (ppm): 307
16:33:45:388 -> CO2 (ppm): 301
16:33:49:409 -> CO2 (ppm): 293
16:33:53:430 -> CO2 (ppm): 284
16:33:57:450 -> CO2 (ppm): 276
16:33:58:130 -> External watchdog feed!
16:33:59:077 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:33:59:078 -> [ApiClient] Info: DATA: {"wifi":-59,"rco2":276,"boot":0,"bootCount":0}
16:33:59:078 -> [ApiClient] Info: Return code: 200
16:33:59:079 ->
16:33:59:079 -> Online mode and isPostToAirGradient = true: watchdog reset
16:33:59:079 ->
16:34:01:471 -> CO2 (ppm): 269
16:34:05:492 -> CO2 (ppm): 263
16:34:09:512 -> CO2 (ppm): 257
16:34:13:533 -> CO2 (ppm): 253
16:34:17:554 -> CO2 (ppm): 248
16:34:21:574 -> CO2 (ppm): 246
16:34:25:895 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:34:25:895 -> [ApiClient] Info: Return code: 200
16:34:25:897 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:34:25:898 -> [Configure] Info: Parse configure success
16:34:25:899 -> [Configure] Info: Detected new firmware version: 3.1.9
16:34:25:943 -> CO2 (ppm): 249
16:34:29:964 -> CO2 (ppm): 249
16:34:33:985 -> CO2 (ppm): 248
16:34:38:006 -> CO2 (ppm): 246
16:34:42:026 -> CO2 (ppm): 246
16:34:46:048 -> CO2 (ppm): 244
16:34:50:068 -> CO2 (ppm): 243
16:34:54:090 -> CO2 (ppm): 242
16:34:58:111 -> CO2 (ppm): 241
16:34:58:153 -> External watchdog feed!
16:35:00:013 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:35:00:013 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":241,"boot":1,"bootCount":1}
16:35:00:013 -> [ApiClient] Info: Return code: 200
16:35:00:014 ->
16:35:00:014 -> Online mode and isPostToAirGradient = true: watchdog reset
16:35:00:014 ->
16:35:06:152 -> CO2 (ppm): 240
16:35:06:152 -> CO2 (ppm): 239
16:35:10:173 -> CO2 (ppm): 238
16:35:14:193 -> CO2 (ppm): 238
16:35:18:214 -> CO2 (ppm): 237
16:35:22:235 -> CO2 (ppm): 238
16:35:26:492 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:35:26:493 -> [ApiClient] Info: Return code: 200
16:35:26:495 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:35:26:496 -> [Configure] Info: Parse configure success
16:35:26:496 -> [Configure] Info: Detected new firmware version: 3.1.9
16:35:26:541 -> CO2 (ppm): 238
16:35:30:561 -> CO2 (ppm): 239
16:35:34:582 -> CO2 (ppm): 238
16:35:38:603 -> CO2 (ppm): 238
16:35:42:624 -> CO2 (ppm): 238
16:35:46:645 -> CO2 (ppm): 238
16:35:50:666 -> CO2 (ppm): 238
16:35:58:177 -> CO2 (ppm): 238
16:35:58:177 -> External watchdog feed!
16:35:58:708 -> CO2 (ppm): 238
16:36:01:001 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:36:01:002 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":238,"boot":2,"bootCount":2}
16:36:01:002 -> [ApiClient] Info: Return code: 200
16:36:01:003 ->
16:36:01:003 -> Online mode and isPostToAirGradient = true: watchdog reset
16:36:01:003 ->
16:36:02:729 -> CO2 (ppm): 239
16:36:06:750 -> CO2 (ppm): 240
16:36:10:770 -> CO2 (ppm): 240
16:36:18:812 -> CO2 (ppm): 240
16:36:18:812 -> CO2 (ppm): 240
16:36:22:833 -> CO2 (ppm): 240
16:36:27:113 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:36:27:113 -> [ApiClient] Info: Return code: 200
16:36:27:114 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:36:27:116 -> [Configure] Info: Parse configure success
16:36:27:116 -> [Configure] Info: Detected new firmware version: 3.1.9
16:36:27:160 -> CO2 (ppm): 253
16:36:31:181 -> CO2 (ppm): 263
16:36:35:202 -> CO2 (ppm): 267
16:36:39:223 -> CO2 (ppm): 267
16:36:43:244 -> CO2 (ppm): 266
16:36:47:265 -> CO2 (ppm): 264
16:36:51:287 -> CO2 (ppm): 262
16:36:55:307 -> CO2 (ppm): 259
16:36:58:200 -> External watchdog feed!
16:36:59:328 -> CO2 (ppm): 256
16:37:01:982 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:37:01:982 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":256,"boot":3,"bootCount":3}
16:37:01:983 -> [ApiClient] Info: Return code: 200
16:37:01:984 ->
16:37:01:984 -> Online mode and isPostToAirGradient = true: watchdog reset
16:37:01:984 ->
16:37:03:349 -> CO2 (ppm): 257
16:37:07:370 -> CO2 (ppm): 257
16:37:11:391 -> CO2 (ppm): 268
16:37:15:412 -> CO2 (ppm): 291
16:37:19:433 -> CO2 (ppm): 306
16:37:23:472 -> CO2 (ppm): 313
16:37:27:728 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:37:27:728 -> [ApiClient] Info: Return code: 200
16:37:27:729 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:37:27:731 -> [Configure] Info: Parse configure success
16:37:27:731 -> [Configure] Info: Detected new firmware version: 3.1.9
16:37:27:775 -> CO2 (ppm): 316
16:37:31:796 -> CO2 (ppm): 314
16:37:35:817 -> CO2 (ppm): 315
16:37:43:859 -> CO2 (ppm): 314
16:37:43:859 -> CO2 (ppm): 309
16:37:47:880 -> CO2 (ppm): 304
16:37:55:922 -> CO2 (ppm): 297
16:37:55:922 -> CO2 (ppm): 290
16:37:58:223 -> External watchdog feed!
16:37:59:943 -> CO2 (ppm): 283
16:38:03:062 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:38:03:062 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":283,"boot":4,"bootCount":4}
16:38:03:062 -> [ApiClient] Info: Return code: 200
16:38:03:063 ->
16:38:03:064 -> Online mode and isPostToAirGradient = true: watchdog reset
16:38:03:064 ->
16:38:03:964 -> CO2 (ppm): 276
16:38:07:985 -> CO2 (ppm): 270
16:38:12:006 -> CO2 (ppm): 264
16:38:16:027 -> CO2 (ppm): 260
16:38:20:048 -> CO2 (ppm): 263
16:38:24:069 -> CO2 (ppm): 271
16:38:28:375 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:38:28:375 -> [ApiClient] Info: Return code: 200
16:38:28:376 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:38:28:378 -> [Configure] Info: Parse configure success
16:38:28:379 -> [Configure] Info: Detected new firmware version: 3.1.9
16:38:28:423 -> CO2 (ppm): 273
16:38:32:443 -> CO2 (ppm): 279
16:38:36:469 -> CO2 (ppm): 292
16:38:40:485 -> CO2 (ppm): 305
16:38:44:560 -> CO2 (ppm): 310
16:38:48:581 -> CO2 (ppm): 308
16:38:52:602 -> CO2 (ppm): 296
16:38:56:623 -> CO2 (ppm): 312
16:38:58:246 -> External watchdog feed!
16:39:00:644 -> CO2 (ppm): 326
16:39:04:092 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:39:04:092 -> [ApiClient] Info: DATA: {"wifi":-65,"rco2":326,"boot":5,"bootCount":5}
16:39:04:092 -> [ApiClient] Info: Return code: 200
16:39:04:093 ->
16:39:04:093 -> Online mode and isPostToAirGradient = true: watchdog reset
16:39:04:093 ->
16:39:04:665 -> CO2 (ppm): 333
16:39:12:707 -> CO2 (ppm): 334
16:39:12:707 -> CO2 (ppm): 329
16:39:16:728 -> CO2 (ppm): 321
16:39:20:749 -> CO2 (ppm): 312
16:39:24:770 -> CO2 (ppm): 302
16:39:29:015 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:39:29:015 -> [ApiClient] Info: Return code: 200
16:39:29:016 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:39:29:018 -> [Configure] Info: Parse configure success
16:39:29:018 -> [Configure] Info: co2CalibrationRequested: True
16:39:29:019 -> [Configure] Info: Detected new firmware version: 3.1.9
16:39:29:020 -> [StateMachine] Info: CO2 Calibration
16:39:29:021 -> [StateMachine] Info: Start CO2 calib after 5 sec
16:39:30:021 -> [StateMachine] Info: Start CO2 calib after 4 sec
16:39:31:021 -> [StateMachine] Info: Start CO2 calib after 3 sec
16:39:32:021 -> [StateMachine] Info: Start CO2 calib after 2 sec
16:39:33:021 -> [StateMachine] Info: Start CO2 calib after 1 sec
16:39:36:029 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
16:39:36:043 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
16:39:36:052 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
16:39:36:065 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
16:39:36:066 -> [StateMachine] Info: CO2 Calibration: success
16:39:37:066 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
16:39:37:074 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:39:37:086 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:39:37:087 -> Flags: 0
16:39:38:095 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:39:38:107 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:39:38:107 -> Flags: 0
16:39:39:116 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:39:39:128 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:39:39:129 -> Flags: 0
16:39:40:137 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05

View File

@ -1,313 +0,0 @@
16:39:43:641 -> Detected OPEN_AIR_OUTDOOR
16:39:43:641 -> Firmware Version: 3.1.9-1-g4691500-dirty
16:39:43:787 -> Found S8 on Serial1
16:39:43:787 -> Init SGP41 failuire
16:39:43:787 -> SGP sensor not found
16:39:43:787 -> Can not detect SGP run mode 'O-1PS'
16:39:43:788 -> initializing PM sensor
16:39:43:788 -> cleared 0 byte(s)
16:39:43:788 -> setting active mode
16:39:43:788 -> 7 byte(s) written
16:39:47:788 -> No PM sensor detected on Serial0
16:39:47:788 -> initializing PM sensor
16:39:47:788 -> cleared 0 byte(s)
16:39:47:788 -> setting active mode
16:39:47:788 -> 7 byte(s) written
16:39:51:788 -> No PM sensor detected on Serial1
16:39:51:789 -> Firmware Mode: 0-1PS
16:39:51:809 -> Set S8 AbcDays successful
16:39:51:809 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
16:39:51:809 -> [ApiClient] Info: begin
16:39:51:854 -> [WifiConnector] Info: Connecting to WiFi...
16:39:51:855 -> *wm:AutoConnect
16:39:51:855 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
16:39:52:358 -> *wm:[ERROR] wifi begin failed
16:39:55:359 -> *wm:AutoConnect: SUCCESS
16:39:55:359 -> *wm:STA IP Address: 192.168.100.127
16:39:55:359 -> [WifiConnector] Info: Wait for configure portal
16:39:55:359 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
16:39:55:373 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
16:39:55:373 -> MQTT is not configured, skipping initialization of MQTT client
16:39:59:401 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:39:59:402 -> [ApiClient] Info: DATA: {"wifi":-86,"boot":0}
16:39:59:402 -> [ApiClient] Info: Return code: 200
16:40:05:402 ->
16:40:05:402 -> firmwareCheckForUpdate:
16:40:05:402 -> firmwareCheckForUpdate: Perform
16:40:05:402 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-1-g4691500-dirty
16:40:06:564 -> Firmware update skipped, the server returned 400
16:40:06:566 -> 3
16:40:06:567 -> OTA message:
16:40:06:567 ->
16:40:11:567 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:40:11:567 -> [ApiClient] Info: Return code: -1
16:40:27:093 -> CO2 (ppm): 252
16:40:31:113 -> CO2 (ppm): 250
16:40:35:135 -> CO2 (ppm): 248
16:40:39:156 -> CO2 (ppm): 246
16:40:43:543 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:40:43:543 -> [ApiClient] Info: DATA: {"wifi":-82,"rco2":246,"boot":0,"bootCount":0}
16:40:43:543 -> [ApiClient] Info: Return code: 200
16:40:43:544 ->
16:40:43:544 -> Online mode and isPostToAirGradient = true: watchdog reset
16:40:43:545 ->
16:40:43:565 -> CO2 (ppm): 245
16:40:43:590 -> External watchdog feed!
16:40:47:586 -> CO2 (ppm): 244
16:40:51:607 -> CO2 (ppm): 243
16:40:55:628 -> CO2 (ppm): 242
16:40:59:649 -> CO2 (ppm): 241
16:41:03:670 -> CO2 (ppm): 241
16:41:07:691 -> CO2 (ppm): 240
16:41:12:313 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:41:12:313 -> [ApiClient] Info: Return code: 200
16:41:12:315 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:41:12:316 -> [Configure] Info: Parse configure success
16:41:12:317 -> [Configure] Info: Detected new firmware version: 3.1.9
16:41:12:361 -> CO2 (ppm): 241
16:41:20:403 -> CO2 (ppm): 240
16:41:20:403 -> CO2 (ppm): 239
16:41:24:423 -> CO2 (ppm): 238
16:41:28:443 -> CO2 (ppm): 238
16:41:32:464 -> CO2 (ppm): 238
16:41:36:485 -> CO2 (ppm): 238
16:41:44:875 -> CO2 (ppm): 239
16:41:44:875 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:41:44:876 -> [ApiClient] Info: DATA: {"wifi":-84,"rco2":239,"boot":1,"bootCount":1}
16:41:44:876 -> [ApiClient] Info: Return code: 200
16:41:44:877 ->
16:41:44:877 -> Online mode and isPostToAirGradient = true: watchdog reset
16:41:44:877 ->
16:41:44:899 -> CO2 (ppm): 247
16:41:44:923 -> External watchdog feed!
16:41:48:920 -> CO2 (ppm): 273
16:41:52:940 -> CO2 (ppm): 287
16:41:56:961 -> CO2 (ppm): 294
16:42:00:982 -> CO2 (ppm): 295
16:42:05:003 -> CO2 (ppm): 294
16:42:09:024 -> CO2 (ppm): 289
16:42:13:362 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:42:13:362 -> [ApiClient] Info: Return code: 200
16:42:13:363 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:42:13:364 -> [Configure] Info: Parse configure success
16:42:13:365 -> [Configure] Info: Detected new firmware version: 3.1.9
16:42:13:409 -> CO2 (ppm): 284
16:42:17:480 -> CO2 (ppm): 280
16:42:21:501 -> CO2 (ppm): 287
16:42:25:522 -> CO2 (ppm): 296
16:42:29:543 -> CO2 (ppm): 294
16:42:33:564 -> CO2 (ppm): 289
16:42:37:585 -> CO2 (ppm): 283
16:42:41:606 -> CO2 (ppm): 278
16:42:46:424 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:42:46:424 -> [ApiClient] Info: DATA: {"wifi":-83,"rco2":278,"boot":2,"bootCount":2}
16:42:46:426 -> [ApiClient] Info: Return code: 200
16:42:46:426 ->
16:42:46:426 -> Online mode and isPostToAirGradient = true: watchdog reset
16:42:46:426 ->
16:42:46:447 -> CO2 (ppm): 274
16:42:46:472 -> External watchdog feed!
16:42:50:468 -> CO2 (ppm): 272
16:42:54:489 -> CO2 (ppm): 268
16:42:58:509 -> CO2 (ppm): 264
16:43:02:531 -> CO2 (ppm): 260
16:43:06:552 -> CO2 (ppm): 257
16:43:10:572 -> CO2 (ppm): 254
16:43:14:063 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:43:14:063 -> [ApiClient] Info: Return code: 200
16:43:14:064 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:43:14:066 -> [Configure] Info: Parse configure success
16:43:14:066 -> [Configure] Info: Detected new firmware version: 3.1.9
16:43:14:593 -> CO2 (ppm): 252
16:43:18:614 -> CO2 (ppm): 250
16:43:22:635 -> CO2 (ppm): 249
16:43:26:656 -> CO2 (ppm): 248
16:43:30:677 -> CO2 (ppm): 248
16:43:34:698 -> CO2 (ppm): 248
16:43:38:719 -> CO2 (ppm): 247
16:43:42:740 -> CO2 (ppm): 245
16:43:47:548 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:43:47:548 -> [ApiClient] Info: DATA: {"wifi":-82,"rco2":245,"boot":3,"bootCount":3}
16:43:47:550 -> [ApiClient] Info: Return code: 200
16:43:47:550 ->
16:43:47:550 -> Online mode and isPostToAirGradient = true: watchdog reset
16:43:47:550 ->
16:43:47:570 -> CO2 (ppm): 244
16:43:47:597 -> External watchdog feed!
16:43:51:591 -> CO2 (ppm): 242
16:43:55:612 -> CO2 (ppm): 240
16:43:59:651 -> CO2 (ppm): 240
16:44:03:654 -> CO2 (ppm): 240
16:44:07:675 -> CO2 (ppm): 239
16:44:11:696 -> CO2 (ppm): 239
16:44:14:686 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:44:14:687 -> [ApiClient] Info: Return code: 200
16:44:14:688 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:44:14:689 -> [Configure] Info: Parse configure success
16:44:14:690 -> [Configure] Info: Detected new firmware version: 3.1.9
16:44:15:716 -> CO2 (ppm): 238
16:44:19:737 -> CO2 (ppm): 238
16:44:23:759 -> CO2 (ppm): 274
16:44:27:779 -> CO2 (ppm): 314
16:44:31:800 -> CO2 (ppm): 343
16:44:39:844 -> CO2 (ppm): 352
16:44:39:844 -> CO2 (ppm): 351
16:44:43:863 -> CO2 (ppm): 347
16:44:48:678 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:44:48:679 -> [ApiClient] Info: DATA: {"wifi":-83,"rco2":347,"boot":4,"bootCount":4}
16:44:48:679 -> [ApiClient] Info: Return code: 200
16:44:48:680 ->
16:44:48:680 -> Online mode and isPostToAirGradient = true: watchdog reset
16:44:48:680 ->
16:44:48:715 -> CO2 (ppm): 340
16:44:48:725 -> External watchdog feed!
16:44:52:721 -> CO2 (ppm): 330
16:44:56:764 -> CO2 (ppm): 318
16:45:00:785 -> CO2 (ppm): 307
16:45:04:805 -> CO2 (ppm): 288
16:45:08:826 -> CO2 (ppm): 280
16:45:12:847 -> CO2 (ppm): 273
16:45:15:303 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:45:15:303 -> [ApiClient] Info: Return code: 200
16:45:15:321 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:45:15:322 -> [Configure] Info: Parse configure success
16:45:15:322 -> [Configure] Info: Detected new firmware version: 3.1.9
16:45:16:867 -> CO2 (ppm): 267
16:45:24:910 -> CO2 (ppm): 262
16:45:24:910 -> CO2 (ppm): 257
16:45:28:930 -> CO2 (ppm): 253
16:45:32:950 -> CO2 (ppm): 250
16:45:36:971 -> CO2 (ppm): 248
16:45:40:992 -> CO2 (ppm): 247
16:45:45:013 -> CO2 (ppm): 246
16:45:49:916 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:45:49:916 -> [ApiClient] Info: DATA: {"wifi":-83,"rco2":246,"boot":5,"bootCount":5}
16:45:49:917 -> [ApiClient] Info: Return code: 200
16:45:49:917 ->
16:45:49:917 -> Online mode and isPostToAirGradient = true: watchdog reset
16:45:49:917 ->
16:45:49:938 -> CO2 (ppm): 247
16:45:49:963 -> External watchdog feed!
16:45:53:959 -> CO2 (ppm): 247
16:45:57:980 -> CO2 (ppm): 247
16:46:02:001 -> CO2 (ppm): 247
16:46:10:043 -> CO2 (ppm): 246
16:46:10:043 -> CO2 (ppm): 246
16:46:14:064 -> CO2 (ppm): 246
16:46:16:023 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:46:16:024 -> [ApiClient] Info: Return code: 200
16:46:16:025 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:46:16:026 -> [Configure] Info: Parse configure success
16:46:16:027 -> [Configure] Info: Detected new firmware version: 3.1.9
16:46:18:085 -> CO2 (ppm): 246
16:46:22:106 -> CO2 (ppm): 247
16:46:26:127 -> CO2 (ppm): 247
16:46:30:148 -> CO2 (ppm): 247
16:46:34:169 -> CO2 (ppm): 246
16:46:38:190 -> CO2 (ppm): 246
16:46:42:211 -> CO2 (ppm): 247
16:46:46:232 -> CO2 (ppm): 246
16:46:50:874 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:46:50:874 -> [ApiClient] Info: DATA: {"wifi":-83,"rco2":246,"boot":6,"bootCount":6}
16:46:50:875 -> [ApiClient] Info: Return code: 200
16:46:50:876 ->
16:46:50:876 -> Online mode and isPostToAirGradient = true: watchdog reset
16:46:50:876 ->
16:46:50:896 -> CO2 (ppm): 255
16:46:50:921 -> External watchdog feed!
16:46:54:918 -> CO2 (ppm): 257
16:46:58:938 -> CO2 (ppm): 257
16:47:02:959 -> CO2 (ppm): 301
16:47:11:001 -> CO2 (ppm): 340
16:47:11:001 -> CO2 (ppm): 357
16:47:15:022 -> CO2 (ppm): 363
16:47:16:647 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:47:16:647 -> [ApiClient] Info: Return code: 200
16:47:16:649 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:47:16:650 -> [Configure] Info: Parse configure success
16:47:16:651 -> [Configure] Info: Detected new firmware version: 3.1.9
16:47:19:043 -> CO2 (ppm): 362
16:47:23:064 -> CO2 (ppm): 358
16:47:27:085 -> CO2 (ppm): 351
16:47:31:106 -> CO2 (ppm): 341
16:47:39:148 -> CO2 (ppm): 330
16:47:39:148 -> CO2 (ppm): 319
16:47:43:169 -> CO2 (ppm): 308
16:47:47:190 -> CO2 (ppm): 297
16:47:51:825 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:47:51:825 -> [ApiClient] Info: DATA: {"wifi":-83,"rco2":297,"boot":7,"bootCount":7}
16:47:51:826 -> [ApiClient] Info: Return code: 200
16:47:51:848 ->
16:47:51:848 -> Online mode and isPostToAirGradient = true: watchdog reset
16:47:51:848 ->
16:47:51:848 -> CO2 (ppm): 288
16:47:51:873 -> External watchdog feed!
16:47:55:869 -> CO2 (ppm): 281
16:47:59:947 -> CO2 (ppm): 276
16:48:03:968 -> CO2 (ppm): 270
16:48:07:989 -> CO2 (ppm): 261
16:48:16:031 -> CO2 (ppm): 257
16:48:16:031 -> CO2 (ppm): 254
16:48:17:265 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:48:17:265 -> [ApiClient] Info: Return code: 200
16:48:17:266 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:48:17:268 -> [Configure] Info: Parse configure success
16:48:17:268 -> [Configure] Info: co2CalibrationRequested: True
16:48:17:269 -> [Configure] Info: Detected new firmware version: 3.1.9
16:48:17:271 -> [StateMachine] Info: CO2 Calibration
16:48:17:271 -> [StateMachine] Info: Start CO2 calib after 5 sec
16:48:18:271 -> [StateMachine] Info: Start CO2 calib after 4 sec
16:48:19:271 -> [StateMachine] Info: Start CO2 calib after 3 sec
16:48:20:271 -> [StateMachine] Info: Start CO2 calib after 2 sec
16:48:21:271 -> [StateMachine] Info: Start CO2 calib after 1 sec
16:48:24:279 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
16:48:24:292 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
16:48:24:301 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
16:48:24:315 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
16:48:24:315 -> [StateMachine] Info: CO2 Calibration: success
16:48:25:316 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
16:48:25:324 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:25:336 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:25:337 -> Flags: 0
16:48:26:345 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:26:357 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:26:357 -> Flags: 0
16:48:27:366 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:27:378 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:27:379 -> Flags: 0
16:48:28:387 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:28:399 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:28:399 -> Flags: 0
16:48:29:408 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:29:420 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:29:420 -> Flags: 0
16:48:30:428 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:30:441 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:30:442 -> Flags: 0
16:48:31:450 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:31:462 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:31:462 -> Flags: 0
16:48:32:470 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:32:483 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:32:483 -> Flags: 0
16:48:33:492 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:33:504 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:33:505 -> Flags: 0
16:48:34:513 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:39:513 -> Get Acknowladgement Response >
16:48:39:514 -> Error getting acknowledgement flags!
16:48:40:521 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:45:522 -> Get Acknowladgement Response > 0xFF
16:48:45:522 -> Error getting acknowledgement flags!
16:48:46:531 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:46:543 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:46:543 -> Flags: 0
16:48:47:552 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:47:564 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:47:564 -> Flags: 0
16:48:48:572 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:48:585 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:48:585 -> Flags: 0
16:48:49:594 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
16:48:49:606 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
16:48:49:606 -> Flags: 0

View File

@ -1,364 +0,0 @@
16:50:04:699 -> No PM sensor detected on Serial0
16:50:04:699 -> initializing PM sensor
16:50:04:699 -> cleared 0 byte(s)
16:50:04:699 -> setting active mode
16:50:04:699 -> 7 byte(s) written
16:50:08:699 -> No PM sensor detected on Serial1
16:50:08:699 -> Firmware Mode: 0-1PS
16:50:08:721 -> Set S8 AbcDays successful
16:50:08:721 -> [ApiClient] Info: Init apiRoot: http://hw.airgradient.com
16:50:08:721 -> [ApiClient] Info: begin
16:50:08:766 -> [WifiConnector] Info: Connecting to WiFi...
16:50:08:766 -> *wm:AutoConnect
16:50:08:767 -> *wm:Connecting to SAVED AP: ag-diamond_2.4GHz
16:50:09:269 -> E (10415) wifi:sta is connecting, return error
16:50:09:270 -> [ 10168][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
16:50:17:484 -> *wm:AutoConnect: SUCCESS
16:50:17:485 -> *wm:STA IP Address: 192.168.100.127
16:50:17:485 -> [WifiConnector] Info: Wait for configure portal
16:50:17:485 -> [WifiConnector] Info: WiFi Connected: ag-diamond_2.4GHz IP: 192.168.100.127
16:50:17:498 -> [LocalServer] Info: Init: airgradient_d83bda1b86c8.local
16:50:20:031 -> MQTT is not configured, skipping initialization of MQTT client
16:50:20:032 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:50:20:032 -> [ApiClient] Info: DATA: {"wifi":-61,"boot":0}
16:50:20:032 -> [ApiClient] Info: Return code: 200
16:50:26:033 ->
16:50:26:033 -> firmwareCheckForUpdate:
16:50:26:033 -> firmwareCheckForUpdate: Perform
16:50:26:033 -> checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/generic/os/firmware.bin?current_firmware=3.1.9-1-g4691500-dirty
16:50:26:883 -> Firmware update skipped, the server returned 400
16:50:26:884 -> 3
16:50:26:884 -> OTA message:
16:50:26:884 ->
16:50:28:014 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:50:28:014 -> [ApiClient] Info: Return code: 200
16:50:28:015 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:50:28:016 -> [Configure] Info: Parse configure success
16:50:28:017 -> [Configure] Info: Detected new firmware version: 3.1.9
16:50:32:066 -> CO2 (ppm): 451
16:50:32:066 -> CO2 (ppm): 449
16:50:36:087 -> CO2 (ppm): 453
16:50:40:108 -> CO2 (ppm): 453
16:50:44:128 -> CO2 (ppm): 452
16:50:48:149 -> CO2 (ppm): 450
16:50:52:170 -> CO2 (ppm): 447
16:50:56:195 -> CO2 (ppm): 443
16:51:00:064 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:51:00:064 -> [ApiClient] Info: DATA: {"wifi":-61,"rco2":443,"boot":0,"bootCount":0}
16:51:00:065 -> [ApiClient] Info: Return code: 200
16:51:00:065 ->
16:51:00:065 -> Online mode and isPostToAirGradient = true: watchdog reset
16:51:00:065 ->
16:51:00:090 -> External watchdog feed!
16:51:00:212 -> CO2 (ppm): 440
16:51:04:234 -> CO2 (ppm): 438
16:51:08:254 -> CO2 (ppm): 436
16:51:12:275 -> CO2 (ppm): 433
16:51:16:296 -> CO2 (ppm): 432
16:51:20:317 -> CO2 (ppm): 431
16:51:24:338 -> CO2 (ppm): 431
16:51:28:639 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:51:28:639 -> [ApiClient] Info: Return code: 200
16:51:28:641 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:51:28:642 -> [Configure] Info: Parse configure success
16:51:28:643 -> [Configure] Info: Detected new firmware version: 3.1.9
16:51:28:687 -> CO2 (ppm): 432
16:51:32:708 -> CO2 (ppm): 432
16:51:36:729 -> CO2 (ppm): 433
16:51:40:749 -> CO2 (ppm): 433
16:51:44:771 -> CO2 (ppm): 433
16:51:48:792 -> CO2 (ppm): 434
16:51:52:813 -> CO2 (ppm): 435
16:52:03:145 -> CO2 (ppm): 435
16:52:03:145 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:52:03:146 -> [ApiClient] Info: DATA: {"wifi":-71,"rco2":435,"boot":1,"bootCount":1}
16:52:03:146 -> [ApiClient] Info: Return code: 200
16:52:03:146 ->
16:52:03:147 -> Online mode and isPostToAirGradient = true: watchdog reset
16:52:03:147 ->
16:52:03:168 -> CO2 (ppm): 433
16:52:03:193 -> External watchdog feed!
16:52:07:189 -> CO2 (ppm): 433
16:52:11:210 -> CO2 (ppm): 433
16:52:15:231 -> CO2 (ppm): 433
16:52:19:252 -> CO2 (ppm): 431
16:52:23:273 -> CO2 (ppm): 430
16:52:27:294 -> CO2 (ppm): 429
16:52:29:269 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:52:29:269 -> [ApiClient] Info: Return code: 200
16:52:29:271 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:52:29:272 -> [Configure] Info: Parse configure success
16:52:29:273 -> [Configure] Info: Detected new firmware version: 3.1.9
16:52:31:315 -> CO2 (ppm): 428
16:52:35:336 -> CO2 (ppm): 428
16:52:39:357 -> CO2 (ppm): 427
16:52:43:378 -> CO2 (ppm): 426
16:52:47:399 -> CO2 (ppm): 425
16:52:51:420 -> CO2 (ppm): 425
16:52:55:441 -> CO2 (ppm): 425
16:52:59:462 -> CO2 (ppm): 425
16:53:04:172 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:53:04:172 -> [ApiClient] Info: DATA: {"wifi":-68,"rco2":425,"boot":2,"bootCount":2}
16:53:04:173 -> [ApiClient] Info: Return code: 200
16:53:04:174 ->
16:53:04:174 -> Online mode and isPostToAirGradient = true: watchdog reset
16:53:04:174 ->
16:53:04:199 -> CO2 (ppm): 425
16:53:04:220 -> External watchdog feed!
16:53:08:216 -> CO2 (ppm): 425
16:53:12:237 -> CO2 (ppm): 425
16:53:16:258 -> CO2 (ppm): 425
16:53:20:279 -> CO2 (ppm): 425
16:53:24:300 -> CO2 (ppm): 424
16:53:28:321 -> CO2 (ppm): 423
16:53:29:880 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:53:29:880 -> [ApiClient] Info: Return code: 200
16:53:29:882 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:53:29:883 -> [Configure] Info: Parse configure success
16:53:29:884 -> [Configure] Info: Detected new firmware version: 3.1.9
16:53:32:342 -> CO2 (ppm): 423
16:53:36:363 -> CO2 (ppm): 422
16:53:40:384 -> CO2 (ppm): 421
16:53:48:425 -> CO2 (ppm): 421
16:53:48:425 -> CO2 (ppm): 420
16:53:52:446 -> CO2 (ppm): 419
16:53:56:467 -> CO2 (ppm): 418
16:54:00:488 -> CO2 (ppm): 417
16:54:05:200 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:54:05:200 -> [ApiClient] Info: DATA: {"wifi":-64,"rco2":417,"boot":3,"bootCount":3}
16:54:05:200 -> [ApiClient] Info: Return code: 200
16:54:05:201 ->
16:54:05:201 -> Online mode and isPostToAirGradient = true: watchdog reset
16:54:05:201 ->
16:54:05:222 -> CO2 (ppm): 417
16:54:05:247 -> External watchdog feed!
16:54:09:244 -> CO2 (ppm): 416
16:54:13:264 -> CO2 (ppm): 416
16:54:17:286 -> CO2 (ppm): 416
16:54:21:307 -> CO2 (ppm): 416
16:54:25:328 -> CO2 (ppm): 416
16:54:29:348 -> CO2 (ppm): 416
16:54:30:498 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:54:30:499 -> [ApiClient] Info: Return code: 200
16:54:30:500 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":Unit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:54:30:502 -> [Configure] Info: Parse configure success
true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperature16:54:30:503 -> [Configure] Info: Detected new firmware version: 3.1.9
16:54:33:369 -> CO2 (ppm): 416
16:54:37:390 -> CO2 (ppm): 416
16:54:45:432 -> CO2 (ppm): 416
16:54:45:432 -> CO2 (ppm): 415
16:54:49:453 -> CO2 (ppm): 415
16:54:53:474 -> CO2 (ppm): 415
16:54:57:495 -> CO2 (ppm): 415
16:55:01:516 -> CO2 (ppm): 415
16:55:06:177 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:55:06:177 -> [ApiClient] Info: DATA: {"wifi":-63,"rco2":415,"boot":4,"bootCount":4}
16:55:06:177 -> [ApiClient] Info: Return code: 200
16:55:06:178 ->
16:55:06:178 -> Online mode and isPostToAirGradient = true: watchdog reset
16:55:06:178 ->
16:55:06:210 -> CO2 (ppm): 414
16:55:06:235 -> External watchdog feed!
16:55:14:253 -> CO2 (ppm): 414
16:55:14:253 -> CO2 (ppm): 414
16:55:18:268 -> CO2 (ppm): 414
16:55:22:290 -> CO2 (ppm): 414
16:55:26:311 -> CO2 (ppm): 413
16:55:30:332 -> CO2 (ppm): 413
16:55:31:115 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:55:31:115 -> [ApiClient] Info: Return code: 200
16:55:31:121 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:55:31:122 -> [Configure] Info: Parse configure success
16:55:31:122 -> [Configure] Info: Detected new firmware version: 3.1.9
16:55:34:353 -> CO2 (ppm): 413
16:55:38:374 -> CO2 (ppm): 413
16:55:42:395 -> CO2 (ppm): 413
16:55:50:436 -> CO2 (ppm): 413
16:55:50:436 -> CO2 (ppm): 412
16:55:54:457 -> CO2 (ppm): 413
16:55:58:478 -> CO2 (ppm): 413
16:56:02:499 -> CO2 (ppm): 413
16:56:07:160 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:56:07:160 -> [ApiClient] Info: DATA: {"wifi":-63,"rco2":413,"boot":5,"bootCount":5}
16:56:07:160 -> [ApiClient] Info: Return code: 200
16:56:07:161 ->
16:56:07:161 -> Online mode and isPostToAirGradient = true: watchdog reset
16:56:07:161 ->
16:56:07:183 -> CO2 (ppm): 412
16:56:07:208 -> External watchdog feed!
16:56:11:204 -> CO2 (ppm): 412
16:56:15:225 -> CO2 (ppm): 412
16:56:19:251 -> CO2 (ppm): 412
16:56:23:272 -> CO2 (ppm): 412
16:56:27:293 -> CO2 (ppm): 412
16:56:31:743 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:56:31:743 -> [ApiClient] Info: Return code: 200
16:56:31:744 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:56:31:746 -> [Configure] Info: Parse configure success
16:56:31:747 -> [Configure] Info: Detected new firmware version: 3.1.9
16:56:31:790 -> CO2 (ppm): 418
16:56:35:812 -> CO2 (ppm): 429
16:56:39:834 -> CO2 (ppm): 438
16:56:43:854 -> CO2 (ppm): 441
16:56:51:896 -> CO2 (ppm): 442
16:56:51:896 -> CO2 (ppm): 440
16:56:55:917 -> CO2 (ppm): 438
16:56:59:937 -> CO2 (ppm): 435
16:57:03:958 -> CO2 (ppm): 439
16:57:08:199 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:57:08:199 -> [ApiClient] Info: DATA: {"wifi":-60,"rco2":439,"boot":6,"bootCount":6}
16:57:08:200 -> [ApiClient] Info: Return code: 200
16:57:08:200 ->
16:57:08:201 -> Online mode and isPostToAirGradient = true: watchdog reset
16:57:08:201 ->
16:57:08:222 -> CO2 (ppm): 457
16:57:08:247 -> External watchdog feed!
16:57:12:243 -> CO2 (ppm): 476
16:57:20:285 -> CO2 (ppm): 482
16:57:20:285 -> CO2 (ppm): 481
16:57:24:306 -> CO2 (ppm): 477
16:57:28:326 -> CO2 (ppm): 470
16:57:32:358 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:57:32:358 -> [ApiClient] Info: Return code: 200
16:57:32:360 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:57:32:361 -> [Configure] Info: Parse configure success
16:57:32:362 -> [Configure] Info: Detected new firmware version: 3.1.9
16:57:32:405 -> CO2 (ppm): 463
16:57:36:426 -> CO2 (ppm): 457
16:57:40:447 -> CO2 (ppm): 450
16:57:44:468 -> CO2 (ppm): 466
16:57:48:489 -> CO2 (ppm): 517
16:57:52:510 -> CO2 (ppm): 564
16:57:56:531 -> CO2 (ppm): 634
16:58:00:552 -> CO2 (ppm): 721
16:58:04:573 -> CO2 (ppm): 788
16:58:09:090 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:58:09:090 -> [ApiClient] Info: DATA: {"wifi":-56,"rco2":788,"boot":7,"bootCount":7}
16:58:09:090 -> [ApiClient] Info: Return code: 200
16:58:09:091 ->
16:58:09:092 -> Online mode and isPostToAirGradient = true: watchdog reset
16:58:09:092 ->
16:58:09:113 -> CO2 (ppm): 812
16:58:09:138 -> External watchdog feed!
16:58:13:134 -> CO2 (ppm): 805
16:58:17:155 -> CO2 (ppm): 781
16:58:21:176 -> CO2 (ppm): 749
16:58:25:197 -> CO2 (ppm): 713
16:58:29:218 -> CO2 (ppm): 676
16:58:32:991 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:58:32:991 -> [ApiClient] Info: Return code: 200
16:58:32:992 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:58:32:992 -> [Configure] Info: Parse configure success
16:58:32:992 -> [Configure] Info: Detected new firmware version: 3.1.9
16:58:33:239 -> CO2 (ppm): 640
16:58:37:259 -> CO2 (ppm): 609
16:58:41:280 -> CO2 (ppm): 579
16:58:45:301 -> CO2 (ppm): 553
16:58:49:322 -> CO2 (ppm): 530
16:58:53:343 -> CO2 (ppm): 510
16:58:57:364 -> CO2 (ppm): 493
16:59:01:385 -> CO2 (ppm): 479
16:59:05:406 -> CO2 (ppm): 468
16:59:10:084 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
16:59:10:084 -> [ApiClient] Info: DATA: {"wifi":-58,"rco2":468,"boot":8,"bootCount":8}
16:59:10:084 -> [ApiClient] Info: Return code: 200
16:59:10:085 ->
16:59:10:085 -> Online mode and isPostToAirGradient = true: watchdog reset
16:59:10:085 ->
16:59:10:106 -> CO2 (ppm): 449
16:59:10:131 -> External watchdog feed!
16:59:18:148 -> CO2 (ppm): 443
16:59:18:148 -> CO2 (ppm): 436
16:59:22:169 -> CO2 (ppm): 431
16:59:26:190 -> CO2 (ppm): 427
16:59:30:211 -> CO2 (ppm): 424
16:59:33:602 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
16:59:33:603 -> [ApiClient] Info: Return code: 200
16:59:33:604 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":false,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
16:59:33:605 -> [Configure] Info: Parse configure success
16:59:33:606 -> [Configure] Info: Detected new firmware version: 3.1.9
16:59:34:232 -> CO2 (ppm): 422
16:59:38:253 -> CO2 (ppm): 421
16:59:42:274 -> CO2 (ppm): 420
16:59:46:295 -> CO2 (ppm): 419
16:59:50:315 -> CO2 (ppm): 418
16:59:54:336 -> CO2 (ppm): 416
16:59:58:358 -> CO2 (ppm): 416
17:00:02:378 -> CO2 (ppm): 415
17:00:06:399 -> CO2 (ppm): 415
17:00:11:082 -> [ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/measures
17:00:11:082 -> [ApiClient] Info: DATA: {"wifi":-57,"rco2":415,"boot":9,"bootCount":9}
17:00:11:082 -> [ApiClient] Info: Return code: 200
17:00:11:083 ->
17:00:11:084 -> Online mode and isPostToAirGradient = true: watchdog reset
17:00:11:084 ->
17:00:11:105 -> CO2 (ppm): 416
17:00:11:130 -> External watchdog feed!
17:00:15:126 -> CO2 (ppm): 416
17:00:19:147 -> CO2 (ppm): 416
17:00:23:168 -> CO2 (ppm): 417
17:00:31:210 -> CO2 (ppm): 417
17:00:31:210 -> CO2 (ppm): 415
17:00:34:222 -> [ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:d83bda1b86c8/one/config
17:00:34:222 -> [ApiClient] Info: Return code: 200
17:00:34:224 -> [Configure] Info: Parse configure: {"country":"CH","pmStandard":"ugm3","co2CalibrationRequested":true,"ledBarTestRequested":false,"ledBarMode":"pm","displayMode":"on","placeOpen":true,"abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"temperatureUnit":"c","targetFirmware":"3.1.9","ledBarBrightness":100,"displayBrightness":100,"corrections":{"pm02":{"correctionAlgorithm":"none","slr":null}},"model":"O-1PST"}
17:00:34:226 -> [Configure] Info: Parse configure success
17:00:34:226 -> [Configure] Info: co2CalibrationRequested: True
17:00:34:226 -> [Configure] Info: Detected new firmware version: 3.1.9
17:00:34:228 -> [StateMachine] Info: CO2 Calibration
17:00:34:228 -> [StateMachine] Info: Start CO2 calib after 5 sec
17:00:35:228 -> [StateMachine] Info: Start CO2 calib after 4 sec
17:00:36:228 -> [StateMachine] Info: Start CO2 calib after 3 sec
17:00:37:228 -> [StateMachine] Info: Start CO2 calib after 2 sec
17:00:38:228 -> [StateMachine] Info: Start CO2 calib after 1 sec
17:00:41:236 -> Clear Acknowladgement Command > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
17:00:41:250 -> Clear Acknowladgement Response > 0xFE 0x06 0x00 0x00 0x00 0x00 0x9D 0xC5
17:00:41:258 -> Send Calibration Command > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
17:00:41:271 -> Send Calibration Response > 0xFE 0x06 0x00 0x01 0x7C 0x06 0x6C 0xC7
17:00:41:272 -> [StateMachine] Info: CO2 Calibration: success
17:00:42:272 -> [StateMachine] Info: CO2 Calibration: Wait for calibration finish...
17:00:42:280 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:42:292 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:42:293 -> Flags: 0
17:00:43:301 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:43:313 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:43:314 -> Flags: 0
17:00:44:322 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:44:334 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:44:335 -> Flags: 0
17:00:45:343 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:45:355 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:45:356 -> Flags: 0
17:00:46:364 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:46:376 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:46:377 -> Flags: 0
17:00:47:385 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:47:397 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:47:397 -> Flags: 0
17:00:48:406 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:48:418 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:48:419 -> Flags: 0
17:00:49:427 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:49:439 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:49:440 -> Flags: 0
17:00:50:448 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:50:460 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:50:461 -> Flags: 0
17:00:51:469 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:51:481 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:51:482 -> Flags: 0
17:00:52:490 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:52:502 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:52:503 -> Flags: 0
17:00:53:511 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:53:524 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:53:524 -> Flags: 0
17:00:54:532 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:54:544 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:54:545 -> Flags: 0
17:00:55:553 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:55:565 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:55:565 -> Flags: 0
17:00:56:574 -> Get Acknowladgement Command > 0xFE 0x03 0x00 0x00 0x00 0x01 0x90 0x05
17:00:56:586 -> Get Acknowladgement Response > 0xFE 0x03 0x02 0x00 0x00 0xAC 0x50
17:00:56:586 -> Flags: 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -50,12 +50,20 @@ You get the following response:
|-----------------------------------|---------|----------------------------------------------------------------------------------------| |-----------------------------------|---------|----------------------------------------------------------------------------------------|
| `serialno` | String | Serial Number of the monitor | | `serialno` | String | Serial Number of the monitor |
| `wifi` | Number | WiFi signal strength | | `wifi` | Number | WiFi signal strength |
| `pm01` | Number | PM1 in ug/m3 | | `pm01` | Number | PM1.0 in ug/m3 (atmospheric environment) |
| `pm02` | Number | PM2.5 in ug/m3 | | `pm02` | Number | PM2.5 in ug/m3 (atmospheric environment) |
| `pm10` | Number | PM10 in ug/m3 | | `pm10` | Number | PM10 in ug/m3 (atmospheric environment) |
| `pm02Compensated` | Number | PM2.5 in ug/m3 with correction applied (from fw version 3.1.4 onwards) | | `pm02Compensated` | Number | PM2.5 in ug/m3 with correction applied (from fw version 3.1.4 onwards) |
| `pm01Standard` | Number | PM1.0 in ug/m3 (standard particle) |
| `pm02Standard` | Number | PM2.5 in ug/m3 (standard particle) |
| `pm10Standard` | Number | PM10 in ug/m3 (standard particle) |
| `rco2` | Number | CO2 in ppm | | `rco2` | Number | CO2 in ppm |
| `pm003Count` | Number | Particle count per dL | | `pm003Count` | Number | Particle count 0.3um per dL |
| `pm005Count` | Number | Particle count 0.5um per dL |
| `pm01Count` | Number | Particle count 1.0um per dL |
| `pm02Count` | Number | Particle count 2.5um per dL |
| `pm50Count` | Number | Particle count 5.0um per dL (only for indoor monitor) |
| `pm10Count` | Number | Particle count 10um per dL (only for indoor monitor) |
| `atmp` | Number | Temperature in Degrees Celsius | | `atmp` | Number | Temperature in Degrees Celsius |
| `atmpCompensated` | Number | Temperature in Degrees Celsius with correction applied | | `atmpCompensated` | Number | Temperature in Degrees Celsius with correction applied |
| `rhum` | Number | Relative Humidity | | `rhum` | Number | Relative Humidity |
@ -65,16 +73,17 @@ You get the following response:
| `noxIndex` | Number | Senisirion NOx Index | | `noxIndex` | Number | Senisirion NOx Index |
| `noxRaw` | Number | NOx raw value | | `noxRaw` | Number | NOx raw value |
| `boot` | Number | Counts every measurement cycle. Low boot counts indicate restarts. | | `boot` | Number | Counts every measurement cycle. Low boot counts indicate restarts. |
| `bootCount` | Number | Same as boot property. Required for Home Assistant compatability. Will be depreciated. | | `bootCount` | Number | Same as boot property. Required for Home Assistant compatability. (deprecated soon!) |
| `ledMode` | String | Current configuration of the LED mode | | `ledMode` | String | Current configuration of the LED mode |
| `firmware` | String | Current firmware version | | `firmware` | String | Current firmware version |
| `model` | String | Current model name | | `model` | String | Current model name |
| `monitorDisplayCompensatedValues` | Boolean | Switching Display of AirGradient ONE to Compensated / Non Compensated Values |
Compensated values apply correction algorithms to make the sensor values more accurate. Temperature and relative humidity correction is only applied on the outdoor monitor Open Air but the properties _compensated will still be send also for the indoor monitor AirGradient ONE. Compensated values apply correction algorithms to make the sensor values more accurate. Temperature and relative humidity correction is only applied on the outdoor monitor Open Air but the properties _compensated will still be send also for the indoor monitor AirGradient ONE.
#### Get Configuration Parameters (GET) #### Get Configuration Parameters (GET)
With the path "/config" you can get the current configuration.
"/config" path returns the current configuration of the monitor.
```json ```json
{ {
"country": "TH", "country": "TH",
@ -91,28 +100,40 @@ With the path "/config" you can get the current configuration.
"displayBrightness": 100, "displayBrightness": 100,
"offlineMode": false, "offlineMode": false,
"model": "I-9PSL", "model": "I-9PSL",
"monitorDisplayCompensatedValues": true "monitorDisplayCompensatedValues": true,
"corrections": {
"pm02": {
"correctionAlgorithm": "epa_2021",
"slr": {}
}
}
}
} }
``` ```
#### Set Configuration Parameters (PUT) #### Set Configuration Parameters (PUT)
Configuration parameters can be changed with a put request to the monitor, e.g. Configuration parameters can be changed with a PUT request to the monitor, e.g.
Example to force CO2 calibration Example to force CO2 calibration
```curl -X PUT -H "Content-Type: application/json" -d '{"co2CalibrationRequested":true}' http://airgradient_84fce612eff4.local/config ``` ```bash
curl -X PUT -H "Content-Type: application/json" -d '{"co2CalibrationRequested":true}' http://airgradient_84fce612eff4.local/config
```
Example to set monitor to Celsius Example to set monitor to Celsius
```curl -X PUT -H "Content-Type: application/json" -d '{"temperatureUnit":"c"}' http://airgradient_84fce612eff4.local/config ``` ```bash
curl -X PUT -H "Content-Type: application/json" -d '{"temperatureUnit":"c"}' http://airgradient_84fce612eff4.local/config
```
If you use command prompt on Windows, you need to escape the quotes: If you use command prompt on Windows, you need to escape the quotes:
``` -d "{\"param\":\"value\"}" ``` ``` -d "{\"param\":\"value\"}" ```
#### Avoiding Conflicts with Configuration on AirGradient Server #### Avoiding Conflicts with Configuration on AirGradient Server
If the monitor is set up on the AirGradient dashboard, it will also receive configurations from there. In case you do not want this, please set `configurationControl` to `local`. In case you set it to `cloud` and want to change it to `local`, you need to make a factory reset.
If the monitor is set up on the AirGradient dashboard, it will also receive the configuration parameters from there. In case you do not want this, please set `configurationControl` to `local`. In case you set it to `cloud` and want to change it to `local`, you need to make a factory reset.
#### Configuration Parameters (GET/PUT) #### Configuration Parameters (GET/PUT)
@ -134,4 +155,62 @@ If the monitor is set up on the AirGradient dashboard, it will also receive conf
| `noxLearningOffset` | Set NOx learning gain offset. | Number | 0-720 (default 12) | `{"noxLearningOffset": 12}` | | `noxLearningOffset` | Set NOx learning gain offset. | Number | 0-720 (default 12) | `{"noxLearningOffset": 12}` |
| `tvocLearningOffset` | Set VOC learning gain offset. | Number | 0-720 (default 12) | `{"tvocLearningOffset": 12}` | | `tvocLearningOffset` | Set VOC learning gain offset. | Number | 0-720 (default 12) | `{"tvocLearningOffset": 12}` |
| `offlineMode` | Set monitor to run without WiFi. | Boolean | `false`: Disabled (default) <br> `true`: Enabled | `{"offlineMode": true}` | | `offlineMode` | Set monitor to run without WiFi. | Boolean | `false`: Disabled (default) <br> `true`: Enabled | `{"offlineMode": true}` |
| `monitorDisplayCompensatedValues` | Set the display show the PM value with/without compensate value (From [3.1.9]()) | Boolean | `false`: Without compensate (default) <br> `true`: with compensate | `{"monitorDisplayCompensatedValues": false }` | | `monitorDisplayCompensatedValues` | Set the display show the PM value with/without compensate value (only on [3.1.9]()) | Boolean | `false`: Without compensate (default) <br> `true`: with compensate | `{"monitorDisplayCompensatedValues": false }` |
| `corrections` | Sets correction options to display and measurement values on local server response. (version >= [3.1.11]()) | Object | _see corrections section_ | _see corrections section_ |
#### Corrections
The `corrections` object allows configuring PM2.5 correction algorithms and parameters locally. This affects both the display and local server response values.
Example correction configuration:
```json
{
"corrections": {
"pm02": {
"correctionAlgorithm": "<Option In String>",
"slr": {
"intercept": 0,
"scalingFactor": 0,
"useEpa2021": false
}
}
}
}
```
| Algorithm | Value | Description | SLR required |
|------------|-------------|------|---------|
| Raw | `"none"` | No correction (default) | No |
| EPA 2021 | `"epa_2021"` | Use EPA 2021 correction factors on top of raw value | No |
| PMS5003_20240104 | `"slr_PMS5003_20240104"` | Correction for PMS5003 sensor batch 20240104| Yes |
| PMS5003_20231218 | `"slr_PMS5003_20231218"` | Correction for PMS5003 sensor batch 20231218| Yes |
| PMS5003_20231030 | `"slr_PMS5003_20231030"` | Correction for PMS5003 sensor batch 20231030| Yes |
**NOTES**:
- Set `useEpa2021` to `true` if want to apply EPA 2021 correction factors on top of SLR correction value, otherwise `false`
- `intercept` and `scalingFactor` values can be obtained from [this article](https://www.airgradient.com/blog/low-readings-from-pms5003/)
- If `configurationControl` is set to `local` (eg. when using Home Assistant), correction need to be set manually, see examples below
**Examples**:
- PMS5003_20231030
```bash
curl --location -X PUT 'http://airgradient_84fce612eff4.local/config' --header 'Content-Type: application/json' --data '{"corrections":{"pm02":{"correctionAlgorithm":"slr_PMS5003_20231030","slr":{"intercept":0,"scalingFactor":0.02838,"useEpa2021":true}}}}'
```
- PMS5003_20231218
```bash
curl --location -X PUT 'http://airgradient_84fce612eff4.local/config' --header 'Content-Type: application/json' --data '{"corrections":{"pm02":{"correctionAlgorithm":"slr_PMS5003_20231218","slr":{"intercept":0,"scalingFactor":0.03525,"useEpa2021":true}}}}'
```
- PMS5003_20240104
```bash
curl --location -X PUT 'http://airgradient_84fce612eff4.local/config' --header 'Content-Type: application/json' --data '{"corrections":{"pm02":{"correctionAlgorithm":"slr_PMS5003_20240104","slr":{"intercept":0,"scalingFactor":0.02896,"useEpa2021":true}}}}'
```

View File

@ -49,9 +49,8 @@ CC BY-SA 4.0 Attribution-ShareAlike 4.0 International License
#define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */ #define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */
#define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */ #define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */
#define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */
#define SENSOR_TEMP_HUM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_TEMP_HUM_UPDATE_INTERVAL 6000 /** ms */
#define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */ #define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */
#define FIRMWARE_CHECK_FOR_UPDATE_MS (60 * 60 * 1000) /** ms */
static AirGradient ag(DIY_BASIC); static AirGradient ag(DIY_BASIC);
static Configuration configuration(Serial); static Configuration configuration(Serial);
@ -68,7 +67,6 @@ static LocalServer localServer(Serial, openMetrics, measurements, configuration,
wifiConnector); wifiConnector);
static MqttClient mqttClient(Serial); static MqttClient mqttClient(Serial);
static int getCO2FailCount = 0;
static AgFirmwareMode fwMode = FW_MODE_I_BASIC_40PS; static AgFirmwareMode fwMode = FW_MODE_I_BASIC_40PS;
static String fwNewVersion; static String fwNewVersion;
@ -90,6 +88,8 @@ static void wdgFeedUpdate(void);
static bool sgp41Init(void); static bool sgp41Init(void);
static void wifiFactoryConfigure(void); static void wifiFactoryConfigure(void);
static void mqttHandle(void); static void mqttHandle(void);
static int calculateMaxPeriod(int updateInterval);
static void setMeasurementMaxPeriod();
AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, oledDisplaySchedule); AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, oledDisplaySchedule);
AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL, AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL,
@ -130,6 +130,10 @@ void setup() {
/** Init sensor */ /** Init sensor */
boardInit(); boardInit();
setMeasurementMaxPeriod();
// Uncomment below line to print every measurements reading update
// measurements.setDebug(true);
/** Connecting wifi */ /** Connecting wifi */
bool connectToWifi = false; bool connectToWifi = false;
@ -230,17 +234,16 @@ void loop() {
} }
static void co2Update(void) { static void co2Update(void) {
if (!configuration.hasSensorS8) {
// Device don't have S8 sensor
return;
}
int value = ag.s8.getCo2(); int value = ag.s8.getCo2();
if (utils::isValidCO2(value)) { if (utils::isValidCO2(value)) {
measurements.CO2 = value; measurements.update(Measurements::CO2, value);
getCO2FailCount = 0;
Serial.printf("CO2 (ppm): %d\r\n", measurements.CO2);
} else { } else {
getCO2FailCount++; measurements.update(Measurements::CO2, utils::getInvalidCO2());
Serial.printf("Get CO2 failed: %d\r\n", getCO2FailCount);
if (getCO2FailCount >= 3) {
measurements.CO2 = utils::getInvalidCO2();
}
} }
} }
@ -313,8 +316,7 @@ static void mqttHandle(void) {
} }
if (mqttClient.isConnected()) { if (mqttClient.isConnected()) {
String payload = measurements.toString(true, fwMode, wifiConnector.RSSI(), String payload = measurements.toString(true, fwMode, wifiConnector.RSSI(), ag, configuration);
&ag, &configuration);
String topic = "airgradient/readings/" + ag.deviceId(); String topic = "airgradient/readings/" + ag.deviceId();
if (mqttClient.publish(topic.c_str(), payload.c_str(), payload.length())) { if (mqttClient.publish(topic.c_str(), payload.c_str(), payload.length())) {
Serial.println("MQTT sync success"); Serial.println("MQTT sync success");
@ -490,88 +492,98 @@ static void oledDisplaySchedule(void) {
} }
static void updateTvoc(void) { static void updateTvoc(void) {
measurements.TVOC = ag.sgp41.getTvocIndex(); if (!configuration.hasSensorSGP) {
measurements.TVOCRaw = ag.sgp41.getTvocRaw(); return;
measurements.NOx = ag.sgp41.getNoxIndex(); }
measurements.NOxRaw = ag.sgp41.getNoxRaw();
Serial.println(); measurements.update(Measurements::TVOC, ag.sgp41.getTvocIndex());
Serial.printf("TVOC index: %d\r\n", measurements.TVOC); measurements.update(Measurements::TVOCRaw, ag.sgp41.getTvocRaw());
Serial.printf("TVOC raw: %d\r\n", measurements.TVOCRaw); measurements.update(Measurements::NOx, ag.sgp41.getNoxIndex());
Serial.printf("NOx index: %d\r\n", measurements.NOx); measurements.update(Measurements::NOxRaw, ag.sgp41.getNoxRaw());
Serial.printf("NOx raw: %d\r\n", measurements.NOxRaw);
} }
static void updatePm(void) { static void updatePm(void) {
if (ag.pms5003.connected()) { if (ag.pms5003.connected()) {
measurements.pm01_1 = ag.pms5003.getPm01Ae(); measurements.update(Measurements::PM01, ag.pms5003.getPm01Ae());
measurements.pm25_1 = ag.pms5003.getPm25Ae(); measurements.update(Measurements::PM25, ag.pms5003.getPm25Ae());
measurements.pm10_1 = ag.pms5003.getPm10Ae(); measurements.update(Measurements::PM10, ag.pms5003.getPm10Ae());
measurements.pm03PCount_1 = ag.pms5003.getPm03ParticleCount(); measurements.update(Measurements::PM03_PC, ag.pms5003.getPm03ParticleCount());
Serial.println();
Serial.printf("PM1 ug/m3: %d\r\n", measurements.pm01_1);
Serial.printf("PM2.5 ug/m3: %d\r\n", measurements.pm25_1);
Serial.printf("PM10 ug/m3: %d\r\n", measurements.pm10_1);
Serial.printf("PM0.3 Count: %d\r\n", measurements.pm03PCount_1);
Serial.printf("PM firmware version: %d\r\n", ag.pms5003.getFirmwareVersion());
ag.pms5003.resetFailCount();
} else { } else {
ag.pms5003.updateFailCount(); measurements.update(Measurements::PM01, utils::getInvalidPmValue());
Serial.printf("PMS read failed %d times\r\n", ag.pms5003.getFailCount()); measurements.update(Measurements::PM25, utils::getInvalidPmValue());
if (ag.pms5003.getFailCount() >= PMS_FAIL_COUNT_SET_INVALID) { measurements.update(Measurements::PM10, utils::getInvalidPmValue());
measurements.pm01_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM03_PC, utils::getInvalidPmValue());
measurements.pm25_1 = utils::getInvalidPmValue();
measurements.pm10_1 = utils::getInvalidPmValue();
measurements.pm03PCount_1 = utils::getInvalidPmValue();
}
if(ag.pms5003.getFailCount() >= ag.pms5003.getFailCountMax()) {
Serial.printf("PMS failure count reach to max set %d, restarting...", ag.pms5003.getFailCountMax());
ESP.restart();
}
} }
} }
static void sendDataToServer(void) { static void sendDataToServer(void) {
/** Increment bootcount when send measurements data is scheduled */
measurements.bootCount++;
/** Ignore send data to server if postToAirGradient disabled */ /** Ignore send data to server if postToAirGradient disabled */
if (configuration.isPostDataToAirGradient() == false || if (configuration.isPostDataToAirGradient() == false ||
configuration.isOfflineMode()) { configuration.isOfflineMode()) {
return; return;
} }
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), ag, configuration);
&ag, &configuration);
if (apiClient.postToServer(syncData)) { if (apiClient.postToServer(syncData)) {
Serial.println(); Serial.println();
Serial.println( Serial.println(
"Online mode and isPostToAirGradient = true: watchdog reset"); "Online mode and isPostToAirGradient = true: watchdog reset");
Serial.println(); Serial.println();
} }
measurements.bootCount++;
} }
static void tempHumUpdate(void) { static void tempHumUpdate(void) {
delay(100);
if (ag.sht.measure()) { if (ag.sht.measure()) {
measurements.Temperature = ag.sht.getTemperature(); float temp = ag.sht.getTemperature();
measurements.Humidity = ag.sht.getRelativeHumidity(); float rhum = ag.sht.getRelativeHumidity();
Serial.printf("Temperature in C: %0.2f\r\n", measurements.Temperature); measurements.update(Measurements::Temperature, temp);
Serial.printf("Relative Humidity: %d\r\n", measurements.Humidity); measurements.update(Measurements::Humidity, rhum);
Serial.printf("Temperature compensated in C: %0.2f\r\n",
measurements.Temperature);
Serial.printf("Relative Humidity compensated: %d\r\n",
measurements.Humidity);
// Update compensation temperature and humidity for SGP41 // Update compensation temperature and humidity for SGP41
if (configuration.hasSensorSGP) { if (configuration.hasSensorSGP) {
ag.sgp41.setCompensationTemperatureHumidity(measurements.Temperature, ag.sgp41.setCompensationTemperatureHumidity(temp, rhum);
measurements.Humidity);
} }
} else { } else {
measurements.update(Measurements::Temperature, utils::getInvalidTemperature());
measurements.update(Measurements::Humidity, utils::getInvalidHumidity());
Serial.println("SHT read failed"); Serial.println("SHT read failed");
measurements.Temperature = utils::getInvalidTemperature();
measurements.Humidity = utils::getInvalidHumidity();
} }
} }
/* Set max period for each measurement type based on sensor update interval*/
void setMeasurementMaxPeriod() {
/// Max period for S8 sensors measurements
measurements.maxPeriod(Measurements::CO2, calculateMaxPeriod(SENSOR_CO2_UPDATE_INTERVAL));
/// Max period for SGP sensors measurements
measurements.maxPeriod(Measurements::TVOC, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::TVOCRaw, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::NOx, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::NOxRaw, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
/// Max period for PMS sensors measurements
measurements.maxPeriod(Measurements::PM25, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM01, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM10, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM03_PC, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
// Temperature and Humidity
if (configuration.hasSensorSHT) {
/// Max period for SHT sensors measurements
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
} else {
/// Temp and hum data retrieved from PMS5003T sensor
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
}
}
int calculateMaxPeriod(int updateInterval) {
// 0.5 is 50% reduced interval for max period
return (SERVER_SYNC_INTERVAL - (SERVER_SYNC_INTERVAL * 0.5)) / updateInterval;
}

View File

@ -53,9 +53,8 @@ void LocalServer::_GET_metrics(void) {
} }
void LocalServer::_GET_measure(void) { void LocalServer::_GET_measure(void) {
server.send( String toSend = measure.toString(true, fwMode, wifiConnector.RSSI(), *ag, config);
200, "application/json", server.send(200, "application/json", toSend);
measure.toString(true, fwMode, wifiConnector.RSSI(), ag, &config));
} }
void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; } void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; }

View File

@ -57,35 +57,44 @@ String OpenMetrics::getPayload(void) {
"gauge", "dbm"); "gauge", "dbm");
add_metric_point("", String(wifiConnector.RSSI())); add_metric_point("", String(wifiConnector.RSSI()));
if (config.hasSensorS8 && measure.CO2 >= 0) { // Initialize default invalid value for each measurements
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(measure.CO2));
}
float _temp = utils::getInvalidTemperature(); float _temp = utils::getInvalidTemperature();
float _hum = utils::getInvalidHumidity(); float _hum = utils::getInvalidHumidity();
int pm01 = utils::getInvalidPmValue(); int pm01 = utils::getInvalidPmValue();
int pm25 = utils::getInvalidPmValue(); int pm25 = utils::getInvalidPmValue();
int pm10 = utils::getInvalidPmValue(); int pm10 = utils::getInvalidPmValue();
int pm03PCount = utils::getInvalidPmValue(); int pm03PCount = utils::getInvalidPmValue();
int co2 = utils::getInvalidCO2();
int atmpCompensated = utils::getInvalidTemperature(); int atmpCompensated = utils::getInvalidTemperature();
int ahumCompensated = utils::getInvalidHumidity(); int ahumCompensated = utils::getInvalidHumidity();
int tvoc = utils::getInvalidVOC();
int tvocRaw = utils::getInvalidVOC();
int nox = utils::getInvalidNOx();
int noxRaw = utils::getInvalidNOx();
if (config.hasSensorSHT) { if (config.hasSensorSHT) {
_temp = measure.Temperature; _temp = measure.getFloat(Measurements::Temperature);
_hum = measure.Humidity; _hum = measure.getFloat(Measurements::Humidity);
atmpCompensated = _temp; atmpCompensated = _temp;
ahumCompensated = _hum; ahumCompensated = _hum;
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
pm01 = measure.pm01_1; pm01 = measure.get(Measurements::PM01);
pm25 = measure.pm25_1; pm25 = measure.get(Measurements::PM25);
pm10 = measure.pm10_1; pm10 = measure.get(Measurements::PM10);
pm03PCount = measure.pm03PCount_1; pm03PCount = measure.get(Measurements::PM03_PC);
}
if (config.hasSensorSGP) {
tvoc = measure.get(Measurements::TVOC);
tvocRaw = measure.get(Measurements::TVOCRaw);
nox = measure.get(Measurements::NOx);
noxRaw = measure.get(Measurements::NOxRaw);
}
if (config.hasSensorS8) {
co2 = measure.get(Measurements::CO2);
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
@ -120,36 +129,44 @@ String OpenMetrics::getPayload(void) {
} }
if (config.hasSensorSGP) { if (config.hasSensorSGP) {
if (utils::isValidVOC(measure.TVOC)) { if (utils::isValidVOC(tvoc)) {
add_metric("tvoc_index", add_metric("tvoc_index",
"The processed Total Volatile Organic Compounds (TVOC) index " "The processed Total Volatile Organic Compounds (TVOC) index "
"as measured by the AirGradient SGP sensor", "as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOC)); add_metric_point("", String(tvoc));
} }
if (utils::isValidVOC(measure.TVOCRaw)) { if (utils::isValidVOC(tvocRaw)) {
add_metric("tvoc_raw", add_metric("tvoc_raw",
"The raw input value to the Total Volatile Organic Compounds " "The raw input value to the Total Volatile Organic Compounds "
"(TVOC) index as measured by the AirGradient SGP sensor", "(TVOC) index as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOCRaw)); add_metric_point("", String(tvocRaw));
} }
if (utils::isValidNOx(measure.NOx)) { if (utils::isValidNOx(nox)) {
add_metric("nox_index", add_metric("nox_index",
"The processed Nitrous Oxide (NOx) index as measured by the " "The processed Nitrous Oxide (NOx) index as measured by the "
"AirGradient SGP sensor", "AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOx)); add_metric_point("", String(nox));
} }
if (utils::isValidNOx(measure.NOxRaw)) { if (utils::isValidNOx(noxRaw)) {
add_metric("nox_raw", add_metric("nox_raw",
"The raw input value to the Nitrous Oxide (NOx) index as " "The raw input value to the Nitrous Oxide (NOx) index as "
"measured by the AirGradient SGP sensor", "measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOxRaw)); add_metric_point("", String(noxRaw));
} }
} }
if (utils::isValidCO2(co2)) {
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(co2));
}
if (utils::isValidTemperature(_temp)) { if (utils::isValidTemperature(_temp)) {
add_metric( add_metric(
"temperature", "temperature",

View File

@ -49,9 +49,8 @@ CC BY-SA 4.0 Attribution-ShareAlike 4.0 International License
#define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */ #define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */
#define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */ #define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */
#define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */
#define SENSOR_TEMP_HUM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_TEMP_HUM_UPDATE_INTERVAL 6000 /** ms */
#define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */ #define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */
#define FIRMWARE_CHECK_FOR_UPDATE_MS (60 * 60 * 1000) /** ms */
static AirGradient ag(DIY_PRO_INDOOR_V3_3); static AirGradient ag(DIY_PRO_INDOOR_V3_3);
static Configuration configuration(Serial); static Configuration configuration(Serial);
@ -68,7 +67,6 @@ static LocalServer localServer(Serial, openMetrics, measurements, configuration,
wifiConnector); wifiConnector);
static MqttClient mqttClient(Serial); static MqttClient mqttClient(Serial);
static int getCO2FailCount = 0;
static AgFirmwareMode fwMode = FW_MODE_I_33PS; static AgFirmwareMode fwMode = FW_MODE_I_33PS;
static String fwNewVersion; static String fwNewVersion;
@ -90,6 +88,8 @@ static void wdgFeedUpdate(void);
static bool sgp41Init(void); static bool sgp41Init(void);
static void wifiFactoryConfigure(void); static void wifiFactoryConfigure(void);
static void mqttHandle(void); static void mqttHandle(void);
static int calculateMaxPeriod(int updateInterval);
static void setMeasurementMaxPeriod();
AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, oledDisplaySchedule); AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, oledDisplaySchedule);
AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL, AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL,
@ -130,6 +130,10 @@ void setup() {
/** Init sensor */ /** Init sensor */
boardInit(); boardInit();
setMeasurementMaxPeriod();
// Uncomment below line to print every measurements reading update
// measurements.setDebug(true);
/** Connecting wifi */ /** Connecting wifi */
bool connectToWifi = false; bool connectToWifi = false;
@ -228,17 +232,16 @@ void loop() {
} }
static void co2Update(void) { static void co2Update(void) {
if (!configuration.hasSensorS8) {
// Device don't have S8 sensor
return;
}
int value = ag.s8.getCo2(); int value = ag.s8.getCo2();
if (utils::isValidCO2(value)) { if (utils::isValidCO2(value)) {
measurements.CO2 = value; measurements.update(Measurements::CO2, value);
getCO2FailCount = 0;
Serial.printf("CO2 (ppm): %d\r\n", measurements.CO2);
} else { } else {
getCO2FailCount++; measurements.update(Measurements::CO2, utils::getInvalidCO2());
Serial.printf("Get CO2 failed: %d\r\n", getCO2FailCount);
if (getCO2FailCount >= 3) {
measurements.CO2 = utils::getInvalidCO2();
}
} }
} }
@ -370,8 +373,7 @@ static void mqttHandle(void) {
} }
if (mqttClient.isConnected()) { if (mqttClient.isConnected()) {
String payload = measurements.toString(true, fwMode, wifiConnector.RSSI(), String payload = measurements.toString(true, fwMode, wifiConnector.RSSI(), ag, configuration);
&ag, &configuration);
String topic = "airgradient/readings/" + ag.deviceId(); String topic = "airgradient/readings/" + ag.deviceId();
if (mqttClient.publish(topic.c_str(), payload.c_str(), payload.length())) { if (mqttClient.publish(topic.c_str(), payload.c_str(), payload.length())) {
Serial.println("MQTT sync success"); Serial.println("MQTT sync success");
@ -542,88 +544,98 @@ static void oledDisplaySchedule(void) {
} }
static void updateTvoc(void) { static void updateTvoc(void) {
measurements.TVOC = ag.sgp41.getTvocIndex(); if (!configuration.hasSensorSGP) {
measurements.TVOCRaw = ag.sgp41.getTvocRaw(); return;
measurements.NOx = ag.sgp41.getNoxIndex(); }
measurements.NOxRaw = ag.sgp41.getNoxRaw();
Serial.println(); measurements.update(Measurements::TVOC, ag.sgp41.getTvocIndex());
Serial.printf("TVOC index: %d\r\n", measurements.TVOC); measurements.update(Measurements::TVOCRaw, ag.sgp41.getTvocRaw());
Serial.printf("TVOC raw: %d\r\n", measurements.TVOCRaw); measurements.update(Measurements::NOx, ag.sgp41.getNoxIndex());
Serial.printf("NOx index: %d\r\n", measurements.NOx); measurements.update(Measurements::NOxRaw, ag.sgp41.getNoxRaw());
Serial.printf("NOx raw: %d\r\n", measurements.NOxRaw);
} }
static void updatePm(void) { static void updatePm(void) {
if (ag.pms5003.connected()) { if (ag.pms5003.connected()) {
measurements.pm01_1 = ag.pms5003.getPm01Ae(); measurements.update(Measurements::PM01, ag.pms5003.getPm01Ae());
measurements.pm25_1 = ag.pms5003.getPm25Ae(); measurements.update(Measurements::PM25, ag.pms5003.getPm25Ae());
measurements.pm10_1 = ag.pms5003.getPm10Ae(); measurements.update(Measurements::PM10, ag.pms5003.getPm10Ae());
measurements.pm03PCount_1 = ag.pms5003.getPm03ParticleCount(); measurements.update(Measurements::PM03_PC, ag.pms5003.getPm03ParticleCount());
Serial.println();
Serial.printf("PM1 ug/m3: %d\r\n", measurements.pm01_1);
Serial.printf("PM2.5 ug/m3: %d\r\n", measurements.pm25_1);
Serial.printf("PM10 ug/m3: %d\r\n", measurements.pm10_1);
Serial.printf("PM0.3 Count: %d\r\n", measurements.pm03PCount_1);
Serial.printf("PM firmware version: %d\r\n", ag.pms5003.getFirmwareVersion());
ag.pms5003.resetFailCount();
} else { } else {
ag.pms5003.updateFailCount(); measurements.update(Measurements::PM01, utils::getInvalidPmValue());
Serial.printf("PMS read failed %d times\r\n", ag.pms5003.getFailCount()); measurements.update(Measurements::PM25, utils::getInvalidPmValue());
if (ag.pms5003.getFailCount() >= PMS_FAIL_COUNT_SET_INVALID) { measurements.update(Measurements::PM10, utils::getInvalidPmValue());
measurements.pm01_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM03_PC, utils::getInvalidPmValue());
measurements.pm25_1 = utils::getInvalidPmValue();
measurements.pm10_1 = utils::getInvalidPmValue();
measurements.pm03PCount_1 = utils::getInvalidPmValue();
}
if(ag.pms5003.getFailCount() >= ag.pms5003.getFailCountMax()) {
Serial.printf("PMS failure count reach to max set %d, restarting...", ag.pms5003.getFailCountMax());
ESP.restart();
}
} }
} }
static void sendDataToServer(void) { static void sendDataToServer(void) {
/** Increment bootcount when send measurements data is scheduled */
measurements.bootCount++;
/** Ignore send data to server if postToAirGradient disabled */ /** Ignore send data to server if postToAirGradient disabled */
if (configuration.isPostDataToAirGradient() == false || if (configuration.isPostDataToAirGradient() == false ||
configuration.isOfflineMode()) { configuration.isOfflineMode()) {
return; return;
} }
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), ag, configuration);
&ag, &configuration);
if (apiClient.postToServer(syncData)) { if (apiClient.postToServer(syncData)) {
Serial.println(); Serial.println();
Serial.println( Serial.println(
"Online mode and isPostToAirGradient = true: watchdog reset"); "Online mode and isPostToAirGradient = true: watchdog reset");
Serial.println(); Serial.println();
} }
measurements.bootCount++;
} }
static void tempHumUpdate(void) { static void tempHumUpdate(void) {
delay(100);
if (ag.sht.measure()) { if (ag.sht.measure()) {
measurements.Temperature = ag.sht.getTemperature(); float temp = ag.sht.getTemperature();
measurements.Humidity = ag.sht.getRelativeHumidity(); float rhum = ag.sht.getRelativeHumidity();
Serial.printf("Temperature in C: %0.2f\r\n", measurements.Temperature); measurements.update(Measurements::Temperature, temp);
Serial.printf("Relative Humidity: %d\r\n", measurements.Humidity); measurements.update(Measurements::Humidity, rhum);
Serial.printf("Temperature compensated in C: %0.2f\r\n",
measurements.Temperature);
Serial.printf("Relative Humidity compensated: %d\r\n",
measurements.Humidity);
// Update compensation temperature and humidity for SGP41 // Update compensation temperature and humidity for SGP41
if (configuration.hasSensorSGP) { if (configuration.hasSensorSGP) {
ag.sgp41.setCompensationTemperatureHumidity(measurements.Temperature, ag.sgp41.setCompensationTemperatureHumidity(temp, rhum);
measurements.Humidity);
} }
} else { } else {
measurements.update(Measurements::Temperature, utils::getInvalidTemperature());
measurements.update(Measurements::Humidity, utils::getInvalidHumidity());
Serial.println("SHT read failed"); Serial.println("SHT read failed");
measurements.Temperature = utils::getInvalidTemperature();
measurements.Humidity = utils::getInvalidHumidity();
} }
} }
/* Set max period for each measurement type based on sensor update interval*/
void setMeasurementMaxPeriod() {
/// Max period for S8 sensors measurements
measurements.maxPeriod(Measurements::CO2, calculateMaxPeriod(SENSOR_CO2_UPDATE_INTERVAL));
/// Max period for SGP sensors measurements
measurements.maxPeriod(Measurements::TVOC, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::TVOCRaw, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::NOx, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::NOxRaw, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
/// Max period for PMS sensors measurements
measurements.maxPeriod(Measurements::PM25, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM01, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM10, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM03_PC, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
// Temperature and Humidity
if (configuration.hasSensorSHT) {
/// Max period for SHT sensors measurements
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
} else {
/// Temp and hum data retrieved from PMS5003T sensor
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
}
}
int calculateMaxPeriod(int updateInterval) {
// 0.5 is 50% reduced interval for max period
return (SERVER_SYNC_INTERVAL - (SERVER_SYNC_INTERVAL * 0.5)) / updateInterval;
}

View File

@ -53,9 +53,8 @@ void LocalServer::_GET_metrics(void) {
} }
void LocalServer::_GET_measure(void) { void LocalServer::_GET_measure(void) {
server.send( String toSend = measure.toString(true, fwMode, wifiConnector.RSSI(), *ag, config);
200, "application/json", server.send(200, "application/json", toSend);
measure.toString(true, fwMode, wifiConnector.RSSI(), ag, &config));
} }
void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; } void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; }

View File

@ -57,35 +57,44 @@ String OpenMetrics::getPayload(void) {
"gauge", "dbm"); "gauge", "dbm");
add_metric_point("", String(wifiConnector.RSSI())); add_metric_point("", String(wifiConnector.RSSI()));
if (config.hasSensorS8 && measure.CO2 >= 0) { // Initialize default invalid value for each measurements
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(measure.CO2));
}
float _temp = utils::getInvalidTemperature(); float _temp = utils::getInvalidTemperature();
float _hum = utils::getInvalidHumidity(); float _hum = utils::getInvalidHumidity();
int pm01 = utils::getInvalidPmValue(); int pm01 = utils::getInvalidPmValue();
int pm25 = utils::getInvalidPmValue(); int pm25 = utils::getInvalidPmValue();
int pm10 = utils::getInvalidPmValue(); int pm10 = utils::getInvalidPmValue();
int pm03PCount = utils::getInvalidPmValue(); int pm03PCount = utils::getInvalidPmValue();
int co2 = utils::getInvalidCO2();
int atmpCompensated = utils::getInvalidTemperature(); int atmpCompensated = utils::getInvalidTemperature();
int ahumCompensated = utils::getInvalidHumidity(); int ahumCompensated = utils::getInvalidHumidity();
int tvoc = utils::getInvalidVOC();
int tvocRaw = utils::getInvalidVOC();
int nox = utils::getInvalidNOx();
int noxRaw = utils::getInvalidNOx();
if (config.hasSensorSHT) { if (config.hasSensorSHT) {
_temp = measure.Temperature; _temp = measure.getFloat(Measurements::Temperature);
_hum = measure.Humidity; _hum = measure.getFloat(Measurements::Humidity);
atmpCompensated = _temp; atmpCompensated = _temp;
ahumCompensated = _hum; ahumCompensated = _hum;
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
pm01 = measure.pm01_1; pm01 = measure.get(Measurements::PM01);
pm25 = measure.pm25_1; pm25 = measure.get(Measurements::PM25);
pm10 = measure.pm10_1; pm10 = measure.get(Measurements::PM10);
pm03PCount = measure.pm03PCount_1; pm03PCount = measure.get(Measurements::PM03_PC);
}
if (config.hasSensorSGP) {
tvoc = measure.get(Measurements::TVOC);
tvocRaw = measure.get(Measurements::TVOCRaw);
nox = measure.get(Measurements::NOx);
noxRaw = measure.get(Measurements::NOxRaw);
}
if (config.hasSensorS8) {
co2 = measure.get(Measurements::CO2);
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
@ -120,36 +129,45 @@ String OpenMetrics::getPayload(void) {
} }
if (config.hasSensorSGP) { if (config.hasSensorSGP) {
if (utils::isValidVOC(measure.TVOC)) { if (utils::isValidVOC(tvoc)) {
add_metric("tvoc_index", add_metric("tvoc_index",
"The processed Total Volatile Organic Compounds (TVOC) index " "The processed Total Volatile Organic Compounds (TVOC) index "
"as measured by the AirGradient SGP sensor", "as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOC)); add_metric_point("", String(tvoc));
} }
if (utils::isValidVOC(measure.TVOCRaw)) {
if (utils::isValidVOC(tvocRaw)) {
add_metric("tvoc_raw", add_metric("tvoc_raw",
"The raw input value to the Total Volatile Organic Compounds " "The raw input value to the Total Volatile Organic Compounds "
"(TVOC) index as measured by the AirGradient SGP sensor", "(TVOC) index as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOCRaw)); add_metric_point("", String(tvocRaw));
} }
if (utils::isValidNOx(measure.NOx)) { if (utils::isValidNOx(nox)) {
add_metric("nox_index", add_metric("nox_index",
"The processed Nitrous Oxide (NOx) index as measured by the " "The processed Nitrous Oxide (NOx) index as measured by the "
"AirGradient SGP sensor", "AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOx)); add_metric_point("", String(nox));
} }
if (utils::isValidNOx(measure.NOxRaw)) { if (utils::isValidNOx(noxRaw)) {
add_metric("nox_raw", add_metric("nox_raw",
"The raw input value to the Nitrous Oxide (NOx) index as " "The raw input value to the Nitrous Oxide (NOx) index as "
"measured by the AirGradient SGP sensor", "measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOxRaw)); add_metric_point("", String(noxRaw));
} }
} }
if (utils::isValidCO2(co2)) {
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(co2));
}
if (utils::isValidTemperature(_temp)) { if (utils::isValidTemperature(_temp)) {
add_metric( add_metric(
"temperature", "temperature",

View File

@ -49,9 +49,8 @@ CC BY-SA 4.0 Attribution-ShareAlike 4.0 International License
#define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */ #define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */
#define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */ #define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */
#define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */
#define SENSOR_TEMP_HUM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_TEMP_HUM_UPDATE_INTERVAL 6000 /** ms */
#define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */ #define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */
#define FIRMWARE_CHECK_FOR_UPDATE_MS (60 * 60 * 1000) /** ms */
static AirGradient ag(DIY_PRO_INDOOR_V4_2); static AirGradient ag(DIY_PRO_INDOOR_V4_2);
static Configuration configuration(Serial); static Configuration configuration(Serial);
@ -69,7 +68,6 @@ static LocalServer localServer(Serial, openMetrics, measurements, configuration,
static MqttClient mqttClient(Serial); static MqttClient mqttClient(Serial);
static uint32_t factoryBtnPressTime = 0; static uint32_t factoryBtnPressTime = 0;
static int getCO2FailCount = 0;
static AgFirmwareMode fwMode = FW_MODE_I_42PS; static AgFirmwareMode fwMode = FW_MODE_I_42PS;
static String fwNewVersion; static String fwNewVersion;
@ -91,6 +89,8 @@ static void wdgFeedUpdate(void);
static bool sgp41Init(void); static bool sgp41Init(void);
static void wifiFactoryConfigure(void); static void wifiFactoryConfigure(void);
static void mqttHandle(void); static void mqttHandle(void);
static int calculateMaxPeriod(int updateInterval);
static void setMeasurementMaxPeriod();
AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, oledDisplaySchedule); AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, oledDisplaySchedule);
AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL, AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL,
@ -131,6 +131,10 @@ void setup() {
/** Init sensor */ /** Init sensor */
boardInit(); boardInit();
setMeasurementMaxPeriod();
// Uncomment below line to print every measurements reading update
// measurements.setDebug(true);
/** Connecting wifi */ /** Connecting wifi */
bool connectToWifi = false; bool connectToWifi = false;
@ -255,17 +259,16 @@ void loop() {
} }
static void co2Update(void) { static void co2Update(void) {
if (!configuration.hasSensorS8) {
// Device don't have S8 sensor
return;
}
int value = ag.s8.getCo2(); int value = ag.s8.getCo2();
if (utils::isValidCO2(value)) { if (utils::isValidCO2(value)) {
measurements.CO2 = value; measurements.update(Measurements::CO2, value);
getCO2FailCount = 0;
Serial.printf("CO2 (ppm): %d\r\n", measurements.CO2);
} else { } else {
getCO2FailCount++; measurements.update(Measurements::CO2, utils::getInvalidCO2());
Serial.printf("Get CO2 failed: %d\r\n", getCO2FailCount);
if (getCO2FailCount >= 3) {
measurements.CO2 = utils::getInvalidCO2();
}
} }
} }
@ -393,8 +396,7 @@ static void mqttHandle(void) {
} }
if (mqttClient.isConnected()) { if (mqttClient.isConnected()) {
String payload = measurements.toString(true, fwMode, wifiConnector.RSSI(), String payload = measurements.toString(true, fwMode, wifiConnector.RSSI(), ag, configuration);
&ag, &configuration);
String topic = "airgradient/readings/" + ag.deviceId(); String topic = "airgradient/readings/" + ag.deviceId();
if (mqttClient.publish(topic.c_str(), payload.c_str(), payload.length())) { if (mqttClient.publish(topic.c_str(), payload.c_str(), payload.length())) {
Serial.println("MQTT sync success"); Serial.println("MQTT sync success");
@ -583,88 +585,98 @@ static void oledDisplaySchedule(void) {
} }
static void updateTvoc(void) { static void updateTvoc(void) {
measurements.TVOC = ag.sgp41.getTvocIndex(); if (!configuration.hasSensorSGP) {
measurements.TVOCRaw = ag.sgp41.getTvocRaw(); return;
measurements.NOx = ag.sgp41.getNoxIndex(); }
measurements.NOxRaw = ag.sgp41.getNoxRaw();
Serial.println(); measurements.update(Measurements::TVOC, ag.sgp41.getTvocIndex());
Serial.printf("TVOC index: %d\r\n", measurements.TVOC); measurements.update(Measurements::TVOCRaw, ag.sgp41.getTvocRaw());
Serial.printf("TVOC raw: %d\r\n", measurements.TVOCRaw); measurements.update(Measurements::NOx, ag.sgp41.getNoxIndex());
Serial.printf("NOx index: %d\r\n", measurements.NOx); measurements.update(Measurements::NOxRaw, ag.sgp41.getNoxRaw());
Serial.printf("NOx raw: %d\r\n", measurements.NOxRaw);
} }
static void updatePm(void) { static void updatePm(void) {
if (ag.pms5003.connected()) { if (ag.pms5003.connected()) {
measurements.pm01_1 = ag.pms5003.getPm01Ae(); measurements.update(Measurements::PM01, ag.pms5003.getPm01Ae());
measurements.pm25_1 = ag.pms5003.getPm25Ae(); measurements.update(Measurements::PM25, ag.pms5003.getPm25Ae());
measurements.pm10_1 = ag.pms5003.getPm10Ae(); measurements.update(Measurements::PM10, ag.pms5003.getPm10Ae());
measurements.pm03PCount_1 = ag.pms5003.getPm03ParticleCount(); measurements.update(Measurements::PM03_PC, ag.pms5003.getPm03ParticleCount());
Serial.println();
Serial.printf("PM1 ug/m3: %d\r\n", measurements.pm01_1);
Serial.printf("PM2.5 ug/m3: %d\r\n", measurements.pm25_1);
Serial.printf("PM10 ug/m3: %d\r\n", measurements.pm10_1);
Serial.printf("PM0.3 Count: %d\r\n", measurements.pm03PCount_1);
Serial.printf("PM firmware version: %d\r\n", ag.pms5003.getFirmwareVersion());
ag.pms5003.resetFailCount();
} else { } else {
ag.pms5003.updateFailCount(); measurements.update(Measurements::PM01, utils::getInvalidPmValue());
Serial.printf("PMS read failed %d times\r\n", ag.pms5003.getFailCount()); measurements.update(Measurements::PM25, utils::getInvalidPmValue());
if (ag.pms5003.getFailCount() >= PMS_FAIL_COUNT_SET_INVALID) { measurements.update(Measurements::PM10, utils::getInvalidPmValue());
measurements.pm01_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM03_PC, utils::getInvalidPmValue());
measurements.pm25_1 = utils::getInvalidPmValue();
measurements.pm10_1 = utils::getInvalidPmValue();
measurements.pm03PCount_1 = utils::getInvalidPmValue();
}
if(ag.pms5003.getFailCount() >= ag.pms5003.getFailCountMax()) {
Serial.printf("PMS failure count reach to max set %d, restarting...", ag.pms5003.getFailCountMax());
ESP.restart();
}
} }
} }
static void sendDataToServer(void) { static void sendDataToServer(void) {
/** Increment bootcount when send measurements data is scheduled */
measurements.bootCount++;
/** Ignore send data to server if postToAirGradient disabled */ /** Ignore send data to server if postToAirGradient disabled */
if (configuration.isPostDataToAirGradient() == false || if (configuration.isPostDataToAirGradient() == false ||
configuration.isOfflineMode()) { configuration.isOfflineMode()) {
return; return;
} }
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), ag, configuration);
&ag, &configuration);
if (apiClient.postToServer(syncData)) { if (apiClient.postToServer(syncData)) {
Serial.println(); Serial.println();
Serial.println( Serial.println(
"Online mode and isPostToAirGradient = true: watchdog reset"); "Online mode and isPostToAirGradient = true: watchdog reset");
Serial.println(); Serial.println();
} }
measurements.bootCount++;
} }
static void tempHumUpdate(void) { static void tempHumUpdate(void) {
delay(100);
if (ag.sht.measure()) { if (ag.sht.measure()) {
measurements.Temperature = ag.sht.getTemperature(); float temp = ag.sht.getTemperature();
measurements.Humidity = ag.sht.getRelativeHumidity(); float rhum = ag.sht.getRelativeHumidity();
Serial.printf("Temperature in C: %0.2f\r\n", measurements.Temperature); measurements.update(Measurements::Temperature, temp);
Serial.printf("Relative Humidity: %d\r\n", measurements.Humidity); measurements.update(Measurements::Humidity, rhum);
Serial.printf("Temperature compensated in C: %0.2f\r\n",
measurements.Temperature);
Serial.printf("Relative Humidity compensated: %d\r\n",
measurements.Humidity);
// Update compensation temperature and humidity for SGP41 // Update compensation temperature and humidity for SGP41
if (configuration.hasSensorSGP) { if (configuration.hasSensorSGP) {
ag.sgp41.setCompensationTemperatureHumidity(measurements.Temperature, ag.sgp41.setCompensationTemperatureHumidity(temp, rhum);
measurements.Humidity);
} }
} else { } else {
measurements.update(Measurements::Temperature, utils::getInvalidTemperature());
measurements.update(Measurements::Humidity, utils::getInvalidHumidity());
Serial.println("SHT read failed"); Serial.println("SHT read failed");
measurements.Temperature = utils::getInvalidTemperature();
measurements.Humidity = utils::getInvalidHumidity();
} }
} }
/* Set max period for each measurement type based on sensor update interval*/
void setMeasurementMaxPeriod() {
/// Max period for S8 sensors measurements
measurements.maxPeriod(Measurements::CO2, calculateMaxPeriod(SENSOR_CO2_UPDATE_INTERVAL));
/// Max period for SGP sensors measurements
measurements.maxPeriod(Measurements::TVOC, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::TVOCRaw, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::NOx, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::NOxRaw, calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL));
/// Max period for PMS sensors measurements
measurements.maxPeriod(Measurements::PM25, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM01, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM10, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::PM03_PC, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
// Temperature and Humidity
if (configuration.hasSensorSHT) {
/// Max period for SHT sensors measurements
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
} else {
/// Temp and hum data retrieved from PMS5003T sensor
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
}
}
int calculateMaxPeriod(int updateInterval) {
// 0.5 is 50% reduced interval for max period
return (SERVER_SYNC_INTERVAL - (SERVER_SYNC_INTERVAL * 0.5)) / updateInterval;
}

View File

@ -53,9 +53,8 @@ void LocalServer::_GET_metrics(void) {
} }
void LocalServer::_GET_measure(void) { void LocalServer::_GET_measure(void) {
server.send( String toSend = measure.toString(true, fwMode, wifiConnector.RSSI(), *ag, config);
200, "application/json", server.send(200, "application/json", toSend);
measure.toString(true, fwMode, wifiConnector.RSSI(), ag, &config));
} }
void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; } void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; }

View File

@ -57,35 +57,44 @@ String OpenMetrics::getPayload(void) {
"gauge", "dbm"); "gauge", "dbm");
add_metric_point("", String(wifiConnector.RSSI())); add_metric_point("", String(wifiConnector.RSSI()));
if (config.hasSensorS8 && measure.CO2 >= 0) { // Initialize default invalid value for each measurements
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(measure.CO2));
}
float _temp = utils::getInvalidTemperature(); float _temp = utils::getInvalidTemperature();
float _hum = utils::getInvalidHumidity(); float _hum = utils::getInvalidHumidity();
int pm01 = utils::getInvalidPmValue(); int pm01 = utils::getInvalidPmValue();
int pm25 = utils::getInvalidPmValue(); int pm25 = utils::getInvalidPmValue();
int pm10 = utils::getInvalidPmValue(); int pm10 = utils::getInvalidPmValue();
int pm03PCount = utils::getInvalidPmValue(); int pm03PCount = utils::getInvalidPmValue();
int co2 = utils::getInvalidCO2();
int atmpCompensated = utils::getInvalidTemperature(); int atmpCompensated = utils::getInvalidTemperature();
int ahumCompensated = utils::getInvalidHumidity(); int ahumCompensated = utils::getInvalidHumidity();
int tvoc = utils::getInvalidVOC();
int tvocRaw = utils::getInvalidVOC();
int nox = utils::getInvalidNOx();
int noxRaw = utils::getInvalidNOx();
if (config.hasSensorSHT) { if (config.hasSensorSHT) {
_temp = measure.Temperature; _temp = measure.getFloat(Measurements::Temperature);
_hum = measure.Humidity; _hum = measure.getFloat(Measurements::Humidity);
atmpCompensated = _temp; atmpCompensated = _temp;
ahumCompensated = _hum; ahumCompensated = _hum;
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
pm01 = measure.pm01_1; pm01 = measure.get(Measurements::PM01);
pm25 = measure.pm25_1; pm25 = measure.get(Measurements::PM25);
pm10 = measure.pm10_1; pm10 = measure.get(Measurements::PM10);
pm03PCount = measure.pm03PCount_1; pm03PCount = measure.get(Measurements::PM03_PC);
}
if (config.hasSensorSGP) {
tvoc = measure.get(Measurements::TVOC);
tvocRaw = measure.get(Measurements::TVOCRaw);
nox = measure.get(Measurements::NOx);
noxRaw = measure.get(Measurements::NOxRaw);
}
if (config.hasSensorS8) {
co2 = measure.get(Measurements::CO2);
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
@ -120,36 +129,44 @@ String OpenMetrics::getPayload(void) {
} }
if (config.hasSensorSGP) { if (config.hasSensorSGP) {
if (utils::isValidVOC(measure.TVOC)) { if (utils::isValidVOC(tvoc)) {
add_metric("tvoc_index", add_metric("tvoc_index",
"The processed Total Volatile Organic Compounds (TVOC) index " "The processed Total Volatile Organic Compounds (TVOC) index "
"as measured by the AirGradient SGP sensor", "as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOC)); add_metric_point("", String(tvoc));
} }
if (utils::isValidVOC(measure.TVOCRaw)) { if (utils::isValidVOC(tvocRaw)) {
add_metric("tvoc_raw", add_metric("tvoc_raw",
"The raw input value to the Total Volatile Organic Compounds " "The raw input value to the Total Volatile Organic Compounds "
"(TVOC) index as measured by the AirGradient SGP sensor", "(TVOC) index as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOCRaw)); add_metric_point("", String(tvocRaw));
} }
if (utils::isValidNOx(measure.NOx)) { if (utils::isValidNOx(nox)) {
add_metric("nox_index", add_metric("nox_index",
"The processed Nitrous Oxide (NOx) index as measured by the " "The processed Nitrous Oxide (NOx) index as measured by the "
"AirGradient SGP sensor", "AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOx)); add_metric_point("", String(nox));
} }
if (utils::isValidNOx(measure.NOxRaw)) { if (utils::isValidNOx(noxRaw)) {
add_metric("nox_raw", add_metric("nox_raw",
"The raw input value to the Nitrous Oxide (NOx) index as " "The raw input value to the Nitrous Oxide (NOx) index as "
"measured by the AirGradient SGP sensor", "measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOxRaw)); add_metric_point("", String(noxRaw));
} }
} }
if (utils::isValidCO2(co2)) {
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(co2));
}
if (utils::isValidTemperature(_temp)) { if (utils::isValidTemperature(_temp)) {
add_metric( add_metric(
"temperature", "temperature",

View File

@ -64,9 +64,8 @@ void LocalServer::_GET_metrics(void) {
} }
void LocalServer::_GET_measure(void) { void LocalServer::_GET_measure(void) {
server.send( String toSend = measure.toString(true, fwMode, wifiConnector.RSSI(), *ag, config);
200, "application/json", server.send(200, "application/json", toSend);
measure.toString(true, fwMode, wifiConnector.RSSI(), ag, &config));
} }
void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; } void LocalServer::setFwMode(AgFirmwareMode fwMode) { this->fwMode = fwMode; }

View File

@ -36,35 +36,35 @@ CC BY-SA 4.0 Attribution-ShareAlike 4.0 International License
*/ */
#include <HardwareSerial.h>
#include "AirGradient.h"
#include "OtaHandler.h"
#include "AgApiClient.h" #include "AgApiClient.h"
#include "AgConfigure.h" #include "AgConfigure.h"
#include "AgSchedule.h" #include "AgSchedule.h"
#include "AgStateMachine.h" #include "AgStateMachine.h"
#include "AgWiFiConnector.h" #include "AgWiFiConnector.h"
#include "AirGradient.h"
#include "EEPROM.h" #include "EEPROM.h"
#include "ESPmDNS.h" #include "ESPmDNS.h"
#include "LocalServer.h" #include "LocalServer.h"
#include "MqttClient.h" #include "MqttClient.h"
#include "OpenMetrics.h" #include "OpenMetrics.h"
#include "OtaHandler.h"
#include "WebServer.h" #include "WebServer.h"
#include <HardwareSerial.h>
#include <WebServer.h> #include <WebServer.h>
#include <WiFi.h> #include <WiFi.h>
#define LED_BAR_ANIMATION_PERIOD 100 /** ms */ #define LED_BAR_ANIMATION_PERIOD 100 /** ms */
#define DISP_UPDATE_INTERVAL 2500 /** ms */ #define DISP_UPDATE_INTERVAL 2500 /** ms */
#define SERVER_CONFIG_SYNC_INTERVAL 60000 /** ms */ #define SERVER_CONFIG_SYNC_INTERVAL 60000 /** ms */
#define SERVER_SYNC_INTERVAL 60000 /** ms */ #define SERVER_SYNC_INTERVAL 60000 /** ms */
#define MQTT_SYNC_INTERVAL 60000 /** ms */ #define MQTT_SYNC_INTERVAL 60000 /** ms */
#define SENSOR_CO2_CALIB_COUNTDOWN_MAX 5 /** sec */ #define SENSOR_CO2_CALIB_COUNTDOWN_MAX 5 /** sec */
#define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */ #define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */
#define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */ #define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */
#define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */
#define SENSOR_TEMP_HUM_UPDATE_INTERVAL 2000 /** ms */ #define SENSOR_TEMP_HUM_UPDATE_INTERVAL 6000 /** ms */
#define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */ #define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */
#define FIRMWARE_CHECK_FOR_UPDATE_MS (60 * 60 * 1000) /** ms */ #define FIRMWARE_CHECK_FOR_UPDATE_MS (60*60*1000) /** ms */
/** I2C define */ /** I2C define */
#define I2C_SDA_PIN 7 #define I2C_SDA_PIN 7
@ -89,7 +89,6 @@ static LocalServer localServer(Serial, openMetrics, measurements, configuration,
wifiConnector); wifiConnector);
static uint32_t factoryBtnPressTime = 0; static uint32_t factoryBtnPressTime = 0;
static int getCO2FailCount = 0;
static AgFirmwareMode fwMode = FW_MODE_I_9PSL; static AgFirmwareMode fwMode = FW_MODE_I_9PSL;
static bool ledBarButtonTest = false; static bool ledBarButtonTest = false;
@ -113,9 +112,10 @@ static void ledBarEnabledUpdate(void);
static bool sgp41Init(void); static bool sgp41Init(void);
static void firmwareCheckForUpdate(void); static void firmwareCheckForUpdate(void);
static void otaHandlerCallback(OtaState state, String mesasge); static void otaHandlerCallback(OtaState state, String mesasge);
static void displayExecuteOta(OtaState state, String msg, int processing); static void displayExecuteOta(OtaState state, String msg,
static void checkSerialForCalco2(void); int processing);
static void calCo2Routine(void); static int calculateMaxPeriod(int updateInterval);
static void setMeasurementMaxPeriod();
AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, updateDisplayAndLedBar); AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, updateDisplayAndLedBar);
AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL, AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL,
@ -126,10 +126,7 @@ AgSchedule pmsSchedule(SENSOR_PM_UPDATE_INTERVAL, updatePm);
AgSchedule tempHumSchedule(SENSOR_TEMP_HUM_UPDATE_INTERVAL, tempHumUpdate); AgSchedule tempHumSchedule(SENSOR_TEMP_HUM_UPDATE_INTERVAL, tempHumUpdate);
AgSchedule tvocSchedule(SENSOR_TVOC_UPDATE_INTERVAL, updateTvoc); AgSchedule tvocSchedule(SENSOR_TVOC_UPDATE_INTERVAL, updateTvoc);
AgSchedule watchdogFeedSchedule(60000, wdgFeedUpdate); AgSchedule watchdogFeedSchedule(60000, wdgFeedUpdate);
AgSchedule checkForUpdateSchedule(FIRMWARE_CHECK_FOR_UPDATE_MS, AgSchedule checkForUpdateSchedule(FIRMWARE_CHECK_FOR_UPDATE_MS, firmwareCheckForUpdate);
firmwareCheckForUpdate);
AgSchedule calCo2WithSerial(1000, checkSerialForCalco2);
AgSchedule calCo2Timer(60000, calCo2Routine);
void setup() { void setup() {
/** Serial for print debug message */ /** Serial for print debug message */
@ -169,6 +166,10 @@ void setup() {
/** Init sensor */ /** Init sensor */
boardInit(); boardInit();
setMeasurementMaxPeriod();
// Comment below line to disable debug measurement readings
measurements.setDebug(true);
/** Connecting wifi */ /** Connecting wifi */
bool connectToWifi = false; bool connectToWifi = false;
@ -213,12 +214,12 @@ void setup() {
initMqtt(); initMqtt();
sendDataToAg(); sendDataToAg();
#ifdef ESP8266 #ifdef ESP8266
// ota not supported // ota not supported
#else #else
firmwareCheckForUpdate(); firmwareCheckForUpdate();
checkForUpdateSchedule.update(); checkForUpdateSchedule.update();
#endif #endif
apiClient.fetchServerConfiguration(); apiClient.fetchServerConfiguration();
configSchedule.update(); configSchedule.update();
@ -259,8 +260,7 @@ void setup() {
oledDisplay.setText("Warming Up", "Serial Number:", ag->deviceId().c_str()); oledDisplay.setText("Warming Up", "Serial Number:", ag->deviceId().c_str());
delay(DISPLAY_DELAY_SHOW_CONTENT_MS); delay(DISPLAY_DELAY_SHOW_CONTENT_MS);
Serial.println("Display brightness: " + Serial.println("Display brightness: " + String(configuration.getDisplayBrightness()));
String(configuration.getDisplayBrightness()));
oledDisplay.setBrightness(configuration.getDisplayBrightness()); oledDisplay.setBrightness(configuration.getDisplayBrightness());
} }
@ -294,7 +294,7 @@ void loop() {
static bool pmsConnected = false; static bool pmsConnected = false;
if (pmsConnected != ag->pms5003.connected()) { if (pmsConnected != ag->pms5003.connected()) {
pmsConnected = ag->pms5003.connected(); pmsConnected = ag->pms5003.connected();
Serial.printf("PMS sensor %s ", pmsConnected ? "connected" : "removed"); Serial.printf("PMS sensor %s ", pmsConnected?"connected":"removed");
} }
} }
} else { } else {
@ -319,22 +319,19 @@ void loop() {
/** Firmware check for update handle */ /** Firmware check for update handle */
checkForUpdateSchedule.run(); checkForUpdateSchedule.run();
calCo2WithSerial.run();
calCo2Timer.run();
} }
static void co2Update(void) { static void co2Update(void) {
if (!configuration.hasSensorS8) {
// Device don't have S8 sensor
return;
}
int value = ag->s8.getCo2(); int value = ag->s8.getCo2();
if (utils::isValidCO2(value)) { if (utils::isValidCO2(value)) {
measurements.CO2 = value; measurements.update(Measurements::CO2, value);
getCO2FailCount = 0;
Serial.printf("CO2 (ppm): %d\r\n", measurements.CO2);
} else { } else {
getCO2FailCount++; measurements.update(Measurements::CO2, utils::getInvalidCO2());
Serial.printf("Get CO2 failed: %d\r\n", getCO2FailCount);
if (getCO2FailCount >= 3) {
measurements.CO2 = utils::getInvalidCO2();
}
} }
} }
@ -367,8 +364,8 @@ static void createMqttTask(void) {
/** Send data */ /** Send data */
if (mqttClient.isConnected()) { if (mqttClient.isConnected()) {
String payload = measurements.toString( String payload =
true, fwMode, wifiConnector.RSSI(), ag, &configuration); measurements.toString(true, fwMode, wifiConnector.RSSI(), *ag, configuration);
String topic = "airgradient/readings/" + ag->deviceId(); String topic = "airgradient/readings/" + ag->deviceId();
if (mqttClient.publish(topic.c_str(), payload.c_str(), if (mqttClient.publish(topic.c_str(), payload.c_str(),
@ -447,7 +444,7 @@ static void factoryConfigReset(void) {
Serial.println("Factory reset successful"); Serial.println("Factory reset successful");
} }
delay(3000); delay(3000);
oledDisplay.setText("", "", ""); oledDisplay.setText("","","");
ESP.restart(); ESP.restart();
} }
} }
@ -485,7 +482,7 @@ static void ledBarEnabledUpdate(void) {
ag->ledBar.setBrightness(brightness); ag->ledBar.setBrightness(brightness);
ag->ledBar.setEnable(configuration.getLedBarMode() != LedBarModeOff); ag->ledBar.setEnable(configuration.getLedBarMode() != LedBarModeOff);
} }
ag->ledBar.show(); ag->ledBar.show();
} }
} }
@ -589,7 +586,7 @@ static void displayExecuteOta(OtaState state, String msg, int processing) {
} }
case OtaState::OTA_STATE_SUCCESS: { case OtaState::OTA_STATE_SUCCESS: {
int i = 6; int i = 6;
while (i != 0) { while(i != 0) {
i = i - 1; i = i - 1;
Serial.println("OTA update performed, restarting ..."); Serial.println("OTA update performed, restarting ...");
int i = 6; int i = 6;
@ -600,7 +597,7 @@ static void displayExecuteOta(OtaState state, String msg, int processing) {
} else { } else {
Serial.println("Rebooting... " + String(i)); Serial.println("Rebooting... " + String(i));
} }
delay(1000); delay(1000);
} }
oledDisplay.setBrightness(0); oledDisplay.setBrightness(0);
@ -699,9 +696,9 @@ static void oneIndoorInit(void) {
WiFi.begin("airgradient", "cleanair"); WiFi.begin("airgradient", "cleanair");
oledDisplay.setText("Configure WiFi", "connect to", "\'airgradient\'"); oledDisplay.setText("Configure WiFi", "connect to", "\'airgradient\'");
delay(2500); delay(2500);
oledDisplay.setText("Rebooting...", "", ""); oledDisplay.setText("Rebooting...", "","");
delay(2500); delay(2500);
oledDisplay.setText("", "", ""); oledDisplay.setText("","","");
ESP.restart(); ESP.restart();
} }
} }
@ -872,43 +869,6 @@ static void failedHandler(String msg) {
} }
} }
static void calCo2Routine(void) {
String respContent =
"{\"country\":\"CH\",\"pmStandard\":\"ugm3\","
"\"co2CalibrationRequested\":true,\"ledBarTestRequested\":false,"
"\"ledBarMode\":\"pm\",\"displayMode\":\"on\",\"placeOpen\":true,"
"\"abcDays\":8,\"tvocLearningOffset\":12,\"noxLearningOffset\":12,"
"\"temperatureUnit\":\"c\",\"targetFirmware\":\"3.1.9\","
"\"ledBarBrightness\":100,\"displayBrightness\":100,\"corrections\":{"
"\"pm02\":{\"correctionAlgorithm\":\"none\",\"slr\":null}},\"model\":"
"\"O-1PST\"}";
if (configuration.parse(respContent, false)) {
configUpdateHandle();
}
}
static void checkSerialForCalco2(void) {
if (Serial.available() > 0) {
String input = Serial.readStringUntil('\n');
input.trim();
if (input == "calco2") {
Serial.println("Received calco2!");
String respContent =
"{\"country\":\"CH\",\"pmStandard\":\"ugm3\","
"\"co2CalibrationRequested\":true,\"ledBarTestRequested\":false,"
"\"ledBarMode\":\"pm\",\"displayMode\":\"on\",\"placeOpen\":true,"
"\"abcDays\":8,\"tvocLearningOffset\":12,\"noxLearningOffset\":12,"
"\"temperatureUnit\":\"c\",\"targetFirmware\":\"3.1.9\","
"\"ledBarBrightness\":100,\"displayBrightness\":100,\"corrections\":{"
"\"pm02\":{\"correctionAlgorithm\":\"none\",\"slr\":null}},\"model\":"
"\"O-1PST\"}";
if (configuration.parse(respContent, false)) {
configUpdateHandle();
}
}
}
}
static void configurationUpdateSchedule(void) { static void configurationUpdateSchedule(void) {
if (apiClient.fetchServerConfiguration()) { if (apiClient.fetchServerConfiguration()) {
configUpdateHandle(); configUpdateHandle();
@ -919,6 +879,7 @@ static void configUpdateHandle() {
if (configuration.isUpdated() == false) { if (configuration.isUpdated() == false) {
return; return;
} }
stateMachine.executeCo2Calibration(); stateMachine.executeCo2Calibration();
String mqttUri = configuration.getMqttBrokerUri(); String mqttUri = configuration.getMqttBrokerUri();
@ -969,7 +930,7 @@ static void configUpdateHandle() {
if (configuration.getLedBarBrightness() == 0) { if (configuration.getLedBarBrightness() == 0) {
ag->ledBar.setEnable(false); ag->ledBar.setEnable(false);
} else { } else {
if (configuration.getLedBarMode() == LedBarMode::LedBarModeOff) { if(configuration.getLedBarMode() == LedBarMode::LedBarModeOff) {
ag->ledBar.setEnable(false); ag->ledBar.setEnable(false);
} else { } else {
ag->ledBar.setEnable(true); ag->ledBar.setEnable(true);
@ -984,7 +945,8 @@ static void configUpdateHandle() {
} }
stateMachine.executeLedBarTest(); stateMachine.executeLedBarTest();
} else if (ag->isOpenAir()) { }
else if(ag->isOpenAir()) {
stateMachine.executeLedBarTest(); stateMachine.executeLedBarTest();
} }
@ -1015,8 +977,7 @@ static void updateDisplayAndLedBar(void) {
} else { } else {
stateMachine.displayClearAddToDashBoard(); stateMachine.displayClearAddToDashBoard();
} }
} else if (apiClient.isPostToServerFailed() && } else if (apiClient.isPostToServerFailed() && configuration.isPostDataToAirGradient()) {
configuration.isPostDataToAirGradient()) {
state = AgStateMachineServerLost; state = AgStateMachineServerLost;
} }
@ -1025,288 +986,236 @@ static void updateDisplayAndLedBar(void) {
} }
static void updateTvoc(void) { static void updateTvoc(void) {
measurements.TVOC = ag->sgp41.getTvocIndex(); if (!configuration.hasSensorSGP) {
measurements.TVOCRaw = ag->sgp41.getTvocRaw(); return;
measurements.NOx = ag->sgp41.getNoxIndex(); }
measurements.NOxRaw = ag->sgp41.getNoxRaw();
Serial.println(); measurements.update(Measurements::TVOC, ag->sgp41.getTvocIndex());
Serial.printf("TVOC index: %d\r\n", measurements.TVOC); measurements.update(Measurements::TVOCRaw, ag->sgp41.getTvocRaw());
Serial.printf("TVOC raw: %d\r\n", measurements.TVOCRaw); measurements.update(Measurements::NOx, ag->sgp41.getNoxIndex());
Serial.printf("NOx index: %d\r\n", measurements.NOx); measurements.update(Measurements::NOxRaw, ag->sgp41.getNoxRaw());
Serial.printf("NOx raw: %d\r\n", measurements.NOxRaw); }
static void updatePMS5003() {
if (ag->pms5003.connected()) {
measurements.update(Measurements::PM01, ag->pms5003.getPm01Ae());
measurements.update(Measurements::PM25, ag->pms5003.getPm25Ae());
measurements.update(Measurements::PM10, ag->pms5003.getPm10Ae());
measurements.update(Measurements::PM01_SP, ag->pms5003.getPm01Sp());
measurements.update(Measurements::PM25_SP, ag->pms5003.getPm25Sp());
measurements.update(Measurements::PM10_SP, ag->pms5003.getPm10Sp());
measurements.update(Measurements::PM03_PC, ag->pms5003.getPm03ParticleCount());
measurements.update(Measurements::PM05_PC, ag->pms5003.getPm05ParticleCount());
measurements.update(Measurements::PM01_PC, ag->pms5003.getPm01ParticleCount());
measurements.update(Measurements::PM25_PC, ag->pms5003.getPm25ParticleCount());
measurements.update(Measurements::PM5_PC, ag->pms5003.getPm5ParticleCount());
measurements.update(Measurements::PM10_PC, ag->pms5003.getPm10ParticleCount());
} else {
measurements.update(Measurements::PM01, utils::getInvalidPmValue());
measurements.update(Measurements::PM25, utils::getInvalidPmValue());
measurements.update(Measurements::PM10, utils::getInvalidPmValue());
measurements.update(Measurements::PM01_SP, utils::getInvalidPmValue());
measurements.update(Measurements::PM25_SP, utils::getInvalidPmValue());
measurements.update(Measurements::PM10_SP, utils::getInvalidPmValue());
measurements.update(Measurements::PM03_PC, utils::getInvalidPmValue());
measurements.update(Measurements::PM05_PC, utils::getInvalidPmValue());
measurements.update(Measurements::PM01_PC, utils::getInvalidPmValue());
measurements.update(Measurements::PM25_PC, utils::getInvalidPmValue());
measurements.update(Measurements::PM5_PC, utils::getInvalidPmValue());
measurements.update(Measurements::PM10_PC, utils::getInvalidPmValue());
}
} }
static void updatePm(void) { static void updatePm(void) {
bool restart = false;
if (ag->isOne()) { if (ag->isOne()) {
if (ag->pms5003.connected()) { updatePMS5003();
measurements.pm01_1 = ag->pms5003.getPm01Ae(); return;
measurements.pm25_1 = ag->pms5003.getPm25Ae(); }
measurements.pm10_1 = ag->pms5003.getPm10Ae();
measurements.pm03PCount_1 = ag->pms5003.getPm03ParticleCount();
Serial.println(); // Open Air Monitor series, can have two PMS5003T sensor
Serial.printf("PM1 ug/m3: %d\r\n", measurements.pm01_1); bool newPMS1Value = false;
Serial.printf("PM2.5 ug/m3: %d\r\n", measurements.pm25_1); bool newPMS2Value = false;
Serial.printf("PM10 ug/m3: %d\r\n", measurements.pm10_1);
Serial.printf("PM0.3 Count: %d\r\n", measurements.pm03PCount_1); // Read PMS channel 1 if available
Serial.printf("PM firmware version: %d\r\n", int channel = 1;
ag->pms5003.getFirmwareVersion()); if (configuration.hasSensorPMS1) {
ag->pms5003.resetFailCount(); if (ag->pms5003t_1.connected()) {
measurements.update(Measurements::PM01, ag->pms5003t_1.getPm01Ae(), channel);
measurements.update(Measurements::PM25, ag->pms5003t_1.getPm25Ae(), channel);
measurements.update(Measurements::PM10, ag->pms5003t_1.getPm10Ae(), channel);
measurements.update(Measurements::PM01_SP, ag->pms5003t_1.getPm01Sp(), channel);
measurements.update(Measurements::PM25_SP, ag->pms5003t_1.getPm25Sp(), channel);
measurements.update(Measurements::PM10_SP, ag->pms5003t_1.getPm10Sp(), channel);
measurements.update(Measurements::PM03_PC, ag->pms5003t_1.getPm03ParticleCount(), channel);
measurements.update(Measurements::PM05_PC, ag->pms5003t_1.getPm05ParticleCount(), channel);
measurements.update(Measurements::PM01_PC, ag->pms5003t_1.getPm01ParticleCount(), channel);
measurements.update(Measurements::PM25_PC, ag->pms5003t_1.getPm25ParticleCount(), channel);
measurements.update(Measurements::Temperature, ag->pms5003t_1.getTemperature(), channel);
measurements.update(Measurements::Humidity, ag->pms5003t_1.getRelativeHumidity(), channel);
// flag that new valid PMS value exists
newPMS1Value = true;
} else { } else {
ag->pms5003.updateFailCount(); // PMS channel 1 now is not connected, update using invalid value
Serial.printf("PMS read failed %d times\r\n", ag->pms5003.getFailCount()); measurements.update(Measurements::PM01, utils::getInvalidPmValue(), channel);
if (ag->pms5003.getFailCount() >= PMS_FAIL_COUNT_SET_INVALID) { measurements.update(Measurements::PM25, utils::getInvalidPmValue(), channel);
measurements.pm01_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM10, utils::getInvalidPmValue(), channel);
measurements.pm25_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM01_SP, utils::getInvalidPmValue(), channel);
measurements.pm10_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM25_SP, utils::getInvalidPmValue(), channel);
measurements.pm03PCount_1 = utils::getInvalidPmValue(); measurements.update(Measurements::PM10_SP, utils::getInvalidPmValue(), channel);
} measurements.update(Measurements::PM03_PC, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM05_PC, utils::getInvalidPmValue(), channel);
if (ag->pms5003.getFailCount() >= ag->pms5003.getFailCountMax()) { measurements.update(Measurements::PM01_PC, utils::getInvalidPmValue(), channel);
restart = true; measurements.update(Measurements::PM25_PC, utils::getInvalidPmValue(), channel);
} measurements.update(Measurements::Temperature, utils::getInvalidTemperature(), channel);
} measurements.update(Measurements::Humidity, utils::getInvalidHumidity(), channel);
} else {
bool pmsResult_1 = false;
bool pmsResult_2 = false;
if (configuration.hasSensorPMS1 && ag->pms5003t_1.connected()) {
measurements.pm01_1 = ag->pms5003t_1.getPm01Ae();
measurements.pm25_1 = ag->pms5003t_1.getPm25Ae();
measurements.pm10_1 = ag->pms5003t_1.getPm10Ae();
measurements.pm03PCount_1 = ag->pms5003t_1.getPm03ParticleCount();
measurements.temp_1 = ag->pms5003t_1.getTemperature();
measurements.hum_1 = ag->pms5003t_1.getRelativeHumidity();
pmsResult_1 = true;
Serial.println();
Serial.printf("[1] PM1 ug/m3: %d\r\n", measurements.pm01_1);
Serial.printf("[1] PM2.5 ug/m3: %d\r\n", measurements.pm25_1);
Serial.printf("[1] PM10 ug/m3: %d\r\n", measurements.pm10_1);
Serial.printf("[1] PM3.0 Count: %d\r\n", measurements.pm03PCount_1);
Serial.printf("[1] Temperature in C: %0.2f\r\n", measurements.temp_1);
Serial.printf("[1] Relative Humidity: %d\r\n", measurements.hum_1);
Serial.printf("[1] Temperature compensated in C: %0.2f\r\n",
ag->pms5003t_1.compensateTemp(measurements.temp_1));
Serial.printf("[1] Relative Humidity compensated: %0.2f\r\n",
ag->pms5003t_1.compensateHum(measurements.hum_1));
Serial.printf("[1] PM firmware version: %d\r\n",
ag->pms5003t_1.getFirmwareVersion());
ag->pms5003t_1.resetFailCount();
} else {
if (configuration.hasSensorPMS1) {
ag->pms5003t_1.updateFailCount();
Serial.printf("[1] PMS read failed %d times\r\n",
ag->pms5003t_1.getFailCount());
if (ag->pms5003t_1.getFailCount() >= PMS_FAIL_COUNT_SET_INVALID) {
measurements.pm01_1 = utils::getInvalidPmValue();
measurements.pm25_1 = utils::getInvalidPmValue();
measurements.pm10_1 = utils::getInvalidPmValue();
measurements.pm03PCount_1 = utils::getInvalidPmValue();
measurements.temp_1 = utils::getInvalidTemperature();
measurements.hum_1 = utils::getInvalidHumidity();
}
if (ag->pms5003t_1.getFailCount() >= ag->pms5003t_1.getFailCountMax()) {
restart = true;
}
}
}
if (configuration.hasSensorPMS2 && ag->pms5003t_2.connected()) {
measurements.pm01_2 = ag->pms5003t_2.getPm01Ae();
measurements.pm25_2 = ag->pms5003t_2.getPm25Ae();
measurements.pm10_2 = ag->pms5003t_2.getPm10Ae();
measurements.pm03PCount_2 = ag->pms5003t_2.getPm03ParticleCount();
measurements.temp_2 = ag->pms5003t_2.getTemperature();
measurements.hum_2 = ag->pms5003t_2.getRelativeHumidity();
pmsResult_2 = true;
Serial.println();
Serial.printf("[2] PM1 ug/m3: %d\r\n", measurements.pm01_2);
Serial.printf("[2] PM2.5 ug/m3: %d\r\n", measurements.pm25_2);
Serial.printf("[2] PM10 ug/m3: %d\r\n", measurements.pm10_2);
Serial.printf("[2] PM3.0 Count: %d\r\n", measurements.pm03PCount_2);
Serial.printf("[2] Temperature in C: %0.2f\r\n", measurements.temp_2);
Serial.printf("[2] Relative Humidity: %d\r\n", measurements.hum_2);
Serial.printf("[2] Temperature compensated in C: %0.2f\r\n",
ag->pms5003t_1.compensateTemp(measurements.temp_2));
Serial.printf("[2] Relative Humidity compensated: %0.2f\r\n",
ag->pms5003t_1.compensateHum(measurements.hum_2));
Serial.printf("[2] PM firmware version: %d\r\n",
ag->pms5003t_2.getFirmwareVersion());
ag->pms5003t_2.resetFailCount();
} else {
if (configuration.hasSensorPMS2) {
ag->pms5003t_2.updateFailCount();
Serial.printf("[2] PMS read failed %d times\r\n",
ag->pms5003t_2.getFailCount());
if (ag->pms5003t_2.getFailCount() >= PMS_FAIL_COUNT_SET_INVALID) {
measurements.pm01_2 = utils::getInvalidPmValue();
measurements.pm25_2 = utils::getInvalidPmValue();
measurements.pm10_2 = utils::getInvalidPmValue();
measurements.pm03PCount_2 = utils::getInvalidPmValue();
measurements.temp_2 = utils::getInvalidTemperature();
measurements.hum_2 = utils::getInvalidHumidity();
}
if (ag->pms5003t_2.getFailCount() >= ag->pms5003t_2.getFailCountMax()) {
restart = true;
}
}
}
if (configuration.hasSensorPMS1 && configuration.hasSensorPMS2 &&
pmsResult_1 && pmsResult_2) {
/** Get total of PMS1*/
measurements.pm1Value01 = measurements.pm1Value01 + measurements.pm01_1;
measurements.pm1Value25 = measurements.pm1Value25 + measurements.pm25_1;
measurements.pm1Value10 = measurements.pm1Value10 + measurements.pm10_1;
measurements.pm1PCount =
measurements.pm1PCount + measurements.pm03PCount_1;
measurements.pm1temp = measurements.pm1temp + measurements.temp_1;
measurements.pm1hum = measurements.pm1hum + measurements.hum_1;
/** Get total of PMS2 */
measurements.pm2Value01 = measurements.pm2Value01 + measurements.pm01_2;
measurements.pm2Value25 = measurements.pm2Value25 + measurements.pm25_2;
measurements.pm2Value10 = measurements.pm2Value10 + measurements.pm10_2;
measurements.pm2PCount =
measurements.pm2PCount + measurements.pm03PCount_2;
measurements.pm2temp = measurements.pm2temp + measurements.temp_2;
measurements.pm2hum = measurements.pm2hum + measurements.hum_2;
measurements.countPosition++;
/** Get average */
if (measurements.countPosition == measurements.targetCount) {
measurements.pm01_1 =
measurements.pm1Value01 / measurements.targetCount;
measurements.pm25_1 =
measurements.pm1Value25 / measurements.targetCount;
measurements.pm10_1 =
measurements.pm1Value10 / measurements.targetCount;
measurements.pm03PCount_1 =
measurements.pm1PCount / measurements.targetCount;
measurements.temp_1 = measurements.pm1temp / measurements.targetCount;
measurements.hum_1 = measurements.pm1hum / measurements.targetCount;
measurements.pm01_2 =
measurements.pm2Value01 / measurements.targetCount;
measurements.pm25_2 =
measurements.pm2Value25 / measurements.targetCount;
measurements.pm10_2 =
measurements.pm2Value10 / measurements.targetCount;
measurements.pm03PCount_2 =
measurements.pm2PCount / measurements.targetCount;
measurements.temp_2 = measurements.pm2temp / measurements.targetCount;
measurements.hum_2 = measurements.pm2hum / measurements.targetCount;
measurements.countPosition = 0;
measurements.pm1Value01 = 0;
measurements.pm1Value25 = 0;
measurements.pm1Value10 = 0;
measurements.pm1PCount = 0;
measurements.pm1temp = 0;
measurements.pm1hum = 0;
measurements.pm2Value01 = 0;
measurements.pm2Value25 = 0;
measurements.pm2Value10 = 0;
measurements.pm2PCount = 0;
measurements.pm2temp = 0;
measurements.pm2hum = 0;
}
}
if (pmsResult_1 && pmsResult_2) {
measurements.Temperature =
(measurements.temp_1 + measurements.temp_2) / 2;
measurements.Humidity = (measurements.hum_1 + measurements.hum_2) / 2;
} else {
if (pmsResult_1) {
measurements.Temperature = measurements.temp_1;
measurements.Humidity = measurements.hum_1;
}
if (pmsResult_2) {
measurements.Temperature = measurements.temp_2;
measurements.Humidity = measurements.hum_2;
}
}
if (configuration.hasSensorSGP) {
float temp;
float hum;
if (pmsResult_1 && pmsResult_2) {
temp = (measurements.temp_1 + measurements.temp_2) / 2.0f;
hum = (measurements.hum_1 + measurements.hum_2) / 2.0f;
} else {
if (pmsResult_1) {
temp = measurements.temp_1;
hum = measurements.hum_1;
}
if (pmsResult_2) {
temp = measurements.temp_2;
hum = measurements.hum_2;
}
}
ag->sgp41.setCompensationTemperatureHumidity(temp, hum);
} }
} }
if (restart) { // Read PMS channel 2 if available
Serial.printf("PMS failure count reach to max set %d, restarting...", channel = 2;
ag->pms5003.getFailCountMax()); if (configuration.hasSensorPMS2) {
ESP.restart(); if (ag->pms5003t_2.connected()) {
measurements.update(Measurements::PM01, ag->pms5003t_2.getPm01Ae(), channel);
measurements.update(Measurements::PM25, ag->pms5003t_2.getPm25Ae(), channel);
measurements.update(Measurements::PM10, ag->pms5003t_2.getPm10Ae(), channel);
measurements.update(Measurements::PM01_SP, ag->pms5003t_2.getPm01Sp(), channel);
measurements.update(Measurements::PM25_SP, ag->pms5003t_2.getPm25Sp(), channel);
measurements.update(Measurements::PM10_SP, ag->pms5003t_2.getPm10Sp(), channel);
measurements.update(Measurements::PM03_PC, ag->pms5003t_2.getPm03ParticleCount(), channel);
measurements.update(Measurements::PM05_PC, ag->pms5003t_2.getPm05ParticleCount(), channel);
measurements.update(Measurements::PM01_PC, ag->pms5003t_2.getPm01ParticleCount(), channel);
measurements.update(Measurements::PM25_PC, ag->pms5003t_2.getPm25ParticleCount(), channel);
measurements.update(Measurements::Temperature, ag->pms5003t_2.getTemperature(), channel);
measurements.update(Measurements::Humidity, ag->pms5003t_2.getRelativeHumidity(), channel);
// flag that new valid PMS value exists
newPMS2Value = true;
} else {
// PMS channel 2 now is not connected, update using invalid value
measurements.update(Measurements::PM01, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM25, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM10, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM01_SP, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM25_SP, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM10_SP, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM03_PC, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM05_PC, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM01_PC, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::PM25_PC, utils::getInvalidPmValue(), channel);
measurements.update(Measurements::Temperature, utils::getInvalidTemperature(), channel);
measurements.update(Measurements::Humidity, utils::getInvalidHumidity(), channel);
}
}
if (configuration.hasSensorSGP) {
float temp, hum;
if (newPMS1Value && newPMS2Value) {
// Both PMS has new valid value
temp = (measurements.getFloat(Measurements::Temperature, 1) +
measurements.getFloat(Measurements::Temperature, 2)) /
2.0f;
hum = (measurements.getFloat(Measurements::Humidity, 1) +
measurements.getFloat(Measurements::Humidity, 2)) /
2.0f;
} else if (newPMS1Value) {
// Only PMS1 has new valid value
temp = measurements.getFloat(Measurements::Temperature, 1);
hum = measurements.getFloat(Measurements::Humidity, 1);
} else {
// Only PMS2 has new valid value
temp = measurements.getFloat(Measurements::Temperature, 2);
hum = measurements.getFloat(Measurements::Humidity, 2);
}
// Update compensation temperature and humidity for SGP41
ag->sgp41.setCompensationTemperatureHumidity(temp, hum);
} }
} }
static void sendDataToServer(void) { static void sendDataToServer(void) {
/** Increment bootcount when send measurements data is scheduled */
measurements.bootCount++;
/** Ignore send data to server if postToAirGradient disabled */ /** Ignore send data to server if postToAirGradient disabled */
if (configuration.isPostDataToAirGradient() == false || if (configuration.isPostDataToAirGradient() == false || configuration.isOfflineMode()) {
configuration.isOfflineMode()) {
return; return;
} }
String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), String syncData = measurements.toString(false, fwMode, wifiConnector.RSSI(), *ag, configuration);
ag, &configuration);
if (apiClient.postToServer(syncData)) { if (apiClient.postToServer(syncData)) {
Serial.println(); Serial.println();
Serial.println( Serial.println(
"Online mode and isPostToAirGradient = true: watchdog reset"); "Online mode and isPostToAirGradient = true: watchdog reset");
Serial.println(); Serial.println();
} }
measurements.bootCount++;
} }
static void tempHumUpdate(void) { static void tempHumUpdate(void) {
delay(100); delay(100);
if (ag->sht.measure()) { if (ag->sht.measure()) {
measurements.Temperature = ag->sht.getTemperature(); float temp = ag->sht.getTemperature();
measurements.Humidity = ag->sht.getRelativeHumidity(); float rhum = ag->sht.getRelativeHumidity();
Serial.printf("Temperature in C: %0.2f\r\n", measurements.Temperature); measurements.update(Measurements::Temperature, temp);
Serial.printf("Relative Humidity: %d\r\n", measurements.Humidity); measurements.update(Measurements::Humidity, rhum);
Serial.printf("Temperature compensated in C: %0.2f\r\n",
measurements.Temperature);
Serial.printf("Relative Humidity compensated: %d\r\n",
measurements.Humidity);
// Update compensation temperature and humidity for SGP41 // Update compensation temperature and humidity for SGP41
if (configuration.hasSensorSGP) { if (configuration.hasSensorSGP) {
ag->sgp41.setCompensationTemperatureHumidity(measurements.Temperature, ag->sgp41.setCompensationTemperatureHumidity(temp, rhum);
measurements.Humidity);
} }
} else { } else {
measurements.Temperature = utils::getInvalidTemperature(); measurements.update(Measurements::Temperature, utils::getInvalidTemperature());
measurements.Humidity = utils::getInvalidHumidity(); measurements.update(Measurements::Humidity, utils::getInvalidHumidity());
Serial.println("SHT read failed"); Serial.println("SHT read failed");
} }
} }
/* Set max period for each measurement type based on sensor update interval*/
void setMeasurementMaxPeriod() {
int max;
/// Max period for S8 sensors measurements
measurements.maxPeriod(Measurements::CO2, calculateMaxPeriod(SENSOR_CO2_UPDATE_INTERVAL));
/// Max period for SGP sensors measurements
max = calculateMaxPeriod(SENSOR_TVOC_UPDATE_INTERVAL);
measurements.maxPeriod(Measurements::TVOC, max);
measurements.maxPeriod(Measurements::TVOCRaw, max);
measurements.maxPeriod(Measurements::NOx, max);
measurements.maxPeriod(Measurements::NOxRaw, max);
/// Max period for PMS sensors measurements
max = calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL);
measurements.maxPeriod(Measurements::PM25, max);
measurements.maxPeriod(Measurements::PM01, max);
measurements.maxPeriod(Measurements::PM10, max);
measurements.maxPeriod(Measurements::PM25_SP, max);
measurements.maxPeriod(Measurements::PM01_SP, max);
measurements.maxPeriod(Measurements::PM10_SP, max);
measurements.maxPeriod(Measurements::PM03_PC, max);
measurements.maxPeriod(Measurements::PM05_PC, max);
measurements.maxPeriod(Measurements::PM01_PC, max);
measurements.maxPeriod(Measurements::PM25_PC, max);
measurements.maxPeriod(Measurements::PM5_PC, max);
measurements.maxPeriod(Measurements::PM10_PC, max);
// Temperature and Humidity
if (configuration.hasSensorSHT) {
/// Max period for SHT sensors measurements
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity,
calculateMaxPeriod(SENSOR_TEMP_HUM_UPDATE_INTERVAL));
} else {
/// Temp and hum data retrieved from PMS5003T sensor
measurements.maxPeriod(Measurements::Temperature,
calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
measurements.maxPeriod(Measurements::Humidity, calculateMaxPeriod(SENSOR_PM_UPDATE_INTERVAL));
}
}
int calculateMaxPeriod(int updateInterval) {
// 0.8 is 80% reduced interval for max period
return (SERVER_SYNC_INTERVAL - (SERVER_SYNC_INTERVAL * 0.8)) / updateInterval;
}

View File

@ -57,62 +57,78 @@ String OpenMetrics::getPayload(void) {
"gauge", "dbm"); "gauge", "dbm");
add_metric_point("", String(wifiConnector.RSSI())); add_metric_point("", String(wifiConnector.RSSI()));
if (config.hasSensorS8 && measure.CO2 >= 0) { // Initialize default invalid value for each measurements
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(measure.CO2));
}
float _temp = utils::getInvalidTemperature(); float _temp = utils::getInvalidTemperature();
float _hum = utils::getInvalidHumidity(); float _hum = utils::getInvalidHumidity();
int pm01 = utils::getInvalidPmValue(); int pm01 = utils::getInvalidPmValue();
int pm25 = utils::getInvalidPmValue(); int pm25 = utils::getInvalidPmValue();
int pm10 = utils::getInvalidPmValue(); int pm10 = utils::getInvalidPmValue();
int pm03PCount = utils::getInvalidPmValue(); int pm03PCount = utils::getInvalidPmValue();
int co2 = utils::getInvalidCO2();
int atmpCompensated = utils::getInvalidTemperature(); int atmpCompensated = utils::getInvalidTemperature();
int ahumCompensated = utils::getInvalidHumidity(); int ahumCompensated = utils::getInvalidHumidity();
int tvoc = utils::getInvalidVOC();
int tvocRaw = utils::getInvalidVOC();
int nox = utils::getInvalidNOx();
int noxRaw = utils::getInvalidNOx();
// Get values
if (config.hasSensorPMS1 && config.hasSensorPMS2) { if (config.hasSensorPMS1 && config.hasSensorPMS2) {
_temp = (measure.temp_1 + measure.temp_2) / 2.0f; _temp = (measure.getFloat(Measurements::Temperature, 1) +
_hum = (measure.hum_1 + measure.hum_2) / 2.0f; measure.getFloat(Measurements::Temperature, 2)) /
pm01 = (measure.pm01_1 + measure.pm01_2) / 2; 2.0f;
pm25 = (measure.pm25_1 + measure.pm25_2) / 2; _hum = (measure.getFloat(Measurements::Humidity, 1) +
pm10 = (measure.pm10_1 + measure.pm10_2) / 2; measure.getFloat(Measurements::Humidity, 2)) /
pm03PCount = (measure.pm03PCount_1 + measure.pm03PCount_2) / 2; 2.0f;
pm01 = (measure.get(Measurements::PM01, 1) + measure.get(Measurements::PM01, 2)) / 2.0f;
pm25 = (measure.get(Measurements::PM25, 1) + measure.get(Measurements::PM25, 2)) / 2.0f;
pm10 = (measure.get(Measurements::PM10, 1) + measure.get(Measurements::PM10, 2)) / 2.0f;
pm03PCount =
(measure.get(Measurements::PM03_PC, 1) + measure.get(Measurements::PM03_PC, 2)) / 2.0f;
} else { } else {
if (ag->isOne()) { if (ag->isOne()) {
if (config.hasSensorSHT) { if (config.hasSensorSHT) {
_temp = measure.Temperature; _temp = measure.getFloat(Measurements::Temperature);
_hum = measure.Humidity; _hum = measure.getFloat(Measurements::Humidity);
} }
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
pm01 = measure.pm01_1; pm01 = measure.get(Measurements::PM01);
pm25 = measure.pm25_1; pm25 = measure.get(Measurements::PM25);
pm10 = measure.pm10_1; pm10 = measure.get(Measurements::PM10);
pm03PCount = measure.pm03PCount_1; pm03PCount = measure.get(Measurements::PM03_PC);
} }
} else { } else {
if (config.hasSensorPMS1) { if (config.hasSensorPMS1) {
_temp = measure.temp_1; _temp = measure.getFloat(Measurements::Temperature, 1);
_hum = measure.hum_1; _hum = measure.getFloat(Measurements::Humidity, 1);
pm01 = measure.pm01_1; pm01 = measure.get(Measurements::PM01, 1);
pm25 = measure.pm25_1; pm25 = measure.get(Measurements::PM25, 1);
pm10 = measure.pm10_1; pm10 = measure.get(Measurements::PM10, 1);
pm03PCount = measure.pm03PCount_1; pm03PCount = measure.get(Measurements::PM03_PC, 1);
} }
if (config.hasSensorPMS2) { if (config.hasSensorPMS2) {
_temp = measure.temp_2; _temp = measure.getFloat(Measurements::Temperature, 2);
_hum = measure.hum_2; _hum = measure.getFloat(Measurements::Humidity, 2);
pm01 = measure.pm01_2; pm01 = measure.get(Measurements::PM01, 2);
pm25 = measure.pm25_2; pm25 = measure.get(Measurements::PM25, 2);
pm10 = measure.pm10_2; pm10 = measure.get(Measurements::PM10, 2);
pm03PCount = measure.pm03PCount_2; pm03PCount = measure.get(Measurements::PM03_PC, 2);
} }
} }
} }
if (config.hasSensorSGP) {
tvoc = measure.get(Measurements::TVOC);
tvocRaw = measure.get(Measurements::TVOCRaw);
nox = measure.get(Measurements::NOx);
noxRaw = measure.get(Measurements::NOxRaw);
}
if (config.hasSensorS8) {
co2 = measure.get(Measurements::CO2);
}
/** Get temperature and humidity compensated */ /** Get temperature and humidity compensated */
if (ag->isOne()) { if (ag->isOne()) {
atmpCompensated = _temp; atmpCompensated = _temp;
@ -122,6 +138,7 @@ String OpenMetrics::getPayload(void) {
ahumCompensated = ag->pms5003t_1.compensateHum(_hum); ahumCompensated = ag->pms5003t_1.compensateHum(_hum);
} }
// Add measurements that valid to the metrics
if (config.hasSensorPMS1 || config.hasSensorPMS2) { if (config.hasSensorPMS1 || config.hasSensorPMS2) {
if (utils::isValidPm(pm01)) { if (utils::isValidPm(pm01)) {
add_metric("pm1", add_metric("pm1",
@ -154,36 +171,44 @@ String OpenMetrics::getPayload(void) {
} }
if (config.hasSensorSGP) { if (config.hasSensorSGP) {
if (utils::isValidVOC(measure.TVOC)) { if (utils::isValidVOC(tvoc)) {
add_metric("tvoc_index", add_metric("tvoc_index",
"The processed Total Volatile Organic Compounds (TVOC) index " "The processed Total Volatile Organic Compounds (TVOC) index "
"as measured by the AirGradient SGP sensor", "as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOC)); add_metric_point("", String(tvoc));
} }
if (utils::isValidVOC(measure.TVOCRaw)) { if (utils::isValidVOC(tvocRaw)) {
add_metric("tvoc_raw", add_metric("tvoc_raw",
"The raw input value to the Total Volatile Organic Compounds " "The raw input value to the Total Volatile Organic Compounds "
"(TVOC) index as measured by the AirGradient SGP sensor", "(TVOC) index as measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.TVOCRaw)); add_metric_point("", String(tvocRaw));
} }
if (utils::isValidNOx(measure.NOx)) { if (utils::isValidNOx(nox)) {
add_metric("nox_index", add_metric("nox_index",
"The processed Nitrous Oxide (NOx) index as measured by the " "The processed Nitrous Oxide (NOx) index as measured by the "
"AirGradient SGP sensor", "AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOx)); add_metric_point("", String(nox));
} }
if (utils::isValidNOx(measure.NOxRaw)) { if (utils::isValidNOx(noxRaw)) {
add_metric("nox_raw", add_metric("nox_raw",
"The raw input value to the Nitrous Oxide (NOx) index as " "The raw input value to the Nitrous Oxide (NOx) index as "
"measured by the AirGradient SGP sensor", "measured by the AirGradient SGP sensor",
"gauge"); "gauge");
add_metric_point("", String(measure.NOxRaw)); add_metric_point("", String(noxRaw));
} }
} }
if (utils::isValidCO2(co2)) {
add_metric("co2",
"Carbon dioxide concentration as measured by the AirGradient S8 "
"sensor, in parts per million",
"gauge", "ppm");
add_metric_point("", String(co2));
}
if (utils::isValidTemperature(_temp)) { if (utils::isValidTemperature(_temp)) {
add_metric("temperature", add_metric("temperature",
"The ambient temperature as measured by the AirGradient SHT / PMS " "The ambient temperature as measured by the AirGradient SHT / PMS "
@ -192,25 +217,21 @@ String OpenMetrics::getPayload(void) {
add_metric_point("", String(_temp)); add_metric_point("", String(_temp));
} }
if (utils::isValidTemperature(atmpCompensated)) { if (utils::isValidTemperature(atmpCompensated)) {
add_metric( add_metric("temperature_compensated",
"temperature_compensated", "The compensated ambient temperature as measured by the AirGradient SHT / PMS "
"The compensated ambient temperature as measured by the AirGradient SHT / PMS " "sensor, in degrees Celsius",
"sensor, in degrees Celsius", "gauge", "celsius");
"gauge", "celsius");
add_metric_point("", String(atmpCompensated)); add_metric_point("", String(atmpCompensated));
} }
if (utils::isValidHumidity(_hum)) { if (utils::isValidHumidity(_hum)) {
add_metric( add_metric("humidity", "The relative humidity as measured by the AirGradient SHT sensor",
"humidity", "gauge", "percent");
"The relative humidity as measured by the AirGradient SHT sensor",
"gauge", "percent");
add_metric_point("", String(_hum)); add_metric_point("", String(_hum));
} }
if (utils::isValidHumidity(ahumCompensated)) { if (utils::isValidHumidity(ahumCompensated)) {
add_metric( add_metric("humidity_compensated",
"humidity_compensated", "The compensated relative humidity as measured by the AirGradient SHT / PMS sensor",
"The compensated relative humidity as measured by the AirGradient SHT / PMS sensor", "gauge", "percent");
"gauge", "percent");
add_metric_point("", String(ahumCompensated)); add_metric_point("", String(ahumCompensated));
} }

View File

@ -1,5 +1,5 @@
name=AirGradient Air Quality Sensor name=AirGradient Air Quality Sensor
version=3.1.9 version=3.1.13
author=AirGradient <support@airgradient.com> author=AirGradient <support@airgradient.com>
maintainer=AirGradient <support@airgradient.com> maintainer=AirGradient <support@airgradient.com>
sentence=ESP32-C3 / ESP8266 library for air quality monitor measuring PM, CO2, Temperature, TVOC and Humidity with OLED display. sentence=ESP32-C3 / ESP8266 library for air quality monitor measuring PM, CO2, Temperature, TVOC and Humidity with OLED display.

View File

@ -12,9 +12,7 @@
platform = espressif32 platform = espressif32
board = esp32-c3-devkitm-1 board = esp32-c3-devkitm-1
framework = arduino framework = arduino
; build_flags = !echo '-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 -D GIT_VERSION=\\"'$(git describe --tags --always --dirty)'\\"' build_flags = !echo '-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 -D GIT_VERSION=\\"'$(git describe --tags --always --dirty)'\\"'
build_flags = -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1
extra_scripts = pre:version.py
board_build.partitions = partitions.csv board_build.partitions = partitions.csv
monitor_speed = 115200 monitor_speed = 115200
lib_deps = lib_deps =
@ -29,17 +27,17 @@ lib_deps =
Update Update
DNSServer DNSServer
; [env:esp8266] [env:esp8266]
; platform = espressif8266 platform = espressif8266
; board = d1_mini board = d1_mini
; framework = arduino framework = arduino
; monitor_speed = 115200 monitor_speed = 115200
; lib_deps = lib_deps =
; aglib=symlink://../arduino aglib=symlink://../arduino
; EEPROM EEPROM
; ESP8266HTTPClient ESP8266HTTPClient
; ESP8266WebServer ESP8266WebServer
; DNSServer DNSServer
monitor_filters = time monitor_filters = time

View File

@ -130,7 +130,7 @@ bool AgApiClient::postToServer(String data) {
client.end(); client.end();
logInfo(String("POST: ") + uri); logInfo(String("POST: ") + uri);
logInfo(String("DATA: ") + data); // logInfo(String("DATA: ") + data);
logInfo(String("Return code: ") + String(retCode)); logInfo(String("Return code: ") + String(retCode));
if ((retCode == 200) || (retCode == 429)) { if ((retCode == 200) || (retCode == 429)) {

View File

@ -1,5 +1,4 @@
#include "AgConfigure.h" #include "AgConfigure.h"
#include "Libraries/Arduino_JSON/src/Arduino_JSON.h"
#if ESP32 #if ESP32
#include "FS.h" #include "FS.h"
#include "SPIFFS.h" #include "SPIFFS.h"
@ -22,6 +21,18 @@ const char *LED_BAR_MODE_NAMES[] = {
[LedBarModeCO2] = "co2", [LedBarModeCO2] = "co2",
}; };
const char *PM_CORRECTION_ALGORITHM_NAMES[] = {
[Unknown] = "-", // This is only to pass "non-trivial designated initializers" error
[None] = "none",
[EPA_2021] = "epa_2021",
[SLR_PMS5003_20220802] = "slr_PMS5003_20220802",
[SLR_PMS5003_20220803] = "slr_PMS5003_20220803",
[SLR_PMS5003_20220824] = "slr_PMS5003_20220824",
[SLR_PMS5003_20231030] = "slr_PMS5003_20231030",
[SLR_PMS5003_20231218] = "slr_PMS5003_20231218",
[SLR_PMS5003_20240104] = "slr_PMS5003_20240104",
};
#define JSON_PROP_NAME(name) jprop_##name #define JSON_PROP_NAME(name) jprop_##name
#define JSON_PROP_DEF(name) const char *JSON_PROP_NAME(name) = #name #define JSON_PROP_DEF(name) const char *JSON_PROP_NAME(name) = #name
@ -42,6 +53,7 @@ JSON_PROP_DEF(co2CalibrationRequested);
JSON_PROP_DEF(ledBarTestRequested); JSON_PROP_DEF(ledBarTestRequested);
JSON_PROP_DEF(offlineMode); JSON_PROP_DEF(offlineMode);
JSON_PROP_DEF(monitorDisplayCompensatedValues); JSON_PROP_DEF(monitorDisplayCompensatedValues);
JSON_PROP_DEF(corrections);
#define jprop_model_default "" #define jprop_model_default ""
#define jprop_country_default "TH" #define jprop_country_default "TH"
@ -87,6 +99,112 @@ String Configuration::getLedBarModeName(LedBarMode mode) {
return String("unknown"); return String("unknown");
} }
PMCorrectionAlgorithm Configuration::matchPmAlgorithm(String algorithm) {
// Loop through all algorithm names in the PM_CORRECTION_ALGORITHM_NAMES array
// If the input string matches an algorithm name, return the corresponding enum value
// Else return Unknown
const size_t enumSize = SLR_PMS5003_20240104 + 1; // Get the actual size of the enum
PMCorrectionAlgorithm result = PMCorrectionAlgorithm::Unknown;
// Loop through enum values
for (size_t enumVal = 0; enumVal < enumSize; enumVal++) {
if (algorithm == PM_CORRECTION_ALGORITHM_NAMES[enumVal]) {
result = static_cast<PMCorrectionAlgorithm>(enumVal);
}
}
return result;
}
bool Configuration::updatePmCorrection(JSONVar &json) {
if (!json.hasOwnProperty("corrections")) {
// TODO: need to response message?
Serial.println("corrections not found");
return false;
}
JSONVar corrections = json["corrections"];
if (!corrections.hasOwnProperty("pm02")) {
Serial.println("pm02 not found");
return false;
}
JSONVar pm02 = corrections["pm02"];
if (!pm02.hasOwnProperty("correctionAlgorithm")) {
Serial.println("correctionAlgorithm not found");
return false;
}
// TODO: Need to have data type check, with error message response if invalid
// Check algorithm
String algorithm = pm02["correctionAlgorithm"];
PMCorrectionAlgorithm algo = matchPmAlgorithm(algorithm);
if (algo == Unknown) {
logInfo("Unknown algorithm");
return false;
}
logInfo("Correction algorithm: " + algorithm);
// If algo is None or EPA_2021, no need to check slr
// But first check if pmCorrection different from algo
if (algo == None || algo == EPA_2021) {
if (pmCorrection.algorithm != algo) {
// Deep copy corrections from root to jconfig, so it will be saved later
jconfig[jprop_corrections]["pm02"]["correctionAlgorithm"] = algorithm;
jconfig[jprop_corrections]["pm02"]["slr"] = JSON.parse("{}"); // Clear slr
// Update pmCorrection with new values
pmCorrection.algorithm = algo;
pmCorrection.changed = true;
logInfo("PM2.5 correction updated");
return true;
}
return false;
}
// Check if pm02 has slr object
if (!pm02.hasOwnProperty("slr")) {
Serial.println("slr not found");
return false;
}
JSONVar slr = pm02["slr"];
// Validate required slr properties exist
if (!slr.hasOwnProperty("intercept") || !slr.hasOwnProperty("scalingFactor") ||
!slr.hasOwnProperty("useEpa2021")) {
Serial.println("Missing required slr properties");
return false;
}
// arduino_json doesn't support float type, need to cast to double first
float intercept = (float)((double)slr["intercept"]);
float scalingFactor = (float)((double)slr["scalingFactor"]);
// Compare with current pmCorrection
if (pmCorrection.algorithm == algo && pmCorrection.intercept == intercept &&
pmCorrection.scalingFactor == scalingFactor &&
pmCorrection.useEPA == (bool)slr["useEpa2021"]) {
return false; // No changes needed
}
// Deep copy corrections from root to jconfig, so it will be saved later
jconfig[jprop_corrections] = corrections;
// Update pmCorrection with new values
pmCorrection.algorithm = algo;
pmCorrection.intercept = intercept;
pmCorrection.scalingFactor = scalingFactor;
pmCorrection.useEPA = (bool)slr["useEpa2021"];
pmCorrection.changed = true;
// Correction values were updated
logInfo("PM2.5 correction updated");
return true;
}
/** /**
* @brief Save configure to device storage (EEPROM) * @brief Save configure to device storage (EEPROM)
* *
@ -162,7 +280,7 @@ void Configuration::defaultConfig(void) {
jconfig[jprop_displayBrightness] = jprop_displayBrightness_default; jconfig[jprop_displayBrightness] = jprop_displayBrightness_default;
} }
if (ag->isOne()) { if (ag->isOne()) {
jconfig[jprop_ledBarMode] = jprop_ledBarBrightness_default; jconfig[jprop_ledBarMode] = jprop_ledBarMode_default;
} }
jconfig[jprop_tvocLearningOffset] = jprop_tvocLearningOffset_default; jconfig[jprop_tvocLearningOffset] = jprop_tvocLearningOffset_default;
jconfig[jprop_noxLearningOffset] = jprop_noxLearningOffset_default; jconfig[jprop_noxLearningOffset] = jprop_noxLearningOffset_default;
@ -171,6 +289,13 @@ void Configuration::defaultConfig(void) {
jconfig[jprop_offlineMode] = jprop_offlineMode_default; jconfig[jprop_offlineMode] = jprop_offlineMode_default;
jconfig[jprop_monitorDisplayCompensatedValues] = jprop_monitorDisplayCompensatedValues_default; jconfig[jprop_monitorDisplayCompensatedValues] = jprop_monitorDisplayCompensatedValues_default;
// PM2.5 correction
pmCorrection.algorithm = None;
pmCorrection.changed = false;
pmCorrection.intercept = 0;
pmCorrection.scalingFactor = 1;
pmCorrection.useEPA = false;
saveConfig(); saveConfig();
} }
@ -229,16 +354,16 @@ bool Configuration::begin(void) {
* @return false Failure * @return false Failure
*/ */
bool Configuration::parse(String data, bool isLocal) { bool Configuration::parse(String data, bool isLocal) {
logInfo("Parse configure: " + data); logInfo("Parsing configuration: " + data);
JSONVar root = JSON.parse(data); JSONVar root = JSON.parse(data);
failedMessage = ""; failedMessage = "";
if (root == undefined) { if (root == undefined || JSONVar::typeof_(root) != "object") {
logError("Parse configuration failed, JSON invalid (" + JSONVar::typeof_(root) + ")");
failedMessage = "JSON invalid"; failedMessage = "JSON invalid";
logError(failedMessage);
return false; return false;
} }
logInfo("Parse configure success"); logInfo("Parse configuration success");
/** Is configuration changed */ /** Is configuration changed */
bool changed = false; bool changed = false;
@ -660,20 +785,25 @@ bool Configuration::parse(String data, bool isLocal) {
if (curVer != newVer) { if (curVer != newVer) {
logInfo("Detected new firmware version: " + newVer); logInfo("Detected new firmware version: " + newVer);
otaNewFirmwareVersion = newVer; otaNewFirmwareVersion = newVer;
udpated = true; updated = true;
} else { } else {
otaNewFirmwareVersion = String(""); otaNewFirmwareVersion = String("");
} }
} }
} }
// Corrections
if (updatePmCorrection(root)) {
changed = true;
}
if (changed) { if (changed) {
udpated = true; updated = true;
saveConfig(); saveConfig();
printConfig(); printConfig();
} else { } else {
if (ledBarTestRequested || co2CalibrationRequested) { if (ledBarTestRequested || co2CalibrationRequested) {
udpated = true; updated = true;
} }
} }
return true; return true;
@ -860,8 +990,8 @@ String Configuration::getModel(void) {
} }
bool Configuration::isUpdated(void) { bool Configuration::isUpdated(void) {
bool updated = this->udpated; bool updated = this->updated;
this->udpated = false; this->updated = false;
return updated; return updated;
} }
@ -1118,6 +1248,15 @@ void Configuration::toConfig(const char *buf) {
jprop_monitorDisplayCompensatedValues_default; jprop_monitorDisplayCompensatedValues_default;
} }
// Set default first before parsing local config
pmCorrection.algorithm = PMCorrectionAlgorithm::None;
pmCorrection.intercept = 0;
pmCorrection.scalingFactor = 0;
pmCorrection.useEPA = false;
// Load correction from saved config
updatePmCorrection(jconfig);
if (changed) { if (changed) {
saveConfig(); saveConfig();
} }
@ -1216,3 +1355,28 @@ String Configuration::newFirmwareVersion(void) {
otaNewFirmwareVersion = String(""); otaNewFirmwareVersion = String("");
return newFw; return newFw;
} }
bool Configuration::isPMCorrectionChanged(void) {
bool changed = pmCorrection.changed;
pmCorrection.changed = false;
return changed;
}
/**
* @brief Check if PM correction is enabled
*
* @return true if PM correction algorithm is not None, otherwise false
*/
bool Configuration::isPMCorrectionEnabled(void) {
PMCorrection pmCorrection = getPMCorrection();
if (pmCorrection.algorithm == PMCorrectionAlgorithm::None ||
pmCorrection.algorithm == PMCorrectionAlgorithm::Unknown) {
return false;
}
return true;
}
Configuration::PMCorrection Configuration::getPMCorrection(void) {
return pmCorrection;
}

View File

@ -5,12 +5,22 @@
#include "Main/PrintLog.h" #include "Main/PrintLog.h"
#include "AirGradient.h" #include "AirGradient.h"
#include <Arduino.h> #include <Arduino.h>
#include "Libraries/Arduino_JSON/src/Arduino_JSON.h"
class Configuration : public PrintLog { class Configuration : public PrintLog {
public:
struct PMCorrection {
PMCorrectionAlgorithm algorithm;
float intercept;
float scalingFactor;
bool useEPA; // EPA 2021
bool changed;
};
private: private:
bool co2CalibrationRequested; bool co2CalibrationRequested;
bool ledBarTestRequested; bool ledBarTestRequested;
bool udpated; bool updated;
String failedMessage; String failedMessage;
bool _noxLearnOffsetChanged; bool _noxLearnOffsetChanged;
bool _tvocLearningOffsetChanged; bool _tvocLearningOffsetChanged;
@ -19,10 +29,13 @@ private:
String otaNewFirmwareVersion; String otaNewFirmwareVersion;
bool _offlineMode = false; bool _offlineMode = false;
bool _ledBarModeChanged = false; bool _ledBarModeChanged = false;
PMCorrection pmCorrection;
AirGradient* ag; AirGradient* ag;
String getLedBarModeName(LedBarMode mode); String getLedBarModeName(LedBarMode mode);
PMCorrectionAlgorithm matchPmAlgorithm(String algorithm);
bool updatePmCorrection(JSONVar &json);
void saveConfig(void); void saveConfig(void);
void loadConfig(void); void loadConfig(void);
void defaultConfig(void); void defaultConfig(void);
@ -83,6 +96,9 @@ public:
void setOfflineModeWithoutSave(bool offline); void setOfflineModeWithoutSave(bool offline);
bool isLedBarModeChanged(void); bool isLedBarModeChanged(void);
bool isMonitorDisplayCompensatedValues(void); bool isMonitorDisplayCompensatedValues(void);
bool isPMCorrectionChanged(void);
bool isPMCorrectionEnabled(void);
PMCorrection getPMCorrection(void);
}; };
#endif /** _AG_CONFIG_H_ */ #endif /** _AG_CONFIG_H_ */

View File

@ -12,12 +12,13 @@
*/ */
void OledDisplay::showTempHum(bool hasStatus, char *buf, int buf_size) { void OledDisplay::showTempHum(bool hasStatus, char *buf, int buf_size) {
/** Temperature */ /** Temperature */
if (utils::isValidTemperature(value.Temperature)) { float temp = value.getAverage(Measurements::Temperature);
if (utils::isValidTemperature(temp)) {
float t = 0.0f; float t = 0.0f;
if (config.isTemperatureUnitInF()) { if (config.isTemperatureUnitInF()) {
t = utils::degreeC_To_F(value.Temperature); t = utils::degreeC_To_F(temp);
} else { } else {
t = value.Temperature; t = temp;
} }
if (config.isTemperatureUnitInF()) { if (config.isTemperatureUnitInF()) {
@ -43,13 +44,14 @@ void OledDisplay::showTempHum(bool hasStatus, char *buf, int buf_size) {
DISP()->drawUTF8(1, 10, buf); DISP()->drawUTF8(1, 10, buf);
/** Show humidity */ /** Show humidity */
if (utils::isValidHumidity(value.Humidity)) { int rhum = round(value.getAverage(Measurements::Humidity));
snprintf(buf, buf_size, "%d%%", value.Humidity); if (utils::isValidHumidity(rhum)) {
snprintf(buf, buf_size, "%d%%", rhum);
} else { } else {
snprintf(buf, buf_size, "-%%"); snprintf(buf, buf_size, "-%%");
} }
if (value.Humidity > 99) { if (rhum > 99.0) {
DISP()->drawStr(97, 10, buf); DISP()->drawStr(97, 10, buf);
} else { } else {
DISP()->drawStr(105, 10, buf); DISP()->drawStr(105, 10, buf);
@ -290,8 +292,9 @@ void OledDisplay::showDashboard(const char *status) {
DISP()->drawUTF8(1, 27, "CO2"); DISP()->drawUTF8(1, 27, "CO2");
DISP()->setFont(u8g2_font_t0_22b_tf); DISP()->setFont(u8g2_font_t0_22b_tf);
if (utils::isValidCO2(value.CO2)) { int co2 = round(value.getAverage(Measurements::CO2));
sprintf(strBuf, "%d", value.CO2); if (utils::isValidCO2(co2)) {
sprintf(strBuf, "%d", co2);
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
@ -310,15 +313,11 @@ void OledDisplay::showDashboard(const char *status) {
DISP()->drawStr(55, 27, "PM2.5"); DISP()->drawStr(55, 27, "PM2.5");
/** Draw PM2.5 value */ /** Draw PM2.5 value */
if (utils::isValidPm(value.pm25_1)) { int pm25 = round(value.getAverage(Measurements::PM25));
int pm25 = value.pm25_1; if (utils::isValidPm(pm25)) {
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
/** Compensate PM2.5 value. */ pm25 = round(value.getCorrectedPM25(*ag, config, true));
if (config.hasSensorSHT && config.isMonitorDisplayCompensatedValues()) {
pm25 = ag->pms5003.compensate(pm25, value.Humidity);
logInfo("PM2.5 compensate: " + String(pm25));
} }
if (config.isPmStandardInUSAQI()) { if (config.isPmStandardInUSAQI()) {
sprintf(strBuf, "%d", ag->pms5003.convertPm25ToUsAqi(pm25)); sprintf(strBuf, "%d", ag->pms5003.convertPm25ToUsAqi(pm25));
} else { } else {
@ -343,17 +342,19 @@ void OledDisplay::showDashboard(const char *status) {
DISP()->drawStr(100, 27, "VOC:"); DISP()->drawStr(100, 27, "VOC:");
/** Draw tvocIndexvalue */ /** Draw tvocIndexvalue */
if (utils::isValidVOC(value.TVOC)) { int tvoc = round(value.getAverage(Measurements::TVOC));
sprintf(strBuf, "%d", value.TVOC); if (utils::isValidVOC(tvoc)) {
sprintf(strBuf, "%d", tvoc);
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
DISP()->drawStr(100, 39, strBuf); DISP()->drawStr(100, 39, strBuf);
/** Draw NOx label */ /** Draw NOx label */
int nox = round(value.getAverage(Measurements::NOx));
DISP()->drawStr(100, 53, "NOx:"); DISP()->drawStr(100, 53, "NOx:");
if (utils::isValidNOx(value.NOx)) { if (utils::isValidNOx(nox)) {
sprintf(strBuf, "%d", value.NOx); sprintf(strBuf, "%d", nox);
} else { } else {
sprintf(strBuf, "%s", "-"); sprintf(strBuf, "%s", "-");
} }
@ -363,8 +364,9 @@ void OledDisplay::showDashboard(const char *status) {
ag->display.clear(); ag->display.clear();
/** Set CO2 */ /** Set CO2 */
if (utils::isValidCO2(value.CO2)) { int co2 = round(value.getAverage(Measurements::CO2));
snprintf(strBuf, sizeof(strBuf), "CO2:%d", value.CO2); if (utils::isValidCO2(co2)) {
snprintf(strBuf, sizeof(strBuf), "CO2:%d", co2);
} else { } else {
snprintf(strBuf, sizeof(strBuf), "CO2:-"); snprintf(strBuf, sizeof(strBuf), "CO2:-");
} }
@ -373,9 +375,9 @@ void OledDisplay::showDashboard(const char *status) {
ag->display.setText(strBuf); ag->display.setText(strBuf);
/** Set PM */ /** Set PM */
int pm25 = value.pm25_1; int pm25 = round(value.getAverage(Measurements::PM25));
if (config.hasSensorSHT && config.isMonitorDisplayCompensatedValues()) { if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25 = (int)ag->pms5003.compensate(pm25, value.Humidity); pm25 = round(value.getCorrectedPM25(*ag, config, true));
} }
ag->display.setCursor(0, 12); ag->display.setCursor(0, 12);
@ -387,12 +389,12 @@ void OledDisplay::showDashboard(const char *status) {
ag->display.setText(strBuf); ag->display.setText(strBuf);
/** Set temperature and humidity */ /** Set temperature and humidity */
if (utils::isValidTemperature(value.Temperature)) { float temp = value.getAverage(Measurements::Temperature);
if (utils::isValidTemperature(temp)) {
if (config.isTemperatureUnitInF()) { if (config.isTemperatureUnitInF()) {
snprintf(strBuf, sizeof(strBuf), "T:%0.1f F", snprintf(strBuf, sizeof(strBuf), "T:%0.1f F", utils::degreeC_To_F(temp));
utils::degreeC_To_F(value.Temperature));
} else { } else {
snprintf(strBuf, sizeof(strBuf), "T:%0.f1 C", value.Temperature); snprintf(strBuf, sizeof(strBuf), "T:%0.f1 C", temp);
} }
} else { } else {
if (config.isTemperatureUnitInF()) { if (config.isTemperatureUnitInF()) {
@ -405,8 +407,9 @@ void OledDisplay::showDashboard(const char *status) {
ag->display.setCursor(0, 24); ag->display.setCursor(0, 24);
ag->display.setText(strBuf); ag->display.setText(strBuf);
if (utils::isValidHumidity(value.Humidity)) { int rhum = round(value.getAverage(Measurements::Humidity));
snprintf(strBuf, sizeof(strBuf), "H:%d %%", (int)value.Humidity); if (utils::isValidHumidity(rhum)) {
snprintf(strBuf, sizeof(strBuf), "H:%d %%", rhum);
} else { } else {
snprintf(strBuf, sizeof(strBuf), "H:- %%"); snprintf(strBuf, sizeof(strBuf), "H:- %%");
} }

View File

@ -1,6 +1,6 @@
#include "AgStateMachine.h" #include "AgStateMachine.h"
#define LED_TEST_BLINK_DELAY 50 /** ms */ #define LED_TEST_BLINK_DELAY 50 /** ms */
#define LED_FAST_BLINK_DELAY 250 /** ms */ #define LED_FAST_BLINK_DELAY 250 /** ms */
#define LED_SLOW_BLINK_DELAY 1000 /** ms */ #define LED_SLOW_BLINK_DELAY 1000 /** ms */
#define LED_SHORT_BLINK_DELAY 500 /** ms */ #define LED_SHORT_BLINK_DELAY 500 /** ms */
@ -8,11 +8,12 @@
#define SENSOR_CO2_CALIB_COUNTDOWN_MAX 5 /** sec */ #define SENSOR_CO2_CALIB_COUNTDOWN_MAX 5 /** sec */
#define RGB_COLOR_R 255, 0, 0 /** Red */ #define RGB_COLOR_R 255, 0, 0 /** Red */
#define RGB_COLOR_G 0, 255, 0 /** Green */ #define RGB_COLOR_G 0, 255, 0 /** Green */
#define RGB_COLOR_Y 255, 150, 0 /** Yellow */ #define RGB_COLOR_Y 255, 150, 0 /** Yellow */
#define RGB_COLOR_O 255, 40, 0 /** Orange */ #define RGB_COLOR_O 255, 40, 0 /** Orange */
#define RGB_COLOR_P 180, 0, 255 /** Purple */ #define RGB_COLOR_P 180, 0, 255 /** Purple */
#define RGB_COLOR_CLEAR 0, 0, 0 /** No color */
/** /**
* @brief Animation LED bar with color * @brief Animation LED bar with color
@ -47,47 +48,67 @@ void StateMachine::ledStatusBlinkDelay(uint32_t ms) {
} }
/** /**
* @brief Led bar show led color status * @brief Led bar show PM or CO2 led color status
* *
* @return true if all led bar are used, false othwerwise
*/ */
void StateMachine::sensorhandleLeds(void) { bool StateMachine::sensorhandleLeds(void) {
int totalLedUsed = 0;
switch (config.getLedBarMode()) { switch (config.getLedBarMode()) {
case LedBarMode::LedBarModeCO2: case LedBarMode::LedBarModeCO2:
co2handleLeds(); totalLedUsed = co2handleLeds();
break; break;
case LedBarMode::LedBarModePm: case LedBarMode::LedBarModePm:
pm25handleLeds(); totalLedUsed = pm25handleLeds();
break; break;
default: default:
ag->ledBar.clear(); ag->ledBar.clear();
break; break;
} }
if (totalLedUsed == ag->ledBar.getNumberOfLeds()) {
return true;
}
// Clear the rest of unused led
int startIndex = totalLedUsed + 1;
for (int i = startIndex; i <= ag->ledBar.getNumberOfLeds(); i++) {
ag->ledBar.setColor(RGB_COLOR_CLEAR, ag->ledBar.getNumberOfLeds() - i);
}
return false;
} }
/** /**
* @brief Show CO2 LED status * @brief Show CO2 LED status
* *
* @return return total number of led that are used on the monitor
*/ */
void StateMachine::co2handleLeds(void) { int StateMachine::co2handleLeds(void) {
int co2Value = value.CO2; int totalUsed = ag->ledBar.getNumberOfLeds();
int co2Value = round(value.getAverage(Measurements::CO2));
if (co2Value <= 600) { if (co2Value <= 600) {
/** G; 1 */ /** G; 1 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);
totalUsed = 1;
} else if (co2Value <= 800) { } else if (co2Value <= 800) {
/** GG; 2 */ /** GG; 2 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 2);
totalUsed = 2;
} else if (co2Value <= 1000) { } else if (co2Value <= 1000) {
/** YYY; 3 */ /** YYY; 3 */
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 2);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 3); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 3);
totalUsed = 3;
} else if (co2Value <= 1250) { } else if (co2Value <= 1250) {
/** OOOO; 4 */ /** OOOO; 4 */
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 2);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 3); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 3);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4);
totalUsed = 4;
} else if (co2Value <= 1500) { } else if (co2Value <= 1500) {
/** OOOOO; 5 */ /** OOOOO; 5 */
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1);
@ -95,6 +116,7 @@ void StateMachine::co2handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 3); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 3);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 5); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 5);
totalUsed = 5;
} else if (co2Value <= 1750) { } else if (co2Value <= 1750) {
/** RRRRRR; 6 */ /** RRRRRR; 6 */
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1);
@ -103,6 +125,7 @@ void StateMachine::co2handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 4); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 4);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 5); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 5);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6);
totalUsed = 6;
} else if (co2Value <= 2000) { } else if (co2Value <= 2000) {
/** RRRRRRR; 7 */ /** RRRRRRR; 7 */
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1);
@ -112,6 +135,7 @@ void StateMachine::co2handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 5); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 5);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 7);
totalUsed = 7;
} else if (co2Value <= 3000) { } else if (co2Value <= 3000) {
/** PPPPPPPP; 8 */ /** PPPPPPPP; 8 */
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1);
@ -122,6 +146,7 @@ void StateMachine::co2handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 6); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 6);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 8); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 8);
totalUsed = 8;
} else { /** > 3000 */ } else { /** > 3000 */
/* PRPRPRPRP; 9 */ /* PRPRPRPRP; 9 */
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1);
@ -133,45 +158,56 @@ void StateMachine::co2handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 8); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 8);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 9); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 9);
totalUsed = 9;
} }
return totalUsed;
} }
/** /**
* @brief Show PM2.5 LED status * @brief Show PM2.5 LED status
* *
* @return return total number of led that are used on the monitor
*/ */
void StateMachine::pm25handleLeds(void) { int StateMachine::pm25handleLeds(void) {
int pm25Value = value.pm25_1; int totalUsed = ag->ledBar.getNumberOfLeds();
if (config.isMonitorDisplayCompensatedValues() && config.hasSensorSHT) {
pm25Value = ag->pms5003.compensate(value.pm25_1, value.Humidity); int pm25Value = round(value.getAverage(Measurements::PM25));
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25Value = round(value.getCorrectedPM25(*ag, config, true));
} }
if (pm25Value < 5) { if (pm25Value <= 5) {
/** G; 1 */ /** G; 1 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);
} else if (pm25Value < 10) { totalUsed = 1;
} else if (pm25Value <= 9) {
/** GG; 2 */ /** GG; 2 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 2);
} else if (pm25Value < 20) { totalUsed = 2;
} else if (pm25Value <= 20) {
/** YYY; 3 */ /** YYY; 3 */
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 2);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 3); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 3);
} else if (pm25Value < 35) { totalUsed = 3;
} else if (pm25Value <= 35) {
/** YYYY; 4 */ /** YYYY; 4 */
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 2);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 3); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 3);
ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 4); ag->ledBar.setColor(RGB_COLOR_Y, ag->ledBar.getNumberOfLeds() - 4);
} else if (pm25Value < 45) { totalUsed = 4;
} else if (pm25Value <= 45) {
/** OOOOO; 5 */ /** OOOOO; 5 */
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 2);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 3); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 3);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 5); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 5);
} else if (pm25Value < 55) { totalUsed = 5;
} else if (pm25Value <= 55) {
/** OOOOOO; 6 */ /** OOOOOO; 6 */
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 2);
@ -179,7 +215,8 @@ void StateMachine::pm25handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 4);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 5); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 5);
ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 6); ag->ledBar.setColor(RGB_COLOR_O, ag->ledBar.getNumberOfLeds() - 6);
} else if (pm25Value < 100) { totalUsed = 6;
} else if (pm25Value <= 100) {
/** RRRRRRR; 7 */ /** RRRRRRR; 7 */
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 2);
@ -188,7 +225,8 @@ void StateMachine::pm25handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 5); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 5);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 7);
} else if (pm25Value < 200) { totalUsed = 7;
} else if (pm25Value <= 125) {
/** RRRRRRRR; 8 */ /** RRRRRRRR; 8 */
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 2);
@ -198,7 +236,8 @@ void StateMachine::pm25handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 6);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 7);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 8); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 8);
} else if (pm25Value < 250) { totalUsed = 8;
} else if (pm25Value <= 225) {
/** PPPPPPPPP; 9 */ /** PPPPPPPPP; 9 */
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 2);
@ -209,7 +248,8 @@ void StateMachine::pm25handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 8); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 8);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 9); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 9);
} else { /** > 250 */ totalUsed = 9;
} else { /** > 225 */
/* PRPRPRPRP; 9 */ /* PRPRPRPRP; 9 */
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 1);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 2); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 2);
@ -220,7 +260,10 @@ void StateMachine::pm25handleLeds(void) {
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 7);
ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 8); ag->ledBar.setColor(RGB_COLOR_R, ag->ledBar.getNumberOfLeds() - 8);
ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 9); ag->ledBar.setColor(RGB_COLOR_P, ag->ledBar.getNumberOfLeds() - 9);
totalUsed = 9;
} }
return totalUsed;
} }
void StateMachine::co2Calibration(void) { void StateMachine::co2Calibration(void) {
@ -242,7 +285,6 @@ void StateMachine::co2Calibration(void) {
} }
delay(1000); delay(1000);
} }
delay(2000);
if (ag->s8.setBaselineCalibration()) { if (ag->s8.setBaselineCalibration()) {
if (ag->isOne() || (ag->isPro4_2()) || ag->isPro3_3()) { if (ag->isOne() || (ag->isPro4_2()) || ag->isPro3_3()) {
@ -264,10 +306,6 @@ void StateMachine::co2Calibration(void) {
while (ag->s8.isBaseLineCalibrationDone() == false) { while (ag->s8.isBaseLineCalibrationDone() == false) {
delay(1000); delay(1000);
count++; count++;
if (count >= 5) {
Serial.println("Calibration Timeout");
break;
}
} }
if (ag->isOne() || (ag->isPro4_2()) || ag->isPro3_3() || ag->isBasic()) { if (ag->isOne() || (ag->isPro4_2()) || ag->isPro3_3() || ag->isBasic()) {
String str = "after " + String(count); String str = "after " + String(count);
@ -316,6 +354,7 @@ void StateMachine::co2Calibration(void) {
void StateMachine::ledBarTest(void) { void StateMachine::ledBarTest(void) {
if (config.isLedBarTestRequested()) { if (config.isLedBarTestRequested()) {
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
if (config.getCountry() == "TH") { if (config.getCountry() == "TH") {
uint32_t tstart = millis(); uint32_t tstart = millis();
logInfo("Start run LED test for 2 min"); logInfo("Start run LED test for 2 min");
@ -330,13 +369,19 @@ void StateMachine::ledBarTest(void) {
} else { } else {
ledBarRunTest(); ledBarRunTest();
} }
} else if (ag->isOpenAir()) { }
else if(ag->isOpenAir()) {
ledBarRunTest(); ledBarRunTest();
} }
} }
} }
void StateMachine::ledBarPowerUpTest(void) { ledBarRunTest(); } void StateMachine::ledBarPowerUpTest(void) {
if (ag->isOne()) {
ag->ledBar.clear();
}
ledBarRunTest();
}
void StateMachine::ledBarRunTest(void) { void StateMachine::ledBarRunTest(void) {
if (ag->isOne()) { if (ag->isOne()) {
@ -589,15 +634,13 @@ void StateMachine::handleLeds(AgStateMachineState state) {
} }
ledState = state; ledState = state;
if (ag->isOne()) {
ag->ledBar.clear(); // Set all LED OFF
}
switch (state) { switch (state) {
case AgStateMachineWiFiManagerMode: { case AgStateMachineWiFiManagerMode: {
/** In WiFi Manager Mode */ /** In WiFi Manager Mode */
/** Turn LED OFF */ /** Turn LED OFF */
/** Turn middle LED Color */ /** Turn middle LED Color */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(0, 0, 255, ag->ledBar.getNumberOfLeds() / 2); ag->ledBar.setColor(0, 0, 255, ag->ledBar.getNumberOfLeds() / 2);
} else { } else {
ag->statusLed.setToggle(); ag->statusLed.setToggle();
@ -607,6 +650,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineWiFiManagerPortalActive: { case AgStateMachineWiFiManagerPortalActive: {
/** WiFi Manager has connected to mobile phone */ /** WiFi Manager has connected to mobile phone */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(0, 0, 255); ag->ledBar.setColor(0, 0, 255);
} else { } else {
ag->statusLed.setOn(); ag->statusLed.setOn();
@ -617,6 +661,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
/** after SSID and PW entered and OK clicked, connection to WiFI network is /** after SSID and PW entered and OK clicked, connection to WiFI network is
* attempted */ * attempted */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ledBarSingleLedAnimation(255, 255, 255); ledBarSingleLedAnimation(255, 255, 255);
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -626,6 +671,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineWiFiManagerStaConnected: { case AgStateMachineWiFiManagerStaConnected: {
/** Connecting to WiFi worked */ /** Connecting to WiFi worked */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(255, 255, 255); ag->ledBar.setColor(255, 255, 255);
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -635,6 +681,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineWiFiOkServerConnecting: { case AgStateMachineWiFiOkServerConnecting: {
/** once connected to WiFi an attempt to reach the server is performed */ /** once connected to WiFi an attempt to reach the server is performed */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ledBarSingleLedAnimation(0, 255, 0); ledBarSingleLedAnimation(0, 255, 0);
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -644,6 +691,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineWiFiOkServerConnected: { case AgStateMachineWiFiOkServerConnected: {
/** Server is reachable, all fine */ /** Server is reachable, all fine */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(0, 255, 0); ag->ledBar.setColor(0, 255, 0);
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -660,6 +708,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineWiFiManagerConnectFailed: { case AgStateMachineWiFiManagerConnectFailed: {
/** Cannot connect to WiFi (e.g. wrong password, WPA Enterprise etc.) */ /** Cannot connect to WiFi (e.g. wrong password, WPA Enterprise etc.) */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(255, 0, 0); ag->ledBar.setColor(255, 0, 0);
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -678,6 +727,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
/** Connected to WiFi but server not reachable, e.g. firewall block/ /** Connected to WiFi but server not reachable, e.g. firewall block/
* whitelisting needed etc. */ * whitelisting needed etc. */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(233, 183, 54); /** orange */ ag->ledBar.setColor(233, 183, 54); /** orange */
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -694,6 +744,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
case AgStateMachineWiFiOkServerOkSensorConfigFailed: { case AgStateMachineWiFiOkServerOkSensorConfigFailed: {
/** Server reachable but sensor not configured correctly */ /** Server reachable but sensor not configured correctly */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.clear();
ag->ledBar.setColor(139, 24, 248); /** violet */ ag->ledBar.setColor(139, 24, 248); /** violet */
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
@ -711,11 +762,10 @@ void StateMachine::handleLeds(AgStateMachineState state) {
/** Connection to WiFi network failed credentials incorrect encryption not /** Connection to WiFi network failed credentials incorrect encryption not
* supported etc. */ * supported etc. */
if (ag->isOne()) { if (ag->isOne()) {
/** WIFI failed status LED color */ bool allUsed = sensorhandleLeds();
ag->ledBar.setColor(255, 0, 0, 0); if (allUsed == false) {
/** Show CO2 or PM color status */ ag->ledBar.setColor(255, 0, 0, 0);
// sensorLedColorHandler(); }
sensorhandleLeds();
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
} }
@ -725,11 +775,10 @@ void StateMachine::handleLeds(AgStateMachineState state) {
/** Connected to WiFi network but the server cannot be reached through the /** Connected to WiFi network but the server cannot be reached through the
* internet, e.g. blocked by firewall */ * internet, e.g. blocked by firewall */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.setColor(233, 183, 54, 0); bool allUsed = sensorhandleLeds();
if (allUsed == false) {
/** Show CO2 or PM color status */ ag->ledBar.setColor(233, 183, 54, 0);
sensorhandleLeds(); }
// sensorLedColorHandler();
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
} }
@ -739,10 +788,10 @@ void StateMachine::handleLeds(AgStateMachineState state) {
/** Server is reachable but there is some configuration issue to be fixed on /** Server is reachable but there is some configuration issue to be fixed on
* the server side */ * the server side */
if (ag->isOne()) { if (ag->isOne()) {
ag->ledBar.setColor(139, 24, 248, 0); bool allUsed = sensorhandleLeds();
if (allUsed == false) {
/** Show CO2 or PM color status */ ag->ledBar.setColor(139, 24, 248, 0);
sensorhandleLeds(); }
} else { } else {
ag->statusLed.setOff(); ag->statusLed.setOff();
} }
@ -808,7 +857,6 @@ void StateMachine::setAirGradient(AirGradient *ag) { this->ag = ag; }
AgStateMachineState StateMachine::getLedState(void) { return ledState; } AgStateMachineState StateMachine::getLedState(void) { return ledState; }
void StateMachine::executeCo2Calibration(void) { void StateMachine::executeCo2Calibration(void) {
Serial.println("state: " + String(AgStateMachineCo2Calibration));
displayHandle(AgStateMachineCo2Calibration); displayHandle(AgStateMachineCo2Calibration);
} }

View File

@ -24,9 +24,9 @@ private:
void ledBarSingleLedAnimation(uint8_t r, uint8_t g, uint8_t b); void ledBarSingleLedAnimation(uint8_t r, uint8_t g, uint8_t b);
void ledStatusBlinkDelay(uint32_t delay); void ledStatusBlinkDelay(uint32_t delay);
void sensorhandleLeds(void); bool sensorhandleLeds(void);
void co2handleLeds(void); int co2handleLeds(void);
void pm25handleLeds(void); int pm25handleLeds(void);
void co2Calibration(void); void co2Calibration(void);
void ledBarTest(void); void ledBarTest(void);
void ledBarPowerUpTest(void); void ledBarPowerUpTest(void);

File diff suppressed because it is too large Load Diff

View File

@ -1,79 +1,217 @@
#ifndef _AG_VALUE_H_ #ifndef _AG_VALUE_H_
#define _AG_VALUE_H_ #define _AG_VALUE_H_
#include <Arduino.h> #include "AgConfigure.h"
#include "AirGradient.h"
#include "App/AppDef.h" #include "App/AppDef.h"
#include "Libraries/Arduino_JSON/src/Arduino_JSON.h"
#include "Main/utils.h"
#include <Arduino.h>
#include <vector>
class Measurements { class Measurements {
private: private:
String pms5003FirmwareVersion(int fwCode); // Generic struct for update indication for respective value
String pms5003TFirmwareVersion(int fwCode); struct Update {
String pms5003FirmwareVersionBase(String prefix, int fwCode); int invalidCounter; // Counting on how many invalid value that are passed to update function
int max; // Maximum length of the period of the moving average
float avg; // Moving average value, updated every update function called
};
// Reading type for sensor value that outputs float
struct FloatValue {
float sumValues; // Total value from each update
std::vector<float> listValues; // List of update value that are kept
Update update;
};
// Reading type for sensor value that outputs integer
struct IntegerValue {
unsigned long sumValues; // Total value from each update; unsigned long to accomodate TVOx and
// NOx raw data
std::vector<int> listValues; // List of update value that are kept
Update update;
};
public: public:
Measurements() { Measurements() {}
pm25_1 = -1;
pm01_1 = -1;
pm10_1 = -1;
pm03PCount_1 = -1;
temp_1 = -1001;
hum_1 = -1;
pm25_2 = -1;
pm01_2 = -1;
pm10_2 = -1;
pm03PCount_2 = -1;
temp_2 = -1001;
hum_2 = -1;
Temperature = -1001;
Humidity = -1;
CO2 = -1;
TVOC = -1;
TVOCRaw = -1;
NOx = -1;
NOxRaw = -1;
}
~Measurements() {} ~Measurements() {}
float Temperature; // Enumeration for every AG measurements
int Humidity; enum MeasurementType {
int CO2; Temperature,
int TVOC; Humidity,
int TVOCRaw; CO2,
int NOx; TVOC, // index value
int NOxRaw; TVOCRaw,
NOx, // index value
NOxRaw,
PM01, // PM1.0 under atmospheric environment
PM25, // PM2.5 under athompheric environment
PM10, // PM10 under atmospheric environment
PM01_SP, // PM1.0 standard particle
PM25_SP, // PM2.5 standard particle
PM10_SP, // PM10 standard particle
PM03_PC, // Particle 0.3 count
PM05_PC, // Particle 0.5 count
PM01_PC, // Particle 1.0 count
PM25_PC, // Particle 2.5 count
PM5_PC, // Particle 5.0 count
PM10_PC, // Particle 10 count
};
int pm25_1; /**
int pm01_1; * @brief Set each MeasurementType maximum period length for moving average
int pm10_1; *
int pm03PCount_1; * @param type the target measurement type to set
float temp_1; * @param max the maximum period length
int hum_1; */
void maxPeriod(MeasurementType, int max);
int pm25_2; /**
int pm01_2; * @brief update target measurement type with new value.
int pm10_2; * Each MeasurementType has last raw value and moving average value based on max period
int pm03PCount_2; * This function is for MeasurementType that use INT as the data type
float temp_2; *
int hum_2; * @param type measurement type that will be updated
* @param val (int) the new value
* @param ch (int) the MeasurementType channel, not every MeasurementType has more than 1 channel.
* Currently maximum channel is 2. Default: 1 (channel 1)
* @return false if new value invalid consecutively reach threshold (max period)
* @return true otherwise
*/
bool update(MeasurementType type, int val, int ch = 1);
int pm1Value01; /**
int pm1Value25; * @brief update target measurement type with new value.
int pm1Value10; * Each MeasurementType has last raw value and moving average value based on max period
int pm1PCount; * This function is for MeasurementType that use FLOAT as the data type
int pm1temp; *
int pm1hum; * @param type measurement type that will be updated
int pm2Value01; * @param val (float) the new value
int pm2Value25; * @param ch (int) the MeasurementType channel, not every MeasurementType has more than 1 channel.
int pm2Value10; * Currently maximum channel is 2. Default: 1 (channel 1)
int pm2PCount; * @return false if new value invalid consecutively reach threshold (max period)
int pm2temp; * @return true otherwise
int pm2hum; */
int countPosition; bool update(MeasurementType type, float val, int ch = 1);
const int targetCount = 20;
/**
* @brief Get the target measurement latest value
*
* @param type measurement type that will be retrieve
* @param ch target type value channel
* @return int measurement type value
*/
int get(MeasurementType type, int ch = 1);
/**
* @brief Get the target measurement latest value
*
* @param type measurement type that will be retrieve
* @param ch target type value channel
* @return float measurement type value
*/
float getFloat(MeasurementType type, int ch = 1);
/**
* @brief Get the target measurement average value
*
* @param type measurement type that will be retrieve
* @param ch target type value channel
* @return moving average value of target measurements type
*/
float getAverage(MeasurementType type, int ch = 1);
/**
* @brief Get the Corrected PM25 object based on the correction algorithm from configuration
*
* If correction is not enabled, then will return the raw value (either average or last value)
*
* @param ag AirGradient instance
* @param config Configuration instance
* @param useAvg Use moving average value if true, otherwise use latest value
* @param ch MeasurementType channel
* @return float Corrected PM2.5 value
*/
float getCorrectedPM25(AirGradient &ag, Configuration &config, bool useAvg = false, int ch = 1);
/**
* build json payload for every measurements
*/
String toString(bool localServer, AgFirmwareMode fwMode, int rssi, AirGradient &ag,
Configuration &config);
/**
* Set to true if want to debug every update value
*/
void setDebug(bool debug);
// TODO: update this to use setter
int bootCount; int bootCount;
String toString(bool isLocal, AgFirmwareMode fwMode, int rssi, void* _ag, void* _config); private:
// Some declared as an array (channel), because FW_MODE_O_1PPx has two PMS5003T
FloatValue _temperature[2];
FloatValue _humidity[2];
IntegerValue _co2;
IntegerValue _tvoc; // Index value
IntegerValue _tvoc_raw;
IntegerValue _nox; // Index value
IntegerValue _nox_raw;
IntegerValue _pm_01[2]; // pm 1.0 atmospheric environment
IntegerValue _pm_25[2]; // pm 2.5 atmospheric environment
IntegerValue _pm_10[2]; // pm 10 atmospheric environment
IntegerValue _pm_01_sp[2]; // pm 1.0 standard particle
IntegerValue _pm_25_sp[2]; // pm 2.5 standard particle
IntegerValue _pm_10_sp[2]; // pm 10 standard particle
IntegerValue _pm_03_pc[2]; // particle count 0.3
IntegerValue _pm_05_pc[2]; // particle count 0.5
IntegerValue _pm_01_pc[2]; // particle count 1.0
IntegerValue _pm_25_pc[2]; // particle count 2.5
IntegerValue _pm_5_pc[2]; // particle count 5.0
IntegerValue _pm_10_pc[2]; // particle count 10
bool _debug = false;
/**
* @brief Get PMS5003 firmware version string
*
* @param fwCode
* @return String
*/
String pms5003FirmwareVersion(int fwCode);
/**
* @brief Get PMS5003T firmware version string
*
* @param fwCode
* @return String
*/
String pms5003TFirmwareVersion(int fwCode);
/**
* @brief Get firmware version string
*
* @param prefix Prefix firmware string
* @param fwCode Version code
* @return string
*/
String pms5003FirmwareVersionBase(String prefix, int fwCode);
/**
* Convert AgValue Type to string representation of the value
*/
String measurementTypeStr(MeasurementType type);
/**
* @brief check if provided channel is a valid channel or not
* abort program if invalid
*/
void validateChannel(int ch);
JSONVar buildOutdoor(bool localServer, AgFirmwareMode fwMode, AirGradient &ag,
Configuration &config);
JSONVar buildIndoor(bool localServer, AirGradient &ag, Configuration &config);
JSONVar buildPMS(AirGradient &ag, int ch, bool allCh, bool withTempHum, bool compensate);
}; };
#endif /** _AG_VALUE_H_ */ #endif /** _AG_VALUE_H_ */

View File

@ -15,7 +15,7 @@
#include "Main/utils.h" #include "Main/utils.h"
#ifndef GIT_VERSION #ifndef GIT_VERSION
#define GIT_VERSION "3.1.9-snap" #define GIT_VERSION "3.1.13-snap"
#endif #endif
/** /**

View File

@ -94,6 +94,18 @@ enum ConfigurationControl {
ConfigurationControlBoth ConfigurationControlBoth
}; };
enum PMCorrectionAlgorithm {
Unknown, // Unknown algorithm
None, // No PM correction
EPA_2021,
SLR_PMS5003_20220802,
SLR_PMS5003_20220803,
SLR_PMS5003_20220824,
SLR_PMS5003_20231030,
SLR_PMS5003_20231218,
SLR_PMS5003_20240104,
};
enum AgFirmwareMode { enum AgFirmwareMode {
FW_MODE_I_9PSL, /** ONE_INDOOR */ FW_MODE_I_9PSL, /** ONE_INDOOR */
FW_MODE_O_1PST, /** PMS5003T, S8 and SGP41 */ FW_MODE_O_1PST, /** PMS5003T, S8 and SGP41 */

View File

@ -151,6 +151,7 @@ void PMSBase::readPackage(Stream *serial) {
if (ms >= READ_PACKGE_TIMEOUT) { if (ms >= READ_PACKGE_TIMEOUT) {
lastPackage = 0; lastPackage = 0;
_connected = false; _connected = false;
Serial.println("PMS disconnected");
} }
} }
} }
@ -297,24 +298,52 @@ uint8_t PMSBase::getErrorCode(void) { return pms_errorCode; }
* @return int * @return int
*/ */
int PMSBase::pm25ToAQI(int pm02) { int PMSBase::pm25ToAQI(int pm02) {
if (pm02 <= 12.0) if (pm02 <= 9.0)
return ((50 - 0) / (12.0 - .0) * (pm02 - .0) + 0); return ((50 - 0) / (9.0 - .0) * (pm02 - .0) + 0);
else if (pm02 <= 35.4) else if (pm02 <= 35.4)
return ((100 - 50) / (35.4 - 12.0) * (pm02 - 12.0) + 50); return ((100 - 51) / (35.4 - 9.1) * (pm02 - 9.0) + 51);
else if (pm02 <= 55.4) else if (pm02 <= 55.4)
return ((150 - 100) / (55.4 - 35.4) * (pm02 - 35.4) + 100); return ((150 - 101) / (55.4 - 35.5) * (pm02 - 35.5) + 101);
else if (pm02 <= 150.4) else if (pm02 <= 125.4)
return ((200 - 150) / (150.4 - 55.4) * (pm02 - 55.4) + 150); return ((200 - 151) / (125.4 - 55.5) * (pm02 - 55.5) + 151);
else if (pm02 <= 250.4) else if (pm02 <= 225.4)
return ((300 - 200) / (250.4 - 150.4) * (pm02 - 150.4) + 200); return ((300 - 201) / (225.4 - 125.5) * (pm02 - 125.5) + 201);
else if (pm02 <= 350.4) else if (pm02 <= 325.4)
return ((400 - 300) / (350.4 - 250.4) * (pm02 - 250.4) + 300); return ((500 - 301) / (325.4 - 225.5) * (pm02 - 225.5) + 301);
else if (pm02 <= 500.4)
return ((500 - 400) / (500.4 - 350.4) * (pm02 - 350.4) + 400);
else else
return 500; return 500;
} }
/**
* @brief SLR correction for PM2.5
*
* Reference: https://www.airgradient.com/blog/low-readings-from-pms5003/
*
* @param pm25 PM2.5 raw value
* @param pm003Count PM0.3 count
* @param scalingFactor Scaling factor
* @param intercept Intercept
* @return float Calibrated PM2.5 value
*/
float PMSBase::slrCorrection(float pm25, float pm003Count, float scalingFactor, float intercept) {
float calibrated;
float lowCalibrated = (scalingFactor * pm003Count) + intercept;
if (lowCalibrated < 31) {
calibrated = lowCalibrated;
} else {
calibrated = pm25;
}
// No negative value for pm2.5
if (calibrated < 0) {
return 0.0;
}
return calibrated;
}
/** /**
* @brief Correction PM2.5 * @brief Correction PM2.5
* *
@ -322,11 +351,12 @@ int PMSBase::pm25ToAQI(int pm02) {
* *
* @param pm25 Raw PM2.5 value * @param pm25 Raw PM2.5 value
* @param humidity Humidity value (%) * @param humidity Humidity value (%)
* @return int * @return compensated pm25 value
*/ */
int PMSBase::compensate(int pm25, float humidity) { float PMSBase::compensate(float pm25, float humidity) {
float value; float value;
float fpm25 = pm25;
// Correct invalid humidity value
if (humidity < 0) { if (humidity < 0) {
humidity = 0; humidity = 0;
} }
@ -334,23 +364,33 @@ int PMSBase::compensate(int pm25, float humidity) {
humidity = 100.0f; humidity = 100.0f;
} }
if(pm25 < 30) { /** pm2.5 < 30 */ // If its already 0, do not proceed
value = (fpm25 * 0.524f) - (humidity * 0.0862f) + 5.75f; if (pm25 == 0) {
} else if(pm25 < 50) { /** 30 <= pm2.5 < 50 */ return 0.0;
value = (0.786f * (fpm25 * 0.05f - 1.5f) + 0.524f * (1.0f - (fpm25 * 0.05f - 1.5f))) * fpm25 - (0.0862f * humidity) + 5.75f; }
} else if(pm25 < 210) { /** 50 <= pm2.5 < 210 */
value = (0.786f * fpm25) - (0.0862f * humidity) + 5.75f; if (pm25 < 30) { /** pm2.5 < 30 */
} else if(pm25 < 260) { /** 210 <= pm2.5 < 260 */ value = (pm25 * 0.524f) - (humidity * 0.0862f) + 5.75f;
value = (0.69f * (fpm25 * 0.02f - 4.2f) + 0.786f * (1.0f - (fpm25 * 0.02f - 4.2f))) * fpm25 - (0.0862f * humidity * (1.0f - (fpm25 * 0.02f - 4.2f))) + (2.966f * (fpm25 * 0.02f - 4.2f)) + (5.75f * (1.0f - (fpm25 * 0.02f - 4.2f))) + (8.84f * (1.e-4) * fpm25 * fpm25 * (fpm25 * 0.02f - 4.2f)); } else if (pm25 < 50) { /** 30 <= pm2.5 < 50 */
value = (0.786f * (pm25 * 0.05f - 1.5f) + 0.524f * (1.0f - (pm25 * 0.05f - 1.5f))) * pm25 -
(0.0862f * humidity) + 5.75f;
} else if (pm25 < 210) { /** 50 <= pm2.5 < 210 */
value = (0.786f * pm25) - (0.0862f * humidity) + 5.75f;
} else if (pm25 < 260) { /** 210 <= pm2.5 < 260 */
value = (0.69f * (pm25 * 0.02f - 4.2f) + 0.786f * (1.0f - (pm25 * 0.02f - 4.2f))) * pm25 -
(0.0862f * humidity * (1.0f - (pm25 * 0.02f - 4.2f))) +
(2.966f * (pm25 * 0.02f - 4.2f)) + (5.75f * (1.0f - (pm25 * 0.02f - 4.2f))) +
(8.84f * (1.e-4) * pm25 * pm25 * (pm25 * 0.02f - 4.2f));
} else { /** 260 <= pm2.5 */ } else { /** 260 <= pm2.5 */
value = 2.966f + (0.69f * fpm25) + (8.84f * (1.e-4) * fpm25 * fpm25); value = 2.966f + (0.69f * pm25) + (8.84f * (1.e-4) * pm25 * pm25);
} }
// No negative value for pm2.5
if (value < 0) { if (value < 0) {
value = 0; return 0.0;
} }
return (int)value; return value;
} }
/** /**
@ -390,20 +430,26 @@ bool PMSBase::validate(const uint8_t *buf) {
} }
void PMSBase::parse(const uint8_t *buf) { void PMSBase::parse(const uint8_t *buf) {
// Standard particle
pms_raw0_1 = toU16(&buf[4]); pms_raw0_1 = toU16(&buf[4]);
pms_raw2_5 = toU16(&buf[6]); pms_raw2_5 = toU16(&buf[6]);
pms_raw10 = toU16(&buf[8]); pms_raw10 = toU16(&buf[8]);
// atmospheric
pms_pm0_1 = toU16(&buf[10]); pms_pm0_1 = toU16(&buf[10]);
pms_pm2_5 = toU16(&buf[12]); pms_pm2_5 = toU16(&buf[12]);
pms_pm10 = toU16(&buf[14]); pms_pm10 = toU16(&buf[14]);
// particle count
pms_count0_3 = toU16(&buf[16]); pms_count0_3 = toU16(&buf[16]);
pms_count0_5 = toU16(&buf[18]); pms_count0_5 = toU16(&buf[18]);
pms_count1_0 = toU16(&buf[20]); pms_count1_0 = toU16(&buf[20]);
pms_count2_5 = toU16(&buf[22]); pms_count2_5 = toU16(&buf[22]);
pms_count5_0 = toU16(&buf[24]); pms_count5_0 = toU16(&buf[24]); // PMS5003 only
pms_count10 = toU16(&buf[26]); pms_count10 = toU16(&buf[26]); // PMS5003 only
pms_temp = toU16(&buf[24]);
pms_hum = toU16(&buf[26]); // Others
pms_temp = toU16(&buf[24]); // PMS5003T only
pms_hum = toU16(&buf[26]); // PMS5003T only
pms_firmwareVersion = buf[28]; pms_firmwareVersion = buf[28];
pms_errorCode = buf[29]; pms_errorCode = buf[29];
} }

View File

@ -39,7 +39,8 @@ public:
uint8_t getErrorCode(void); uint8_t getErrorCode(void);
int pm25ToAQI(int pm02); int pm25ToAQI(int pm02);
int compensate(int pm25, float humidity); float slrCorrection(float pm25, float pm003Count, float scalingFactor, float intercept);
float compensate(float pm25, float humidity);
private: private:
static const uint8_t package_size = 32; static const uint8_t package_size = 32;

View File

@ -79,28 +79,49 @@ bool PMS5003::begin(void) {
} }
/** /**
* @brief Read PM1.0 must call this function after @ref readData success * @brief Read PM1.0
* *
* @return int PM1.0 index * @return int PM1.0 index (atmospheric environment)
*/ */
int PMS5003::getPm01Ae(void) { return pms.getPM0_1(); } int PMS5003::getPm01Ae(void) { return pms.getPM0_1(); }
/** /**
* @brief Read PM2.5 must call this function after @ref readData success * @brief Read PM2.5
* *
* @return int PM2.5 index * @return int PM2.5 index (atmospheric environment)
*/ */
int PMS5003::getPm25Ae(void) { return pms.getPM2_5(); } int PMS5003::getPm25Ae(void) { return pms.getPM2_5(); }
/** /**
* @brief Read PM10.0 must call this function after @ref readData success * @brief Read PM10.0
* *
* @return int PM10.0 index * @return int PM10.0 index (atmospheric environment)
*/ */
int PMS5003::getPm10Ae(void) { return pms.getPM10(); } int PMS5003::getPm10Ae(void) { return pms.getPM10(); }
/** /**
* @brief Read PM0.3 must call this function after @ref readData success * @brief Read PM1.0
*
* @return int PM1.0 index (standard particle)
*/
int PMS5003::getPm01Sp(void) { return pms.getRaw0_1(); }
/**
* @brief Read PM2.5
*
* @return int PM2.5 index (standard particle)
*/
int PMS5003::getPm25Sp(void) { return pms.getRaw2_5(); }
/**
* @brief Read PM10
*
* @return int PM10 index (standard particle)
*/
int PMS5003::getPm10Sp(void) { return pms.getRaw10(); }
/**
* @brief Read particle 0.3 count
* *
* @return int PM0.3 index * @return int PM0.3 index
*/ */
@ -108,6 +129,41 @@ int PMS5003::getPm03ParticleCount(void) {
return pms.getCount0_3(); return pms.getCount0_3();
} }
/**
* @brief Read particle 1.0 count
*
* @return int particle 1.0 count index
*/
int PMS5003::getPm01ParticleCount(void) { return pms.getCount1_0(); }
/**
* @brief Read particle 0.5 count
*
* @return int particle 0.5 count index
*/
int PMS5003::getPm05ParticleCount(void) { return pms.getCount0_5(); }
/**
* @brief Read particle 2.5 count
*
* @return int particle 2.5 count index
*/
int PMS5003::getPm25ParticleCount(void) { return pms.getCount2_5(); }
/**
* @brief Read particle 5.0 count
*
* @return int particle 5.0 count index
*/
int PMS5003::getPm5ParticleCount(void) { return pms.getCount5_0(); }
/**
* @brief Read particle 10 count
*
* @return int particle 10 count index
*/
int PMS5003::getPm10ParticleCount(void) { return pms.getCount10(); }
/** /**
* @brief Convert PM2.5 to US AQI * @brief Convert PM2.5 to US AQI
* *
@ -116,18 +172,20 @@ int PMS5003::getPm03ParticleCount(void) {
*/ */
int PMS5003::convertPm25ToUsAqi(int pm25) { return pms.pm25ToAQI(pm25); } int PMS5003::convertPm25ToUsAqi(int pm25) { return pms.pm25ToAQI(pm25); }
float PMS5003::slrCorrection(float pm25, float pm003Count, float scalingFactor, float intercept) {
return pms.slrCorrection(pm25, pm003Count, scalingFactor, intercept);
}
/** /**
* @brief Correct PM2.5 * @brief Correct PM2.5
* *
* Reference formula: https://www.airgradient.com/documentation/correction-algorithms/ * Reference formula: https://www.airgradient.com/documentation/correction-algorithms/
* *
* @param pm25 PM2.5 raw value * @param pm25 PM2.5 raw value
* @param humidity Humidity value * @param humidity Humidity value
* @return int * @return compensated value in float
*/ */
int PMS5003::compensate(int pm25, float humidity) { float PMS5003::compensate(float pm25, float humidity) { return pms.compensate(pm25, humidity); }
return pms.compensate(pm25, humidity);
}
/** /**
* @brief Get sensor firmware version * @brief Get sensor firmware version

View File

@ -25,12 +25,25 @@ public:
void resetFailCount(void); void resetFailCount(void);
int getFailCount(void); int getFailCount(void);
int getFailCountMax(void); int getFailCountMax(void);
// Atmospheric environment
int getPm01Ae(void); int getPm01Ae(void);
int getPm25Ae(void); int getPm25Ae(void);
int getPm10Ae(void); int getPm10Ae(void);
// Standard particle
int getPm01Sp(void);
int getPm25Sp(void);
int getPm10Sp(void);
// Particle count
int getPm03ParticleCount(void); int getPm03ParticleCount(void);
int getPm05ParticleCount(void);
int getPm01ParticleCount(void);
int getPm25ParticleCount(void);
int getPm5ParticleCount(void);
int getPm10ParticleCount(void);
int convertPm25ToUsAqi(int pm25); int convertPm25ToUsAqi(int pm25);
int compensate(int pm25, float humidity); float slrCorrection(float pm25, float pm003Count, float scalingFactor, float intercept);
float compensate(float pm25, float humidity);
int getFirmwareVersion(void); int getFirmwareVersion(void);
uint8_t getErrorCode(void); uint8_t getErrorCode(void);
bool connected(void); bool connected(void);

View File

@ -108,35 +108,77 @@ bool PMS5003T::begin(void) {
} }
/** /**
* @brief Read PM1.0 must call this function after @ref readData success * @brief Read PM1.0
* *
* @return int PM1.0 index * @return int PM1.0 index (atmospheric environment)
*/ */
int PMS5003T::getPm01Ae(void) { return pms.getPM0_1(); } int PMS5003T::getPm01Ae(void) { return pms.getPM0_1(); }
/** /**
* @brief Read PM2.5 must call this function after @ref readData success * @brief Read PM2.5
* *
* @return int PM2.5 index * @return int PM2.5 index (atmospheric environment)
*/ */
int PMS5003T::getPm25Ae(void) { return pms.getPM2_5(); } int PMS5003T::getPm25Ae(void) { return pms.getPM2_5(); }
/** /**
* @brief Read PM10.0 must call this function after @ref readData success * @brief Read PM10.0
* *
* @return int PM10.0 index * @return int PM10.0 index (atmospheric environment)
*/ */
int PMS5003T::getPm10Ae(void) { return pms.getPM10(); } int PMS5003T::getPm10Ae(void) { return pms.getPM10(); }
/** /**
* @brief Read PM 0.3 Count must call this function after @ref readData success * @brief Read PM1.0
* *
* @return int PM 0.3 Count index * @return int PM1.0 index (standard particle)
*/
int PMS5003T::getPm01Sp(void) { return pms.getRaw0_1(); }
/**
* @brief Read PM2.5
*
* @return int PM2.5 index (standard particle)
*/
int PMS5003T::getPm25Sp(void) { return pms.getRaw2_5(); }
/**
* @brief Read PM10
*
* @return int PM10 index (standard particle)
*/
int PMS5003T::getPm10Sp(void) { return pms.getRaw10(); }
/**
* @brief Read particle 0.3 count
*
* @return int particle 0.3 count index
*/ */
int PMS5003T::getPm03ParticleCount(void) { int PMS5003T::getPm03ParticleCount(void) {
return pms.getCount0_3(); return pms.getCount0_3();
} }
/**
* @brief Read particle 0.5 count
*
* @return int particle 0.5 count index
*/
int PMS5003T::getPm05ParticleCount(void) { return pms.getCount0_5(); }
/**
* @brief Read particle 1.0 count
*
* @return int particle 1.0 count index
*/
int PMS5003T::getPm01ParticleCount(void) { return pms.getCount1_0(); }
/**
* @brief Read particle 2.5 count
*
* @return int particle 2.5 count index
*/
int PMS5003T::getPm25ParticleCount(void) { return pms.getCount2_5(); }
/** /**
* @brief Convert PM2.5 to US AQI * @brief Convert PM2.5 to US AQI
* *
@ -165,16 +207,14 @@ float PMS5003T::getRelativeHumidity(void) {
/** /**
* @brief Correct PM2.5 * @brief Correct PM2.5
* *
* Reference formula: https://www.airgradient.com/documentation/correction-algorithms/ * Reference formula: https://www.airgradient.com/documentation/correction-algorithms/
* *
* @param pm25 PM2.5 raw value * @param pm25 PM2.5 raw value
* @param humidity Humidity value * @param humidity Humidity value
* @return int * @return compensated value
*/ */
int PMS5003T::compensate(int pm25, float humidity) { float PMS5003T::compensate(float pm25, float humidity) { return pms.compensate(pm25, humidity); }
return pms.compensate(pm25, humidity);
}
/** /**
* @brief Get module(s) firmware version * @brief Get module(s) firmware version

View File

@ -28,14 +28,24 @@ public:
void resetFailCount(void); void resetFailCount(void);
int getFailCount(void); int getFailCount(void);
int getFailCountMax(void); int getFailCountMax(void);
// Atmospheric environment
int getPm01Ae(void); int getPm01Ae(void);
int getPm25Ae(void); int getPm25Ae(void);
int getPm10Ae(void); int getPm10Ae(void);
// Standard particle
int getPm01Sp(void);
int getPm25Sp(void);
int getPm10Sp(void);
// Particle count
int getPm03ParticleCount(void); int getPm03ParticleCount(void);
int getPm05ParticleCount(void);
int getPm01ParticleCount(void);
int getPm25ParticleCount(void);
int convertPm25ToUsAqi(int pm25); int convertPm25ToUsAqi(int pm25);
float getTemperature(void); float getTemperature(void);
float getRelativeHumidity(void); float getRelativeHumidity(void);
int compensate(int pm25, float humidity); float compensate(float pm25, float humidity);
int getFirmwareVersion(void); int getFirmwareVersion(void);
uint8_t getErrorCode(void); uint8_t getErrorCode(void);
bool connected(void); bool connected(void);

View File

@ -1,6 +1,6 @@
#include "S8.h" #include "S8.h"
#include "../Main/utils.h"
#include "mb_crc.h" #include "mb_crc.h"
#include "../Main/utils.h"
#if defined(ESP8266) #if defined(ESP8266)
#include <SoftwareSerial.h> #include <SoftwareSerial.h>
#else #else
@ -245,6 +245,7 @@ int16_t S8::getCo2(void) {
} else { } else {
AgLog("Error getting CO2 value!"); AgLog("Error getting CO2 value!");
} }
return co2; return co2;
} }
@ -273,13 +274,7 @@ bool S8::isBaseLineCalibrationDone(void) {
if (isCalib == false) { if (isCalib == false) {
return true; return true;
} }
int16_t getack = getAcknowledgement(); if (getAcknowledgement() & S8_MASK_CO2_BACKGROUND_CALIBRATION) {
// Serial.printf("getAcknowledgement: 0x%X\n", getack);
if (getack == 0xFF) {
Serial.println("Stop calibration");
return true;
} else if (getack & S8_MASK_CO2_BACKGROUND_CALIBRATION) {
Serial.println("Success calibration!");
return true; return true;
} }
return false; return false;
@ -401,8 +396,10 @@ bool S8::manualCalib(void) {
} }
bool result = clearAcknowledgement(); bool result = clearAcknowledgement();
if (result) { if (result) {
result = sendSpecialCommand(S8_CO2_BACKGROUND_CALIBRATION); result = sendSpecialCommand(S8_CO2_BACKGROUND_CALIBRATION);
if (result) { if (result) {
AgLog("Manual calibration in background has started"); AgLog("Manual calibration in background has started");
} else { } else {
@ -428,36 +425,17 @@ int16_t S8::getAcknowledgement(void) {
// Ask acknowledgement flags // Ask acknowledgement flags
sendCommand(MODBUS_FUNC_READ_HOLDING_REGISTERS, MODBUS_HR1, 0x0001); sendCommand(MODBUS_FUNC_READ_HOLDING_REGISTERS, MODBUS_HR1, 0x0001);
Serial.print("Get Acknowledgement Command > ");
for (int i = 0; i < 8; i++) {
Serial.printf(" 0x%02X ", buf_msg[i]);
}
Serial.println();
// Wait response // Wait response
memset(buf_msg, 0, S8_LEN_BUF_MSG); memset(buf_msg, 0, S8_LEN_BUF_MSG);
uint8_t nb = uartReadBytes(7, S8_TIMEOUT); uint8_t nb = uartReadBytes(7, S8_TIMEOUT);
Serial.print("Get Acknowledgement Response > ");
for (int i = 0; i < nb; i++) {
Serial.printf(" 0x%02X ", buf_msg[i]);
}
Serial.println();
// Check response and get data // Check response and get data
if (validResponseLenght(MODBUS_FUNC_READ_HOLDING_REGISTERS, nb, 7)) { if (validResponseLenght(MODBUS_FUNC_READ_HOLDING_REGISTERS, nb, 7)) {
flags = ((buf_msg[3] << 8) & 0xFF00) | (buf_msg[4] & 0x00FF); flags = ((buf_msg[3] << 8) & 0xFF00) | (buf_msg[4] & 0x00FF);
Serial.printf("Flags: %x\n", flags);
} else { } else {
AgLog("Error getting acknowledgement flags!"); AgLog("Error getting acknowledgement flags!");
Serial.println("Error getting acknowledgement flags!");
}
if (Serial.available() > 0) {
String input = Serial.readStringUntil('\n');
input.trim();
if (input == "calStop") {
return 0x00FF;
}
} }
return flags; return flags;
} }
@ -477,11 +455,6 @@ bool S8::clearAcknowledgement(void) {
// Ask clear acknowledgement flags // Ask clear acknowledgement flags
sendCommand(MODBUS_FUNC_WRITE_SINGLE_REGISTER, MODBUS_HR1, 0x0000); sendCommand(MODBUS_FUNC_WRITE_SINGLE_REGISTER, MODBUS_HR1, 0x0000);
Serial.print("Clear Acknowledgement Command > ");
for (int i = 0; i < 8; i++) {
Serial.printf(" 0x%02X ", buf_msg[i]);
}
Serial.println();
// Save bytes sent // Save bytes sent
memcpy(buf_msg_sent, buf_msg, 8); memcpy(buf_msg_sent, buf_msg, 8);
@ -489,11 +462,6 @@ bool S8::clearAcknowledgement(void) {
// Wait response // Wait response
memset(buf_msg, 0, S8_LEN_BUF_MSG); memset(buf_msg, 0, S8_LEN_BUF_MSG);
uartReadBytes(8, S8_TIMEOUT); uartReadBytes(8, S8_TIMEOUT);
Serial.print("Clear Acknowledgement Response > ");
for (int i = 0; i < 8; i++) {
Serial.printf(" 0x%02X ", buf_msg[i]);
}
Serial.println();
// Check response // Check response
if (memcmp(buf_msg_sent, buf_msg, 8) == 0) { if (memcmp(buf_msg_sent, buf_msg, 8) == 0) {
@ -610,11 +578,6 @@ bool S8::sendSpecialCommand(CalibrationSpecialComamnd command) {
// Ask set user special command // Ask set user special command
sendCommand(MODBUS_FUNC_WRITE_SINGLE_REGISTER, MODBUS_HR2, command); sendCommand(MODBUS_FUNC_WRITE_SINGLE_REGISTER, MODBUS_HR2, command);
Serial.print("Send Calibration Command > ");
for (int i = 0; i < 8; i++) {
Serial.printf(" 0x%02X ", buf_msg[i]);
}
Serial.println();
// Save bytes sent // Save bytes sent
memcpy(buf_msg_sent, buf_msg, 8); memcpy(buf_msg_sent, buf_msg, 8);
@ -623,12 +586,6 @@ bool S8::sendSpecialCommand(CalibrationSpecialComamnd command) {
memset(buf_msg, 0, S8_LEN_BUF_MSG); memset(buf_msg, 0, S8_LEN_BUF_MSG);
uartReadBytes(8, S8_TIMEOUT); uartReadBytes(8, S8_TIMEOUT);
Serial.print("Send Calibration Response > ");
for (int i = 0; i < 8; i++) {
Serial.printf(" 0x%02X ", buf_msg[i]);
}
Serial.println();
// Check response // Check response
if (memcmp(buf_msg_sent, buf_msg, 8) == 0) { if (memcmp(buf_msg_sent, buf_msg, 8) == 0) {
result = true; result = true;

View File

@ -1,18 +0,0 @@
import subprocess
import os
def get_git_version():
try:
version = subprocess.check_output(["git", "describe", "--tags", "--always", "--dirty"]).decode("utf-8").strip()
return version
except Exception as e:
print("Could not get git version:", e)
return "unknown"
git_version = get_git_version()
# git_version = "0.8.7-1-g118f259-dirty"
print("GIT_VERSION:", git_version)
# เพิ่ม GIT_VERSION เป็น build flag
Import("env")
env.Append(CPPDEFINES=[("GIT_VERSION", '\\"{}\\"'.format(git_version))])