clemlatz / homebridge-tiko

Homebridge plugin to integrate Tiko / Mon Pilotage Elec devices into HomeKit
Apache License 2.0
0 stars 0 forks source link

Timeout when home bridge refreshes data #4

Closed j-maillard closed 3 months ago

j-maillard commented 7 months ago

Describe The Bug: hello, I've never been able to get the plugin to work properly. After configuration, the data is refreshed correctly. But afterwards, I get timeouts on API calls for refreshing . Any ideas?

To Reproduce: Issue occurred everytime

Expected behavior:

Logs: Exemple

[4/1/2024, 7:44:54 AM] [Tiko] An error occurred while trying to get currentTemperatureDegrees: Timeout of 2500 ms exceeded

Plugin Config:

{
    "name": "Tiko",
    "login": "juXXXXXX",
    "password": "XXXXXXX",
    "endpoint": "https://portal-engie.tiko.ch/api/v3/graphql/",
    "platform": "Tiko"
}

Screenshots:

Environment:

clemlatz commented 7 months ago

Hi @j-maillard and thank you for sharing your issue.

This is caused by the Tiko server taking too long to respond so I'm not sure there's much we can do about it.

Have your tried to increase the timeout config option ? It controls how much time HomeBridge waits for a response before throwing an error. The default value is 1000 (1 second, which is quite low — I might change that) but you can try to increase it until the message disappears.

j-maillard commented 7 months ago

Hello Clement, thanks for the reply. I've already increase the timeout to 2500 ms. Do you think it could be a good option to put it higher ? I may have another idea. I'm thinking it could be a problem with the SSL handshake of my Synology server What do you think about it ? Best regards .

clemlatz commented 7 months ago

I'm not sure if this can be related to an SSL handshake issue. But I guess that would affect any http call ? Do you have other timeout problem with other applications ?

All I can say is that I sometimes encounters timeout errors with my Raspberry Pi installation, and that increasing the timeout config option has made the error disappear (it is currently set to 8000 ms).

j-maillard commented 7 months ago

Hi clement, I tried to use the plugin with a 8000 ms timeout but it still doesn't work . Can you explain me how can I do to have more detailed log please ? Thanks ,

clemlatz commented 7 months ago

You can enable logs using homebridge debug mode:

DEBUG=* homebridge -D