Amazon Echo to Domoticz Bridge: switches, sensors & more

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Thursday 06 April 2017 10:58

Good morning

I've been using Domoticz for a year now and thinks it's a brilliant system to control sockets

I've just got a echo dot and wud like to add it to my system but can anybody give me a step by step setup guide as I only know the basics of programming but love to learn

Hardware I have
Amerzon echo dot
Raspberry pi 2 ( running Domoticz )
Rfx mitter ( running home easy products )
KM tronic relay boards

I have a spare raspberry pi 3 if needed ?

Thanks in advance

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Thursday 06 April 2017 11:33

Hi there :)

You can find the code, and a new and improved manual (thanks to Borcon) here:
https://github.com/madgeni/alexa_domo

Any questions, just post here
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

borcon
Posts: 32
Joined: Thursday 05 January 2017 12:15
Target OS: Raspberry Pi
Domoticz version: BETA
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by borcon » Friday 07 April 2017 20:05

Some informations for you

In some cases you want another name in alexa then the device name in domoticz.
Because alexa does not unterstand the name or the name is too long to speak.
Now it's possible (with the new version of domapi.js) to set the device name for alexa in the description field of each domoticz device.

Write in the description field: Alexa_Name:Your Name For Alexa

See attachment (1).
So the device name "Light Test" is ignored and "Your Name For Alexa" is the new device name.
You can write additional informations in the description field. No problem. But not in the same line!

@madgeni: In the next days, i will add these informations to the manual.
Attachments
2017-04-07 19_46_25-Domoticz.png
2017-04-07 19_46_25-Domoticz.png (162.8 KiB) Viewed 708 times

Bigted
Posts: 35
Joined: Friday 12 December 2014 15:42
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Bigted » Friday 07 April 2017 22:05

Thanks for the update, haven't updated for a while as I've been pleased with the way it was working, but the renaming of devices for Alexa has taken it to a new level

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Friday 07 April 2017 23:54

Madgeni wrote:Hi there :)

You can find the code, and a new and improved manual (thanks to Borcon) here:
https://github.com/madgeni/alexa_domo

Any questions, just post here
thanks for you quick reply and help much appreciated :)

I'm following the tutorial manual and I'm done okey antill i get to section

3.4 on Lambda

i cannot see on select Blueprint
alexia-smart-home-skill-adapter I'm only viewing Blue print skills 1-5 and manual says they can view 1-7

I've tried selecting different regions Eu London , Eu Ireland and US N Virginia still the same

any ideas

Thanks in Advance

john

borcon
Posts: 32
Joined: Thursday 05 January 2017 12:15
Target OS: Raspberry Pi
Domoticz version: BETA
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by borcon » Saturday 08 April 2017 0:27

Hey john,
i can confirm, that the skill adapter is missing at the moment.
Please try it tomorrow again. Maybe amazon is working on it.

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Saturday 08 April 2017 17:36

borcon wrote:Hey john,
i can confirm, that the skill adapter is missing at the moment.
Please try it tomorrow again. Maybe amazon is working on it.



Hi thanks for letting me know

I checked again today still no skill is they a way of finding out when it be back online ?

Thanks in adavace
John

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Monday 10 April 2017 0:37

I
Last edited by jono on Monday 10 April 2017 4:08, edited 2 times in total.

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Monday 10 April 2017 4:06

borcon wrote:Hey john,
i can confirm, that the skill adapter is missing at the moment.
Please try it tomorrow again. Maybe amazon is working on it.

good Evening

i followed the step by step guide

the only bit i didn't do was select the blue print "alexia-smart-home-skill-adapter"

is the amazon blue print still down ?

i get the following error message in AWS Control when i save and test


{
"errorMessage": "Cannot find module '/var/task/domapi'",
"errorType": "Error",
"stackTrace": [
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)"
]
}

am i anywhere close or do i need togo recheck my configurations ?

I can see Domoticz I set up on the Amazon Alexa app
I've enabled it but cannot Descover any devices

My Domoticz runs on port 8080 should I change in Conf.json port 80 to 8080



thanks in advance John

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Monday 10 April 2017 11:03

so, in the lambda, you've run a test and get that error?

You've not renamed the domapi.js have you?
Yes, the conf.json should reflect the config to your domoticz host
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Monday 10 April 2017 17:22

Madgeni wrote:so, in the lambda, you've run a test and get that error?

You've not renamed the domapi.js have you?
Yes, the conf.json should reflect the config to your domoticz host

Hi Madgeni

i haven't changed the name of domapi.js still same

in conf.json
I've changed to port 8080 instead of 80
under username "" as not using login Id at moment
password "" as not using password at moment

could it be because i didn't select a Alexa-home-smart Blue print because not available to select ?

i get the following error message in Lambda when excuse a test

thanks in advance
John

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Monday 10 April 2017 18:25

I've just created a new lambda function via the blank template, selecting Smart Home Skill as the Trigger. Zipped up domapi.js/conf.json/node_modules/package.json - uploaded and tested all ok here. I wonder if it's the blank user/pwd..
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Monday 10 April 2017 19:01

so you need to be using (for your safety!) https, and specify a username/pwd. I'm assuming you're doing this?
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Tuesday 11 April 2017 1:08

Madgeni wrote:so you need to be using (for your safety!) https, and specify a username/pwd. I'm assuming you're doing this?

hi Madgeni

I've setup My domoticz web browser with a password and user name and updated the conf.json with user name and password re zipped

I've restarted the whole install from scratch including selecting the blank Blueprint

I'm using EU Ireland as my region

i get the following error in lambada when i upload the new code and carried out save and test


Execution result: failed(logs)
The area below shows the result returned by your function execution. Learn more about returning results from your function.
{
"errorMessage": "Cannot find module '/var/task/domapi'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:276:25)",
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)"
]
}

Summary
Code SHA-256
Ol9wwGkxmGJC0RgBiL0hDC3W4jBcnRvAln8n3fSDNyI=
Request ID
c1e70dea-1e3e-11e7-ac29-7f9766942959
Duration
89.92 ms
Billed duration
100 ms
Resources configured
128 MB
Max memory used
15 MB
Log output
The area below shows the logging calls in your code. These correspond to a single row within the CloudWatch log group corresponding to this Lambda function. Click here to view the CloudWatch log group.
START RequestId: c1e70dea-1e3e-11e7-ac29-7f9766942959 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)
END RequestId: c1e70dea-1e3e-11e7-ac29-7f9766942959
REPORT RequestId: c1e70dea-1e3e-11e7-ac29-7f9766942959 Duration: 89.92 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 15 MB


thanks in advance
john

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Tuesday 11 April 2017 9:40

It's implying the domapi.js file isn't present - it gets the name from the Handler name - in our case domapi.handler.
Can you check file permissions before zipping? How are you zipping the files?
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

markk
Posts: 400
Joined: Tuesday 14 January 2014 15:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by markk » Tuesday 11 April 2017 12:46

Hi. I followed the original instructions weeks ago and was so pleased to get this working. The update to allow renaming of devices is drawing me in but I don't want to start the whole process again in case I break anything. Is someone able to tell me what are the bits I need to amend please?
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.

jono
Posts: 9
Joined: Saturday 09 July 2016 8:27
Target OS: Raspberry Pi
Domoticz version:
Location: U.K.-England
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by jono » Tuesday 11 April 2017 13:16

Madgeni wrote:It's implying the domapi.js file isn't present - it gets the name from the Handler name - in our case domapi.handler.
Can you check file permissions before zipping? How are you zipping the files?
I've checked the following

Conf.json (change name and from example Conf.json) added my external IP, user/password

domapi.js not touched

Package.json (not touched)

Folder nodes_modules ( not touched )

I then select all 4 then compress on my mac air it then generates a zip folder then I uploaded to lambada

Can you give me details how to re upload the folder to lambada

Thanks
John

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Tuesday 11 April 2017 13:37

markk wrote:Hi. I followed the original instructions weeks ago and was so pleased to get this working. The update to allow renaming of devices is drawing me in but I don't want to start the whole process again in case I break anything. Is someone able to tell me what are the bits I need to amend please?
All you need to do is:
In Domoticz - under switches
in the Description - put: Alexa_Name:Your Name For Alexa - where Your Name For Alexa is the name you want.

Then Forget and Discover in Alexa app.

This is after you've downloaded, zipped and uploaded the code from github (making sure to update the conf.json to your own settings).

To be sure, download your code from your lambda first, so you can revert back to it with no problem
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

Madgeni
Posts: 371
Joined: Friday 25 March 2016 18:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by Madgeni » Tuesday 11 April 2017 14:34

@jono - still not sure what's happening to you. I use a Mac, compress the same way you do, and I don't have any special permissions set (Although this was a problem for some running on linux).
here's my conf - IP & U:P changed -

Code: Select all

{
    "protocol": "https",
    "host": "12.34.567.890",
    "port": 8443,
    "username": "username",
    "password": "password"
}
Like my code? Want to buy me beer? https://paypal.me/madgeni
Like Controlicz? Want to help keep the lights on? https://paypal.me/madgeni :)

Native Alexa skill - register at http://www.controlicz.com

qwerk
Posts: 258
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi
Domoticz version: beta
Location: Netherlands
Contact:

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by qwerk » Tuesday 11 April 2017 20:08

I know it has been asked before in this topic, but the given solution did not help me.
Today I made my first skill (thank you Madgeni)
when testing the discovery in AWS I get all my devices, complete with friendlynames etc.
Trying to turn off a light with the AWS test, it works fine.
but.... I don't get any devices in my alexa environment. I get my Harmony devices and my HA-bridge, but no domoticz-alexa devices.
AWS.JPG
AWS.JPG (23.53 KiB) Viewed 460 times
this looks correct. What else can I test??

thanks in advance

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests