Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM2.5 SLR configuration corrupts config in EEPROM #268

Open
jakpor opened this issue Nov 27, 2024 · 0 comments
Open

PM2.5 SLR configuration corrupts config in EEPROM #268

jakpor opened this issue Nov 27, 2024 · 0 comments

Comments

@jakpor
Copy link

jakpor commented Nov 27, 2024

In latest release (3.1.13) selection of correction algorithm was removed from AirGradienr monitoring site, so I used Local server readme to enable latest slr correction algorithm using curl commands.

Commands, were accepted, corrections seemed to work well (PM2.5 readings decreased after this change to be closer to my reference). However, after resetting controller, program crashed on JSON parsing stage. To resolve that I cleared whole EEPROM on WEMOS so it can operate normally.

Here is the list of commands:
Enable SLR corrections:
curl --location -X PUT 'http://192.168.20.14/config' --header 'Content-Type: application/json' --data '{"corrections":{"pm02":{"correctionAlgorithm":"slr_PMS5003_20231030","slr":{"intercept":0,"scalingFactor":0.02838,"useEpa2021":true}}}}'

Check if all is uploaded:
curl GET 'http://192.168.20.14/config' {"country":"PL","pmStandard":"ugm3","ledBarMode":"co2","abcDays":8,"tvocLearningOffset":12,"noxLearningOffset":12,"mqttBrokerUrl":"","temperatureUnit":"c","configurationControl":"local","postDataToAirGradient":false,"ledBarBrightness":100,"displayBrightness":20,"offlineMode":false,"monitorDisplayCompensatedValues":false,"model":"DIY-BASIC-I-4.0PS","corrections":{"pm02":{"correctionAlgorithm":"slr_PMS5003_20240104","slr":{"intercept":0,"scalingFactor":0.02896,"useEpa2021":true}}}}

Error received on Serial:
`--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8
tail 0
chksum 0x2b
csum 0x2b
v0007d660
~ld
������n�{��n|� d ��$��#��� �|�r��l�o���o��l���s�l�$��� ��Serial nr: 840d8e99d680
[Configure] Info: Parse file to JSON
[Configure] Info: Correction algorithm: slr_PMS5003_20240104

--------------- CUT HERE FOR EXCEPTION DECODER ---------------`

One potential cause might be that value "intercept":0 is an integer, to apply it as double it should be "intercept":0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant