Just went through the Alexa Smart Home setup and got stuck a "discover Devices"

Please let me know if anything shouldnt be showing…

Yeah, that’s not right. You should see a response from home assistant. Seems like you may have missed a step.

What code did you paste into your lambda_function?

Are you in the US or elsewhere? Myself and others have tried to set this up but it wouldn’t work as we were in Europe. Been posted on here a few times but devs didn’t seem bothered.

Don’t know if it was ever fixed but I went back to Haaska which still works perfectly.

Okay Petro, you totally figured it out there. When I pasted in the code, I didnt click save and I thought I had done that correctly but it was still the original code.

I repasted lambda_function and its correctly receiving devices now. Time to try alexa skill. Thank you!

Okay, corrected.

Still not discovering devices. Here is the optput:

{
  "event": {
    "header": {
      "messageId": "4e6da379-745a-443d-b5d8-1288dc8d21f5",
      "name": "Discover.Response",
      "namespace": "Alexa.Discovery",
      "payloadVersion": "3"
    },
    "payload": {
      "endpoints": [
        {
          "capabilities": [
            {
              "interface": "Alexa.TemperatureSensor",
              "properties": {
                "proactivelyReported": true,
                "retrievable": true,
                "supported": [
                  {
                    "name": "temperature"
                  }
                ]
              },
            
ETC ETC ETC ETC ETC (removed for sanity)
        }
      ]
    }
  }
}

And the log output:

START RequestId: be7318e8-6fa2-4fb8-acfa-d917d26d979a Version: $LATEST
[DEBUG]	2020-04-27T16:56:14.273Z	be7318e8-6fa2-4fb8-acfa-d917d26d979a	Event: {'directive': {'header': {'namespace': 'Alexa.Discovery', 'name': 'Discover', 'payloadVersion': '3', 'messageId': '1bd5d003-31b9-476f-ad03-71d471922820'}, 'payload': {'scope': {'type': 'BearerToken'}}}}

/var/runtime/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'XXXXXXXX.duckdns.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
END RequestId: be7318e8-6fa2-4fb8-acfa-d917d26d979a
REPORT RequestId: be7318e8-6fa2-4fb8-acfa-d917d26d979a	Duration: 382.15 ms	Billed Duration: 400 ms	Memory Size: 128 MB	Max Memory Used: 51 MB	Init Duration: 151.32 ms

It’s seeing devices. That first endpoint is one. So it should be working now.

BUUUUUUUUT

If you have media_players, they may make the discovery fail. So remove them from configuration. Here’s what my configuration looks like and you can use it as a guide.

Basically list out what you want to send to alexa in include_entities. Then give them special unique ‘Alexa only’ names in the entity_config section

alexa:
  smart_home:
    filter:
      include_entities:
        - fan.bonus_room_bedroom
        - fan.bonus_room_office
        - fan.master_fixture
        - light.bonus_room_bedroom_fixture
        - light.bonus_room_bedroom_recessed
        - light.bonus_room_entrance
        - light.bonus_room_office_fixture
        - light.bonus_room_office_recessed
        - light.dining_room_chandelier
        - light.game_room_bulb
        - light.game_room_bulb_2
        - light.hallway
        - light.kitchen_cans
        - light.kitchen_island
        - light.living_room
        - light.master_bathroom_cans
        - light.master_bathroom_sink
        - light.master_closet
        - light.master_fixture
        - media_player.dining_room_speakers
        - media_player.living_room_speakers
        - switch.basement_cans
        - switch.basement_stairs
        - switch.dining_room_hutch
        - switch.disney_plus
        - switch.downstairs
        - switch.echo_through_receiver
        - switch.floating_outlet_switch
        - switch.foyer
        - switch.game_room_outlet
        - switch.game_room_switch
        - switch.game_room_window
        - switch.garage_cans
        - switch.garage_entry
        - switch.garage_workbench
        - switch.hbo_now
        - switch.hulu
        - switch.inside
        - switch.kitchen_cabinet
        - switch.kitchen_outlet_above_fridge
        - switch.kitchen_outlet_above_microwave
        - switch.kitchen_pantry
        - switch.laundry
        - switch.living_room_window
        - switch.master_bathroom_fan
        - switch.master_nightstand_left
        - switch.master_nightstand_right
        - switch.netflix
        - switch.outside
        - switch.outside_porch
        - switch.passenger_sconce
        - switch.prime_video
        - switch.ps4
        - switch.roku
        - switch.sconces_garage
        - switch.sconces_main_entrance
        - switch.switch
        - switch.tv
        - switch.upstairs
        - switch.xbox_one
    entity_config:
      fan.bonus_room_bedroom:
        name: Bonusroom Fan
      fan.bonus_room_office:
        name: Office Fan
      fan.master_fixture:
        name: Master Fan
      light.bonus_room_bedroom_fixture:
        name: Bonusroom Fixture
      light.bonus_room_bedroom_recessed:
        name: Bonusroom Cans
      light.bonus_room_entrance:
        name: Bonusroom Hallway
      light.bonus_room_office_fixture:
        name: Office Fixture
      light.bonus_room_office_recessed:
        name: Office Cans
      light.dining_room_chandelier:
        name: Chandelier
      light.game_room_bulb:
        name: Bulb 1
      light.game_room_bulb_2:
        name: Bulb 2
      light.hallway:
        name: Hallway
      light.kitchen_cans:
        name: Can Lights
      light.kitchen_island:
        name: Island Lights
      light.living_room:
        name: Living Room Light
      light.master_bathroom_cans:
        name: Master Can
      light.master_bathroom_sink:
        name: Master Sink
      light.master_closet:
        name: Master Closet
      light.master_fixture:
        name: Master Light
      media_player.dining_room_speakers:
        name: Dining Room Speakers
      media_player.living_room_speakers:
        name: Living Room Speakers
      switch.audio_1:
        name: Audio One
      switch.audio_2:
        name: Audio Two
      switch.basement_cans:
        name: Basement Cans
      switch.basement_stairs:
        name: Basement Stairs
      switch.dining_room_hutch:
        name: Hutch Lights
      switch.disney_plus:
        name: Disney Plus
      switch.downstairs:
        name: Downstairs
      switch.echo_through_receiver:
        name: Echo
      switch.floating_outlet_switch:
        name: Echo Outlet
      switch.foyer:
        name: Foyer Lights
      switch.garage_cans:
        name: Garage Fixtures
      switch.garage_entry:
        name: Entry Lights
      switch.garage_workbench:
        name: Workbench
      switch.hbo_now:
        name: HBO Now
      switch.hulu:
        name: Hulu
      switch.inside:
        name: Inside
      switch.kitchen_cabinet:
        name: Cabinet Lights
      switch.kitchen_outlet_above_fridge:
        name: Kitchen Outlet Above Refrigerator
      switch.kitchen_outlet_above_microwave:
        name: Kitchen Outlet Above Microwave
      switch.kitchen_pantry:
        name: Pantry Lights
      switch.laundry:
        name: Laundry
      switch.living_room_window:
        name: Living Room Outlet
      switch.master_bathroom_fan:
        name: Master Bath Fan
      switch.master_nightstand_left:
        name: Nightstand Left
      switch.master_nightstand_right:
        name: Nightstand Right
      switch.netflix:
        name: Netflix
      switch.game_room_outlet:
        name: Game Room Light
      switch.game_room_switch:
        name: Game Room Switch
      switch.game_room_window:
        name: Game Room Outlet
      switch.outside:
        name: Outside
      switch.outside_porch:
        name: Outside Outlet
      switch.passenger_sconce:
        name: Passenger Sconce
      switch.prime_video:
        name: Prime Video
      switch.ps4:
        name: Playstation
      switch.roku:
        name: Roku
      switch.sconces_garage:
        name: Garage Sconces
      switch.sconces_main_entrance:
        name: Main Sconces
      switch.switch:
        name: Switch
      switch.tv:
        name: Cable
      switch.upstairs:
        name: Upstairs
      switch.xbox_one:
        name: Xbox One

EDIT: That goes in your configuration.yaml

Hrmm. No Media Player in config.

I was hoping it would detect entities by itself. But it seems like I have to manually add them? Bummer, but acceptable

No you don’t. This is just how I filter my environment. I have thousands of items and I only want a few to go to alexa.

By default everything is sent to Alexa. But that doesn’t mean it’s sent correctly or usable. I’ve seen issues recently with a few devices so it’s worth looking into filtering it down.

You do have to manually discover devices in alexa. That requires you to click the discovery button or tell her to discover crap.

Any advice on getting SSL working? Doesnt appear that Amazon bleieves I have it, but I did everything I was supposed to.

The big thing I dont understand is why its showing the devices in the test but the actual skilll wont.

Could it be due to using port 8443 instead of port 443? I thought that synology had issues if I forwarded 80 or 443 because it uses those ports.

Have you tried the Nabu Casa trial? Makes setting this up super easy. Might be worth trying and then paying the $5 / month if you like it.

As I said before. There are entities that break the discovery process on ALEXAs side. You have to filter things and find out what is causing the problem.

As for ssl, are you using DuckDns? If so, you need to port forward 443 external to 8123 internal on your HomeAssistant ip address.

By entities, do you mean known devices?

If I delete known devices and let it repopulate could that help?

Is there anything besides media_player that interferes? If so I will check that, but I have no media players in my known entities.

I used DuckDNS but I set up everything through 8443 instead of 443 to keep 443 open.

I mean entities. This would be seen/filtered from the home assistant side.

I’m not sure what you mean by ‘known devices’ . Do you mean the devices on alexa’s side?

Not that i know of.

Are you putting the port in everything for the alexa configuration?

Ahh thanks for the clarification. I have two showing up, my samsung tv and my nvidia shield. Can I disable them somehow to see if that fixes it?

Yes, and it works fine from the “test” code.

Yeah, try that. from what I’ve seen media_players are the only issue at the moment. And it’s not all media players with the issue.

Whats the best process to disable them?

Trying to find out what methods to disable media player would work.

I tried disabling from the front end but that didnt do the job.

Disable them through the configuration I posted before with the include/exclude entities.