-
Couldn't load subscription status.
- Fork 18
Add particulate_matter sensor type
#131
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think PM1, PM2.5, PM4 and PM10 are a good sample to start with. Will try to implement these in our Space API shortly.
| "PM4.25": { | ||
| "description": "Concentration of particulate matter with a diameter of 4.25µm or less.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "PM4.25": { | |
| "description": "Concentration of particulate matter with a diameter of 4.25µm or less.", | |
| "PM4": { | |
| "description": "Concentration of particulate matter with a diameter of 4µm or less.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some online research and found that "PM4.25" seems to be an industry standard. Are you sure "PM4" isn't just an abbreviation used by your sensor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual question would be if statically defined PM sizes are adequate.
A "quick" solution I could think of that's both strict and allows different PM sizes would be the use of JSONSchema Pattern Properties.
However I've never used them and don't know how API clients deal with this. @SpaceApi/core can anyone of you provide input here?
Another approach would be to not use named properties, but a list of objects with the particle size as a separate property, e.g.:
"particulate_matter": [
{
"location": "Hackcenter",
"lastchange": 1756499104,
"properties": [
{
"measurement": "PM10",
"value": 20,
"unit": "µg/m³"
},
{
"measurement": "PM2.5",
"value": 25,
"unit": "µg/m³"
}
]
}
]Again, input from @SpaceApi/core is very welcome.

This PR adds support for the
particulate_mattersensor type as proposed in #129.@mweinelt I would also ask you to provide feedback as well since you requested this feature in the first place.