Add support to SCD30 CO2 sensor coming through Luftdaten firmware #950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Luftdaten firmware sends SCD30 sensor data as
scd30_co2_ppm
, which currently can't be matched to a sensor title.Motivation and Context
With this addition, if you name a sensor phenomenon 'co2', 'carbon_dioxide', 'kohlendioxid', 'kohlenstoffdioxid' it will match against the sensor data sent by Luftdaten firmware.
How Has This Been Tested?
Luftdaten firmware provides debug info on the JSON sent. Example JSON measurement:
Of which the
{"value_type":"SCD30_co2_ppm","value":"579.00"}
is the key.luftdatenHandler.js
will split at the first underscore and try to matchco2_ppm
to a Phenomenon textbox value defined by the user.Types of changes
luftdatenHandler.js
matchings enum has two new entries for co2 and co2_ppm phenomenon and likely user-defined titles.Checklist:
yarn run lint
.yarn run test
)