[OH 3.4] Luftdaten.info and OpenWeatherMap.AirPollution - no data any more

Hello,
maybe with the update to OH3.4 the world got better and all pollution disappeared…

Unfortunately both AddOns now don’t show any values for PM2.5 and PM10 any more. OpenWeatherMap AirPollution still has a green binding and I get timestamp and quality index - all other values are still 0.0.
The releated ‘Weather and Forecast’ works fine, so it is not an API-Key problem I assume.

Luftdateninfo is pointing to a local sensor on the balcony and is saying ‘green’ but is also only showing 0.0…

As both Bindings seem to have an issue I was wondering if maybe the underlying Number:Density has received some changes with 3.4? But of course while re-installing and testing I tried also String and Number without success…

Is it only me having these issues? Then I could change the provider or e.g do a completel re-install…

Thanks a lot!

You have to add UnitOfMeasurement, at least there are many users reporting problems which seems to be fixed with a modified item definition.
https://community.openhab.org/t/openhab-3-4-release-discussion/142257/54?u=spaceman_spiff

1 Like

Comment 3.4 introduces system default units for Quantity types. Previously, some types had a default (e.g. Temperature) and some did not (e.g.Density)

When a binding posts a value like “22 um” to an Item,
a) If there is no default unit, it gets accepted as-is - state becomes 22 um
b) If there is a default unit, say “m”, the posted value gets scaled to the default unit - state becomes 0.000022 m.
(Which will look like 0.0 in most display formatting)

Note that 3.4 has now eliminated possibility (a)

You may define a default unit individually per Item, the state presentation has a secondary use for this. This is the ‘pattern’ element like [%.1f kWh].
This will override the system default for that type.

I think the default for Density is in kg/m3, so you might expect to see real life air readings appearing as 0.0

Default units also affect how persistence works, so a caution that older stored data/charts may now appear to be screwed up.

1 Like

Thanks so much - that was it :slight_smile:

In case someone else has this issue - do the following:

  • Go to the Item
  • Metadata → Add Metadata ->State Description
  • Pattern: %.2f µg/m³ (this works fine for Feinstaub)

More details are here: Units Of Measurement | openHAB

And yes, historic data is now in a different UoM.
Thanks again!