joeyhage / homebridge-alexa-smarthome

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

Alexa devices matched but not added to homebridge #109

Open Femumme opened 4 months ago

Femumme commented 4 months ago

Describe Your Problem:

I want to add some of my alexa devices to my homebridge. So your plugin seems to be a perfect fit - thanks for the great work!

I was able to get the authentication up and running and I can connect the bridge to homekit. When not specifying the devices that I want to fetch from Alexa, I get the following Logs:

[2/7/2024, 2:22:58 PM] [homebridge-alexa-smarthome] Launched child bridge with PID 7739
[2/7/2024, 2:22:58 PM] Registering platform 'homebridge-alexa-smarthome.HomebridgeAlexaSmartHome'
[2/7/2024, 2:22:58 PM] [homebridge-alexa-smarthome] Loaded homebridge-alexa-smarthome v2.1.2 child bridge successfully
[2/7/2024, 2:22:58 PM] Loaded 0 cached accessories from cachedAccessories.0E1D23131D25.
[2/7/2024, 2:22:58 PM] Homebridge v1.7.0 (HAP v0.11.1) (homebridge-alexa-smarthome) is running on port 49934.
[2/7/2024, 2:23:00 PM] [homebridge-alexa-smarthome] 0 devices provided in settings but 48 matching Alexa smart home devices were discovered.

That indicates that the bridge was able to find matching devices. But those devices never show up in the homebridge devices list.

When i specify some of the devices that I want to add, I get the following logs:

[2/7/2024, 2:25:53 PM] [homebridge-alexa-smarthome] Launched child bridge with PID 7768
[2/7/2024, 2:25:53 PM] Registering platform 'homebridge-alexa-smarthome.HomebridgeAlexaSmartHome'
[2/7/2024, 2:25:53 PM] [homebridge-alexa-smarthome] Loaded homebridge-alexa-smarthome v2.1.2 child bridge successfully
[2/7/2024, 2:25:53 PM] Loaded 0 cached accessories from cachedAccessories.0E1D23131D25.
[2/7/2024, 2:25:53 PM] Homebridge v1.7.0 (HAP v0.11.1) (homebridge-alexa-smarthome) is running on port 49934.

But still no device is added. Am I doing something wrong?

Plugin Config:

{
    "devices": [],
    "auth": {
        "refreshInterval": 4,
        "proxy": {
            "clientHost": "alexa.homebridge.nas.mumme-it.de",
            "port": 9000
        }
    },
    "amazonDomain": "amazon.de",
    "language": "en-US",
    "performance": {
        "cacheTTL": 30,
        "backgroundRefresh": false
    },
    "debug": false,
    "_bridge": {
        "username": "0E:1D:23:13:1D:25",
        "port": 49934
    },
    "platform": "HomebridgeAlexaSmartHome"
}

Environment:

joeyhage commented 4 months ago

@Femumme can you please edit the settings you shared and change debug from false to true, restart the child bridge, and look at the logs? That will provide more details.

Femumme commented 4 months ago

Sure, here are the logs with debug enabled:

[2/7/2024, 3:29:18 PM] [homebridge-alexa-smarthome] Launched child bridge with PID 4067
[2/7/2024, 3:29:18 PM] [homebridge-alexa-smarthome] Loaded homebridge-alexa-smarthome v2.1.2 child bridge successfully
[2/7/2024, 3:29:18 PM] Loaded 0 cached accessories from cachedAccessories.0E1D23131D25.
[2/7/2024, 3:29:18 PM] [homebridge-alexa-smarthome] Alexa-Remote: cookie was provided
[2/7/2024, 3:29:18 PM] Homebridge v1.7.0 (HAP v0.11.1) (homebridge-alexa-smarthome) is running on port 49934.
[2/7/2024, 3:29:18 PM] Registering platform '@tritter/homebridge-shelly.Shelly'
[2/7/2024, 3:29:18 PM] [homebridge-alexa-smarthome] Alexa-Remote: Authentication checked: true
[2/7/2024, 3:29:18 PM] [homebridge-alexa-smarthome] Alexa-Remote: Change Base URL for API calls to eu-api-alexa.amazon.de
[2/7/2024, 3:29:20 PM] [homebridge-alexa-smarthome] Successfully authenticated Alexa account.
[2/7/2024, 3:29:21 PM] [homebridge-alexa-smarthome] Found 48 devices connected to the current Alexa account.
[2/7/2024, 3:29:21 PM] [homebridge-alexa-smarthome] BEGIN devices connected to Alexa account
 [
  {
    "displayName": "Sea Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Büro Glides",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Couch",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Nachttischlampe",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Blaze Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Wohnzimmer",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Fernseher Wohnzimmer",
    "deviceType": "TV"
  },
  {
    "displayName": "Prism Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Echo Wohnzimmer",
    "deviceType": "ALEXA_VOICE_ENABLED"
  },
  {
    "displayName": "00176573 3",
    "deviceType": "SMARTPLUG"
  },
  {
    "displayName": "Lightscape Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Pop Rocks Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Ambiente Couch",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Schlafzimmer",
    "deviceType": "ALEXA_VOICE_ENABLED"
  },
  {
    "displayName": "Büro Caya",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Echo Schlafzimmer",
    "deviceType": "ALEXA_VOICE_ENABLED"
  },
  {
    "displayName": "Morning Sky Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Ambiente Felix",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Cotton Candy Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Echo Büro",
    "deviceType": "ALEXA_VOICE_ENABLED"
  },
  {
    "displayName": "Roomba",
    "deviceType": "VACUUM_CLEANER"
  },
  {
    "displayName": "Date Night Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Starlight Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Küche",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Deckenleuchte",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Waterfall Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Hip Hop Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Northern Lights Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Alex",
    "deviceType": "VACUUM_CLEANER"
  },
  {
    "displayName": "Ocean Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Sundown Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Ambientelicht",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Schlafzimmer-TV",
    "deviceType": "TV"
  },
  {
    "displayName": "Lights",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Deckenleuchte",
    "deviceType": "LIGHT"
  },
  {
    "displayName": "Cocoa Beach Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Beatdrop Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Hot Sauce Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Echo Backup",
    "deviceType": "ALEXA_VOICE_ENABLED"
  },
  {
    "displayName": "Jungle Home",
    "deviceType": "ACTIVITY_TRIGGER"
  },
  {
    "displayName": "Esstisch",
    "deviceType": "LIGHT"
  }
]
END devices connected to Alexa account
[2/7/2024, 3:29:21 PM] [homebridge-alexa-smarthome] 0 devices provided in settings but 48 matching Alexa smart home devices were discovered.
[2/7/2024, 3:29:21 PM] [homebridge-alexa-smarthome] Updating device states
[2/7/2024, 3:29:21 PM] [homebridge-alexa-smarthome] Alexa-Remote: rate exceeded response ... Retrying once in 49682ms
[2/7/2024, 3:29:21 PM] [homebridge-alexa-smarthome] Alexa-Remote: rate exceeded response ... Retrying once in 35924ms

Edit: After a few minutes, this error popped up:

[2/7/2024, 3:30:10 PM] [homebridge-alexa-smarthome] BEGIN capabilities for all devices: {
  "message": "Too many requests. Try again in some time."
} END capabilities for all devices
[2/7/2024, 3:30:10 PM] [homebridge-alexa-smarthome] After initialization - RequestUnsuccessful(Error getting smart home device state(s). Response: {
  "message": "Too many requests. Try again in some time."
})
MaxCodeDE commented 4 months ago

I have the same Problem since yesterday i restarted my HomeBridge

MaxCodeDE commented 4 months ago

I read in an iobroker Forum with the Same Error Message that Problem is because Amazon have made chances with the "Rate Limkits". I dont know what this is but i hope it helps!

joeyhage commented 4 months ago

@MaxCodeDE can you please share a link to the iobroker forum?

MaxCodeDE commented 4 months ago

@joeyhage here I read this: https://forum.iobroker.net/topic/59384/fix-available-alexa-per-alexa2-totalausfall/11

It is in German but maybe it helps with translation

Mk4102 commented 3 months ago

Has the problem been fixed? Or is there a workaround?

I have exactly the same error message

mbpetrillo commented 1 month ago

I everyone, I just started seeing this error as well. I'm not able to control my devices through home app.

Was there a fix for this that helped anyone?