ha-climacell-weather icon indicating copy to clipboard operation
ha-climacell-weather copied to clipboard

Error 403 from Climacell API

Open bangcrash opened this issue 4 years ago • 8 comments

I have created a Climacell account this morning and then set up the HA component. At the moment it is only configured with a single monitored condition of cloud_cover. My YAML is:

  • platform: climacell api_key: !secret climacell_api latitude: !secret latitude longitude: !secret longitude monitored_conditions: realtime: conditions: - cloud_cover update: auto scan_interval: days: 0 hours: 0 minutes: 15 seconds: 0 milliseconds: 0

When I restart HA I get the following error in the logs:

`Logger: custom_components.climacell Source: custom_components/climacell/init.py:93 Integration: Climacell weather (documentation) First occurred: 15:49:51 (2 occurrences) Last logged: 16:09:53

ClimacellRealtimeDataProvider._retrieve_data error status_code 403`

and then when the sensor tries to update I get:

`Logger: custom_components.climacell.sensor Source: custom_components/climacell/sensor.py:399 Integration: Climacell weather (documentation) First occurred: 15:49:51 (5 occurrences) Last logged: 16:09:53

RealtimeSensor.update - Provider has no data for: cc climacell Cloud Cover`

On the Climacell account page it says that the API key is active and I have double and triple checked that it has been entered into my secrets.yaml file correctly with no spaces etc.

image

I know that the 403 error would normally suggest permission problems but I can't see a reason why I would be getting access denied based on everything that I have listed above.

Any ideas why this might be happening?

bangcrash avatar Dec 21 '20 16:12 bangcrash

I'm having the EXACT same issue, with the exact same error.

eboettn avatar Dec 21 '20 19:12 eboettn

I have managed to resolve this.

The account that I created this morning was for the v4 API so after a bit of digging I created a second account using this link: https://developer.climacell.co/sign-in.

Once created this gave me access to a different dashboard with a different API key. I swapped the API key in my secrets.yaml and restarted HA and the error has gone and it seems to be working perfectly.

It looks like this component doesn't support the v4 API yet but Climacell are giving those out by default to new accounts

bangcrash avatar Dec 21 '20 20:12 bangcrash

Worked for me too! Thanks.

haidlogan avatar Dec 21 '20 20:12 haidlogan

Worked for me too. Thanks!!

Get Outlook for iOShttps://aka.ms/o0ukef


From: haidlogan [email protected] Sent: Monday, December 21, 2020 3:51:50 PM To: r-renato/ha-climacell-weather [email protected] Cc: eboettn [email protected]; Comment [email protected] Subject: Re: [r-renato/ha-climacell-weather] Error 403 from Climacell API (#31)

Worked for me too! Thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/r-renato/ha-climacell-weather/issues/31#issuecomment-749190345, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTLP4LN4PVZJHY2X6TTTBDSV6YONANCNFSM4VENNIMQ.

eboettn avatar Dec 21 '20 22:12 eboettn

If I read the website correctly, the v3 API is going away in July 2021. FYI.

jig432 avatar Dec 23 '20 00:12 jig432

So it won’t work if i have it set up?

On Dec 22, 2020, at 7:00 PM, jig432 [email protected] wrote:

 If I read the website correctly, the v3 API is going away in July 2021. FYI.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

haidlogan avatar Dec 23 '20 00:12 haidlogan

I also tried and found I only have a v4 key. As mentioned above, I did a v3 registration, got a key and am able to use the v3 version. But I think it will go away in July 2021, according to what I saw on the climacell web site.

I hacked on a v4 version of this HA sensor and got it to mostly work, but since I am still learning HA, and this source, it still has issues. The changes they made for the climacell v4 API have some significant changes that will need to be updated in this source:

  1. condition name changes (like from wind_speed to now "windSpeed")
  2. only return values in metric units (my hack didn't try to add converting to imperial)
  3. don't return units in each REST API response, you have to keep your own units as a requester
  4. returned data organization is different
  5. appears to want the requested fields in the URL
  6. wants "Z" added as suffice to UTC times maybe other things I forgot....

Hope the author of this will update it.

jig432 avatar Dec 23 '20 00:12 jig432

Trying to sign up on https://developer.climacell.co/sign-in just directs back to the new v4 page it seems. Having the same problem and can't find a way to get the v3 API

ITensEI avatar Jan 17 '21 05:01 ITensEI