A lot of common sensors aren't supported because of temperature and humidity error #1

Closed
opened 4 years ago by Olivin · 1 comments
Olivin commented 4 years ago

Your Feinstaubwidget doesn't display temperature and humidity if sensor type is BME280. This sensor is compatible to DHT11/DHT22 and additionally measures air pressure. Your Widget should support this sensor because it's often used.

See difference between DHT11/DHT22 and BME280:

DHT22: http://api.luftdaten.info/v1/sensor/1315/
BME280: http://api.luftdaten.info/v1/sensor/15662/

None of your JSON parsers works with BME280. I don't understand your concept of different parsers - one parser should be enough. For my own software I used the free libjansson which is part of Linux, easy to use and available for all operation systems incl. Android. https://jansson.readthedocs.io/en/2.10/gettingstarted.html

BTW: My parser routine C/C++ for array of 'sensordatavalues' looks like this:

... array = json_array_get(sensordatavalues, i) ...
... if (json_unpack_ex(array, &error, 0, "{s:s,s:o,s?I*}", "value_type", &sensor[i].type, "value", &value, "id", &sensor[i].id)...

No regex required and order doesn't matter

Your Feinstaubwidget doesn't display temperature and humidity if sensor type is BME280. This sensor is compatible to DHT11/DHT22 and additionally measures air pressure. Your Widget should support this sensor because it's often used. See difference between DHT11/DHT22 and BME280: DHT22: http://api.luftdaten.info/v1/sensor/1315/ BME280: http://api.luftdaten.info/v1/sensor/15662/ None of your JSON parsers works with BME280. I don't understand your concept of different parsers - one parser should be enough. For my own software I used the free libjansson which is part of Linux, easy to use and available for all operation systems incl. Android. https://jansson.readthedocs.io/en/2.10/gettingstarted.html BTW: My parser routine C/C++ for array of 'sensordatavalues' looks like this: ... array = json_array_get(sensordatavalues, i) ... ... if (json_unpack_ex(array, &error, 0, "{s:s,s:o,s?I*}", "value_type", &sensor[i].type, "value", &value, "id", &sensor[i].id)... No regex required and order doesn't matter
Starfish self-assigned this 4 years ago
Starfish closed this issue 4 years ago
Starfish reopened this issue 4 years ago
Owner

Added partial support for the BME280 sensor: temperature & humidity, but not pressure values.

Added partial support for the BME280 sensor: temperature & humidity, but not pressure values.
Starfish added the
bug
label 4 years ago
Starfish added this to the medium priority milestone 4 years ago
Starfish closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.