valiquette / homebridge-my-wallbox

Homebridge support for locking/unlocking Wallbox EV charger
MIT License
4 stars 3 forks source link

Error getting charger status Request failed with status code 401 #16

Closed tobihoby closed 1 year ago

tobihoby commented 1 year ago

Hi,

what does the following error mean:

[29/12/2022, 15:29:35] [Wallbox] Error getting charger status Request failed with status code 401 [29/12/2022, 15:29:35] [Wallbox] { "code": 401, "message": "Your token is expired, please renew it." }

Thank you. Greetings Tobi

valiquette commented 1 year ago

Not sure why this happened, I saw it too, the timeout may have changed again. You just need to restart the app.

tobihoby commented 1 year ago

Unfortunately, the error still occurs with version 1.1.7.

Yes, the restart works, but it can't be a permanent state.

valiquette commented 1 year ago

I found a bug introduced in 1.1.7 that has been fixed in 1.1.8 that will correct the refresh. I also see where the error was not handled correctly, I will address that in the next update

tobihoby commented 1 year ago

the problem also exists with version 1.1.9:

06/02/2023, 11:10:15] [Wallbox] Error getting charger status Request failed with status code 401 [06/02/2023, 11:10:15] [Wallbox] { "code": 401, "message": "Your token is expired, please renew it." } [06/02/2023, 11:10:15] [Wallbox] Error updating status TypeError: Cannot read properties of undefined (reading 'data') at wallboxPlatform.getStatus (/var/lib/homebridge/node_modules/homebridge-my-wallbox/wallboxplatform.js:252:112) at processTicksAndRejections (node:internal/process/task_queues:95:5)

valiquette commented 1 year ago

Thanks, I know what's going on, I have another update but will wait a full 24 hours on my end, sorry for the inconvenience.

valiquette commented 1 year ago

I have an instance still running on 1.1.9 which has the 2nd error. but the token does refresh. So I am not seeing the 401 error. I am seeing a 501 error around the same place in the log. Do you ever see "Token has been refreshed" in your log?

tobihoby commented 1 year ago

yes: [06/02/2023, 15:29:39] [Wallbox] Token has been refreshed

valiquette commented 1 year ago

there is a new update. please let me know in a few days if it is working as expected.

tobihoby commented 1 year ago

everything looks good so far, thanks

tobihoby commented 1 year ago

with version 1.1.11:

[17/02/2023, 05:18:47] [Wallbox] Error getting charger status Request failed with status code 401 [17/02/2023, 05:18:47] [Wallbox] { "code": 401, "message": "Your token is expired, please renew it." }

valiquette commented 1 year ago

I saw one instance of that myself. Do you see any other error maybe 2 hours before that first occurrence? Right now the plug-in makes one attempt to refresh before the token expires and if that fails you will eventually see that error. I have all new logic for the api to auto retry. I have had it running hoping to catch this. I should get an update out next week. Thanks for your patience.

tobihoby commented 1 year ago

[19/02/2023, 09:32:48] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [19/02/2023, 09:32:49] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [19/02/2023, 09:32:50] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [19/02/2023, 09:32:52] [Wallbox] Error getting charger status Request failed with status code 401 [19/02/2023, 09:32:52] [Wallbox] { "code": 401, "message": "Your token is expired, please renew it." } [19/02/2023, 09:32:54] [Wallbox] Request failed with status code 401 retrying get status, attempt #4

valiquette commented 1 year ago

That make sense for the "get status" if the token is expired, what does not make sense is why the token did not refresh 1.4 hours earlier "retrieving token". Can you send me you configuration for this plugin? and if possible enable debug logging and next time you see this send a 2 hour block leading up to this error.

valiquette commented 1 year ago

with debug on you should see something like this

[2/19/2023, 10:43:55 AM] [Wallbox-Dev] Retrieving token

[2/19/2023, 10:43:55 AM] [Wallbox-Dev] refreshed token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Imp2YWxpcXVldHRlMTYzQGdtYWlsLmNvbSIsInVpZCI6IjA** [2/19/2023, 10:43:55 AM] [Wallbox-Dev] Token has been refreshed

tobihoby commented 1 year ago

here is the log:

[19/02/2023, 23:34:44] [Wallbox] Token has been refreshed [19/02/2023, 23:48:15] [Wallbox] Token has been refreshed [20/02/2023, 00:01:45] [Wallbox] Token has been refreshed [20/02/2023, 00:15:15] [Wallbox] Token has been refreshed [20/02/2023, 00:28:46] [Wallbox] Token has been refreshed [20/02/2023, 00:42:16] [Wallbox] Token has been refreshed [20/02/2023, 00:55:47] [Wallbox] Token has been refreshed [20/02/2023, 01:09:17] [Wallbox] Token has been refreshed [20/02/2023, 01:22:57] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying get token, attempt #1 [20/02/2023, 01:22:58] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying get token, attempt #2 [20/02/2023, 01:22:59] [Wallbox] Error getting token getaddrinfo ENOTFOUND user-api.wall-box.com [20/02/2023, 01:22:59] [Wallbox] Error retrieving token [20/02/2023, 01:22:59] [Wallbox] Failed to refresh token TypeError: Cannot read properties of undefined (reading 'data') [20/02/2023, 05:56:19] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 05:56:20] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 05:56:22] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 05:56:25] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 05:56:33] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 05:56:39] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 05:56:40] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 05:56:43] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 05:56:46] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 05:56:49] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 05:56:49] [Wallbox] { [20/02/2023, 05:56:54] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 05:56:59] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 05:57:00] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 05:57:01] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 05:57:05] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 05:57:09] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 05:57:09] [Wallbox] { [20/02/2023, 05:57:13] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 05:57:19] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 05:57:20] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 05:57:21] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 05:57:25] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 05:57:28] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 05:57:28] [Wallbox] { [20/02/2023, 05:57:33] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 05:57:39] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 05:57:40] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 05:57:41] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 05:57:45] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 05:57:48] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 05:57:48] [Wallbox] { [20/02/2023, 05:57:53] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 05:58:08] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 05:58:08] [Wallbox] { [20/02/2023, 06:19:14] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 06:19:15] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 06:19:16] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 06:19:20] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 06:19:28] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 06:19:34] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 06:19:35] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 06:19:36] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 06:19:40] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 06:19:44] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 06:19:44] [Wallbox] { [20/02/2023, 06:19:47] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 06:19:54] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 06:19:55] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 06:19:56] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 06:20:00] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 06:20:03] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 06:20:03] [Wallbox] { [20/02/2023, 06:20:07] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 06:20:14] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 06:20:15] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 06:20:16] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 06:20:20] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 06:20:23] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 06:20:23] [Wallbox] { [20/02/2023, 06:20:28] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 06:20:34] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [20/02/2023, 06:20:35] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [20/02/2023, 06:20:36] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [20/02/2023, 06:20:40] [Wallbox] Request failed with status code 401 retrying get status, attempt #4 [20/02/2023, 06:20:43] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 06:20:43] [Wallbox] { [20/02/2023, 06:20:47] [Wallbox] Request failed with status code 401 retrying get status, attempt #5 [20/02/2023, 06:21:03] [Wallbox] Error getting charger status Request failed with status code 401 [20/02/2023, 06:21:03] [Wallbox] {

tobihoby commented 1 year ago

and here the config:

{ "name": "Wallbox", "email": "xxxxxxxxxx@gmail.com", "password": "xxxxxxxxxxx", "refreshRate": 24, "liveRefreshTimeout": 2, "liveRefreshRate": 20, "cars": [ { "carName": "Audi Q4", "chargerName": "Wallbox", "kwH": 80 } ], "showControls": 5, "socSensor": true, "showAPIMessages": true, "_bridge": { "username": "xxxxxxxxxxxxxxxx", "port": 33403 }, "platform": "wallbox" }

valiquette commented 1 year ago

helpful but I maybe more confused now. getaddrinfo ENOTFOUND user-api.wall-box.com line tells me that your DNS is not resolving that address. That address is only used to signin. I am assuming you have no issue loading the app. Do you know what DNS provider you are using? Are you overriding your ISP are you using some kind of DNS blocking for ads where you may have to whitelist this address.

I did write some test code to help debug this issue and I am now going to call a different endpoint to actually refresh the token vs signing in again, but that will still use the address user-api.wall-box.com and may not be of much value.

valiquette commented 1 year ago

I also do not understand why the token is trying to refresh every ~15 mins, Do you see that all the time in your logs? What time zone are you in?

tobihoby commented 1 year ago

Please take a look at the times in the first log, then it will be clearer. I can't explain the dns query either, otherwise I wouldn't have any problems that would indicate DNS. I use 8.8.8.8 as DNS server, so nothing special and I don't have active DNS blocking either. Sorry that I have no further information on this

tobihoby commented 1 year ago

pi@HB38:~ $ cat /var/lib/homebridge/homebridge.log | grep Wallbox [20/02/2023, 08:20:32] [Wallbox] Token has been refreshed [20/02/2023, 08:34:02] [Wallbox] Token has been refreshed [20/02/2023, 08:47:32] [Wallbox] Token has been refreshed [20/02/2023, 09:01:03] [Wallbox] Token has been refreshed [20/02/2023, 09:14:33] [Wallbox] Token has been refreshed [20/02/2023, 09:28:04] [Wallbox] Token has been refreshed [20/02/2023, 09:41:34] [Wallbox] Token has been refreshed [20/02/2023, 09:55:05] [Wallbox] Token has been refreshed [20/02/2023, 10:08:35] [Wallbox] Token has been refreshed [20/02/2023, 10:22:07] [Wallbox] Token has been refreshed [20/02/2023, 10:35:37] [Wallbox] Token has been refreshed [20/02/2023, 10:49:08] [Wallbox] Token has been refreshed [20/02/2023, 11:02:38] [Wallbox] Token has been refreshed [20/02/2023, 11:16:09] [Wallbox] Token has been refreshed [20/02/2023, 11:29:39] [Wallbox] Token has been refreshed [20/02/2023, 11:43:09] [Wallbox] Token has been refreshed [20/02/2023, 11:56:40] [Wallbox] Token has been refreshed [20/02/2023, 12:10:10] [Wallbox] Token has been refreshed [20/02/2023, 12:23:43] [Wallbox] Token has been refreshed [20/02/2023, 12:37:13] [Wallbox] Token has been refreshed [20/02/2023, 12:50:43] [Wallbox] Token has been refreshed [20/02/2023, 13:02:19] [Wallbox] getaddrinfo ENOTFOUND api.wall-box.com retrying get status, attempt #1 [20/02/2023, 13:02:20] [Wallbox] getaddrinfo ENOTFOUND api.wall-box.com retrying get status, attempt #2 [20/02/2023, 13:02:21] [Wallbox] Error getting charger status getaddrinfo ENOTFOUND api.wall-box.com [20/02/2023, 13:02:30] [Wallbox] getaddrinfo ENOTFOUND api.wall-box.com retrying get status, attempt #1 [20/02/2023, 13:04:14] [Wallbox] Token has been refreshed [20/02/2023, 13:17:44] [Wallbox] Token has been refreshed [20/02/2023, 13:31:14] [Wallbox] Token has been refreshed [20/02/2023, 13:44:48] [Wallbox] Token has been refreshed [20/02/2023, 13:58:18] [Wallbox] Token has been refreshed [20/02/2023, 14:11:49] [Wallbox] Token has been refreshed [20/02/2023, 14:25:19] [Wallbox] Token has been refreshed [20/02/2023, 14:38:50] [Wallbox] Token has been refreshed [20/02/2023, 14:52:21] [Wallbox] Token has been refreshed [20/02/2023, 15:05:53] [Wallbox] Token has been refreshed pi@HB38:~ $

so far so good

valiquette commented 1 year ago

I will get you a test version that can verify what is going on. The current code will only retry the ENOTFOUND twice so it may give up too soon. I am still concerned about the TTL that drives the refresh. if should 24 hour but it looks like 15 mins. (15x.9=13:30) which is the actual timeout. In the meantime What time zone are you in? Is your Wallbox configured for the right timezone? Does homebridge time look ok? is you Pi's time correct? is the locale the correct timezone? I am asking because Wallbox token TTL is a future date and time, and I just subtract the current date and time which should equal 24 hours. One of these two things has to be off.

I am guessing that your hitting the callbox site too much and things freak out. The log file should note the total calls in a 24 hour period. I suspect you will be way more then a few hundred.

tobihoby commented 1 year ago

Time and time zone are set correctly everywhere...

Current default time zone: 'Europe/Berlin' Local time is now: Mon Feb 20 20:21:00 CET 2023. Universal Time is now: Mon Feb 20 19:21:00 UTC 2023

valiquette commented 1 year ago

I have a alternate version you can install v1.1.13-test.0 This version will have some extra logging (warning level) that will highlight the calculation for the token refresh. when it loads you should see

[2/20/2023, 6:52:04 PM] [Wallbox-Dev] Current time Mon Feb 20 2023 18:52:04 GMT-0700 (Mountain Standard Time) [2/20/2023, 6:52:04 PM] [Wallbox-Dev] Token will expire at Tue Feb 21 2023 18:52:04 GMT-0700 (Mountain Standard Time) [2/20/2023, 6:52:04 PM] [Wallbox-Dev] Refresh Token will expire at Sat Aug 19 2023 19:52:04 GMT-0600 (Mountain Daylight Time) [2/20/2023, 6:52:04 PM] [Wallbox-Dev] Token ttl=86400 seconds [2/20/2023, 6:52:04 PM] [Wallbox-Dev] Token will refresh @ Tue Feb 21 2023 16:28:04 GMT-0700 (Mountain Standard Time) after 3 minutes the token will be void and will create the 401 condition and try 3 times before failing [2/20/2023, 6:55:04 PM] [Wallbox-Dev] token is no longer valid

[2/20/2023, 6:55:18 PM] [Wallbox-Dev] Request failed with status code 401 retrying get status, attempt #1 [2/20/2023, 6:55:19 PM] [Wallbox-Dev] Request failed with status code 401 retrying get status, attempt #2 [2/20/2023, 6:55:20 PM] [Wallbox-Dev] Request failed with status code 401 retrying get status, attempt #3

at this point the plugin will try and refresh the token following the error

[2/20/2023, 7:02:52 PM] [Wallbox-Dev] Error getting charger status Request failed with status code 401 [2/20/2023, 7:02:52 PM] [Wallbox-Dev] { "code": 401, "message": "Your token is invalid, please login again to get a new one" } [2/20/2023, 7:02:52 PM] [Wallbox-Dev] Refreshing token [2/20/2023, 7:02:52 PM] [Wallbox-Dev] Current time Mon Feb 20 2023 19:02:52 GMT-0700 (Mountain Standard Time) [2/20/2023, 7:02:52 PM] [Wallbox-Dev] Token will expire at Tue Feb 21 2023 19:02:52 GMT-0700 (Mountain Standard Time) [2/20/2023, 7:02:52 PM] [Wallbox-Dev] Refresh Token will expire at Sat Aug 19 2023 20:02:52 GMT-0600 (Mountain Daylight Time) [2/20/2023, 7:02:52 PM] [Wallbox-Dev] Token ttl=86400 seconds [2/20/2023, 7:02:52 PM] [Wallbox-Dev] Token will refresh @ Tue Feb 21 2023 16:38:52 GMT-0700 (Mountain Standard Time)

At this point you will be good for 24 hours?

Your responses should mirror what I have. If the TTL is not 86400 then let me know I also increased the no response retries from 2 to 3.

tobihoby commented 1 year ago

[21.2.2023, 16:29:53] [Wallbox] Launched child bridge with PID 91436 [21.2.2023, 16:29:53] [Wallbox] Loaded homebridge-my-wallbox v1.1.13-test.0 child bridge successfully [21.2.2023, 16:29:53] [Wallbox] Starting Wallbox platform using homebridge API 2.7 [21.2.2023, 16:29:53] [Wallbox] Getting Account info... [21.2.2023, 16:29:53] Homebridge v1.6.0 (HAP v0.11.0) (Wallbox) is running on port 33403. [21.2.2023, 16:29:56] [Wallbox] Email status confirmed [21.2.2023, 16:29:56] [Wallbox] Current time Tue Feb 21 2023 16:29:56 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:29:56] [Wallbox] Token will expire at Tue Feb 21 2023 16:44:56 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:29:56] [Wallbox] Refresh Token will expire at Sun Aug 20 2023 17:29:56 GMT+0200 (Mitteleuropäische Sommerzeit) [21.2.2023, 16:29:56] [Wallbox] Token ttl=900 seconds [21.2.2023, 16:29:56] [Wallbox] Token will refresh @ Tue Feb 21 2023 16:43:26 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:29:57] [Wallbox] Found group for xxxxxxxxxxxxxxxxxxx [21.2.2023, 16:29:57] [Wallbox] Found charger Wallbox with software 5.13.17 [21.2.2023, 16:29:57] [Wallbox] Found account for xxxxxxxxxxxxxxxx [21.2.2023, 16:29:57] [Wallbox] Found device at the location: xxxxxxxxxxxxxxxxxxxx [21.2.2023, 16:29:58] [Wallbox] Adding lock for Wallbox charger [21.2.2023, 16:29:58] [Wallbox] Adding sensor for Wallbox charger [21.2.2023, 16:29:58] [Wallbox] Adding battery service for Wallbox charger [21.2.2023, 16:29:58] [Wallbox] Adding outlet for Wallbox charger [21.2.2023, 16:29:59] [Wallbox] Wallbox platform finished loading [21.2.2023, 16:32:56] [Wallbox] token is no longer valid [21.2.2023, 16:33:19] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [21.2.2023, 16:33:20] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [21.2.2023, 16:33:22] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [21.2.2023, 16:33:26] [Wallbox] Error getting charger status Request failed with status code 401 [21.2.2023, 16:33:26] [Wallbox] { [21.2.2023, 16:33:26] [Wallbox] Current time Tue Feb 21 2023 16:33:26 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:33:26] [Wallbox] Token will expire at Tue Feb 21 2023 16:48:26 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:33:26] [Wallbox] Refresh Token will expire at Sun Aug 20 2023 17:33:26 GMT+0200 (Mitteleuropäische Sommerzeit) [21.2.2023, 16:33:26] [Wallbox] Token ttl=900 seconds [21.2.2023, 16:33:26] [Wallbox] Token will refresh @ Tue Feb 21 2023 16:46:56 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:43:26] [Wallbox] { [21.2.2023, 16:43:26] [Wallbox] token changed true [21.2.2023, 16:43:26] [Wallbox] Current time 21.2.2023, 16:43:26 [21.2.2023, 16:43:26] [Wallbox] Token will expire at 21.2.2023, 16:58:26 [21.2.2023, 16:43:26] [Wallbox] Refresh Token will expire at 20.8.2023, 17:43:26 [21.2.2023, 16:43:26] [Wallbox] token updated true [21.2.2023, 16:43:26] [Wallbox] Token ttl=900 seconds [21.2.2023, 16:43:26] [Wallbox] Token will refresh @ Tue Feb 21 2023 16:56:56 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:43:26] [Wallbox] Token has been refreshed

so far, so good again :) I'll watch it for the next 24 hours

valiquette commented 1 year ago

My math is right, but the TTL should be 86400, not 900. I looks like the token TLL in the Wallbox API is not what I was expecting. This changed in the US a while back and broke the plugin, which is when I stopped trying to refresh basically TTL-1 hour. Shortly after it went from 15 mins back to 24 hours. This would make sense that you have a lot more opportunity to fail an update before I put some retry logic in, now this will renew on a 401 error, which I think I should keep in based on your log. I wonder if you are getting redirected to a different site.

If you go to this address https://my.wallbox.com/dashboard does it get redirected?

tobihoby commented 1 year ago

I am redirected to this page: https://my.wallbox.com/login

tobihoby commented 1 year ago

The log currently looks like this (since 16:43):

[21.2.2023, 16:46:56] [Wallbox] { [21.2.2023, 16:46:56] [Wallbox] token changed true [21.2.2023, 16:46:56] [Wallbox] Current time 21.2.2023, 16:46:56 [21.2.2023, 16:46:56] [Wallbox] Token will expire at 21.2.2023, 17:01:56 [21.2.2023, 16:46:56] [Wallbox] Refresh Token will expire at 20.8.2023, 17:46:56 [21.2.2023, 16:46:56] [Wallbox] token updated true [21.2.2023, 16:46:56] [Wallbox] Token ttl=900 seconds [21.2.2023, 16:46:56] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:00:26 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:46:56] [Wallbox] Token has been refreshed [21.2.2023, 16:56:57] [Wallbox] { [21.2.2023, 16:56:57] [Wallbox] token changed true [21.2.2023, 16:56:57] [Wallbox] Current time 21.2.2023, 16:56:57 [21.2.2023, 16:56:57] [Wallbox] Token will expire at 21.2.2023, 17:11:57 [21.2.2023, 16:56:57] [Wallbox] Refresh Token will expire at 20.8.2023, 17:56:57 [21.2.2023, 16:56:57] [Wallbox] token updated true [21.2.2023, 16:56:57] [Wallbox] Token ttl=900 seconds [21.2.2023, 16:56:57] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:10:27 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 16:56:57] [Wallbox] Token has been refreshed [21.2.2023, 17:00:26] [Wallbox] { [21.2.2023, 17:00:26] [Wallbox] token changed true [21.2.2023, 17:00:26] [Wallbox] Current time 21.2.2023, 17:00:26 [21.2.2023, 17:00:26] [Wallbox] Token will expire at 21.2.2023, 17:15:26 [21.2.2023, 17:00:26] [Wallbox] Refresh Token will expire at 20.8.2023, 18:00:26 [21.2.2023, 17:00:26] [Wallbox] token updated true [21.2.2023, 17:00:26] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:00:26] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:13:56 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:00:26] [Wallbox] Token has been refreshed [21.2.2023, 17:10:27] [Wallbox] { [21.2.2023, 17:10:27] [Wallbox] Token has been refreshed [21.2.2023, 17:10:27] [Wallbox] token changed true [21.2.2023, 17:10:27] [Wallbox] Current time 21.2.2023, 17:10:27 [21.2.2023, 17:10:27] [Wallbox] Token will expire at 21.2.2023, 17:25:27 [21.2.2023, 17:10:27] [Wallbox] Refresh Token will expire at 20.8.2023, 18:10:27 [21.2.2023, 17:10:27] [Wallbox] token updated true [21.2.2023, 17:10:27] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:10:27] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:23:57 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:13:56] [Wallbox] { [21.2.2023, 17:13:56] [Wallbox] token changed true [21.2.2023, 17:13:56] [Wallbox] Current time 21.2.2023, 17:13:56 [21.2.2023, 17:13:56] [Wallbox] Token will expire at 21.2.2023, 17:28:56 [21.2.2023, 17:13:56] [Wallbox] Refresh Token will expire at 20.8.2023, 18:13:56 [21.2.2023, 17:13:56] [Wallbox] token updated true [21.2.2023, 17:13:56] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:13:56] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:27:26 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:13:56] [Wallbox] Token has been refreshed [21.2.2023, 17:23:57] [Wallbox] { [21.2.2023, 17:23:57] [Wallbox] token changed true [21.2.2023, 17:23:57] [Wallbox] Current time 21.2.2023, 17:23:57 [21.2.2023, 17:23:57] [Wallbox] Token will expire at 21.2.2023, 17:38:57 [21.2.2023, 17:23:57] [Wallbox] Refresh Token will expire at 20.8.2023, 18:23:57 [21.2.2023, 17:23:57] [Wallbox] token updated true [21.2.2023, 17:23:57] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:23:57] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:37:27 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:23:57] [Wallbox] Token has been refreshed [21.2.2023, 17:27:26] [Wallbox] { [21.2.2023, 17:27:26] [Wallbox] token changed true [21.2.2023, 17:27:26] [Wallbox] Current time 21.2.2023, 17:27:26 [21.2.2023, 17:27:26] [Wallbox] Token will expire at 21.2.2023, 17:42:26 [21.2.2023, 17:27:26] [Wallbox] Refresh Token will expire at 20.8.2023, 18:27:26 [21.2.2023, 17:27:26] [Wallbox] token updated true [21.2.2023, 17:27:26] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:27:26] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:40:56 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:27:26] [Wallbox] Token has been refreshed [21.2.2023, 17:37:27] [Wallbox] { [21.2.2023, 17:37:27] [Wallbox] token changed true [21.2.2023, 17:37:27] [Wallbox] Current time 21.2.2023, 17:37:27 [21.2.2023, 17:37:27] [Wallbox] Token will expire at 21.2.2023, 17:52:27 [21.2.2023, 17:37:27] [Wallbox] Refresh Token will expire at 20.8.2023, 18:37:27 [21.2.2023, 17:37:27] [Wallbox] token updated true [21.2.2023, 17:37:27] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:37:27] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:50:57 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:37:27] [Wallbox] Token has been refreshed [21.2.2023, 17:40:56] [Wallbox] { [21.2.2023, 17:40:56] [Wallbox] token changed true [21.2.2023, 17:40:56] [Wallbox] Current time 21.2.2023, 17:40:56 [21.2.2023, 17:40:56] [Wallbox] Token will expire at 21.2.2023, 17:55:56 [21.2.2023, 17:40:56] [Wallbox] Refresh Token will expire at 20.8.2023, 18:40:56 [21.2.2023, 17:40:56] [Wallbox] token updated true [21.2.2023, 17:40:56] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:40:56] [Wallbox] Token will refresh @ Tue Feb 21 2023 17:54:26 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:40:56] [Wallbox] Token has been refreshed [21.2.2023, 17:50:58] [Wallbox] { [21.2.2023, 17:50:58] [Wallbox] token changed true [21.2.2023, 17:50:58] [Wallbox] Current time 21.2.2023, 17:50:58 [21.2.2023, 17:50:58] [Wallbox] Token will expire at 21.2.2023, 18:05:57 [21.2.2023, 17:50:58] [Wallbox] Refresh Token will expire at 20.8.2023, 18:50:57 [21.2.2023, 17:50:58] [Wallbox] token updated true [21.2.2023, 17:50:58] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:50:58] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:04:28 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:50:58] [Wallbox] Token has been refreshed [21.2.2023, 17:54:27] [Wallbox] { [21.2.2023, 17:54:27] [Wallbox] token changed true [21.2.2023, 17:54:27] [Wallbox] Current time 21.2.2023, 17:54:27 [21.2.2023, 17:54:27] [Wallbox] Token will expire at 21.2.2023, 18:09:27 [21.2.2023, 17:54:27] [Wallbox] Refresh Token will expire at 20.8.2023, 18:54:27 [21.2.2023, 17:54:27] [Wallbox] token updated true [21.2.2023, 17:54:27] [Wallbox] Token ttl=900 seconds [21.2.2023, 17:54:27] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:07:57 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 17:54:27] [Wallbox] Token has been refreshed [21.2.2023, 18:04:28] [Wallbox] { [21.2.2023, 18:04:28] [Wallbox] token changed true [21.2.2023, 18:04:28] [Wallbox] Current time 21.2.2023, 18:04:28 [21.2.2023, 18:04:28] [Wallbox] Token will expire at 21.2.2023, 18:19:28 [21.2.2023, 18:04:28] [Wallbox] Refresh Token will expire at 20.8.2023, 19:04:28 [21.2.2023, 18:04:28] [Wallbox] token updated true [21.2.2023, 18:04:28] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:04:28] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:17:58 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:04:28] [Wallbox] Token has been refreshed [21.2.2023, 18:07:58] [Wallbox] { [21.2.2023, 18:07:58] [Wallbox] token changed true [21.2.2023, 18:07:58] [Wallbox] Current time 21.2.2023, 18:07:58 [21.2.2023, 18:07:58] [Wallbox] Token will expire at 21.2.2023, 18:22:58 [21.2.2023, 18:07:58] [Wallbox] Refresh Token will expire at 20.8.2023, 19:07:58 [21.2.2023, 18:07:58] [Wallbox] token updated true [21.2.2023, 18:07:58] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:07:58] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:21:28 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:07:58] [Wallbox] Token has been refreshed [21.2.2023, 18:17:58] [Wallbox] { [21.2.2023, 18:17:58] [Wallbox] token changed true [21.2.2023, 18:17:58] [Wallbox] Current time 21.2.2023, 18:17:58 [21.2.2023, 18:17:58] [Wallbox] Token will expire at 21.2.2023, 18:32:58 [21.2.2023, 18:17:58] [Wallbox] Refresh Token will expire at 20.8.2023, 19:17:58 [21.2.2023, 18:17:58] [Wallbox] token updated true [21.2.2023, 18:17:58] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:17:58] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:31:28 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:17:58] [Wallbox] Token has been refreshed [21.2.2023, 18:21:29] [Wallbox] { [21.2.2023, 18:21:29] [Wallbox] token changed true [21.2.2023, 18:21:29] [Wallbox] Current time 21.2.2023, 18:21:29 [21.2.2023, 18:21:29] [Wallbox] Token will expire at 21.2.2023, 18:36:29 [21.2.2023, 18:21:29] [Wallbox] Refresh Token will expire at 20.8.2023, 19:21:29 [21.2.2023, 18:21:29] [Wallbox] token updated true [21.2.2023, 18:21:29] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:21:29] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:34:59 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:21:29] [Wallbox] Token has been refreshed [21.2.2023, 18:31:28] [Wallbox] { [21.2.2023, 18:31:28] [Wallbox] token changed true [21.2.2023, 18:31:28] [Wallbox] Current time 21.2.2023, 18:31:28 [21.2.2023, 18:31:28] [Wallbox] Token will expire at 21.2.2023, 18:46:28 [21.2.2023, 18:31:28] [Wallbox] Refresh Token will expire at 20.8.2023, 19:31:28 [21.2.2023, 18:31:28] [Wallbox] token updated true [21.2.2023, 18:31:28] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:31:28] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:44:58 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:31:28] [Wallbox] Token has been refreshed [21.2.2023, 18:34:59] [Wallbox] { [21.2.2023, 18:34:59] [Wallbox] Token has been refreshed [21.2.2023, 18:34:59] [Wallbox] token changed true [21.2.2023, 18:34:59] [Wallbox] Current time 21.2.2023, 18:34:59 [21.2.2023, 18:34:59] [Wallbox] Token will expire at 21.2.2023, 18:49:59 [21.2.2023, 18:34:59] [Wallbox] Refresh Token will expire at 20.8.2023, 19:34:59 [21.2.2023, 18:34:59] [Wallbox] token updated true [21.2.2023, 18:34:59] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:34:59] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:48:29 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:44:59] [Wallbox] { [21.2.2023, 18:44:59] [Wallbox] token changed true [21.2.2023, 18:44:59] [Wallbox] Current time 21.2.2023, 18:44:59 [21.2.2023, 18:44:59] [Wallbox] Token will expire at 21.2.2023, 18:59:59 [21.2.2023, 18:44:59] [Wallbox] Refresh Token will expire at 20.8.2023, 19:44:59 [21.2.2023, 18:44:59] [Wallbox] token updated true [21.2.2023, 18:44:59] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:44:59] [Wallbox] Token will refresh @ Tue Feb 21 2023 18:58:29 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:44:59] [Wallbox] Token has been refreshed [21.2.2023, 18:48:29] [Wallbox] { [21.2.2023, 18:48:29] [Wallbox] token changed true [21.2.2023, 18:48:29] [Wallbox] Current time 21.2.2023, 18:48:29 [21.2.2023, 18:48:29] [Wallbox] Token will expire at 21.2.2023, 19:03:29 [21.2.2023, 18:48:29] [Wallbox] Refresh Token will expire at 20.8.2023, 19:48:29 [21.2.2023, 18:48:29] [Wallbox] token updated true [21.2.2023, 18:48:29] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:48:29] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:01:59 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:48:29] [Wallbox] Token has been refreshed [21.2.2023, 18:58:30] [Wallbox] { [21.2.2023, 18:58:30] [Wallbox] token changed true [21.2.2023, 18:58:30] [Wallbox] Current time 21.2.2023, 18:58:30 [21.2.2023, 18:58:30] [Wallbox] Token will expire at 21.2.2023, 19:13:30 [21.2.2023, 18:58:30] [Wallbox] Refresh Token will expire at 20.8.2023, 19:58:30 [21.2.2023, 18:58:30] [Wallbox] token updated true [21.2.2023, 18:58:30] [Wallbox] Token ttl=900 seconds [21.2.2023, 18:58:30] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:12:00 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 18:58:30] [Wallbox] Token has been refreshed [21.2.2023, 19:01:59] [Wallbox] { [21.2.2023, 19:01:59] [Wallbox] token changed true [21.2.2023, 19:01:59] [Wallbox] Current time 21.2.2023, 19:01:59 [21.2.2023, 19:01:59] [Wallbox] Token will expire at 21.2.2023, 19:16:59 [21.2.2023, 19:01:59] [Wallbox] Refresh Token will expire at 20.8.2023, 20:01:59 [21.2.2023, 19:01:59] [Wallbox] token updated true [21.2.2023, 19:01:59] [Wallbox] Token ttl=900 seconds [21.2.2023, 19:01:59] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:15:29 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 19:01:59] [Wallbox] Token has been refreshed [21.2.2023, 19:12:00] [Wallbox] { [21.2.2023, 19:12:00] [Wallbox] token changed true [21.2.2023, 19:12:00] [Wallbox] Current time 21.2.2023, 19:12:00 [21.2.2023, 19:12:00] [Wallbox] Token will expire at 21.2.2023, 19:27:00 [21.2.2023, 19:12:00] [Wallbox] Refresh Token will expire at 20.8.2023, 20:12:00 [21.2.2023, 19:12:00] [Wallbox] token updated true [21.2.2023, 19:12:00] [Wallbox] Token ttl=900 seconds [21.2.2023, 19:12:00] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:25:30 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 19:12:00] [Wallbox] Token has been refreshed [21.2.2023, 19:15:29] [Wallbox] { [21.2.2023, 19:15:29] [Wallbox] token changed true [21.2.2023, 19:15:29] [Wallbox] Current time 21.2.2023, 19:15:29 [21.2.2023, 19:15:29] [Wallbox] Token will expire at 21.2.2023, 19:30:29 [21.2.2023, 19:15:29] [Wallbox] Refresh Token will expire at 20.8.2023, 20:15:29 [21.2.2023, 19:15:29] [Wallbox] token updated true [21.2.2023, 19:15:29] [Wallbox] Token ttl=900 seconds [21.2.2023, 19:15:29] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:28:59 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 19:15:29] [Wallbox] Token has been refreshed [21.2.2023, 19:25:31] [Wallbox] { [21.2.2023, 19:25:31] [Wallbox] token changed true [21.2.2023, 19:25:31] [Wallbox] Current time 21.2.2023, 19:25:31 [21.2.2023, 19:25:31] [Wallbox] Token will expire at 21.2.2023, 19:40:31 [21.2.2023, 19:25:31] [Wallbox] Refresh Token will expire at 20.8.2023, 20:25:31 [21.2.2023, 19:25:31] [Wallbox] token updated true [21.2.2023, 19:25:31] [Wallbox] Token ttl=900 seconds [21.2.2023, 19:25:31] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:39:01 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 19:25:31] [Wallbox] Token has been refreshed [21.2.2023, 19:29:02] [Wallbox] { [21.2.2023, 19:29:02] [Wallbox] token changed true [21.2.2023, 19:29:02] [Wallbox] Current time 21.2.2023, 19:29:02 [21.2.2023, 19:29:02] [Wallbox] Token will expire at 21.2.2023, 19:44:02 [21.2.2023, 19:29:02] [Wallbox] Refresh Token will expire at 20.8.2023, 20:29:02 [21.2.2023, 19:29:02] [Wallbox] token updated true [21.2.2023, 19:29:02] [Wallbox] Token ttl=900 seconds [21.2.2023, 19:29:02] [Wallbox] Token will refresh @ Tue Feb 21 2023 19:42:32 GMT+0100 (Mitteleuropäische Normalzeit) [21.2.2023, 19:29:02] [Wallbox] Token has been refreshed

tobihoby commented 1 year ago

the update has worked well so far except for here:

[22.2.2023, 04:12:27] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying refresh token, attempt #1 [22.2.2023, 04:12:27] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying refresh token, attempt #2 [22.2.2023, 04:12:29] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying refresh token, attempt #3 [22.2.2023, 04:12:32] [Wallbox] Error refreshing token getaddrinfo ENOTFOUND user-api.wall-box.com [22.2.2023, 04:12:32] [Wallbox] Error refreshing token [22.2.2023, 04:12:32] [Wallbox] Failed to refresh token TypeError: Cannot read properties of undefined (reading 'data') [22.2.2023, 04:15:37] [Wallbox] { [22.2.2023, 04:15:37] [Wallbox] token changed true [22.2.2023, 04:15:37] [Wallbox] Current time 22.2.2023, 04:15:37 [22.2.2023, 04:15:37] [Wallbox] Token will expire at 22.2.2023, 04:30:37 [22.2.2023, 04:15:37] [Wallbox] Refresh Token will expire at 21.8.2023, 05:15:37 [22.2.2023, 04:15:37] [Wallbox] token updated true [22.2.2023, 04:15:37] [Wallbox] Token ttl=900 seconds [22.2.2023, 04:15:37] [Wallbox] Token will refresh @ Wed Feb 22 2023 04:29:07 GMT+0100 (Mitteleuropäische Normalzeit) [22.2.2023, 04:15:37] [Wallbox] Token has been refreshed

valiquette commented 1 year ago

It looks like it recovered from that error. I did not expect this test version to solve the issue, but it has pointed me to the real issue here. I am working on the real fix.

tobihoby commented 1 year ago

thats fine, thank you :)

two more time stamps:

[22.2.2023, 13:02:34] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying refresh token, attempt #1 [22.2.2023, 13:02:34] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying refresh token, attempt #2 [22.2.2023, 13:02:36] [Wallbox] getaddrinfo ENOTFOUND user-api.wall-box.com retrying refresh token, attempt #3 [22.2.2023, 13:02:39] [Wallbox] Error refreshing token getaddrinfo ENOTFOUND user-api.wall-box.com [22.2.2023, 13:02:39] [Wallbox] Error refreshing token [22.2.2023, 13:02:39] [Wallbox] Failed to refresh token TypeError: Cannot read properties of undefined (reading 'data') [22.2.2023, 13:13:44] [Wallbox] Request failed with status code 401 retrying get status, attempt #1 [22.2.2023, 13:13:45] [Wallbox] Request failed with status code 401 retrying get status, attempt #2 [22.2.2023, 13:13:47] [Wallbox] Request failed with status code 401 retrying get status, attempt #3 [22.2.2023, 13:13:50] [Wallbox] Error getting charger status Request failed with status code 401 [22.2.2023, 13:13:50] [Wallbox] { [22.2.2023, 13:13:50] [Wallbox] Current time Wed Feb 22 2023 13:13:50 GMT+0100 (Mitteleuropäische Normalzeit) [22.2.2023, 13:13:50] [Wallbox] Token will expire at Wed Feb 22 2023 13:28:50 GMT+0100 (Mitteleuropäische Normalzeit) [22.2.2023, 13:13:50] [Wallbox] Refresh Token will expire at Mon Aug 21 2023 14:13:50 GMT+0200 (Mitteleuropäische Sommerzeit) [22.2.2023, 13:13:50] [Wallbox] Token ttl=900 seconds [22.2.2023, 13:13:50] [Wallbox] Token will refresh @ Wed Feb 22 2023 13:27:20 GMT+0100 (Mitteleuropäische Normalzeit)

[22.2.2023, 16:16:27] [Wallbox] getaddrinfo ENOTFOUND api.wall-box.com retrying get status, attempt #1 [22.2.2023, 16:16:27] [Wallbox] getaddrinfo ENOTFOUND api.wall-box.com retrying get status, attempt #2 [22.2.2023, 16:16:29] [Wallbox] Error getting charger status getaddrinfo ENOTFOUND api.wall-box.com [22.2.2023, 16:16:29] [Wallbox] Error updating status. [22.2.2023, 16:23:00] [Wallbox] { [22.2.2023, 16:23:00] [Wallbox] token changed true [22.2.2023, 16:23:00] [Wallbox] Current time 22.2.2023, 16:23:00 [22.2.2023, 16:23:00] [Wallbox] Token will expire at 22.2.2023, 16:37:59 [22.2.2023, 16:23:00] [Wallbox] Refresh Token will expire at 21.8.2023, 17:22:59 [22.2.2023, 16:23:00] [Wallbox] token updated true [22.2.2023, 16:23:00] [Wallbox] Token ttl=900 seconds [22.2.2023, 16:23:00] [Wallbox] Token will refresh @ Wed Feb 22 2023 16:36:30 GMT+0100 (Mitteleuropäische Normalzeit) [22.2.2023, 16:23:00] [Wallbox] Token has been refreshed [22.2.2023, 16:29:58] [Wallbox] API calls for this polling period 248

tobihoby commented 1 year ago

maybe you can implement the debug mode as an option in the next version?!

valiquette commented 1 year ago

Posted an update, implemented your suggestion, but there is not much there. I am no longer relying on a scheduled refresh You may still see the ENOTFOUND errors but things should recover, same with the 401.

valiquette commented 1 year ago

Did this past release correct the issue you were seeing?