Page 12 of 36
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 1:46
by simonfr
Yup - updated the ARN in the skill as well. I've now tried deleting the Skill and the Function and recreating from scratch, but to no avail. I can't get the trigger to create at all when selecting "EU (Ireland)" and don't appear to have any choice other than to use "US East (N. Virginia)".
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 9:26
by Madgeni
Hi
I have the same problem re: Ireland simonfr. So if it's not triggering at all, it's 'usually' the oauth settings on the smart skill. Can you just triple check those?
Full disclosure, I don't use those workaround oauth settings anymore, i've configured it with Amazon account linking
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 9:51
by gizmocuz
Still wonder if this is not a better starting point:
http://www.instructables.com/id/Hacking ... azon-Echo/
Please read the footnote
We could modify the script perhaps to read a roomplan ?
The above is working blazing fast
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 11:28
by simonfr
Madgeni wrote:Hi
I have the same problem re: Ireland simonfr. So if it's not triggering at all, it's 'usually' the oauth settings on the smart skill. Can you just triple check those?
Full disclosure, I don't use those workaround oauth settings anymore, i've configured it with Amazon account linking
Thanks - thought it might be related to those. Will triple check when I get a few minutes from the chores today. May be worth adding that I've tried using Chrome and Edge browsers to create a new Skill, but each time I do so I get a message with a spinning blue circle that reads "Please wait while details for this skill are retrieved...". I've left it for a reasonable length of time (i.e. up to 5 minutes), but it never returns. However, it does appear to actually have created the skill and I can get to it by clicking on the main "Alexa" menu item and then by clicking on the "Get Started" link under "Alexa Skills Kit". Does anyone else have that problem?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 11:36
by nigels0
This skill doesn't need 'tell XXX to...' as it populates the home control with the devices from Domoticz directly - so I can say ' Alexa, turn on the light'. And it is very fast. By the time Alexa says 'OK', the job is done.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 11:43
by simonfr
Ok, have gone through it again and created screenshots. If you are willing to have a look at them I'd really appreciate it.
http://www.simon-fraser.com/raspberry/S ... tings.docx
Simon
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 12:13
by Madgeni
ok - ive done some testing.
I can *only* get it working with English U.S in N.Virginia. I can see you have English U.K - can you add English U.S and try again?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 12:21
by Madgeni
nigels0 wrote:
This skill doesn't need 'tell XXX to...' as it populates the home control with the devices from Domoticz directly - so I can say ' Alexa, turn on the light'. And it is very fast. By the time Alexa says 'OK', the job is done.
I'm running this from the US aws instance and the response time is 0.3seconds to turn a group off. It's not the ideal solution, but in truth none will be until I can work out a way to use something like my.domoticz.com as the login and external facing address, then I could certify it and you wouldn't have to go through the faffing with Smart Home skills (which is where i'm positive all the issues are - it's easy to get the lambda talking to your domoticz)
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 12:26
by simonfr
I've added English U.S. and removed English U.K., but still nothing in the CloudWatch logs indicating the Lambda function was even called. I had previously always selected English U.S. but for that last attempt thought I'd try the UK version to see if it made any difference.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 13:00
by Madgeni
right. All looks fine, so can you try this? Open a new browser tab from your Smart Home Skill (you'll need this open also)
go here:
https://developer.amazon.com/lwa/sp/overview.html
Create a new security profile, give it a name and description. for the consent privacy url i use:
http://www.example.com/privacy and save it.
Then click on the gear and edit Web Settings:
Allowed origins:
https://amazon.com
Allowed return URLS: **copy these from your Smart Home Skill - e.g
https://pitangui.amazon.com/api/skill/l ... xxxxxxxxxx
Save it.
Then back in your Smart Home Skill Configuration tab:
Authorization URL:
https://www.amazon.com/ap/oa
Client ID: This is from the General Tab in your Security Profile
Scope: profile:user_id
Access Token URI:
https://api.amazon.com/auth/o2/token
Client Secret: Copy from the General Tab in your Security Profile
Client Authentication Scheme: HTTP Basic
Save it.
Then in
http://alexa.amazon.com - disable your skill, then reenable it - this should take you to the Amazon linking site, login via amazon credentials - and see what happens?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 13:24
by nigels0
Madgeni wrote:ok - ive done some testing.
I can *only* get it working with English U.S in N.Virginia. I can see you have English U.K - can you add English U.S and try again?
I've got it working with both English (UK) and Ireland. So not sure that is the problem.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 13:38
by simonfr
Thanks for the suggestion. This initially gave me a 400 (authorization error) because a return URL hadn't been added. I had to provide 3 return URLs :
https://layla.amazon.co.uk/api/skill/li ... YX0T5R82MK
https://pitangui.amazon.com/api/skill/l ... YX0T5R82MK
https://layla.amazon.com/api/skill/link/M1IRYX0T5R82MK
That last one did not appear in the Smart Home Skill, but was mentioned in the 400 error. As soon as I added it I was prompted to enter my Amazon credentials while enabling the skill, and while Alexa did successfully link with the Skill, I have the same problem in that it's not finding anything (I've just manually tested the Lambda function again and it is still finding my Domoticz switches ok).
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 13:47
by Madgeni
Ok, that last part is strange. Had you created more than 1 skill?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 14:48
by simonfr
Yes, but since deleted so should now just be the one. I'll double check that.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 18:54
by simonfr
Ok - major malfunction on my part and now trying to get account reset. Could be a while ...
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 18:55
by Madgeni
whoops!
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 21:03
by nigels0
Madgeni,
You mentioned connecting to My.Domoticz, but wouldn't a better approach (certainly for me) would be to have the contents of the conf.json file as setup parameters to a skill - not sure how you would provide the unique information as I haven't looked at it at all, but it would mean you could publish the skill as you mentioned...
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 21:17
by Madgeni
agreed! however you can't
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 21:46
by nigels0
Bugger
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 30 October 2016 22:25
by Madgeni