joeyhage / homebridge-alexa-smarthome

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

Alexa sign-on process not as documented #108

Closed PeterP1908 closed 4 months ago

PeterP1908 commented 4 months ago

Following the guide, setup the proxy details and port as described. Also changed the amazon domain as described (I'm in the UK, so my amazon domain is "amazon.co.uk").

When navigating to the specified address and port, I ended up at a different amazon sign-in page. Rather than being a web page requiring user id and password, it was a page with a QR code which directed me to the Alexa app on my iPhone.

Logs:

[2/6/2024, 3:42:06 PM] [homebridge-alexa-smarthome] Restarting child bridge... [2/6/2024, 3:42:06 PM] Got SIGTERM, shutting down child bridge process... [2/6/2024, 3:42:11 PM] [homebridge-alexa-smarthome] Child bridge process ended [2/6/2024, 3:42:11 PM] [homebridge-alexa-smarthome] Process Ended. Code: 143, Signal: null [2/6/2024, 3:42:18 PM] [homebridge-alexa-smarthome] Restarting Process... [2/6/2024, 3:42:19 PM] [homebridge-alexa-smarthome] Launched child bridge with PID 9771 [2/6/2024, 3:42:19 PM] Registering platform 'homebridge-alexa-smarthome.HomebridgeAlexaSmartHome' [2/6/2024, 3:42:19 PM] [homebridge-alexa-smarthome] Loaded homebridge-alexa-smarthome v2.1.2 child bridge successfully [2/6/2024, 3:42:19 PM] Loaded 0 cached accessories from cachedAccessories.0E48462701A1. [2/6/2024, 3:42:19 PM] Homebridge v1.7.0 (HAP v0.11.1) (homebridge-alexa-smarthome) is running on port 55450. [2/6/2024, 3:42:19 PM] [homebridge-alexa-smarthome] Failed to initialize connection to Alexa. - Please open http://xx.xx.xxx.xxx, xxxxxx.local, xxxxxx:xxxx/ with your browser and login to Amazon. The cookie will be output here after successfull login. [2/6/2024, 3:42:19 PM] [homebridge-alexa-smarthome] After initialization - HttpError(Error getting smart home devices. Reason: Cookie invalid, Renew unsuccessful)

Plugin Config:

{ "devices": [], "auth": { "refreshInterval": 4, "proxy": { "clientHost": "xxx.xx.xxxx.xxxx, xxxxxx.local, xxxxxx", "port": xxxx } }, "amazonDomain": "amazon.co.uk", "language": "en-GB", "performance": { "cacheTTL": 30, "backgroundRefresh": true }, "debug": false, "_bridge": { "username": "xx:xx:xx:xx:xx:xx", "port": xxxxx }, "platform": "HomebridgeAlexaSmartHome" }

Screenshots:

image

Environment:

joeyhage commented 4 months ago

That issue is documented here under the section called Alexa login errors or Failed to initialize connection to Alexa. Please try the step using an incognito window with JavaScript disabled.

joeyhage commented 4 months ago

Why do you have three URL’s in clientHost of your settings? I think that is the biggest issue. You need to only provide one, all lowercase, the same as what you use to visit the homebridge UI.

PeterP1908 commented 4 months ago

Thank you. It was the URLs.