joeyhage / homebridge-alexa-smarthome

Connect Alexa devices to HomeKit
MIT License
64 stars 20 forks source link

Getting `HttpError(Error getting smart home device state. Reason: Timeout)` #19

Closed NiceAesth closed 10 months ago

NiceAesth commented 10 months ago

Describe Your Problem:

The plugin worked at first but it no longer adding devices to homebridge. I have tried removing the plugin and adding it again and deleting the persist/ folder.

Specifying the names of the devices manually does add them though.

Logs:

[9/1/2023, 3:14:24 AM] [homebridge-alexa-smarthome] Restarting child bridge...
[9/1/2023, 3:14:24 AM] Got SIGTERM, shutting down child bridge process...
[9/1/2023, 3:14:28 AM] [Homebridge UI] Starting terminal session
[9/1/2023, 3:14:29 AM] [homebridge-alexa-smarthome] Child bridge process ended
[9/1/2023, 3:14:29 AM] [homebridge-alexa-smarthome] Process Ended. Code: 143, Signal: null
[9/1/2023, 3:14:36 AM] [homebridge-alexa-smarthome] Restarting Process...
[9/1/2023, 3:14:37 AM] [homebridge-alexa-smarthome] Launched child bridge with PID 9131
[9/1/2023, 3:14:37 AM] Registering platform 'homebridge-alexa-smarthome.HomebridgeAlexaSmartHome'
[9/1/2023, 3:14:37 AM] [homebridge-alexa-smarthome] Loaded homebridge-alexa-smarthome v0.1.0 child bridge successfully
[9/1/2023, 3:14:37 AM] Loaded 0 cached accessories from cachedAccessories.IDHERE.
[9/1/2023, 3:14:37 AM] Homebridge v1.6.1 (HAP v0.11.1) (homebridge-alexa-smarthome) is running on port 48617.
[9/1/2023, 3:14:46 AM] [Homebridge UI] Terminal session ended.
[9/1/2023, 3:14:50 AM] [Homebridge UI] Starting terminal session
[9/1/2023, 3:14:55 AM] [homebridge-alexa-smarthome] After initialization - HttpError(Error getting smart home device state. Reason: Timeout)

Plugin Config:

        {
            "auth": {
                "refreshInterval": 4,
                "proxy": {
                    "clientHost": "192.168.1.138",
                    "port": 8000
                }
            },
            "devices": [],
            "amazonDomain": "amazon.com",
            "language": "en-US",
            "debug": false,
            "platform": "HomebridgeAlexaSmartHome",
            "_bridge": {
                "username": "",
                "port": 48617
            }
        }

Environment:

NiceAesth commented 10 months ago

As a sidenote, this is a very cool idea and I appreciate the project! 😄

joeyhage commented 10 months ago

Hmm, do you have other Homebridge plugins that are still working?

How many devices do you have linked to your Alexa account? I have 31 but it’s possible things are slower if you have say 100 devices.

If you don’t have that many devices, this seems like an internet speed/connection issue.

joeyhage commented 10 months ago

One thing you could try is explicitly providing the list of device names you want to connect in the plugin config.

NiceAesth commented 10 months ago

Hmm, do you have other Homebridge plugins that are still working?

Yep, other plugins still work

How many devices do you have linked to your Alexa account? I have 31 but it’s possible things are slower if you have say 100 devices.

Only 24, so that shouldn't be an issue.

If you don’t have that many devices, this seems like an internet speed/connection issue.

Unlikely as I am running on a gigabit connection. Maybe local IP of something got changed, set all of them to be static either way to be sure.

It does work now after specifying device names manually, so thankfully it is resolved.

ie-junky commented 9 months ago

I have this issue too, I tried to add devices manually but still got the same error/timeout.

joeyhage commented 9 months ago

Hi @ie-junky, can you try enabling background refresh in the plugin settings and setting the cache lifetime to 300? (5 minutes). Start with that and if it works well, you can always lower it if you notice that devices are showing old information. Shouldn’t be a problem though