Page 28 of 36
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 11 May 2017 22:43
by Madgeni
working on light colour control - one issue is controlling multiple lights. As you control one device at a time, i'm not sure of the user experience you'll get if you have to do this one light at a time!
any thoughts anyone?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Monday 15 May 2017 19:38
by borcon
@swifty: sorry for late reply.
My nginx reverse proxy has a self-signed webserver certificate.
Amazon AWS is talking to my proxy and forwards the packages to domoticz. Thats all.
In aws i have no own (client) certificates. AWS accepts in dev mode self signed certs.
@Madgeni, i will send you a new version of the manual
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Monday 15 May 2017 21:10
by Madgeni
Thanks Borcon - it's been uploaded.
Also, i've added the ability to set colours (i've only tested it at the lambda, not via Alexa). I had to create the ability in the node module for Domoticz, I convert it to hex, so took a little while.
Still not convinced that turning each Hue on (or any RGBW) one by one is a great experience!
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 18:31
by Madgeni
so - just heard that Alexa Notifications are coming soon. As my Product Owners

- can you provide me with some user stories for notifications, and i'll get thinking
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 18:41
by heggink
Wow, interesting. How would that work?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 19:20
by qwerk
@madgeni is that like push messages?
and you need use cases specific for alexa-domo?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 20:06
by Lokonli
My use case for Alexa push notifications: when someone enters the garage this is detected by a PIR sensor. This triggers Alexa to say 'We have a guest' (or whatever you want)
I have this working. I have modified the Alexa AVS sample app to send a pre-recorded MP3 file to the Alexa server. This triggers a custom skill which gets the text that needs to be speech synthesized from Domoticz.
The delay between PIR detection and the moment Alexa starts talking is a few seconds. Acceptable.
Verstuurd vanaf mijn SM-G800F met Tapatalk
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 20:12
by qwerk
@lokonli that's the kind off things I had in mind.
I had a homey, and let domoticz speak through it.
Doorbell actions, specific confirmations, and PIR's but only after time checking etc.
So a way to let Domoticz to tell Alexa what to say, would be perfect for me.
The nicest way is to let it happen without "man in the middle" so domoticz >> the skill by madgeni >> alexa.
How did you make this function, is there a manual ???
Re: RE: Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 20:46
by Lokonli
qwerk wrote:@lokonli that's the kind off things I had in mind.
I had a homey, and let domoticz speak through it.
Doorbell actions, specific confirmations, and PIR's but only after time checking etc.
So a way to let Domoticz to tell Alexa what to say, would be perfect for me.
The nicest way is to let it happen without "man in the middle" so domoticz >> the skill by madgeni >> alexa.
How did you make this function, is there a manual ???
I've derived it from:
https://github.com/jbreed/AlexaDomoticz
See:
http://www.domoticz.com/forum/viewtopic.php?t=8755
Verstuurd vanaf mijn SM-G800F met Tapatalk
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 16 May 2017 22:12
by Madgeni
I'd considered another skill just for push notifications - using mqtt to the AWS iot - but the ideal is for it to be built into the Smart Home Skill Api Amazon provide. It might still be a couple of months away, but at least we know it's now on the horizon.
As people have said, obvious things are about state changes to devices, based on criteria.
As soon as I get any info, i'll pass it on
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 0:18
by markk
Hi
I'm trying to update to the latest version but keep getting this error:
Code: Select all
{
"errorMessage": "Cannot find module 'hsl-to-rgb-for-reals'",
"errorType": "Error",
"stackTrace": [
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)",
"Object.<anonymous> (/var/task/node_modules/hsl-to-hex/index.js:3:13)",
"Module._compile (module.js:409:26)",
"Object.Module._extensions..js (module.js:416:10)",
"Module.load (module.js:343:32)",
"Function.Module._load (module.js:300:12)",
"Module.require (module.js:353:17)"
]
}
What am I doing wrong?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 0:23
by Madgeni
Hi markk - you'll need to pull the node_modules folder also - i've included a couple of libraries to convert hue to hex
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 0:43
by markk
hi Madgeni
I downloaded the whole zip from github into a separate folder, changed the config.json and then zipped all 4 new files, including the node_modules folder together !
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 0:44
by Madgeni
weird - and that module is in the node_modules folder?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 0:54
by markk
yep
here's the folder. The zip contains the three downloaded today plus the amended conf.json

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 8:30
by Madgeni
i've just tested it again on the lambda, and all seems well this end?
this is the test i use:
Code: Select all
{
"header": {
"messageId": "ABC-123-DEF-456",
"namespace": "Alexa.ConnectedHome.Control",
"name": "SetColorRequest",
"payloadVersion": "2"
},
"payload": {
"accessToken": "123",
"appliance": {
"applianceId": "157",
"additionalApplianceDetails": {
"WhatAmI": "light"
}
},
"color": {
"hue": 180.0,
"saturation": 1.0000,
"brightness": 97.0000
}
}
}
Re: RE: Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 9:13
by qwerk
Lokonli wrote:qwerk wrote:@lokonli that's the kind off things I had in mind.
I had a homey, and let domoticz speak through it.
Doorbell actions, specific confirmations, and PIR's but only after time checking etc.
So a way to let Domoticz to tell Alexa what to say, would be perfect for me.
The nicest way is to let it happen without "man in the middle" so domoticz >> the skill by madgeni >> alexa.
How did you make this function, is there a manual ???
I've derived it from:
https://github.com/jbreed/AlexaDomoticz
See:
http://www.domoticz.com/forum/viewtopic.php?t=8755
I don't see how to get a message to alexa with this skill. Alexa seems to be the trigger in the jbreed story and I am looking for a way to let ( in my case) domoticz be the trigger. please correct me if I am wrong
When I reed back my earlier post, it says "without man in the middle" I do not see the madgeni skill as a "man in the middle" but as a necessary and good step from domoticz to alexa.
I meant without an
extra man in the middle. just to set things straight.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 11:44
by markk
How odd.
just tried again with your test but still no good. Here's the cloud watch report:
Code: Select all
START RequestId: 9641d249-3ae4-11e7-8db5-ab8d427fed42 Version: $LATEST
Unable to import module 'domapi': Error
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/var/task/node_modules/hsl-to-hex/index.js:3:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
END RequestId: 9641d249-3ae4-11e7-8db5-ab8d427fed42
REPORT RequestId: 9641d249-3ae4-11e7-8db5-ab8d427fed42 Duration: 9.78 ms Billed Duration: 100 ms Memory Size: 512 MB Max Memory Used: 36 MB
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 14:34
by Madgeni
i must have broken something - i'll go through it again
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 14:49
by Madgeni
I've added a zipped file which has my current files (the same as on github) to github - this is the one i'm using - try that?