ugumba / homey-panasonic-comfort-cloud-alt

GNU General Public License v3.0
14 stars 4 forks source link

Request failed - Status 400 #17

Closed Homey4Osty closed 2 months ago

Homey4Osty commented 2 months ago

Hello, i don't have an access to the panasonic confort cloud with this app at the moment. I got this informations at the log file:

2024-06-26T11:25:54.563Z [err] [ManagerDrivers] [Driver:aircon] [Device:368553a9-1246-4c89-91bd-1cc4cb84fce2] getDevice failed: ServiceError: Request failed with status code 400 at new ServiceError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/model/ServiceError.js:23:28) at ComfortCloudClient.handleError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:184:15) at ComfortCloudClient. (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:171:30) at step (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:33:23) at Object.throw (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:14:53) at rejected (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:6:65) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { _code: undefined, _httpCode: 400 } unhandledRejection: ServiceError: Request failed with status code 400

Credentials are correkt ...

Can you fix it, please?

Thanks a lot. Osty

jarll commented 2 months ago

There is already work in progress. See https://community.homey.app/t/app-pro-panasonic-comfort-cloud-alternative/75906

ugumba commented 2 months ago

Thanks for reporting, @Homey4Osty - this affects all users.

Panasonic has changed their authentication flow.
This app relies on a JS package which handles this, you can follow the related issue here: https://github.com/marc2016/panasonic-comfort-cloud-client/issues/14

Cannonb4ll commented 2 months ago

Version 2.0.0 was released, that should solve it: https://www.npmjs.com/package/panasonic-comfort-cloud-client

ugumba commented 2 months ago

I've pushed 1.1.5 to develop to consume the new pcc-client package.
The token management/refreshing is now handled internally, so my own code could be simplified considerably.

I'm not on my home network, so have not been able to test at all! Will probably be able to test tonight - adventurous souls are welcome to beat me to it. :smile:

Homey4Osty commented 2 months ago

Thanks for develop package ... but: image

I`m not able to install it... There's a timeout... What can i do?

ugumba commented 2 months ago

I think something similar happened the last time I installed (a couple of weeks back) - at least I got an error.
Retrying worked fine for me. I'll try 1.1.5 myself later this evening.

ugumba commented 2 months ago

Seems Panasonic bumped the API version from 1.20.1 to 1.21.0 - I've pushed an update to develop again.

Cannonb4ll commented 2 months ago

Seems to work again!

Homey4Osty commented 2 months ago

I think something similar happened the last time I installed (a couple of weeks back) - at least I got an error.
Retrying worked fine for me. I'll try 1.1.5 myself later this evening.

After the action 'npm audit fix' the installation was successful.

ugumba commented 2 months ago

Fix pushed to master