New Weather Underground binding for Eclipse SmartHome / openHAB2

Dear Lolodomo,

first of all congratulations for this very nice binding, which I am using since you 1st posted it. It works really well.
I am wondering, if you may can extend it to the “hourly10days” channel. The interesting information I am looking for is the “sky” field, which is needed(among other parameters) to calculate the expected Solar watts per sqm for the next days. With this information it is possible to significant increase the self-used Solarpower, as you may not need to store energy in your batteries as enough Solarpower is forecasted. Here is a link(in german) of somebody who has disclosed a solution for that unrelated to your binding and openhab. http://www.kkopv.com/2014/10/eigenverbrauch-und-eigenverbrauchsoptim.html
For sure this kind of “empowering the smart home” will get more and more important.

What do you think?

2 Likes

Are the channels dynamically made available based on the data that is being pulled in for the specified location? I’m specifically trying to get solarRadiation, but I do not see a channel for it. I thought it might be the location I was using, but I’ve specified large cities for the location and the channel still does not show up. I know there are a few stations near me reporting it, but I’d prefer not to specify a specific pws because occasionally the data is bad for the ones I’ve tried.

OH 2.3 snapshot build 1159
WeatherUnderground Binding 0.10.0.201712141004

All channels are static.
If you don’t see it, maybe your thing is very old and was created when this channel did not yet exist.
In this case, try to delete and create again your thing.

I found it! I am not used to using PaperUI and was being slow… I just needed to click on Show More :roll_eyes: In migrating from the Weather 1.x binding, there are three pieces of data that I do not see in the new binding. the current chance of precipitation (current#probaPrecipitation?), commonId, and the pressure trend. The last two I could create in a rule though. But you mentioned this…

Where did the discussion end up (or were you referring to this)? Thank you for putting this binding together!

Feature request: I should put this into GH, but thought I could try to gauge interest here first. It would be great if you could pull in weather alerts, which can be grabbed in the same API call. I use them for audio notifications. Here are some items I create with the data:

String      Weather_Alert_Message_Raw      "Severe Weather Alert (Raw) [%s]"	    <text>  (gWeather,gNotification)
String      Weather_Alert_NWS_VTEC         "Severe Weather Alert NWS VTEC [%s]"	    <text>  (gWeather,gNotification)
String      Weather_Alert_Type             "Severe Weather Alert Type [%s]"	        <text>  (gWeather,gNotification)
DateTime    Weather_Alert_Expiration       "Severe Weather Alert Expiration [%1$tA, %1$tB %1$te, %1$tY at %1$tl:%1$tM%1$tp]"	<calendar>  (gWeather,gNotification)

I had posted about this here:

Did you solve this? I have the exact same problem. Every second request fails with “(COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.”

No, still same symptoms. events.log:


2018-01-25 01:09:50.977 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:local' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
2018-01-25 01:09:51.015 [vent.ItemStateChangedEvent] - CurrentConditions changed from UNDEF to Teils Wolkig
2018-01-25 01:09:51.017 [vent.ItemStateChangedEvent] - CurrentRelativeHumidity changed from UNDEF to 86
2018-01-25 01:09:51.018 [vent.ItemStateChangedEvent] - CurrentTemperature changed from UNDEF to 9.1
2018-01-25 01:09:51.019 [vent.ItemStateChangedEvent] - CurrentWindDirection changed from UNDEF to Süd-Südwest
2018-01-25 01:09:51.021 [vent.ItemStateChangedEvent] - CurrentWindSpeed changed from UNDEF to 0
2018-01-25 01:09:51.022 [vent.ItemStateChangedEvent] - CurrentWindGust changed from UNDEF to 4.8
2018-01-25 01:09:51.023 [vent.ItemStateChangedEvent] - CurrentPressure changed from UNDEF to 1016
2018-01-25 01:09:51.024 [vent.ItemStateChangedEvent] - CurrentDewPoint changed from UNDEF to 7
2018-01-25 01:09:51.025 [vent.ItemStateChangedEvent] - CurrentFeelingTemperature changed from UNDEF to 9
2018-01-25 01:09:51.026 [vent.ItemStateChangedEvent] - CurrentPrecipitationHour changed from UNDEF to 0
2018-01-25 01:10:10.169 [vent.ItemStateChangedEvent] - ForecastTodayConditions changed from UNDEF to Regen
2018-01-25 01:10:10.178 [vent.ItemStateChangedEvent] - ForecastTodayMinTemperature changed from UNDEF to 6
2018-01-25 01:10:10.190 [vent.ItemStateChangedEvent] - ForecastTodayMaxTemperature changed from UNDEF to 10
2018-01-25 01:10:10.194 [vent.ItemStateChangedEvent] - ForecastTodayProbaPrecipitation changed from UNDEF to 90
2018-01-25 01:10:10.198 [vent.ItemStateChangedEvent] - ForecastTodayPrecipitationDay changed from UNDEF to 15
2018-01-25 01:10:10.201 [vent.ItemStateChangedEvent] - ForecastTodaySnow changed from UNDEF to 0.0
2018-01-25 01:10:10.205 [vent.ItemStateChangedEvent] - ForecastTodayMaxWindSpeed changed from UNDEF to 16
2018-01-25 01:10:10.208 [vent.ItemStateChangedEvent] - ForecastTodayAverageWindSpeed changed from UNDEF to 14
2018-01-25 01:10:10.256 [vent.ItemStateChangedEvent] - ForecastTodayIcon changed from UNDEF to raw type (image/gif): 1730 bytes
2018-01-25 01:20:29.545 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:local' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
2018-01-25 01:20:29.574 [vent.ItemStateChangedEvent] - CurrentConditions changed from Teils Wolkig to UNDEF
2018-01-25 01:20:29.579 [vent.ItemStateChangedEvent] - CurrentTemperature changed from 9.1 to UNDEF
2018-01-25 01:20:29.581 [vent.ItemStateChangedEvent] - CurrentRelativeHumidity changed from 86 to UNDEF
2018-01-25 01:20:29.582 [vent.ItemStateChangedEvent] - CurrentWindDirection changed from Süd-Südwest to UNDEF
2018-01-25 01:20:29.584 [vent.ItemStateChangedEvent] - CurrentWindSpeed changed from 0 to UNDEF
2018-01-25 01:20:29.585 [vent.ItemStateChangedEvent] - CurrentWindGust changed from 4.8 to UNDEF
2018-01-25 01:20:29.587 [vent.ItemStateChangedEvent] - CurrentPressure changed from 1016 to UNDEF
2018-01-25 01:20:29.589 [vent.ItemStateChangedEvent] - CurrentDewPoint changed from 7 to UNDEF
2018-01-25 01:20:29.591 [vent.ItemStateChangedEvent] - CurrentFeelingTemperature changed from 9 to UNDEF
2018-01-25 01:20:29.595 [vent.ItemStateChangedEvent] - CurrentPrecipitationHour changed from 0 to UNDEF
2018-01-25 01:20:29.600 [vent.ItemStateChangedEvent] - ForecastTodayConditions changed from Regen to UNDEF
2018-01-25 01:20:29.602 [vent.ItemStateChangedEvent] - ForecastTodayMinTemperature changed from 6 to UNDEF
2018-01-25 01:20:29.607 [vent.ItemStateChangedEvent] - ForecastTodayMaxTemperature changed from 10 to UNDEF
2018-01-25 01:20:29.609 [vent.ItemStateChangedEvent] - ForecastTodayProbaPrecipitation changed from 90 to UNDEF
2018-01-25 01:20:29.613 [vent.ItemStateChangedEvent] - ForecastTodayPrecipitationDay changed from 15 to UNDEF
2018-01-25 01:20:29.615 [vent.ItemStateChangedEvent] - ForecastTodaySnow changed from 0.0 to UNDEF
2018-01-25 01:20:29.618 [vent.ItemStateChangedEvent] - ForecastTodayMaxWindSpeed changed from 16 to UNDEF
2018-01-25 01:20:29.620 [vent.ItemStateChangedEvent] - ForecastTodayAverageWindSpeed changed from 14 to UNDEF
2018-01-25 01:20:29.627 [vent.ItemStateChangedEvent] - ForecastTodayIcon changed from raw type (image/gif): 1730 bytes to UNDEF
2018-01-25 01:30:30.167 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:local' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
2018-01-25 01:30:30.174 [vent.ItemStateChangedEvent] - CurrentConditions changed from UNDEF to Teils Wolkig
2018-01-25 01:30:30.177 [vent.ItemStateChangedEvent] - CurrentTemperature changed from UNDEF to 8.9
2018-01-25 01:30:30.180 [vent.ItemStateChangedEvent] - CurrentRelativeHumidity changed from UNDEF to 86
2018-01-25 01:30:30.182 [vent.ItemStateChangedEvent] - CurrentWindDirection changed from UNDEF to Süd-Südwest
2018-01-25 01:30:30.185 [vent.ItemStateChangedEvent] - CurrentWindSpeed changed from UNDEF to 0
2018-01-25 01:30:30.189 [vent.ItemStateChangedEvent] - CurrentWindGust changed from UNDEF to 8.0
2018-01-25 01:30:30.192 [vent.ItemStateChangedEvent] - CurrentPressure changed from UNDEF to 1016
2018-01-25 01:30:30.194 [vent.ItemStateChangedEvent] - CurrentDewPoint changed from UNDEF to 7
2018-01-25 01:30:30.198 [vent.ItemStateChangedEvent] - CurrentFeelingTemperature changed from UNDEF to 9
2018-01-25 01:30:30.201 [vent.ItemStateChangedEvent] - CurrentPrecipitationHour changed from UNDEF to 0
2018-01-25 01:30:49.138 [vent.ItemStateChangedEvent] - ForecastTodayConditions changed from UNDEF to Regen
2018-01-25 01:30:49.154 [vent.ItemStateChangedEvent] - ForecastTodayMaxTemperature changed from UNDEF to 10
2018-01-25 01:30:49.156 [vent.ItemStateChangedEvent] - ForecastTodayMinTemperature changed from UNDEF to 6
2018-01-25 01:30:49.157 [vent.ItemStateChangedEvent] - ForecastTodayProbaPrecipitation changed from UNDEF to 90
2018-01-25 01:30:49.159 [vent.ItemStateChangedEvent] - ForecastTodayPrecipitationDay changed from UNDEF to 15
2018-01-25 01:30:49.160 [vent.ItemStateChangedEvent] - ForecastTodaySnow changed from UNDEF to 0.0
2018-01-25 01:30:49.161 [vent.ItemStateChangedEvent] - ForecastTodayMaxWindSpeed changed from UNDEF to 16
2018-01-25 01:30:49.162 [vent.ItemStateChangedEvent] - ForecastTodayAverageWindSpeed changed from UNDEF to 14
2018-01-25 01:30:49.191 [vent.ItemStateChangedEvent] - ForecastTodayIcon changed from UNDEF to raw type (image/gif): 1730 bytes
2018-01-25 01:41:08.394 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:local' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
2018-01-25 01:41:08.430 [vent.ItemStateChangedEvent] - CurrentConditions changed from Teils Wolkig to UNDEF
2018-01-25 01:41:08.446 [vent.ItemStateChangedEvent] - CurrentTemperature changed from 8.9 to UNDEF
2018-01-25 01:41:08.449 [vent.ItemStateChangedEvent] - CurrentRelativeHumidity changed from 86 to UNDEF
2018-01-25 01:41:08.450 [vent.ItemStateChangedEvent] - CurrentWindDirection changed from Süd-Südwest to UNDEF
2018-01-25 01:41:08.451 [vent.ItemStateChangedEvent] - CurrentWindSpeed changed from 0 to UNDEF
2018-01-25 01:41:08.453 [vent.ItemStateChangedEvent] - CurrentWindGust changed from 8.0 to UNDEF
2018-01-25 01:41:08.454 [vent.ItemStateChangedEvent] - CurrentPressure changed from 1016 to UNDEF
2018-01-25 01:41:08.455 [vent.ItemStateChangedEvent] - CurrentDewPoint changed from 7 to UNDEF
2018-01-25 01:41:08.456 [vent.ItemStateChangedEvent] - CurrentFeelingTemperature changed from 9 to UNDEF
2018-01-25 01:41:08.457 [vent.ItemStateChangedEvent] - CurrentPrecipitationHour changed from 0 to UNDEF
2018-01-25 01:41:08.458 [vent.ItemStateChangedEvent] - ForecastTodayConditions changed from Regen to UNDEF
2018-01-25 01:41:08.460 [vent.ItemStateChangedEvent] - ForecastTodayMinTemperature changed from 6 to UNDEF
2018-01-25 01:41:08.461 [vent.ItemStateChangedEvent] - ForecastTodayMaxTemperature changed from 10 to UNDEF
2018-01-25 01:41:08.462 [vent.ItemStateChangedEvent] - ForecastTodayProbaPrecipitation changed from 90 to UNDEF
2018-01-25 01:41:08.463 [vent.ItemStateChangedEvent] - ForecastTodayPrecipitationDay changed from 15 to UNDEF
2018-01-25 01:41:08.464 [vent.ItemStateChangedEvent] - ForecastTodayMaxWindSpeed changed from 16 to UNDEF
2018-01-25 01:41:08.465 [vent.ItemStateChangedEvent] - ForecastTodayAverageWindSpeed changed from 14 to UNDEF
2018-01-25 01:41:08.466 [vent.ItemStateChangedEvent] - ForecastTodaySnow changed from 0.0 to UNDEF
2018-01-25 01:41:08.467 [vent.ItemStateChangedEvent] - ForecastTodayIcon changed from raw type (image/gif): 1730 bytes to UNDEF

And on and on and on it goes…

same error here :frowning:
every second request fails. anyone?

For information, I deleted the binding from the marketplace as it is now included in the official Eclipse Smarthome distributions and included in openHAB since the version 2.2.

For all users having communication errors, please enable the DEBUG logs for the binding, it should help to identify what is the error.
log:set DEBUG org.eclipse.smarthome.binding.weatherunderground

For information, I just submitted a code change that introduce new channels containing the icon key:

1 Like

I proposed another enhancement to provide the channel pressureTrend:

Excellent… thank you! If you’re looking for some more, hourly forecast (specifically, I’d like current precip %) and weather alerts would be great to have in the binding!

If I currently have this binding installed, how do I upgrade to the new code that helps fix the…

“‘weatherunderground:weather:241f43f2’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.”

Thanks!

As requested in the git issue, I need you enable DEBUG log to understand what is this communication error.

I have Debug enabled and this is what I am seeing in the log, I fear it doesn’t help much. This happens on every second request and the error is always the same (TimeoutExcption)

2018-02-14 07:25:38.141 [DEBUG] [nd.handler.WeatherUndergroundHandler] - URL = http://api.wunderground.com/api/xxxxxxxxxxxxxxxx/conditions/forecast10day/lang:DL/q/XX.xxxx,X.xxxx.json
2018-02-14 07:26:08.146 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Error running Weather Underground request: java.util.concurrent.TimeoutException
2018-02-14 07:26:08.157 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel current#observationTime with state UNDEF (null)
2018-02-14 07:26:08.159 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:local' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
2018-02-14 07:26:08.160 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel current#temperature with state UNDEF (null)
2018-02-14 07:26:08.163 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel current#relativeHumidity with state UNDEF (null)
2018-02-14 07:26:08.169 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel current#pressure with state UNDEF (null)
2018-02-14 07:26:08.173 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel current#feelingTemperature with state UNDEF (null)
2018-02-14 07:26:08.177 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel current#icon with state UNDEF (null)
2018-02-14 07:26:08.180 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastToday#conditions with state UNDEF (null)
2018-02-14 07:26:08.183 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastToday#minTemperature with state UNDEF (null)
2018-02-14 07:26:08.186 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastToday#maxTemperature with state UNDEF (null)
2018-02-14 07:26:08.191 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastTomorrow#forecastTime with state UNDEF (null)
2018-02-14 07:26:08.194 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastTomorrow#conditions with state UNDEF (null)
2018-02-14 07:26:08.197 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastTomorrow#minTemperature with state UNDEF (null)
2018-02-14 07:26:08.201 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastTomorrow#maxTemperature with state UNDEF (null)
2018-02-14 07:26:08.213 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastDay2#forecastTime with state UNDEF (null)
2018-02-14 07:26:08.219 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastDay2#minTemperature with state UNDEF (null)
2018-02-14 07:26:08.232 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Update channel forecastDay2#maxTemperature with state UNDEF (null)
2018-02-14 07:26:08.417 [vent.ItemStateChangedEvent] - gl_WeatherLastUpdate changed from 2018-02-14T07:15:08.065+0100 to 2018-02-14T07:26:08.189+0100
2018-02-14 07:26:08.444 [vent.ItemStateChangedEvent] - gl_WeatherLastUpdate changed from 2018-02-14T07:26:08.189+0100 to 2018-02-14T07:26:08.388+0100

Ok so apparently the service is not always available to you.
Timeout for requests is set to 30 seconds which is already very high I think.

Are you using a WiFi connection ?
Maybe you have network problems like internet not available sometimes not available ?

We can see the 30 seconds delay in the 2 first lines in your logs.

I’m having this exact same issue. I have a Personal Weather Station in Weather Underground. I use the binding to pull data into OH2 using the Weather Underground API. My OH2 is running on a wired connection.

Weatherunderground has API outages from time to time.