icanos / hassio-plejd

Hass.io add-on for Plejd home automation devices
Apache License 2.0
126 stars 37 forks source link

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

Closed jonbe242 closed 11 months ago

jonbe242 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

SweVictor commented 1 year ago

We would need someone to explore the new Plejd API if the old one is gone. And document it.

Presumably the gateway uses it if you have one.

On Fri, Mar 3, 2023, 19:08 Jonas Jinbäck @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/icanos/hassio-plejd/issues/264#issuecomment-1453906242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADNWQ7BVPHBHA3EKY37PVDW2IXP5ANCNFSM6AAAAAAUC4GUPI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Emlben commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

If anyone continues to have problems, please

SweVictor commented 11 months ago

Closing due to inactivity