openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

[weather] apiXU provider calls failing, using out-of-date API #5972

Closed bzshumsky closed 3 years ago

bzshumsky commented 3 years ago

The ApiXU provider now apparently redirects to Weatherstack, which uses a different API.

2020-11-11 16:34:16.091 [DEBUG] [eather.internal.scheduler.WeatherJob] - Starting Weather job for location ‘home’ 2020-11-11 16:34:16.105 [TRACE] [nal.provider.AbstractWeatherProvider] - APIXU[home]: request : https://api.apixu.com/v1/current.json?key=efe39xxxxxxxxxxxx&lang=en&q=12.xx,70.xx 2020-11-11 16:34:17.528 [TRACE] [nal.provider.AbstractWeatherProvider] - APIXU[home]: response: error code: 1010 2020-11-11 16:34:17.755 [ERROR] [nal.provider.AbstractWeatherProvider] - APIXU: Unrecognized token ‘error’: was expecting (‘true’, ‘false’ or ‘null’) at [Source: error code: 1010; line: 1, column: 6] 2020-11-11 16:34:17.975 [ERROR] [eather.internal.scheduler.WeatherJob] - Unrecognized token ‘error’: was expecting (‘true’, ‘false’ or ‘null’) at [Source: error code: 1010; line: 1, column: 6] com.fasterxml.jackson.core.JsonParseException: Unrecognized token ‘error’: was expecting (‘true’, ‘false’ or ‘null’) at [Source: error code: 1010; line: 1, column: 6]

Running the REST call in the browser returns:

{ “0”: “#################################################################################################################################”, “1”: “# #”, “2”: “# IMPORTANT - PLEASE UPDATE YOUR API ENDPOINT #”, “3”: “# #”, “4”: “# This API endpoint is deprecated and has now been shut down. To keep using the apixu API, please update your integration #”, “5”: “# to use the new weatherstack API endpoint, designed as a simple drop-in replacement. #”, “6”: “# You will be required to create an account at https://weatherstack.com and obtain an API access key. #”, “7”: “# #”, “8”: “# For more information on how to upgrade please visit our Github Tutorial at: https://github.com/apilayer/weatherstack#readme #”, “9”: “# #”, “a”: “#################################################################################################################################” }

Using org.openhab.binding.weather version 1.14.0 on OpenHab 4.2.7

J-N-K commented 3 years ago

This is a openhab1 addon. Transferring to that repo

wborn commented 3 years ago

Duplicates https://github.com/openhab/openhab1-addons/issues/5897