joeyhage/homebridge-alexa-smarthome

Login screen asks for QR code, no option for credentialed login

Closed this issue · 1 comments

Describe The Bug:

When opening the login link, I am greeted by a request to scan a QR code and log in with a mobile device. There is no option to log in normally, and scanning the QR code does not successfully log in or capture the cookie, but opens the download link for Alexa on the App Store/Google Play

To Reproduce:

Set up the plugin, then attempt to log in with local link.

Expected behavior:

A log in screen for Alexa which would allow cookie capture etc

Logs:

[9/13/2024, 11:19:48 AM] [HomebridgeAlexaSmartHome] Failed to initialize connection to Alexa. - Please open http://localhost:7111/ with your browser and login to Amazon. The cookie will be output here after successfull login.
[9/13/2024, 11:19:48 AM] [HomebridgeAlexaSmartHome] After initialization - HttpError(Error getting smart home devices. Reason: Cookie invalid, Renew unsuccessful)

Plugin Config:

{
    "bridge": {
        "name": "Homebridge ....",
        "username": ".....",
        "port": .....,
        "pin": ".....",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "devices": [
                "Echo Dot"
            ],
            "excludeDevices": [],
            "auth": {
                "refreshInterval": 4,
                "proxy": {
                    "clientHost": "localhost",
                    "port": 7111
                }
            },
            "amazonDomain": "amazon.com",
            "language": "en-US",
            "performance": {
                "cacheTTL": 60
            },
            "debug": false,
            "platform": "HomebridgeAlexaSmartHome"
        }
    ]
}

Screenshots:
image
Partial screenshot to not show my hostname etc

Environment:

  • Plugin Version:
  • Homebridge Version: v1.8.4
  • Node.js Version: v20.17.0
  • Operating System: Docker

This was caused by accessing my server via tailscale serve. As noted in the alexa-remote docs, if there is a difference in IP between the IP you set as your local IP and the one you authenticate on, you will be prompted with the QR code. My network doesn't allow for local connections so I had to install a WM on my server and authenticate directly on that machine.