Openweathermap not updating ozone

Hi,

I want to user the ozone channel from the openweathermap air_pollution. but it never updated, always = 0.
I am using Openhab 3.1

openhab-cli info

Version: 3.1.0 (Build)

User: openhab (Active Process 578)
User Groups: openhab tty dialout audio

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab | openhab:openhab
OPENHAB_CONF | /etc/openhab | willy:willy
OPENHAB_LOGDIR | /var/log/openhab | openhab:openhab
OPENHAB_BACKUPS | /var/lib/openhab/backups | openhab:openhab

java -version
openjdk version “11.0.11” 2021-04-20 LTS
OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS)
OpenJDK Client VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)

uname -a
Linux mon 5.10.52-v7+ #1440 SMP Tue Jul 27 09:54:13 BST 2021 armv7l GNU/Linux

From the TRACE log
2021-08-04 18:10:56.860 [TRACE] [.connection.OpenWeatherMapConnection] - OpenWeatherMap request: URL = ‘https://api.openweathermap.org/data/2.5/air_pollution/forecast?appid=*****&lon=4.7783&units=metric&lang=en&lat=51.0030’
2021-08-04 18:10:56.998 [TRACE] [.connection.OpenWeatherMapConnection] - OpenWeatherMap response: status = 200, content = '{“coord”:{“lon”:4.7783,“lat”:51.003},“list”:


,“dt”:1628089200},{“main”:{“aqi”:3},“components”:{“co”:236.99,“no”:0.25,“no2”:3.68,“o3”:121.59,“so2”:1.46,“pm2_5”:12.53,“pm10”:14.02,“nh3”:3.93},“dt”:1628092800},{“main”


2021-08-04 18:10:57.023 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘airQualityIndex’ of group ‘current’ with new state ‘3’.
2021-08-04 18:10:57.028 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘particulateMatter2dot5’ of group ‘current’ with new state ‘12.53 ”g/m³’.
2021-08-04 18:10:57.033 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘particulateMatter10’ of group ‘current’ with new state ‘14.02 ”g/m³’.
2021-08-04 18:10:57.040 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘carbonMonoxide’ of group ‘current’ with new state ‘236.99 ”g/m³’.
2021-08-04 18:10:57.045 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘nitrogenMonoxide’ of group ‘current’ with new state ‘0.25 ”g/m³’.
2021-08-04 18:10:57.053 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘nitrogenDioxide’ of group ‘current’ with new state ‘3.68 ”g/m³’.
2021-08-04 18:10:57.058 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘ozone’ of group ‘current’ with new state ‘0 ”g/m³’.
2021-08-04 18:10:57.065 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘sulphurDioxide’ of group ‘current’ with new state ‘1.46 ”g/m³’.
2021-08-04 18:10:57.070 [DEBUG] [er.OpenWeatherMapAirPollutionHandler] - Update channel ‘ammonia’ of group ‘current’ with new state ‘3.93 ”g/m³’.

If you need the complete response, please let me know.
Please help.
Kind regards
Willy

Hi Willy,

Thanks for reporting. That is a bug. Looking into the code I can see a wrong mapping of the OWM response to the internal Java classes. I will provide a fix for it.

Best,
Christoph

1 Like

Hi Christoph,

Thanks for the update, I suppose the fix will be in the next (minor) release ? :+1:

Kind regards

Willy