Closed guggu1 closed 2 years ago
additionally got the following by starting the adapter in debug mode from terminal (iobroker debug swiss-weather-api.0):
2021-11-21 00:42:02.742 - info: swiss-weather-api.0 (15832) starting. Version 1.0.2 in /opt/iobroker/node_modules/iobroker.swiss-weather-api, node: v12.22.5, js-controller: 3.3.19 2021-11-21 00:42:02.849 - info: swiss-weather-api.0 (15832) longitude/longitude will be set by self-Config - longitude: 8.0414 latitude: 46.6242 2021-11-21 00:42:02.885 - debug: swiss-weather-api.0 (15832) use system language for weekday names: 2021-11-21 00:42:12.867 - debug: swiss-weather-api.0 (15832) Successfull DNS resolve for api.srgssr.ch: ["3.120.122.149"] 2021-11-21 00:42:12.870 - debug: swiss-weather-api.0 (15832) There is no geolocationId, so getting one before calling forecasts... 2021-11-21 00:42:12.872 - debug: swiss-weather-api.0 (15832) getting Token... 2021-11-21 00:42:12.874 - debug: swiss-weather-api.0 (15832) "lagSQfVGtdyJwDQJkXteWbAxGeR0t8tz:pSH5ASzUPJ2kCLO4" converted to Base64 is "bGFnU1FmVkd0ZHlKd0RRSmtYdGVXYkF4R2VSMHQ4dHo6cFNINUFTelVQSjJrQ0xPNA=="
2021-11-21 00:42:12.876 - debug: swiss-weather-api.0 (15832) Options to get Access Token: {"json":true,"method":"POST","hostname":"api.srgssr.ch","port":null,"path":"/oauth/v1/accesstoken?grant_type=client_credentials","headers":{"Authorization":"Basic bGFnU1FmVkd0ZHlKd0RRSmtYdGVXYkF4R2VSMHQ4dHo6cFNINUFTelVQSjJrQ0xPNA==","Cache-Control":"no-cache","Content-Length":0,"Postman-Token":"24264e32-2de0-f1e3-f3f8-eab014bb6d76"}} (node:15832) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
2021-11-21 00:42:13.165 - debug: swiss-weather-api.0 (15832) Answer of Request Access Token: {"access_token":"hTFT2poPolSimWJkFrkrWSRMiKcV", "expires_in": 2591999, "token_type":"Bearer"}
2021-11-21 00:42:13.167 - debug: swiss-weather-api.0 (15832) Access_Token : hTFT2poPolSimWJkFrkrWSRMiKcV 2021-11-21 00:42:13.168 - debug: swiss-weather-api.0 (15832) Getting GeolocationId.... 2021-11-21 00:42:13.169 - debug: swiss-weather-api.0 (15832) Options to get GeolocationId: {"method":"GET","hostname":"api.srgssr.ch","port":null,"path":"/srf-meteo/geolocations?latitude=46.6242&longitude=8.0414","headers":{"authorization":"Bearer hTFT2poPolSimWJkFrkrWSRMiKcV"}}
2021-11-21 00:42:13.377 - debug: swiss-weather-api.0 (15832) Answer of getGeolocation Request: []
2021-11-21 00:42:13.378 - debug: swiss-weather-api.0 (15832) Body: []
2021-11-21 00:42:13.380 - error: swiss-weather-api.0 (15832) uncaught exception: Cannot read property 'id' of undefined
2021-11-21 00:42:13.382 - error: swiss-weather-api.0 (15832) TypeError: Cannot read property 'id' of undefined
at IncomingMessage.
2021-11-21 00:42:13.383 - error: swiss-weather-api.0 (15832) Cannot read property 'id' of undefined 2021-11-21 00:42:13.391 - debug: swiss-weather-api.0 (15832) Cron job destroyed 2021-11-21 00:42:13.392 - info: swiss-weather-api.0 (15832) cleaned everything up... 2021-11-21 00:42:13.394 - info: swiss-weather-api.0 (15832) terminating 2021-11-21 00:42:13.396 - warn: swiss-weather-api.0 (15832) Terminated (UNCAUGHT_EXCEPTION): Without reason
I have the following versions installed on the new system: ======== Rasperry PI ========: PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
============== ioBroker ===============
pi@raspberrypi:~ $ iobroker version 3.3.19
======= npm ========= pi@raspberrypi:~ $ iobroker version 3.3.19
=======. nodejs ======== pi@raspberrypi:~ $ node -v v12.22.5
Hi Same problems with adapter Version 1.0.2 , node: v14.18.1, js-controller: 3.3.18 running Windows11
The problem startet after update to Node 14.18.1
Regards
Got same issue. I've not updated any adapter. I think they have changed something in the API.
I don't have this issue; everything works fine:
I could find the reason. The Request for geolaction return an empty string. When I rode API docs I see that the request is made wrong in the adapter:
from: 2992 "path": "/srf-meteo/geolocations?latitude=" + self.config.Latitude + "&longitude=" + self.config.Longitude, to: 2992 "path": "/srf-meteo/geolocations/?latitude=" + self.config.Latitude + "&longitude=" + self.config.Longitude,
After that the adapter is starting again but for some unknown reason I get a wrong Geolocation ID 0.0000 :(👎
Boy, this did the trick. I managed to change to code locally. Adapter runs as smooth as before.
Thanks
Christoph S
yeah but the weather is somehow somewhere in usa for me ;-) ... getting GeoLocation ID 0.0000 don't know why ;)
same here. Did not realise that. I lost all my VIS objects (shame on me, no backup), hence I never verified if the data were OK. Just saw that the adapter was running.
Hope this will be fixed soon. I am not good enough a programmer to figure out the fix.
Hope too, Im bit mad with SRG. I wrote them an email today. For me they send wrong Response. It looks like that they have changed their API. I cannot test it anymore because I've reached free limit ;-).
just create a new app. Then you0ll get another 50 requests.
CCS
On 22 Nov 2021, at 11:52, florian1984 @.***> wrote:
Hope too, Im bit mad with SRG. I wrote them an email today. For me they send wrong Response. It looks like that they have changed their API. I cannot test it anymore because I've reached free limit ;-).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/baerengraben/ioBroker.swiss-weather-api/issues/68#issuecomment-975396399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFR4AD67BICZFQVKQNTOPEDUNIOGZANCNFSM5ION3TJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
the most API currently not working correctlys. SRF not answer my mails. Great service. Now i know why i pay serafe fees, shi news s** service.
I will change to openweather.
Yes, I can confirm there something is going wrong. I check it now...
...Ok, the endpoint https://api.srgssr.ch/srf-meteo/geolocations for getting the geolocation-id is not working properly anymore.
I don't think that it is a problem with the adapter. You can check this out here: https://developer.srgssr.ch/apis/srf-weather/docs/geolocation-latitude-and-longitude
If you do a test, then you see that even this testpage is doing the request as GET /srf-meteo/geolocations?latitude=xxxx&longitude=xxxx
And normaly parameters a attached to an URL with "'?....." and not with "/?...." => At least this was the standard back then, when I studied IT ;)
I wrote it to api@srgssr.ch and hope that they are answer soon...
Yes its not the adapter fault ;).
Im waiting 2 days for an answer from them. I saw the same thing. But anyways /? or ?para1.... both work not correctly. First send empty object, /? send an json but with weather info from USA with geoID 0.0000 .... ;-).
From the API Documentation its /?latitude=,longitude= see here https://developer.srgssr.ch/apis/srf-weather/docs/geolocation-latitude-and-longitude
Normally its true if it's a normal GET Parameter ?parameter=value is the right syntax ... ^^
Hope they are answering soon. If not, I do have two other direct contacts to SRG. When I do not get an answer, I will try to contact them directly.
PS: I used openweather too. But I was never happy with their data-quality. That's because I wrote the srf-weather adapter. Now the data-quality is good, but it seems that this is the frist time SRG is doing API-Technology ^^
that's true. I loved your adapter and the weather data quality :-). First I wanted to look at kachelmann weather but they not offer an api :(. OK, hope they get the things working again. Have many logic on this weather data ;).
today i got a response from the srg. they fixed the api issue. But the adapter still using geo id 0. Via https://developer.srgssr.ch/apis/srf-weather/docs/geolocation-latitude-and-longitude i can see a correct response body. Any idea what is wrong?
Just tested it now. And I can confirm, that it is working again. No Issues here. @mi1985 : Is longitude and latitude set correctly? Maybe you could reinstall Adapter just to be shure everything is set correctly. If it is not working, can you provide your debug-log?
I reeinstalled the adapter. Now the adpater get a geo id and the adapter is using it for the forecast request. But now it hangs in the forecast request process.
2021-11-24 22:20:17.624 error Forecast - Resource not found 2021-11-24 22:20:17.624 debug Return Code: 404.02.001 2021-11-24 22:20:17.624 debug Answer of forecast Request: { "code": "404.02.001", "message": "Resource not found error", "info": "https://developer.srgssr.ch" } 2021-11-24 22:20:17.524 info Getting forecast for GeolocationId: 47.4467,9.4050 2021-11-24 22:20:17.523 debug Options to get forecast: {"method":"GET","hostname":"api.srgssr.ch","port":null,"path":"/srf-meteo/forecast/47.4467,9.4050","headers":{"authorization":"Bearer xy*"}} 2021-11-24 22:20:17.523 debug Getting Forecast for geolocation id: 47.4467,9.4050
*Bearer replaced
I try it out via https://developer.srgssr.ch/apis/srf-weather/docs/forecast-geolocationid and there it works fine.
I can reproduce it. My Geolocation-id is working properly. Yours not. the requests sent through the adapter compared to https://developer.srgssr.ch/apis/srf-weather/docs/forecast-geolocationid are the same. Realy strange. I'll have to do further tests.
Hm.. Did now a direct test with your geolocation id 47.4467,9.4050 Now I get a "resource not found" on the developer-page:
Can you retest this? ...Maybe they are in the middle of "doing something" ;)
Get the same message. If you use manual settings in the app it's working:
1) https://developer.srgssr.ch/apis/srf-weather/docs/geolocationnames-name-or-zip < getting right long latitude. 2) enter the values in the adapter settings.
But I have some bad feelings to use this API anymore :(. They still not write me. They change API without any announcement or infos. If I work in my company like that I could find a new job.
ok, thanks for the info. At the moment max api calls reached and they fixed the trick with remove and add a new app. So I have to wait. But I am completly with you regarding the quality of the api. I extend my script with basic check if the swiss api response is up to date if note use an another data source.
I do not think it is an adapter problem. I did not change anything on it and before it worked without problems. From my point of view it is 100% because they changed something. Unfortunately I can't currently track what it is. Because the requests from the developer side and from the adapter are the same. And some locations are working (my location).
I reported this to srg. And I got already an answer. They also confirm, that actually it is not possible to get an Info, when they change something on the API. SRG confirms, that they are working on it.
Im wondering how many paying customer they still have...
Well, good question. Because we use the service for free, I guess we have to be a little patient and/or lenient. I hope it works better for the paying customers and that SRG will get better in operating this API. Normally the API would have to be operated with a "version-management" to ensure an operational stability. That is definitely missing at the moment.
the adapter/interface is working again, it seems - by some miracle. I have not changed anything. I don't think the SRF folks' reliability can be trusted. I hope the news they broadcast in TV are more reliable.
my previous statement is incorrect, too. I am still in Sierra San Felipe. But no errors are reported.
the news are even worser ;). OK I cannot call it "news". Corona, corona, corona 5G, 4G its so boring all the time ....
For me its working I've used this https://developer.srgssr.ch/apis/srf-weather/docs/geolocationnames-name-or-zip < getting right long latitude. After entering the corrected location everything works fine (since 3days).
the news are even worser ;). OK I cannot call it "news". Corona, corona, corona 5G, 4G its so boring all the time ....
For me its working I've used this https://developer.srgssr.ch/apis/srf-weather/docs/geolocationnames-name-or-zip < getting right long latitude. After entering the corrected location everything works fine (since 3days).
does not work here after I have obtained to coordinates from SRG for zip 4102.
Did you apply the fix suggested by floian1984?
If I apply the fix, I get
swiss-weather-api.1 | 2021-11-29 10:41:24.561 | info | Getting forecast for GeolocationId: 0.0000,0.0000 |
---|
If I run the original code, I get
swiss-weather-api.1 | 2021-11-29 10:39:03.483 | error | Forecast - Resource not found |
---|
CCS
swiss-weather-api.1 | 2021-11-29 10:39:03.483 | error | Forecast - Resource not found |
---|
swiss-weather-api.1 | 2021-11-29 10:39:03.483 | error | Forecast - Resource not found |
---|
For me its currently working without any change in 1.02 version:
I restart the adapter every day, so I would know it if something go wrong. I did the same. Getting my geolocation for my postal code. Strange, maybe SRG still not fixed it yet?
That's really strange. My GeolocationId works since 4 days again without problems. I use the latitude and longitude directly from ioBroker. I don't even have to enter them manually (via https://developer.srgssr.ch/apis/srf-weather/docs/geolocationnames-name-or-zip )
I will do some testing (again). Hope I will find some reason.
Since Friday, after removing latitude and longitude from the adapter, everyhing is ok.
I put the adapter back in service today after the problems. The adapter now runs properly again and also the latitude and longitude are correctly taken directly from ioBroker
I did a test today on https://developer.srgssr.ch/apis/srf-weather/docs/:
Using the received geolocationid (47.4467,9.4050) for getting Forcast (Forecast by geolocationid)
=> The API throws the error "Resource not found error"
I assume, there is still something wrong with that API. So I reported that Issue to api@srgssr.ch.
I have received a quick answer from SRG. The error message "Resource not found error" in this case is unfortunately a bit inaccurate:
The Meteo Freemium Product allows you to get forcasts for only one Location. So API-Requests for different locations will throw this error.
This means: API is working correctly by now => only the error message is confusing.
So I'm closing this issue.
Hello, the adapter stopped running on my Rasperrry PI. Error log entries see below. I did not make any changes to my raspi. It just stopped running some time after I have upgraded the adapter to 1.0.2 (I could not get 1.0.1 to work. There was some login error).
I observe the exact same effect on a brand new system, where I made a fresh install of the operating system, npm, node.js , ioBroker and the swiss-weather-api adapter. No objects are created by the adapter. In view of this fact I cannot think of the problem being due to some corruption in the original system
Any ideas?
Christoph S
Error log entries:
3) === this one may be the culprit. I have never seen this before the problem with the adapter occurred ==============