Closed Rick-Jongbloed closed 5 years ago
Replaced weather1 binding with weatherunderground binding.
Logger + appender:
log4j2.logger.Weatherunderground.name = org.openhab.binding.Weatherunderground log4j2.logger.Weatherunderground.level = DEBUG
log4j2.logger.Weatherunderground.additivity = false log4j2.logger.Weatherunderground.appenderRefs = Weatherunderground log4j2.logger.Weatherunderground.appenderRef.http.ref = WEATHERUNDERGROUND
log4j2.appender.WEATHERUNDERGROUND.name = WEATHERUNDERGROUND log4j2.appender.WEATHERUNDERGROUND.type = RollingRandomAccessFile log4j2.appender.WEATHERUNDERGROUND.fileName = ${openhab.logdir}/weatherunderground.log log4j2.appender.WEATHERUNDERGROUND.filePattern = ${openhab.logdir}/weatherunderground.log.%i log4j2.appender.WEATHERUNDERGROUND.immediateFlush = true log4j2.appender.WEATHERUNDERGROUND.append = true log4j2.appender.WEATHERUNDERGROUND.layout.type = PatternLayout log4j2.appender.WEATHERUNDERGROUND.layout.pattern = %d{dd-MMM-yyyy HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n log4j2.appender.WEATHERUNDERGROUND.policies.type = Policies log4j2.appender.WEATHERUNDERGROUND.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.WEATHERUNDERGROUND.policies.size.size = 10MB log4j2.appender.WEATHERUNDERGROUND.strategy.type = DefaultRolloverStrategy log4j2.appender.WEATHERUNDERGROUND.strategy.max = 10
Configuration at https://www.openhab.org/addons/bindings/weatherunderground/
Lines removed from http binding
weatherconditions.url=https://api.wunderground.com/api/-/conditions/q/52.405322,5.299563.json weatherconditions.updateInterval=360000
weatherforecast.url=https://api.wunderground.com/api/-/forecast/q/52.405322,5.299563.json weatherforecast.updateInterval=360000
Weatherunderground is no more.... https://apicommunity.wunderground.com/weatherapi/topics/end-of-service-for-the-weather-underground-api
Removed code from outdoor.items
// not valid anymore. need to use another example
// // weather wunderground example from https://community.openhab.org/t/comprehensive-wunderground-using-http-binding-example/33267
// Number vWeather_Temp "Outside Temp [%.0f °F]"
// Number vWeather_UV "UV Index [JS(uv.js):%s]"
// Number vWeather_Today_TempHigh "Today High [%.0f °F]"
// Number vWeather_Today_TempLow "Today Low [%.0f °F]"
// Number vWeather_Today_QPF "Today Precip QPF [%.1f in]"
// String vWeather_Tomorrow_Conditions "Tomorrow Conditions [%s]"
Transformed into ticket to add the same functionality via the old weather binding.
created 030_weather_test.items, creating a change request to make it better
however it's still not working. Created logger and appender
log4j2.logger.weather.name = org.openhab.binding.weather log4j2.logger.weather.level = TRACE
log4j2.logger.weather.additivity = false log4j2.logger.weather.appenderRefs = weather log4j2.logger.weather.appenderRef.http.ref = WEATHER
log4j2.appender.WEATHER.name = WEATHER log4j2.appender.WEATHER.type = RollingRandomAccessFile log4j2.appender.WEATHER.fileName = ${openhab.logdir}/weather.log log4j2.appender.WEATHER.filePattern = ${openhab.logdir}/weather.log.%i log4j2.appender.WEATHER.immediateFlush = true log4j2.appender.WEATHER.append = true log4j2.appender.WEATHER.layout.type = PatternLayout log4j2.appender.WEATHER.layout.pattern = %d{dd-MMM-yyyy HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n log4j2.appender.WEATHER.policies.type = Policies log4j2.appender.WEATHER.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.WEATHER.policies.size.size = 10MB log4j2.appender.WEATHER.strategy.type = DefaultRolloverStrategy log4j2.appender.WEATHER.strategy.max = 10
Got OpenWeatherMap, WeatherBit and ForecastIO (DarkSky) running and showing data. All bugs are fixed, will continue another time, this ticket can be closed.
Log: 2019-04-26 22:47:17.475 [INFO ] [vice.internal.HttpServiceFactoryImpl] - Binding bundle: [org.openhab.binding.weather_1.14.0.M1 [263]] to http service 2019-04-26 22:47:17.503 [WARN ] [eather.internal.common.WeatherConfig] - Provider with name 'Wunderground' not found. Check the binding config. 2019-04-26 22:47:17.506 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=425, bundle=263/mvn:org.openhab.binding/org.openhab.binding.weather/1.14.0.M1]: Updating property weather of configuration org.openhab.weather caused a problem: Provider with name 'Wunderground' not found. Check the binding config. org.osgi.service.cm.ConfigurationException: weather : Provider with name 'Wunderground' not found. Check the binding config. at org.openhab.binding.weather.internal.common.WeatherConfig.getProviderName(WeatherConfig.java:223) ~[?:?] at org.openhab.binding.weather.internal.common.WeatherConfig.parseApiKey(WeatherConfig.java:182) ~[?:?] at org.openhab.binding.weather.internal.common.WeatherConfig.parse(WeatherConfig.java:88) ~[?:?] at org.openhab.binding.weather.internal.bus.WeatherBinding.updated(WeatherBinding.java:82) ~[?:?] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) ~[9:org.apache.felix.configadmin:1.9.10] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [9:org.apache.felix.configadmin:1.9.10] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [9:org.apache.felix.configadmin:1.9.10] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1113) [9:org.apache.felix.configadmin:1.9.10] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1069) [9:org.apache.felix.configadmin:1.9.10] at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [9:org.apache.felix.configadmin:1.9.10] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [9:org.apache.felix.configadmin:1.9.10] at java.lang.Thread.run(Thread.java:748) [?:?]