Alexa Smart Home account linking

I also am trying to set this up and can confirm what Petro said, you have to now select “add trigger” before making the selection in the drop down list. However, in my case I do not see “Alexa Smart Home” in the list. I only see “Alexa Skills Kit”. I selected that one and got all the way through testing the lambda function but when I try to paste the arn for the lambda back in the Alexa Developer console it does not accept it. I get the “is not valid for any of the supported regions” message but it is set up in us-east. Not really sure where to go from here.

Nevermind, I got it to work. I missed the step where it says you have to select “N. Virginia” in the upper right. I set my lambda function up in Ohio. Once I re-created it in N. Virginia the “Alexa Smart Home” option showed up in the trigger list. Completed the steps, discovered devices, all working perfectly now!

Has anyone figured out how to allow two Alexa accounts to access Home Assistant? I’ve created my custom SmartHome skill, and I’ve got everything working as expected. If I tell Alexa to turn on the kitchen lights, or lock the front door, etc… She does it. But… If the Echo device I’m taking to, happens to be logged in with my wife’s account, Alexa doesn’t know what to do, as the skill doesn’t exist in her account.

There is definitely something broken with this and I am not skilled enough to track bug properly, and kinda sorry I can’t help with proper bug report. Integration does not seems to work for Europe as described in documentation for me, I rechecked it 5-6 times. I was fighting with changing various options in all combinations on Amazon side and locally including full reinstall on different test hardware setup but only managed to get it working when I ignored fact that I live in EU and setup everything like I am in USA.

So the combination of:

EU (Ireland)
https://layla.amazon.com/

Did not work?

Did you try other EU servers instead of EU(Ireland)?

What was not working?

I didn’t try other servers in EU as documentation says:

IMPORTANT Your current region will be displayed on the top right corner, make sure you select right region base on your Amazon account’s country:

  • US East (N.Virginia) region for English (US) or English (CA) skills
  • EU (Ireland) region for English (UK), English (IN), German (DE), Spanish (ES) or French (FR) skills
  • US West (Oregon) region for Japanese and English (AU) skills.

but when I tried N.Virginia it started working properly.

Guess it introduced lag connecting cross ocean now but it work.
If I can help testing any option combination let me know.

Must be something trivial I am missing if it work for others. I should leave it for now and try another day clear-headed.

Its possible that the skill is not allowed for use in EU. Either way, the issue is on amazons side, not home assistant. If the skill doesn’t appear when you select EU (Ireland), then the problem is with them. They could have switched the server to another area in EU. If you cycle through them and find that it’s available under another EU region, then write up an issue with home assistants docs.

I have the same Problem with you. Has anyone from EU managed to get it working?

HI @vanclec I gave your idea a tried but still doesnt find any device is yours still working?

I am trying to do a custom Alexa skill and am stuck. Have something else using port 443 and do not really feel like going thru the pain it would take to change it. I saw this:

The account linking section. Is there something to this that we can use another service to get our linkages working?

Thanks.

JR

Account linking is for linking accounts with Home assistant. With Alexa, you’re linking home assistant with Alexa. This would be needed on Alexa side.

Thanks Petro. Yeah I’ve confirmed if I was to turn off what I have on port 443 now and switch HA to it, that it links but not something I can do. Guess for me I’ll have to go back to haaska if I get around to redoing Alexa integration. Not sure why that works but the newer alexa smart home integration doesn’t.

JR

That’s odd, it’s practically the same Aside from authentication

Not really as I wake up and remember things. Since it’s the oauth 2 that Amazon requires 443 on, and haaska uses basic authentication which is supposed to go away, whenever that is, that’s probably why it works.

I also have a problem with account linking. I am form europe.

When I use client id:
https://layla.amazon.com/

I get error: invalid client id or redirect uri.
HA log error: Login attempt or request with invalid authentication from IP.

When I use client id:
https://pitangui.amazon.com/

I can put in my user and pass and after that I get screen:
We were unable to link myskill at this time.
No error in HA log.

Any idea?

Same problem here @lpt2007 . Did you find a solution?

Yes. I am using alexa trough node-red and is working great.

I am using this two nodes:
node-red-contrib-alexa-remote2
node-red-contrib-alexa-smart-home

Here is example how I turn on and off printer:

[
    {
        "id": "1b1ea32f.7093ad",
        "type": "switch",
        "z": "6b4f6863.5a1a78",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ON",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "OFF",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 230,
        "y": 60,
        "wires": [
            [
                "9b3a6dec.3240c"
            ],
            [
                "887ba9e.b13d658"
            ]
        ]
    },
    {
        "id": "b3bdf1c6.b0e62",
        "type": "api-call-service",
        "z": "6b4f6863.5a1a78",
        "name": "printer on",
        "server": "db45197b.698f08",
        "version": 1,
        "debugenabled": false,
        "service_domain": "switch",
        "service": "turn_on",
        "entityId": "switch.0220014568c63aa16b60_2",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 540,
        "y": 80,
        "wires": [
            []
        ]
    },
    {
        "id": "dd6116eb.a6bfd8",
        "type": "api-call-service",
        "z": "6b4f6863.5a1a78",
        "name": "printer off",
        "server": "db45197b.698f08",
        "version": 1,
        "debugenabled": false,
        "service_domain": "switch",
        "service": "turn_off",
        "entityId": "switch.0220014568c63aa16b60_2",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 540,
        "y": 140,
        "wires": [
            []
        ]
    },
    {
        "id": "9b3a6dec.3240c",
        "type": "api-current-state",
        "z": "6b4f6863.5a1a78",
        "name": "is printer on",
        "server": "db45197b.698f08",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.0220014568c63aa16b60_2",
        "state_type": "str",
        "state_location": "",
        "override_payload": "none",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 390,
        "y": 60,
        "wires": [
            [
                "b8ac5c56.6ad99"
            ],
            [
                "b3bdf1c6.b0e62"
            ]
        ]
    },
    {
        "id": "887ba9e.b13d658",
        "type": "api-current-state",
        "z": "6b4f6863.5a1a78",
        "name": "is printer on",
        "server": "db45197b.698f08",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.0220014568c63aa16b60_2",
        "state_type": "str",
        "state_location": "",
        "override_payload": "none",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 390,
        "y": 120,
        "wires": [
            [
                "dd6116eb.a6bfd8"
            ],
            [
                "35aea90b.d48146"
            ]
        ]
    },
    {
        "id": "b8ac5c56.6ad99",
        "type": "alexa-remote-routine",
        "z": "6b4f6863.5a1a78",
        "name": "speak is on",
        "account": "c7ca149e.605768",
        "routineNode": {
            "type": "speakAtVolume",
            "payload": {
                "type": "regular",
                "text": {
                    "type": "str",
                    "value": "Printer is already on."
                },
                "volume": {
                    "type": "num",
                    "value": "50"
                },
                "mode": "set",
                "devices": [
                    "G0911B059353025X"
                ]
            }
        },
        "x": 550,
        "y": 40,
        "wires": [
            []
        ]
    },
    {
        "id": "35aea90b.d48146",
        "type": "alexa-remote-routine",
        "z": "6b4f6863.5a1a78",
        "name": "speak is off",
        "account": "c7ca149e.605768",
        "routineNode": {
            "type": "speakAtVolume",
            "payload": {
                "type": "regular",
                "text": {
                    "type": "str",
                    "value": "Printer is already off."
                },
                "volume": {
                    "type": "num",
                    "value": "50"
                },
                "mode": "set",
                "devices": [
                    "G0911B059353025X"
                ]
            }
        },
        "x": 550,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "55ac07b2.07bcb8",
        "type": "alexa-smart-home-v3",
        "z": "6b4f6863.5a1a78",
        "conf": "4b9128a2.624868",
        "device": "8101",
        "acknowledge": true,
        "name": "printer",
        "topic": "",
        "x": 50,
        "y": 60,
        "wires": [
            [
                "1b1ea32f.7093ad"
            ]
        ]
    },
    {
        "id": "4fdd9660.6e3448",
        "type": "comment",
        "z": "6b4f6863.5a1a78",
        "name": "ALEXA - BEDROOM - PRINTER",
        "info": "",
        "x": 130,
        "y": 20,
        "wires": []
    },
    {
        "id": "db45197b.698f08",
        "type": "server",
        "z": "",
        "name": "hassos-vir",
        "legacy": false,
        "addon": false,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true
    },
    {
        "id": "c7ca149e.605768",
        "type": "alexa-remote-account",
        "z": "",
        "name": "",
        "authMethod": "proxy",
        "proxyOwnIp": "192.168.20.199",
        "proxyPort": "6677",
        "cookieFile": "alexa",
        "refreshInterval": "3",
        "alexaServiceHost": "pitangui.amazon.com",
        "amazonPage": "amazon.com",
        "acceptLanguage": "en-US",
        "userAgent": "",
        "useWsMqtt": "on",
        "autoInit": "on"
    },
    {
        "id": "4b9128a2.624868",
        "type": "alexa-smart-home-v3-conf",
        "z": "",
        "username": "user",
        "mqttserver": "mq-red.cb-net.co.uk",
        "webapiurl": "red.cb-net.co.uk"
    }
]

Hi @PedroLamas, do you know if it is possible to use port 443 only during linking and then revert to the non-standard port?

Can’t really say @asp, I’m using nginx for 443 and that then takes care of reverse-proxing the requests to home assistant and others based on the requesting domain!

Thanks for replying @PedroLamas :slight_smile:

For those who might be interested, in the meanwhile I made some tests…

  1. I linked Alexa to HA using https://my-ha-address.com:443 as Authorization URI, Token URI and BASE_URL in Lambda function.
  2. After I linked Alexa and check that everything was working I changed the BASE_URL to https://my-ha-address.com:1234 where 1234 is my custom port and closed 443 port in my router, but I didn’t change Authorization URI and Token URI.

Everything seems working fine so far (I do not completely understand why… :sweat_smile:)

UPDATE: Everything stopped working. Makes sense. I don’t know why it worked for a while…