Weatherunderground sporadic exception

Hi Community,

i’m currently setting up the Weatherunderground binding with OH2.2 on Raspi3 with Openhabian 1.4

Sometimes (a couple of times per day) my weather data are not being displayed and the weatherunderground switches to communication error:

2018-01-05 23:51:44.477 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.

After switching the binding to debug, i see the following (i’ve erased te API key in the URL)

2018-01-05 04:30:47.404 [DEBUG] [nd.handler.WeatherUndergroundHandler] - URL = http://api.wunderground.com/api/<myAPIKEY>/conditions/forecast10day/lang:DL/q/pws:IAUGSBUR176.json
2018-01-05 04:30:47.454 [DEBUG] [nd.handler.WeatherUndergroundHandler] - Error running Weather Underground request: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@12aea88(l:/192.168.2.30:44038 <-> r:api.wunderground.com/88.221.150.130:80,closed=false)[HttpChannelOverHTTP@7a2000(exchange=HttpExchange@44d04e req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1001d41(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@164d303{s=START}],recv=HttpReceiverOverHTTP@fd900f(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]]

In addition there aren’t any JSON data coming from the API.
Does anybody of you have similar issues or is that something that resides on the wunderground side?

My update interval is set to 30min

Ok, here’s what i’ve found out so far.
The exception seems not to be sporadic.
Moreover it happens every 2nd update:

	Line 118690: 2018-01-06 09:44:44.998 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 118778: 2018-01-06 10:14:45.871 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 118859: 2018-01-06 10:44:46.084 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 118936: 2018-01-06 11:14:53.579 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 119006: 2018-01-06 11:44:53.751 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 119097: 2018-01-06 12:14:54.818 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 119180: 2018-01-06 12:44:54.991 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 119259: 2018-01-06 13:15:03.167 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 119342: 2018-01-06 13:45:03.297 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 119415: 2018-01-06 14:15:05.984 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 119499: 2018-01-06 14:45:06.181 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 119591: 2018-01-06 15:15:07.450 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 119668: 2018-01-06 15:45:07.628 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 119797: 2018-01-06 16:15:10.809 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 119884: 2018-01-06 16:45:10.979 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 120007: 2018-01-06 17:15:11.826 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 120104: 2018-01-06 17:45:11.950 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 120222: 2018-01-06 18:15:15.544 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 120326: 2018-01-06 18:45:15.719 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 120423: 2018-01-06 19:15:17.593 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 120542: 2018-01-06 19:45:17.751 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 120630: 2018-01-06 20:15:20.965 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE
	Line 120723: 2018-01-06 20:45:21.062 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request.
	Line 120844: 2018-01-06 21:15:24.843 [hingStatusInfoChangedEvent] - 'weatherunderground:weather:b796cd32' changed from OFFLINE (COMMUNICATION_ERROR): An error occurred while running the Weather Underground request. to ONLINE

I still do not know why, but maybe this information helps finding out the root cause.

Next update - for testing i’ve lowered the refresh interval to 5min and now everything seems to be working. I’ll mark this fixed as long as it is running now.

OK., i need to revert my previous marked solution.
Does anybody have similar issues with the weatherunderground binding?

Every 2nd update fails.
I initally thought that lowering the interval to 5min helped but it avoided ths issue since the thing was only offline for 5 mins.

I reinstalled the binding and reconfigured everthing - to be honest there’s not much that could be done wrong - except the location.

I am using this binding for some irrigation rules - but i don’t want to check every item that comes from the binding vs. null in each rule, therefore it would be really helpful to find out what is causing those problems and how to get rid of them

To have any hope of diagnosing this issue, you’re going to need to get a debug log.

Thanks for offering your help, @namraccr.
It is cursed - for getting faster debug logs, i lowered the update time and now i can’t see any issues so far.
At least it happens now only two/three times a day.

So I think it has something to do with the API itself and not necessarily the binding.

I am seeing the same issue and I would like to ask whether the code could be changed to not setting the values to NULL in case of a communication error and keeping the old values.
Thanks

1 Like

Since the weatherunderground API is going to shutdown i think you need to look for another service:

I realize this a year old thread, but I have a PWS in my yard that I have updating Weather Underground, yet I can’t seem to get the information to report back to openHAB. Does this have anything to do with the EOL for the API? I get the same errors as the OP.

I’m running 2.5.2 on a Synology NAS and can’t to put my hands on the editable files.