Amazon Echo to Domoticz Bridge: switches, sensors & more
Moderator: leecollings
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
bugger. I'll revert it for now whilst i test
Ok - reverted and tested. I think some of the issues are of my making (i use the aws-sdk package for local testing, which is pretty cool, but problematic for you guys )
Ok - reverted and tested. I think some of the issues are of my making (i use the aws-sdk package for local testing, which is pretty cool, but problematic for you guys )
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
I've tried this again, tweaked it, as well as fixed an issue where it was only discovering the first group - please test it and give me some feedback
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
- l0gic
- Posts: 107
- Joined: Tuesday 08 October 2013 9:35
- Target OS: Linux
- Domoticz version: Latest
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Hi,
just updated to latest code and I'm getting the following in the lambda logs
This seems to be while running a discovery.
If I understand it correctly, is should also discover temperature set point units, these do not appear in discovered devices but I guess that could well be down to the code not completing.
Control of the discovered units seems to be ok still.
All the best
Kevin
just updated to latest code and I'm getting the following in the lambda logs
Code: Select all
2016-11-29T10:48:53.222Z 691f17c3-b621-11e6-a006-c9681d09aea6 TypeError: Cannot read property 'length' of undefined
at /var/task/domapi.js:401:42
at Request._callback (/var/task/node_modules/domoticz-api/api/domoticz.js:88:13)
at Request.self.callback (/var/task/node_modules/domoticz-api/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/var/task/node_modules/domoticz-api/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/var/task/node_modules/domoticz-api/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
If I understand it correctly, is should also discover temperature set point units, these do not appear in discovered devices but I guess that could well be down to the code not completing.
Control of the discovered units seems to be ok still.
All the best
Kevin
Non credus crepitus
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Hi - and you definitely have devices in your room plans?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 65
- Joined: Tuesday 24 February 2015 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Hi again,
Just had time to try with the latest code on github and it runs through but doesn't find the virtual set points still
Just had time to try with the latest code on github and it runs through but doesn't find the virtual set points still
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
argh! can you let me know the Type/SubType from Setup>Devices, and i'll double-check
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
- l0gic
- Posts: 107
- Joined: Tuesday 08 October 2013 9:35
- Target OS: Linux
- Domoticz version: Latest
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Yup, every device is in its relevant room.Madgeni wrote:Hi - and you definitely have devices in your room plans?
Cheers
Kevin
Non credus crepitus
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
I get this error when I am running the command on an iPad and I have the standard hello world test script in the Lambda. Running on a Mac with the discovery test script, it works fine.l0gic wrote:Yup, every device is in its relevant room.Madgeni wrote:Hi - and you definitely have devices in your room plans?
Cheers
Kevin
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
that's weird - something in the browser compatability?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 74
- Joined: Thursday 24 September 2015 11:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Followed this setup and the new authentication, getting the following when trying to test from LAmbda
Using latest from github
Any ideas what the problem is?
Code: Select all
START RequestId: 7c80066f-bce0-11e6-a2d3-cb03f3127bfc Version: $LATEST
2016-12-08T00:51:43.346Z 7c80066f-bce0-11e6-a2d3-cb03f3127bfc **** what am i? : "light"
2016-12-08T00:51:43.350Z 7c80066f-bce0-11e6-a2d3-cb03f3127bfc http://user:[email protected]:8080/json.htm?type=command&idx=25¶m=switchlight&switchcmd=Off
2016-12-08T00:51:43.620Z 7c80066f-bce0-11e6-a2d3-cb03f3127bfc SyntaxError: Unexpected token <
at Object.parse (native)
at Request._callback (/var/task/node_modules/domoticz-api/api/domoticz.js:88:58)
at Request.self.callback (/var/task/node_modules/domoticz-api/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/var/task/node_modules/domoticz-api/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/var/task/node_modules/domoticz-api/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
END RequestId: 7c80066f-bce0-11e6-a2d3-cb03f3127bfc
REPORT RequestId: 7c80066f-bce0-11e6-a2d3-cb03f3127bfc Duration: 298.79 ms Billed Duration: 300 ms Memory Size: 512 MB Max Memory Used: 27 MB
Process exited before completing request
Any ideas what the problem is?
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Hi fergalom -
what's the new authentication method?
what's the new authentication method?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 74
- Joined: Thursday 24 September 2015 11:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
@Madgeni - this
Madgeni wrote: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?
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
ah ok - and it was working when you used the workaround oauth?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 74
- Joined: Thursday 24 September 2015 11:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Haven't tried that, went straight to the new method.Madgeni wrote:ah ok - and it was working when you used the workaround oauth?
Will try it and report back
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
i'm guessing it's the code, not the auth method so I wouldn't worry too much.
Can you double check your conf.json is formatted ok?
Can you double check your conf.json is formatted ok?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 74
- Joined: Thursday 24 September 2015 11:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
made a new conf - eventhough exactly the same as before
ok bit further along, test event in Lambda to turn on/off a light switch confirmed working - great!
Test event to discover devices throws the following:
Also alexa.amazon.com will not discover devices.
Getting closer.
ok bit further along, test event in Lambda to turn on/off a light switch confirmed working - great!
Test event to discover devices throws the following:
Code: Select all
START RequestId: 9f3aa4c3-bd2c-11e6-b687-0dca2c95e318 Version: $LATEST
2016-12-08T09:56:43.068Z 9f3aa4c3-bd2c-11e6-b687-0dca2c95e318 TypeError: Cannot read property 'length' of undefined
at /var/task/domapi.js:401:42
at Request._callback (/var/task/node_modules/domoticz-api/api/domoticz.js:88:13)
at Request.self.callback (/var/task/node_modules/domoticz-api/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/var/task/node_modules/domoticz-api/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/var/task/node_modules/domoticz-api/node_modules/request/request.js:988:12)
at emitNone (events.js:72:20)
END RequestId: 9f3aa4c3-bd2c-11e6-b687-0dca2c95e318
REPORT RequestId: 9f3aa4c3-bd2c-11e6-b687-0dca2c95e318 Duration: 171.20 ms Billed Duration: 200 ms Memory Size: 512 MB Max Memory Used: 21 MB
Process exited before completing request
Getting closer.
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
ah ok, do you have any Room Plans in Domoticz? You need those, then to put devices in them.
I really should do some error handling in there
I really should do some error handling in there
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
-
- Posts: 74
- Joined: Thursday 24 September 2015 11:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
ha
Ok I had some room plans which were empty (work in progress) and once I put a device in each, discovery worked ok.
Alexa.amazon.com still not discovering them though, have tried disabling and relinking the skill.
so close
Ok I had some room plans which were empty (work in progress) and once I put a device in each, discovery worked ok.
Alexa.amazon.com still not discovering them though, have tried disabling and relinking the skill.
so close
-
- Posts: 1571
- Joined: Friday 25 March 2016 17:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
hmm is the skill firing the lamdba - can you check the logs?
I think there's some general problems with skills linking to lambda functions. My skill is using English U.S, and my lambda is in N.Virginia if that helps.
I think there's some general problems with skills linking to lambda functions. My skill is using English U.S, and my lambda is in N.Virginia if that helps.
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
Who is online
Users browsing this forum: No registered users and 1 guest