Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve session token response: Request failed with status code 404 #264

Closed
jonbe242 opened this issue Jan 22, 2023 · 7 comments

Comments

@jonbe242
Copy link

Seems like Plejd have changed their API.

2023-01-22 10:18:56 ERR [plejd-api] Unable to retrieve session token response: Request failed with status code 404 Error: Request failed with status code 404 at createError (/plejd/node_modules/axios/lib/core/createError.js:16:15) at settle (/plejd/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/plejd/node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1241:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

The add-on fallbacks to cached data so this is no major issue right now.

@Jakewelsh91
Copy link

Having the similar issue, did you manage to find a fix?

'''
[plejd-api] Unable to retrieve session token response: Request failed with status code 404
Error: Request failed with status code 404
'''

@ZynThaX
Copy link

ZynThaX commented Mar 3, 2023

Having the same issue when setting up a new HA.
Any way I could help with the troubleshooting?

@SweVictor
Copy link
Collaborator

SweVictor commented Mar 4, 2023 via email

@Emlben
Copy link

Emlben commented Aug 11, 2023

Hi, fresh user trying to set p this addon today after been using klalis for years but now moving to HAOS with addons.
I get stuck on this issue today.
Unfortuntely I can not assist on this but I would just like to ask:
Should I hope for this to be solved?
Is there any workaround by manually fetching units and token from my old klali-install and edit some file?

Thank you to everyone who has contributed to this!

@SweVictor
Copy link
Collaborator

Hi,
I just debugged the startup - everything seems to work on my end. Relevant logs from a recent startup

2023-08-14 14:20:25 VRB [plejd-main] Log level set to verbose
Starting Plejd addon and reading configuration...
2023-08-14 14:20:25 VRB [plejd-main] Log level set to verbose
2023-08-14 14:20:25 INF [plejd-main] Plejd add-on, version 0.9.1
2023-08-14 14:20:25 VRB [plejd-main] Addon info: {"name":"Plejd","version":"0.9.1","slug":"plejd","description":"Adds support for the Swedish home automation devices from Plejd.","url":"https://github.com/icanos/hassio-plejd/","arch":["armhf","armv7","aarch64","amd64","i386"],"startup":"application","boot":"auto","host_network":true,"host_dbus":true,"apparmor":false}
2023-08-14 14:20:25 INF [device-comm] Starting Plejd communication handler.
2023-08-14 14:20:25 INF [plejd-ble] Starting Plejd BLE Handler, resetting all device states.
2023-08-14 14:20:25 INF [plejd-main] Main Plejd addon init()...
2023-08-14 14:20:25 INF [plejd-api] init()
2023-08-14 14:20:25 INF [plejd-api] Getting cached api response from disk
2023-08-14 14:20:25 DBG [plejd-api] Prefer cache? false
2023-08-14 14:20:25 DBG [plejd-api] Cache exists? Yes, created 2023-08-14T12:20:11.980Z
2023-08-14 14:20:25 INF [plejd-api] login()
2023-08-14 14:20:25 INF [plejd-api] logging into [site]
2023-08-14 14:20:25 DBG [plejd-api] sending POST to https://cloud.plejd.com/parse/login
2023-08-14 14:20:25 INF [plejd-api] got session token response
2023-08-14 14:20:25 INF [plejd-api] Get all Plejd sites for account...
2023-08-14 14:20:25 DBG [plejd-api] sending POST to https://cloud.plejd.com/parse/functions/getSiteList
2023-08-14 14:20:26 INF [plejd-api] Got site list response with 2: [site 1], [site 2]
2023-08-14 14:20:26 INF [plejd-api] Site found matching configuration name [site 1]
2023-08-14 14:20:26 INF [plejd-api] Get site details for UUID...
2023-08-14 14:20:26 DBG [plejd-api] sending POST to https://cloud.plejd.com/parse/functions/getSiteById
...

Is anyone still having problems? Otherwise I suggest closing this. Note in the middle "got session token response".

I know we've seen issues in the past with the Plejd API being inaccessible for a day or two and then being up again.

@SweVictor
Copy link
Collaborator

If anyone continues to have problems, please

  • Follow the troubleshooting instructions in README
  • Make sure you can reach the URL for the session token request (login - shown in the log)

@SweVictor
Copy link
Collaborator

Closing due to inactivity

@SweVictor SweVictor closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants