Unable to link account with Alexa with Cloudflare Tunnels

Sitting in the same boat. I must admit I dont understand most of @dbrunt comments. Fast learner, but new to this. Was able to setup cloudflared docker and have 1st services exposed. On HA I used cloudflare addon. Not sure what to to in the cloudflare addon to get this going. iOS Home works out of the box. Alexa is not getting access to HA.

I need help. WAF is down significanlty with no Alexa steering the house.

You’ve provided almost no details of what you’ve configured and where. If your tunnel is up and passing all public traffic from everywhere then Alexa would have the same access via the same URL that your companion app or public browser can access.

I will be blunt…If you do not understand most of my comments then keep things simple (and the WAF happy) and subscribe to Nabu Casa’s Home Assistant Cloud service for your public access.

Thanks for you trying to help out. I wanted to be kind ,-). I know a lot, I dont know everything.

I have a selfhost background and host lots of internal services on my system. UDMP, DHCPv6, CGNAT, prefix delegation, proxmox with 3 nodes, 8TB NAS. Own domain. Transferred DNS to CF.

Have HA running in a VM inside proxmox. Had nabu casa for years. Wanted to learn more. Digged into cloudflare a fee days ago and wanted to give it a try. Found how easy it is to setup cloudflared and got it working in a few hours.

What do you need to know to help me get this sorted out?

I have cloudflared addon up an running. ha.my-domain.com works like a charm. Companion App works. Apple Home/Siri works. Additional selfhosted services run via CF zero trust

When I ask Alexa to turn on light (say kitchen) it says the entity is not responding.

I have a Fibre Connection from Deutsche Glasfaser (no public IPv4, CGNAT). I suspect the Ipv6/IPv4 being an issue.

When I look into debug logs of Alexa Media Player integration I see the request incoming I issued via Alexa.

But besides that I am stuck.

Thanks for your time.

Playing catchup here, do you have Alexa set up in your configuration.yaml file?

Thanks. Yes, under the cloud section. It was working with Nabu Casa beforehand. Now with CF I get connections to Alexa (play a message when door is open), but she doesn’t play the real message but says she cant retrieve the media file.

It’s been a very long time since I switched from Home Assistant Cloud by Nabu Casa and set up my own Alexa Smart Home Skill but I think when you remove the Home Assistant Smart Home skill you may have to remove all of the devices it had added to Alexa but I could be wrong. The reason is that those devices have different interal Alexa linking than the ones which will discovered via your new manually created skill. I think you then have to disable the Alexa Voice assistant under Settings. I also run my own version of default_config and am then able to exclude the default cloud: item. You will then need an alexa: block in configuration.yaml (see Alexa Smart Home Integration Configuration). I break out larger blocks into their own yaml file so I have alexa: !include alexa.yaml and that block/yaml file is how you expose entities to your custom skill. This is my alexa.yaml:

smart_home:
  locale: en-CA
  endpoint: https://api.amazonalexa.com/v3/events
  client_id: amzn1.application-oa2-client.5659d5<redacted>
  client_secret: amzn1.oa2-cs.v1.a15ad3<redacted>
  filter:
    include_domains:
      - light
      - cover
      - lock

    include_entities:
      - binary_sensor.front_door_motion
      - input_boolean.bedroom_automatic_lights
      - input_boolean.coffee_prepared
      - input_boolean.living_room_automatic_lights
      - input_boolean.sleep_mode
      - input_number.coffee
      - input_number.coffee_filter_count
      - input_number.daily_business_mileage
      - media_player.bedroom_tv
      - media_player.living_room_tv
      - script.bought_coffee_filters
      - script.feed_fish
      - script.good_morning
      - script.good_night
      - script.lights
      - script.may_is_coming
      - script.sleep_mode
      - script.start_my_car
      - script.stop_my_car
      - switch.delonghi_a_c
      - switch.bedroom_3_plug_2
      - switch.electric_kettle
      - switch.garage_door_opener
      - switch.dryer
      - switch.washer

    include_entity_globs:
      - switch.aquarium*

    exclude_entity_globs:
      - cover.*_hidden
      - light.tagreader_*
      - light.browser_mod*
      - media_player.browser_mod*
      - sensor.browser_mod*

  entity_config:
    binary_sensor.front_door_motion:
      name: "Front Door"
      description: "Front Door"
      display_categories: CAMERA
    cover.kitchen_blind_1:
      name: "Kitchen Blind 1"
      description: "iBlinds"
      display_categories: INTERIOR_BLIND
    cover.kitchen_blind_2:
      name: "Kitchen Blind 2"
      description: "iBlinds"
      display_categories: INTERIOR_BLIND
    cover.kitchen_blind_3:
      name: "Kitchen Blind 3"
      description: "iBlinds"
      display_categories: INTERIOR_BLIND
    cover.living_room_blind:
      name: "Living Room Blind"
      description: "iBlinds"
      display_categories: INTERIOR_BLIND
    cover.patio_door_blind:
      name: "Patio Door Blind"
      description: "iBlinds"
      display_categories: INTERIOR_BLIND
    cover.bedroom_blind:
      name: "Bedroom Blind"
      description: "iBlinds"

###  Unused display_categories
#      display_categories: INTERIOR_BLIND
#      display_categories: SMARTPLUG
#      display_categories: OTHER
#      display_categories: GARAGE_DOOR
#      display_categories: CONTACT_SENSOR
#      display_categories: LIGHT
#      display_categories: SMARTLOCK
#      display_categories: SCENE_TRIGGER

Doing it yourself means every time you want to expose/remove a device in Alexa, you have to edit the alexa: block and restart HA.

1 Like

Solid advice. To expand on your post the client_id and client_secret are optional.

The endpoint , client_id and client_secret are optional, and are only required if you want to enable Alexa’s proactive mode (i.e., “Send Alexa Events” enabled).

I figured I wanted that so I configured it.

I love the feature, just wanted to @rak to understand it’s not a necessity to turn devices on and off. Like you, it’s been forever since I used Alexa via Nabu Casa

1 Like