apetrycki / daikinskyport

API for accessing a DaikinOne+ Thermostat
59 stars 26 forks source link

Error connecting to Daikin Skyport while attempting to get thermostat data. Refreshing tokens and trying again. #65

Closed daswass closed 9 months ago

daswass commented 11 months ago

Hey - Ive been messing with this for about 3 days and haven't been able to get it working. I ran through all the requests using Postman and and not having any issue querying the devices, but when using this integration, after turning on debug logging, I just keep getting the error in the title. Any thoughts?

daswass commented 11 months ago

I removed the Host header in Postman and got a 400 response when querying https://api.daikinskyport.com/devices. Is it possible that the request made by the python in this add on is missing the Host header?

daswass commented 11 months ago

Got it! It seemed one of my three thermostats was disconnected from the network. It happened to be the first in the list. Theres a specific error code returned by the API for this. I would suggest handling this error code and moving on rather than assuming the tokens are no good.

apetrycki commented 11 months ago

Can you post the response and I'll take a look?

daswass commented 11 months ago

{"message":"DeviceOfflineException"} with 400 code.

apetrycki commented 11 months ago

And you receive that message when you probe the device (curl --location --request GET "https://api.daikinskyport.com/deviceData/") or when you get the list of devices (curl --location --request GET "https://api.daikinskyport.com/devices")?

daswass commented 11 months ago

When probing the device. It seems like the list of devices comes back with all 3 devices, and then querying the first device returns the error.

daswass commented 9 months ago

Hey, @apetrycki any updates pending?

apetrycki commented 9 months ago

I'm in the middle of a major rewrite. I'm trying to knock out the major issues first, then I'll get to stuff like this. I'm working in the ui_config branch for now.

daswass commented 9 months ago

Got it! Looking forward to the rewrite. I've posted a small PR in the meantime: https://github.com/apetrycki/daikinskyport/pull/69

On Sat, Sep 16, 2023 at 8:48 AM apetrycki @.***> wrote:

I'm in the middle of a major rewrite. I'm trying to knock out the major issues first, then I'll get to stuff like this. I'm working in the ui_config branch for now.

— Reply to this email directly, view it on GitHub https://github.com/apetrycki/daikinskyport/issues/65#issuecomment-1722223342, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVGNHRUH4YX5EVPL7KMFXDX2WN2DANCNFSM6AAAAAA3FMBUOE . You are receiving this because you modified the open/close state.Message ID: @.***>

apetrycki commented 9 months ago

Should work in the new version as I merged in your PR. I haven't taken my thermostat offline to test it.