Page 6 of 36
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 14:59
by Madgeni
Ok, apologies - fixed now (should be ok, tested against Dummy dimmer, which is now showing correctly as a Light, rather than as a Temp)
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 15:10
by blackdog65
@Madgeni
Hiya,
I got my grubby paws on my Echo today

and obviously want it to integrate with Domoticz (who wouldn't?

).
I had already set HA-Bridge in preparation for it's arrival and it can turn stuff on and off ok...ish.
What I want to clarify is... Are you developing a true "Alexa Skill" to be installed via the Alexa App or something that each individual needs to set up and tweak? I've been trying to follow the thread, but without hardware to refer to, it isn't completely clear.
Either way, I have an Echo and some spare time if you need another tester
Sean
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 15:34
by Madgeni
So the issue is more with Domoticz than with Alexa. It's a 'true' Smart Home Skill, however I can't certify it, as Domoticz doesn't have a standardised 'front door' - If/when my.domoticz gets oauth2, then I can probably simplify everyone's lives, and you will be able to just install it from alexa.
Till then, you'll need to follow my (hopefully simple instructions) and roll your own.
Basically it's 100% a true alexa skill, without being able to certify it.
Worth saying that this started as for my own use
The Hue-Bridge seems like a good workaround (not used it though)
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 15:46
by blackdog65
The problem with the ha-bridge (or me more likely) is that I can't figure out how to fetch data i.e. "Alexa, what is the sitting room temperature?"
Is your skill able to do that? I'll try and get it set up later today. Are there any necessary naming conventions for devices?
Ideally I want to able to say "Alexa, turn the sitting room stat down by 2 deg and ignore the wife, even if she screams at you to turn it up."

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 16:04
by Lard2010
Hi,
I can get the lambda test to work - for example discovering all my devices, but I can't get my Echo to discover them - nothing in the lambda logs either - any ideas?
Cheers,
Lard
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 16:32
by Madgeni
blackdog65 wrote:The problem with the ha-bridge (or me more likely) is that I can't figure out how to fetch data i.e. "Alexa, what is the sitting room temperature?"
Is your skill able to do that? I'll try and get it set up later today. Are there any necessary naming conventions for devices?
Ideally I want to able to say "Alexa, turn the sitting room stat down by 2 deg and ignore the wife, even if she screams at you to turn it up."

Hi -
currently it should allow you to set temp - so "alexa set sitting room stat to 18" - It will allow increments (when I get around to it!) - I'm somewhat limited by the Domoticz API and it's capabilities, so it involves more coding for me

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 16:43
by Madgeni
Lard2010 wrote:Hi,
I can get the lambda test to work - for example discovering all my devices, but I can get my Echo to discover them - nothing in the lambda logs either - any ideas?
Cheers,
Lard
Hi - sounds like a disconnect between the skill and the lambda. Can you double check your config against my doc? Worth checking that your lambda is running in Virginia? I've had no luck in getting it working in Europe (I only tried once to be fair)
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 18:15
by DanM
Quick question (I imagine this is going to be a popular thread today!). Do I need to open my domoticz externally or will the local ip suffice?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 18:22
by Madgeni
afraid it needs to be externally facing. Hopefully my.domoticz.com will get oauth2, then it will be a 'straightforward' task for me to certify this, and make everyones easier

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 18:33
by DanM
Thanks. I'm guessing hue / hive e.t.c are built differently as they all work without open ports? I appreciate there is a risk we drift off topic here, but I dont suppose there is a way to limit the access to just Alexa? Historically I've VPN'd to get to Domoticz and have no idea about how best to secure outside access.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 18:37
by blackdog65
Oh dear, I tried to set up Lamda in europe and nothing happened... If I'd read ALL of this, I'd have gone to Virginia 1st... doh
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 18:41
by blackdog65
"Note: Lambda functions for Alexa skills must be hosted in the US East (N. Virginia) region. Currently, this is the only Lambda region the Alexa Skills Kit supports." from the developer site
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 19:04
by Madgeni
pretty sure it's supposed to be Ireland also now:
https://developer.amazon.com/public/sol ... home-skill
"Make sure you’ve selected the N.Virginia for English (US) skills or the EU (Ireland) region for English (UK) and German skills"
Also, thought it was in my Readme?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 19:08
by blackdog65
In the lamda console I get
Code: Select all
"errorMessage": "Cannot find module './node_modules/domoticz-api/api/domoticz'",
I thought the "domoticz" needed the .js suffix, but that just gives
Code: Select all
"errorMessage": "Cannot find module './node_modules/domoticz-api/api/domoticz.js'",
The pages I'm seeing in lamda are also different to those in your docx.... enough head scratching for one day

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 19:22
by Madgeni
Ok - from my doc, did you:
Take the node_modules folder, the domapi.js, and package.json from
https://github.com/madgeni/alexa_domo and zip them and upload them?
The Lambda pages look pretty much the same to me?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 20:03
by Bigted
Madgeni wrote:Ok, apologies - fixed now (should be ok, tested against Dummy dimmer, which is now showing correctly as a Light, rather than as a Temp)
Thanks for the fast update, my lights are now back as lights
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 22:07
by l0gic
Hi Madgeni,
Ok, I grabbed the latest version and stuck it up on my Lambda site (Ireland instance).
After correcting a password typo (doh!) I can get a list of devices and also control my lights via script.
My next set will be to extend this over to the echo, it's not working at the moment but it's probably a typo in the referring address.
Something I have noticed is that even though I have 31 temperature devices (all dumb readers, one wires etc) none of them appear in the list of detected devices.
Is this correct or should I be able to see them?
I was hoping to be able to query a temperature in a room or in a hot water tank, this is possible for other temperatures i.e. from the weather.
If is ask Alexa what the current outside temperature she (it?) responds with the expected information.
BTW, I've sent you a pm on a different subject, hope you have got it OK.
All the best
Kevin
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 22:11
by Madgeni
ok, sure it's my code. Will take a look!
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 28 September 2016 23:22
by Madgeni
Ok - i've cleaned up the logic - which should help me iterate it more easily. Over to you!
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 29 September 2016 11:00
by l0gic
Nice one, will try to have a go this pm. If not this evening.