bertrik / sensor-data-bridge

Bridge software for receiving airborne particulate matter measurements from TheThingsNetwork and forwarding them to sensor.community and opensensemap
https://revspace.nl/sensor-data-bridge
MIT License
7 stars 1 forks source link

Possible error: "ESensorItem.PM2_5" is used for "P2" and "P0" in OpenSenseUploader.java #6

Closed ThatRed closed 2 days ago

ThatRed commented 5 days ago

Hello @bertrik,

in "sensor-data-bridge/src/main/java/nl/bertriksikken/opensense/OpenSenseUploader.java" you used "ESensorItem.PM2_5" for "P2" and "P0". I would have expected the use of "ESensorItem.PM1_0" for "P0".

Is this an error or am I missing something?

// particulate matter String pmPrefix = getPmPrefix(data); if (data.hasValue(ESensorItem.PM10)) { message.addItem(pmPrefix + "P1", data.getValue(ESensorItem.PM10)); } if (data.hasValue(ESensorItem.PM2_5)) { message.addItem(pmPrefix + "P2", data.getValue(ESensorItem.PM2_5)); } if (data.hasValue(ESensorItem.PM1_0)) { message.addItem(pmPrefix + "P0", data.getValue(ESensorItem.PM2_5)); } if (data.hasValue(ESensorItem.PM4_0)) { message.addItem(pmPrefix + "P4", data.getValue(ESensorItem.PM4_0)); }

Thanks in advance.

bertrik commented 4 days ago

Oh wow, I think you're right! Will fix this ASAP!

ThatRed commented 4 days ago

Hello @bertrik,

thank you for fixing the problem. Can you please upload a new docker container? Or does it happen automatically after a certain amount time?

Thanks in advance.

Edit: Thanks for updating the docker container.