Some fun with Alexa on a Friday afternoon

Bummer. So they don’t allow any access to port forwarding on the page or they just rewrote the interface?

They have rewrote the interface and do allow port forwarding but they do not allow or their interface does not allow to forward ports i.e. 433 to 8123 or vice versa. See image attached for the configuration of port forwarding.

Try this google search - I saw a few solutions including a few videos.

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=port+forwarding+virgin+superhub+3

One of them was even from the Virgin Media user group.

It’s a bit of a long thread, so you’ll have to do some digging. But I skipped to the end where one of the users was saying that they “wished VM support could have told them that” so I think they figured it out.

Thanks for this but these guys couldn’t forward their ports in general. My issue is to forward a port to another port. I will have to speak to my ISP I guess.

He,

thanks for this. Works just asome on my alexa.
I’ve a little problem with the alexa_confirm.yaml

Mine is looking like this:

>
  {{ [
  "ok",
  "wie du wünscht",
  "alles klar",
  "sofort",
  "wird erledigt",
  "wenn du meinst",
  "natürlich",
  "erledigt",
  "Kein Problem",
  "mach ich",
  "klaro",
  "ey ey kaptain"
  ] | random }}

if i remove the indentations HA won’t start with Log-Entry:

17-01-31 22:05:49 ERROR (Thread-1) [homeassistant.util.yaml] expected '<document start>', but found '{'
  in "/home/hass/.homeassistant/alexa_confirm.yaml", line 2, column 1

With indentations everything is working fine, but alexa only respones with a different command after restarting HA.
If i check in the Templatesection it change the response everytime.

My HA-Version is 37.0

Whats wrong with my Config?

Thanks

BR

Lukas

Hmm. I recently saw this on a thread over here:

same issue, the list would only randomize once. At the time I responded to that thread, I was on .35 and not having the issue (at least I don’t think I was!) But now, on .37, it looks like the random filter is broken.

Opened an issue:

1 Like

Confirmed on my system as well and I’ll report over at the issue.

Have you tried using ngork to set up custom skills?

Hi,

I’m trying this on my current setup but somehow its not working. I see the following error
WARNING:homeassistant.components.alexa:Received unknown intent ActivateSceneIntent

my alexa.yaml has the following config:
ActivateSceneIntent:
action:
service: scene.turn_on
data_template:
entity_id: scene.{{ Scene | replace(" ", “_”) }}
speech:
type: plaintext
text: OK

my scenes.yaml

name: TV
entities:
switch.living_room_tv:
state: on

on amazon side I have the following:

Intent schema

{
  "intent": "ActivateSceneIntent",
  "slots": [
    {
      "name": "Scene",
      "type": "Scenes"
    }
  ]
}

Sample Utterances
ActivateSceneIntent activate {Scene}

Any idea what is missing?

Have you checked home-assistant.log for errors? If this is your first Alexa intent, it could be that you haven’t set it up correctly - in that case, it wouldn’t be available to HA.

Try posting using preformatted text to see if we can spot an issue.

And be sure that you’ve included that alexa.yaml in your main config (I know - basic - but it happens)

alexa:
  intents: !include alexa.yaml

Hi,
I’m loosing somewhere and I don’t know where.
alexa: intents: ActivateSceneIntent: action: service: scene.turn_on data_template: entity_id: scene.{{ Scene | replace(" ", "_") }} speech: type: plaintext text: OK

When I ask Alexa she say hello but HASS error:
17-04-11 14:54:18 ERROR (MainThread) [homeassistant.core] Invalid service data for scene.turn_on: Entity ID scene. is an invalid entity id for dictionary value @ data[‘entity_id’]. Got ‘scene.’

Looks like a problem with the template but I don’t know where.

same here, i dont get an error though. i just get: 17-04-12 22:59:00 INFO (MainThread) [homeassistant.components.http] Serving /api/alexa to xx.xx.xx.xx (auth: True) in the log.

anything changed recently? i also dont get confirmation from alexa and it looks like this from the amazon developer console:
{
“version”: “1.0”,
“response”: {
“shouldEndSession”: true
},
“sessionAttributes”: {}
}

normally you should see the speech return here

Restore randomness to Alexa confirmations:

1 Like

Giving this a try - thanks @ih8gates! How did you figure this out?

I really missed my random playlists. I have random music start my day as an alarm and I wanted the randomness back, so I thought I’d do some spelunking.

@7h30n3 did some helpful experiments that he noted on the issue:
https://github.com/home-assistant/home-assistant/issues/5678#issuecomment-283031918

Since range still produced random numbers, I experimented with using that. Then I hit the Jinja docs to figure out the syntax for getting the length of a list…

1 Like

can confirm this works, good catch!

Same here - I liked the post but forgot to respond; so nice to have my random replies back. Thanks again, @ih8gates!

hi, I was trying custom command to use with Alexa. It works when I try to test in Service Simulator you can find screenshot below. even it responds success command when I when I speak to Alexa “ask home assistant to turn on ac” but it does not trigger script. someone, please help me

this my Intent Schema

{
  "intents": [
    {
      "slots": [
        {
          "name": "User",
          "type": "AMAZON.US_FIRST_NAME"
        }
      ],
      "intent": "LocateIntent"
    },
    {
      "intent": "WhereAreWeIntent"
    },
    {
      "slots": [
        {
          "name": "Script",
          "type": "Scripts"
        }
      ],
      "intent": "RunScriptIntent"
    }
  ]
}

Custom Slot Types & Sample Utterances

config in HA

alexa:
  intents:
    WhereAreWeIntent:
      speech:
        type: plaintext
        text: >
          {%- if is_state('device_tracker.ashu_ashu', 'home') and
                 is_state('device_tracker.afu_afu', 'home') -%}
            You are both home, you silly
          {%- else -%}
            Afu is at {{ states("device_tracker.afu_afu") }}
            and Ashu is at {{ states("device_tracker.ashu_ashu") }}
          {% endif %}

    LocateIntent:
      action:
        service: notify.notify
        data_template:
          message: The location of {{ User }} has been queried via Alexa.
      speech:
        type: plaintext
        text: >
          {%- for state in states.device_tracker -%}
            {%- if state.name.lower() == User.lower() -%}
              {{ state.name }} is at {{ state.state }}
            {%- elif loop.last -%}
              I am sorry, I do not know where {{ User }} is.
            {%- endif -%}
          {%- else -%}
            Sorry, I don't have any trackers registered.
          {%- endfor -%}
      card:
        type: simple
        title: Sample title
        content: Some more content
        
    RunScriptIntent:
      action:
        service: script.turn_on
        data_template:
          entity_id: script.{{ Script | replace(" ", "_") }}
      speech:
        type: plaintext
        text: !include alexa_confirm.yaml

Service Simulator

I think that sample utterance might be your issue. I’m not sure that Alexa can extract {Script}ekn and just return the “Script” part of the phrase. I bet you’re not getting a value for Script that you expect. Perhaps do something where you can see the actual text value of Script, like create a notification.

In your home-assistant.log, you’ve likely got errors telling you that the script that it attempted to run does not exist.

1 Like

yes.i think “ekn” was creating issue removed that and it works fine now.