home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.82k stars 30.08k forks source link

Tomorrow.io stuck on initializing #93818

Closed benblb closed 1 year ago

benblb commented 1 year ago

The problem

The Tomorrow.io integration was stuck on initializing. I restarted HA Core and updated, but no help. I disabled the integration, restarted HA Core, and re-enabled the integration which fixed the issue. I feel like there was previously a "reload" button for the integration which fixed these types of issues, but it seems to have disappeared.

What version of Home Assistant Core has the issue?

2023.05.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Tomorrow.io

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Nothing in log, I checked.

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @raman325, @lymanepp, mind taking a look at this issue as it has been labeled with an integration (tomorrowio) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tomorrowio` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tomorrowio` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


tomorrowio documentation tomorrowio source (message by IssueLinks)

cniweb commented 1 year ago

@raman325, @lymanepp I can confirm this problem, too!

benblb commented 1 year ago

@raman325, @lymanepp I can confirm this problem, too!

@cniweb if you want it to work now, disable, restart, enable. Fixed it for me.

leoheitor commented 1 year ago

Same here. I’m using last version of HÁ. No success with disable/reboot/reload. log: Logger: homeassistant.config_entries Source: components/tomorrowio/init.py:205 First occurred: June 18, 2023 at 11:14:54 PM (9 occurrences) Last logged: 6:45:37 AM

Error setting up entry Tomorrow.io - CasaHeitor for tomorrowio Error setting up entry Tomorrow.io for tomorrowio Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/tomorrowio/init.py", line 141, in async_setup_entry await coordinator.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/components/tomorrowio/init.py", line 205, in async_setup_entry await self._coordinator_ready.wait() File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait await fut asyncio.exceptions.CancelledError

cejennings commented 1 year ago

I have the same problem - but the disable/restart/reenable isn't fixing it for me.

Here is my current environment: Home Assistant 2023.6.2 Supervisor 2023.06.2 Operating System 10.3 Frontend 20230608.0 - latest

cejennings commented 1 year ago

I have the same problem - but the disable/restart/reenable isn't fixing it for me.

Here is my current environment: Home Assistant 2023.6.2 Supervisor 2023.06.2 Operating System 10.3 Frontend 20230608.0 - latest

Also - found this in my debug logs: 2023-06-22 15:53:13.237 DEBUG (MainThread) [homeassistant.components.tomorrowio] Setting up coordinator for API key ozn6****Tc6c, loading data for all entries 2023-06-22 15:53:13.238 DEBUG (MainThread) [homeassistant.components.tomorrowio] Loaded 1 entries, initiating first refresh 2023-06-22 15:53:13.238 DEBUG (MainThread) [homeassistant.components.tomorrowio] Fetching data for 1 entries 2023-06-22 15:53:13.239 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Sending the following payload to tomorrow.io: {'location': '30.0**61902', 'units': 'metric', 'timesteps': ['5m', '1h', '1d'], 'startTime': '2023-06-22T19:53:13+00:00', 'fields': ['temperatureMin', 'temperatureMax', 'windSpeed', 'windDirection', 'weatherCode', 'precipitationIntensityAvg', 'precipitationProbability']} 2023-06-22 15:53:13.689 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403 and headers <CIMultiDictProxy('Date': 'Thu, 22 Jun 2023 19:53:13 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Correlation-Id': '50b8805a-449f-4048-bff5-18d422d70d36', 'X-Request-Id': 'e7a05b34-a814-47a6-ab25-ab015d380967', 'Access-Control-Allow-Origin': '', 'X-Moesif-Transaction-Id': 'ce8b05b5-a868-4254-ab8d-8f56fb2c8848', 'X-Kong-Upstream-Latency': '22', 'X-Kong-Proxy-Latency': '80', 'Content-Encoding': 'gzip', 'Via': '1.1 google', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7db709439ff1ad9a-ATL')> 2023-06-22 15:53:13.690 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching tomorrowio_ozn6Tc6c data in 0.452 seconds (success: False)

bisquit2003 commented 1 year ago

Same here. I’m using last version of HÁ. No success with disable/reboot/reload. log: Logger: homeassistant.config_entries Source: components/tomorrowio/init.py:205 First occurred: June 18, 2023 at 11:14:54 PM (9 occurrences) Last logged: 6:45:37 AM

Error setting up entry Tomorrow.io - CasaHeitor for tomorrowio Error setting up entry Tomorrow.io for tomorrowio Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/tomorrowio/init.py", line 141, in async_setup_entry await coordinator.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/components/tomorrowio/init.py", line 205, in async_setup_entry await self._coordinator_ready.wait() File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait await fut asyncio.exceptions.CancelledError

The same problem

Maharshi-Pathak commented 1 year ago

Conitnuing to see this issue even after numerous "disable, reload, restart". Tried deleting the integration and start afresh but no luck.

CT2HUU commented 1 year ago

Same with me! Suck on initializing. Tried "disable, reload, restart" and "remove, restart, add integration" without success. Tried previous steps waiting days between them, without success. On Tomorrow.io webpage I can see 3 or 4 api requests per day of attempt. I'm in Portugal, just in case I'm "out of coverage"... Am I @raman325?

MarcoZ76 commented 1 year ago

same here, stuck on inizializing. tried disable/reboot/reenable but didn'tfix. Also tried with new HA 2023.7... no fixed

yormedia commented 1 year ago

Also same here. Tried removing and adding. Disable/Enable but still stuck on initializing. HA 2023.7...

SarahDal commented 1 year ago

Identical problem with this intergration

lymanepp commented 1 year ago

I'm not making any promises, but I'll try to take a look at this over the weekend.

But since I can't recreate the problem, I need one or more people to enable debug logging and attach the log file to this thread.

How to enable logging: https://www.home-assistant.io/integrations/logger/

Enable both of these in your configuration.yaml file.

logger:
  logs:
    homeassistant.components.tomorrowio: debug
    pytomorrowio: debug
Maharshi-Pathak commented 1 year ago

this is the only log entry I get:

2023-07-14 00:01:27.927 DEBUG (MainThread) [homeassistant.components.tomorrowio] Setting up coordinator for API key <API_KEY>, loading data for all entries 2023-07-14 00:01:27.936 DEBUG (MainThread) [homeassistant.components.tomorrowio] Loaded 1 entries, initiating first refresh 2023-07-14 00:01:27.960 DEBUG (MainThread) [homeassistant.components.tomorrowio] Fetching data for 1 entries 2023-07-14 00:01:27.962 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Sending the following payload to tomorrow.io: {'location': '<lat-long>', 'units': 'metric', 'timesteps': ['1m', '1h', '1d'], 'startTime': '2023-07-14T04:01:27+00:00', 'fields': ['temperatureMin', 'temperatureMax', 'windSpeed', 'windDirection', 'weatherCode', 'precipitationIntensityAvg', 'precipitationProbability']} 2023-07-14 00:01:32.183 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403 and headers <CIMultiDictProxy('Date': 'Fri, 14 Jul 2023 04:01:31 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Correlation-Id': '28b65709-6890-419e-a017-95744783679e', 'X-Request-Id': 'ff87a076-8b91-446d-8f50-b4b76323a27b', 'Access-Control-Allow-Origin': '*', 'X-Moesif-Transaction-Id': '1344e6b9-a992-4f92-9259-07f424cdfa3c', 'X-Kong-Upstream-Latency': '22', 'X-Kong-Proxy-Latency': '50', 'Content-Encoding': 'gzip', 'Via': '1.1 google', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7e66dd6dadc66300-ORD')> 2023-07-14 00:01:32.185 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching <tomorrowio_APIKEY> data in 4.225 seconds (success: False)

lymanepp commented 1 year ago

There are actually six log messages there. Here's the one of interest (reformatted for readability).

2023-07-14 00:01:32.183 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403 and headers
{
    "Date": "Fri, 14 Jul 2023 04:01:31 GMT",
    "Content-Type": "application/json; charset=utf-8",
    "Transfer-Encoding": "chunked",
    "Connection": "keep-alive",
    "X-Correlation-Id": "28b65709-6890-419e-a017-95744783679e",
    "X-Request-Id": "ff87a076-8b91-446d-8f50-b4b76323a27b",
    "Access-Control-Allow-Origin": "*",
    "X-Moesif-Transaction-Id": "1344e6b9-a992-4f92-9259-07f424cdfa3c",
    "X-Kong-Upstream-Latency": "22",
    "X-Kong-Proxy-Latency": "50",
    "Content-Encoding": "gzip",
    "Via": "1.1 google",
    "CF-Cache-Status": "DYNAMIC",
    "Server": "cloudflare",
    "CF-RAY": "7e66dd6dadc66300-ORD"
}

The problem is a 403 response code from tomorrow.io API. The integration needs to be updated to log the full error code instead of just 403.

403 FORBIDDEN:

lymanepp commented 1 year ago

I submitted PR # https://github.com/raman325/pytomorrowio/pull/30 to enhance the logging for this.

Maharshi-Pathak commented 1 year ago

Alright, thanks for that clarification on integration logs. I just did a curl request from command line; it seems it is 403003.

  1. curl --compressed --request GET --url \ 'https://api.tomorrow.io/v4/timelines?location=40.75872069597532,-73.98529171943665&fields=temperature&timesteps=30m&units=metric&apikey=XXXXXXXXXXXX' {"code":403003,"type":"Forbidden Action","message":"The plan is restricted and cannot perform this action. Adjust action and try again: Querying '30m' timestep is not allowed in the current plan"}#
  2. replacing 30 min time step to 1 hr which is tomorrow.io's standard curl example; curl --compressed --request GET --url \ 'https://api.tomorrow.io/v4/timelines?location=40.75872069597532,-73.98529171943665&fields=temperature&timesteps=1h&units=metric&apikey=XXXXXXXXXX' and that gives a valid response.

I had mentioned this in the pytomorrowio issues: https://github.com/raman325/pytomorrowio/issues/29

Maharshi-Pathak commented 1 year ago

Also: the integration seems to get stuck on the initial set up stage itself: might be the same issue as well image

lymanepp commented 1 year ago

Also: the integration seems to get stuck on the initial set up stage itself: might be the same issue as well

If you still have logging enabled, you can check the logs to see if it's the same error (it probably is).

lymanepp commented 1 year ago

Querying '30m' timestep is not allowed in the current plan

Tomorrow.io needs an API call to return the capabilities of the API key. My free key was created in April 2022 and it isn't quite as limited as yours. I am able to do the query with 30m interval and I get 500 API calls per day.

@raman325 ,we need to make this dynamically determine the limits or reduce calls to the least-common denominator.

meetbryce commented 1 year ago

Having the same issue. The disable/reboot/enable cycle didn't help unfortunately.

CookeryTech commented 1 year ago

Same Issue Stuck on Intializing....Tried disable restart, Delete, reinstall

Debug Log .....

2023-07-28 12:05:18.212 DEBUG (MainThread) [homeassistant.components.tomorrowio] Setting up coordinator for API key 1vHN****hwAX, loading data for all entries 2023-07-28 12:05:18.212 DEBUG (MainThread) [homeassistant.components.tomorrowio] Loaded 1 entries, initiating first refresh 2023-07-28 12:05:18.213 DEBUG (MainThread) [homeassistant.components.tomorrowio] Fetching data for 1 entries 2023-07-28 12:05:18.213 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Sending the following payload to tomorrow.io: {'location': '-36.7**97018', 'units': 'metric', 'timesteps': ['15m', '1h', '1d'], 'startTime': '2023-07-28T00:05:18+00:00', 'fields': ['temperatureMin', 'temperatureMax', 'windSpeed', 'windDirection', 'weatherCode', 'precipitationIntensityAvg', 'precipitationProbability']} 2023-07-28 12:05:20.354 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403 and headers <CIMultiDictProxy('Date': 'Fri, 28 Jul 2023 00:05:20 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Correlation-Id': '5ac04ceb-ca06-4035-8059-800f7cddf199', 'X-Request-Id': '2af8e7f7-b3f6-408d-b2a4-4fd75f903081', 'Access-Control-Allow-Origin': '', 'X-Moesif-Transaction-Id': '01437fb7-a55e-48a0-a239-a3a08e7f4bc2', 'X-Kong-Upstream-Latency': '22', 'X-Kong-Proxy-Latency': '10', 'Content-Encoding': 'gzip', 'Via': '1.1 google', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7ed8deaf8a671c5c-AKL')> 2023-07-28 12:05:20.354 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching tomorrowio_1vHNhwAX data in 2.141 seconds (success: False) 2023-07-28 12:05:20.354 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Tomorrow.io - Business' for tomorrowio integration not ready yet; Retrying in background

lymanepp commented 1 year ago

Same Issue Stuck on Intializing....Tried disable restart, Delete, reinstall

Try grabbing the log output after upgrading to 2023.8

JcMinarro commented 1 year ago

It is the error I received after upgrade to 2023.8.0

2023-08-07 10:28:09.519 DEBUG (MainThread) [homeassistant.components.tomorrowio] Loaded 1 entries, initiating first refresh
2023-08-07 10:28:09.519 DEBUG (MainThread) [homeassistant.components.tomorrowio] Fetching data for 1 entries
2023-08-07 10:28:09.519 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Sending the following payload to tomorrow.io: {'location': '37.6***************************65381', 'units': 'metric', 'timesteps': ['15m', '1h', '1d'], 'startTime': '2023-08-07T08:28:09+00:00', 'fields': ['temperatureMin', 'temperatureMax', 'windSpeed', 'windDirection', 'weatherCode', 'precipitationIntensityAvg', 'precipitationProbability']}
2023-08-07 10:28:10.492 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403, headers <CIMultiDictProxy('Date': 'Mon, 07 Aug 2023 08:28:10 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Correlation-Id': 'f0615154-560a-429d-91c0-2cdae7527770', 'X-Request-Id': 'b566103f-1e4d-4ae9-ac83-e41cedc4bd71', 'Access-Control-Allow-Origin': '*', 'X-Moesif-Transaction-Id': '0b7e83e4-2f98-46de-b35a-914010d21074', 'X-Kong-Upstream-Latency': '5', 'X-Kong-Proxy-Latency': '55', 'Content-Encoding': 'gzip', 'Via': '1.1 google', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7f2e2501cf881bbf-MAD')>, and body: {'code': 403003, 'type': 'Forbidden Action', 'message': "The plan is restricted and cannot perform this action. Adjust action and try again: Querying '15m' timestep is not allowed in the current plan"}
2023-08-07 10:28:10.492 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching tomorrowio_YERM************************FEbW data in 0.973 seconds (success: False)

It looks like Querying '15m' timestep is not allowed but I am not sure how we can change this param

JcMinarro commented 1 year ago

Ok, it looks like it is the param we can configure on the "device section", but the maximum value we can select is 30 (minutes) which is not allowed on the free plan either. I have been doing some tests with the curl call tomorrow.io provides on their web and seems that using 1h (1 hour):

curl --compressed --request GET --url \
'https://api.tomorrow.io/v4/timelines?location=40.75872069597532,-73.98529171943665&fields=temperature&timesteps=1h&units=metric&apikey=XXX'

I think the tomorrow.io integration should use 1h by default, and add some "warning" in the case a below value is used notifying it requires a premium plan

lymanepp commented 1 year ago

I created PR to fix this. Hopefully it can be integrated soon including for 2023.8 release.

lymanepp commented 1 year ago

The fix should be in 2023.8.2

ncd7 commented 1 year ago

Thank you so much! When do minor releases (I assume) like 2023.8.2 normally get released? I tried googling around but only saw info on major monthly releases.
EDIT: also since only two files were impacted, is it advisable/possible to apply the fix locally? will it interfere with HA updates or it will get overwritten by the official update anyway?

lymanepp commented 1 year ago

Your guess is as good as mine, but hopefully soon.

ncd7 commented 1 year ago

Ah I see so you mean minor releases don't have a set cadence like major ones... thanks

lymanepp commented 1 year ago
lymanepp commented 1 year ago

2023.8.2 was released today. Everyone please give this reply a 👍 if it's working for you now or a 👎 if it's still not working.

ncd7 commented 1 year ago

Just got it earlier and the new 60min option works great - thank you!

CookeryTech commented 1 year ago

Sorted Boo Yah

On Sat, 12 Aug 2023, 16:15 nu, @.***> wrote:

Just got it earlier and the new 60min option works great - thank you!

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/93818#issuecomment-1675678661, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBO4EO6RQIX22F6TKRDZ3Q3XU37NLANCNFSM6AAAAAAYUK5GJ4 . You are receiving this because you commented.Message ID: @.***>

JingleheimerSE commented 1 year ago

I'm still having trouble with this issue after upgrading to 2023.9.0. After adding the integration I am getting 403 errors in my debug log:

2023-09-07 10:21:36.663 DEBUG (MainThread) [homeassistant.components.tomorrowio] Setting up coordinator for API key 2Uxu************************zBr8, loading data for all entries
2023-09-07 10:21:36.663 DEBUG (MainThread) [homeassistant.components.tomorrowio] Loaded 1 entries, initiating first refresh
2023-09-07 10:21:36.664 DEBUG (MainThread) [homeassistant.components.tomorrowio] Fetching data for 1 entries
2023-09-07 10:21:36.665 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Sending the following payload to tomorrow.io: {'location': '39.0***************************54732', 'units': 'metric', 'timesteps': ['15m', '1h', '1d'], 'startTime': '2023-09-07T14:21:36+00:00', 'fields': ['temperatureMin', 'temperatureMax', 'windSpeed', 'windDirection', 'weatherCode', 'precipitationIntensityAvg', 'precipitationProbability']}
2023-09-07 10:21:44.387 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403 and headers <CIMultiDictProxy('Date': 'Thu, 07 Sep 2023 14:21:44 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Correlation-Id': '1788fe8b-fb79-4f64-8c67-ef6c31819d0d', 'X-Request-Id': 'cbc665bb-4368-4930-afd5-1cd26c268a2f', 'Access-Control-Allow-Origin': '*', 'X-Moesif-Transaction-Id': 'cd028b6c-2072-4866-9ca8-bdc00f19ccd6', 'X-Kong-Upstream-Latency': '42', 'X-Kong-Proxy-Latency': '59', 'Content-Encoding': 'gzip', 'Via': '1.1 google', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '802f998e7c875872-IAD')>
2023-09-07 10:21:44.388 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching tomorrowio_2Uxu************************zBr8 data in 7.723 seconds (success: False)

I also noticed this error when restarting my HA instance but that seems reasonable given the process was going down:

2023-09-07 10:21:24.386 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Tomorrow.io - Home for tomorrowio
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tomorrowio/__init__.py", line 141, in async_setup_entry
    await coordinator.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/components/tomorrowio/__init__.py", line 205, in async_setup_entry
    await self._coordinator_ready.wait()
  File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
    await fut
asyncio.exceptions.CancelledError
lymanepp commented 1 year ago

2023-09-07 10:21:44.387 DEBUG (MainThread) [pytomorrowio.pytomorrowio] Received a response with status code 403 and headers <CIMultiDictProxy('Date': 'Thu, 07 Sep 2023 14:21:44 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Correlation-Id': '1788fe8b-fb79-4f64-8c67-ef6c31819d0d', 'X-Request-Id': 'cbc665bb-4368-4930-afd5-1cd26c268a2f', 'Access-Control-Allow-Origin': '*', 'X-Moesif-Transaction-Id': 'cd028b6c-2072-4866-9ca8-bdc00f19ccd6', 'X-Kong-Upstream-Latency': '42', 'X-Kong-Proxy-Latency': '59', 'Content-Encoding': 'gzip', 'Via': '1.1 google', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '802f998e7c875872-IAD')>

That message shouldn't be possible since 403 definitely isn't 200 or 206. See the logic added in 2023.8.0 at https://github.com/raman325/pytomorrowio/blob/8595833bf3ff6273d883106d5dbdcd7ab2fcae1d/pytomorrowio/pytomorrowio.py#L244

But the 403 return code likely indicates that the 15 minute interval that you've configured isn't supported by your API key.

CodeTypeDescription
403001Access DeniedThe authentication token in use is restricted and cannot access the requested resource.
403002Account LimitThe plan limit for a resource has been reached.
403003Forbidden ActionThe plan is restricted and cannot perform this action.