OK that’s the difference between yours and mine I thought I had to use Lambda services again. Could you help me or point me in the right direction to do https I’m running duckdns and letsencrypt. I’m not sure how to get the proper setup with https.
Thank you
@RobDYI This is part I’m not sure on From the link above Alexa / Amazon Echo
Endpoint:
https
https://YOUR_HOST/api/alexa?api_password=YOUR_API_PASSWORD
Is this my end point to HA and my HA password or Do I have to make a Alexa API and link it to that
Thank you
That is correct. Make sure that you setup SSL, I use Lets Encrypt and duckdns.org as described in the HA instructions. Once you have your SSL setup and HA running with Alexa part added to your configuration.yaml, go to Alexa dev tool and to HA skill and test the SSL and your end point and your HA skill. You should have all green before testing on your Echo.
OK so if I get this right mine should look like this If my password to HA was 123456
https://MYDUCKDNSNAME.duckdns.org/api/alexa?api_password=123456
I dont have to change the /alexa?api_password to anything?
Thank you
OK then I’m still doing something wrong I’m getting the same Error as I did with the Lambda function
ERROR: The remote endpoint could not be called, or the response it returned was invalid.
all green check marks all the way including test,
I read somewhere about special characters in the passwords, Mine has one could that be stopping it.
Can you login through https?
To test your api, try this in a browser (change sensor.time to a sensor you have setup if you don’t have time)
https://MYDUCKDNSNAME.duckdns.org:8123/api/states/sensor.time?api_password=123456
i get this in the browser
{“attributes”: {“friendly_name”: “Time”, “icon”: “mdi:clock”}, “entity_id”: “sensor.time”, “last_changed”: “2017-03-31T17:38:21.134415+00:00”, “last_updated”: “2017-03-31T17:38:21.134415+00:00”, “state”: “10:38”}
if that works, its probably your Alexa: setup in the configuration.yaml.
OK I got back, But with out the port :8123
{“attributes”: {“friendly_name”: “STUDY TEMP”, “unit_of_measurement”: “\u00b0F”}, “entity_id”: “sensor.study_temp”, “last_changed”: “2017-03-31T20:44:17.465198+00:00”, “last_updated”: “2017-03-31T20:44:17.465198+00:00”, “state”: “83.66”}
So I get the Response back So I would think that the communication is OK, So it may be in my alexa.yaml
So I put it straight in my configuration.yaml file and get the same ERROR
One Question on the Certificate for NA Endpoint:there are 3 options to choose from I picked the first one
My development endpoint has a certificate from a trusted certificate authority
Is that the right one to use?
others are
My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority
and
I will upload a self-signed certificate in X.509 format.
It depends on how you setup your SSL, I used Lets Encrypt which acts as trusted authority so I use
- My development endpoint has a certificate from a trusted certificate authority
you might have self signed which you then will use
- I will upload a self-signed certificate in X.509 format
When I put “test” in the Alexa app skill test. i get “There was an error calling the remote endpoint, which returned HTTP 500 : Internal Server Error” What do you get?
You might want to try the examples first to test it isn’t your alexa.yaml setup
I get, “The remote endpoint could not be called, or the response it returned was invalid.”
I setup mine just like the examples until I get it working the only change is the name of my devices
here is my configuration
alexa:
intents:
WhereAreWeIntent:
speech:
type: plaintext
text: >
{%- if is_state('device_tracker.dee', 'home') and
is_state('device_tracker.cathy', 'home') -%}
You are both home, you silly
{%- else -%}
Cathy is at {{ states("device_tracker.cathy") }}
and dee is at {{ states("device_tracker.dee") }}
{% 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
Make sure you point to alexa.yaml in your configuration.yaml by
alexa:
intents: !include alexa.yaml
take a look here if your still having problems, I have run out of ideas.
edit: sorry, I noticed you didn’t use alexa.yaml, your configuration looks ok to me. I expected to see an error code with your end point error.
@RobDYI OK Thanks for your help. I’ll keep looking and when I find the answer I’ll post it here.
Thank you
For what it’s worth, I changed my endpoint url to be intentionally incorrect and with all green checks, it give me the same error below. Please check the url endpoint in the dev skill app to make sure its correct in your setup.
The remote endpoint could not be called, or the response it returned was invalid.
@RobDYI Well I found it, I had the end point HTTPS
I had a comma instead of a period in part of it.
Thank you for all your help, I would not have got it going without your help.
I did find I needed a HTTPS and not a Lambda function
Thanks Again
well I ran into another problem but not sure why last night I just tested the phase “where are we” and I got a answer.
today I tested and it still worked but then I asked where Cathy was and I got the same Error as before
The remote endpoint could not be called, or the response it returned was invalid.
Could it have to do with notify I’m using pushbullet
any time Iask where we are I get the right response
You can try comment out that part of the intent section to try to make it more like the working Wherearewe. I don’t use notify or cards.
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
From helping you, I decided to rework my Alexa skill which you might like. Instead of calling it “home assistant”, I called it “location” and rewrote the intents so this works
Alexa, tell location of User1
Alexa, ask location of User1
Alexa, search location of User1
I will write a skill called “status” today to report sensor info.
Sounds Great, Thank you for all your help
@RobDYI Have you had any luck with the sensor status skill? I would be very interested in if you could share your configeration as I have about 8 temp sensors around the house.
I did get the location skill to work, But after she tells me the location, She says she don’t know where I am
Not sure why you get the I am sorry part. Mine is the exact same and works. You can always delete that part of the speech or write something else.
speech:
type: plaintext
text: >
{%- for state in states.device_tracker -%}
{%- if state.name.lower() == User.lower() -%}
{{ state.name }} is at {{ state.state }}
{%- endif -%}
{%- else -%}
I am sorry, I do not know where {{ User }} is.
{%- endfor -%}
I haven’t wrote the sensor state skill yet but I think this one fits your needs. I’ll post mine when complete.
@RobDYI Well I find why it was saying the I am sorry part, look at {%- elif loop.last -%} I copied from above
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 -%}
And I got the Status of my sensors for now, when ever you get yours done please let me know.
Thanks for all your help, I learned a lot the last few days.