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.
qwerk
Posts: 212
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

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

Postby qwerk » Friday 14 April 2017 16:26

I have my devices in Alexa ;-)
I have made the AWS part in N. Virginia and set the language to US. ( I did not get the combi Ireland and UK working, will try again later)

But now my next funny thing has shown up. I have received all my devices wich are placed in rooms, but for some reason it first gives the Dutch name and then the given Alexa_Name , this means that alexa will respond to the first line ( the dutch name)
saying turn off : "Lamp terras tuin" with a funny english accent works. but turn of Garden ( the Alexa_Name) does not. He/She/It cannot find that device

How can I switch that?

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

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

Postby Madgeni » Friday 14 April 2017 18:00

so are you saying it works with the device name - "terras tuin", but not the alexa_name "Garden"?
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby qwerk » Friday 14 April 2017 18:21

Yep,
when running a test ( discover) I get Description found Alexa_Name: Garden
so that looks fine, But I can not use it .


I would like to add: good job so far. Thanks

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

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

Postby Madgeni » Friday 14 April 2017 18:30

thanks :)
so what do you see in your alexa app when it doesn't work? Does it hear you ok, and it just doesn't work?
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby qwerk » Friday 14 April 2017 19:59

In the alexa app, I also have HA-bridge devices, On the first line is the Device name and on the second it says Lux Light, Also with the Harmony devices, first line is the device name and the secondline is "Harmony Activity: film kijken)
With my alexa/domoticz devices I have on the first line the name as I use them in Domoticz and on the second line given Alexa_Name ( or when I did not enter that, the same as on the first line)
Alexa hears me ok, in the logging I can see she/he/it understood the Alexa_Name and also from the speaker it says : I couldn't find a device or group named garden in aren's account

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

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

Postby qwerk » Friday 14 April 2017 20:03

@Madgeni,

just a thought: Is it possible to only add/use device/groups/scenes that are in a specific room.
If a room is given in the conf.json, only items from that room are used, else every items in every room is added.

That we I can omit certain devices, that I don't want to show in alexa but do want to show up on a floorplan.


Forget this question Borcon came with a better and simpler solution, use user rights.
Last edited by qwerk on Sunday 16 April 2017 7:52, edited 1 time in total.

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

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

Postby borcon » Sunday 16 April 2017 0:37

@qwerk,

why do you want use a special room for alexa devices?
Domoticz has a integrated rights user management.
Allow your alexa remote access account (used in conf.json) only access to your allowed devices.
I think it's the best way to do this. Each remote access should be controled with access rights and not with rooms.

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

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

Postby qwerk » Sunday 16 April 2017 7:49

@Borcon, I didn't think of that, but you are right. Thats is much easier and already implemented ;-)

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

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

Postby markk » Tuesday 18 April 2017 14:33

markk wrote:
qwerk wrote:
markk wrote:
I've been messing with this all evening now but still can't get it to work. I changed the name on a couple of switches and then forgot these from Alexa. I then asked Alexa app to discover devices again and I can see the request going through Lambda but the devices don't reappear on the app again and neither does Alexa recognise them. I reloaded the old zip file and they all reappear again but obviously without the renaming functionality. Ive attached the log in lambda in case it gives any clues. Any idea please?

Code: Select all

[attachment=0]Alexa.txt[/attachment]


Hi Markk, what do you mean with: I can see the request going through lambda.

When you Ask Alexa to discover, then on the AWS website you can follow that process ??
Should the Alexa actions be logged with /aws/lambda/{projectname] ?
There I can only find the tests I did from the AWS website. but none of all the alexa tests I did.

I hope this can help me find my problem.

gr.
Aren


On the page where you upload the zip file in AWS theres an option to test. I tested using the device discovery code at the very end of the manual and all showed up in AWS. Then I went to the alexa app on my phone and pressed discover devices and I could see the progress of this on the same test page in AWS. However, none of my devices are actually updated/discovered with the new version. Works perfectly with the old one though :(


Just noticed the new domapi.js on github. Tried with this latest version and this seems to have fixed the above device discovery issues I had. Thanks for this, well chuffed :)
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.

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

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

Postby Madgeni » Tuesday 18 April 2017 14:50

excellent, thanks for testing :)
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby Madgeni » Wednesday 19 April 2017 10:09

update:
Added increment/decrement percentage to dimmable lights
also, looks like for those of you hosted in the US, the get current Temp now works ok

If this is useful, please grab it and test it out
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby qwerk » Wednesday 19 April 2017 14:45

I grabbed and I tested.
I still get the alexa_name and the "normal name" in the wrong order.
Funny thing now is when I test on the AWS environment i get all the devices I should in the window above Summary. But in the log-output I get no devices. However in Alexa itself I get the devices I am supposed to. ( with the wrong name order)
I am running US language and AWS from the N. Virginia site.
Also the "get temp" function is not working here. Maybe wrong devices , maybe wrong questions....

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

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

Postby Madgeni » Wednesday 19 April 2017 17:02

So the order should be :
Device Name
Alexa_name

Re: Lambda testing - that usually depends on what debugging i've got on in the release :)
In this case, it's less 'chatty' in the logging, so don't worry too much.

Re: GetTemp - can you test it in the lambda with this test - changing to an IDX of a thermostat you have?

Code: Select all

{
  "header": {
    "messageId": "b6602211-b4b3-4960-b063-f7e3967c00c4",
    "name": "GetTemperatureReadingRequest",
    "namespace": "Alexa.ConnectedHome.Query",
    "payloadVersion": "2"
  },
  "payload": {
    "accessToken": "123",
    "appliance": {
      "additionalApplianceDetails": {
        "WhatAmI": "temp"
      },
      "applianceId": "123"
    }
  }
}
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby borcon » Wednesday 19 April 2017 18:14

@madgeni,

i can confirm, that there is something wrong.
The domoticz device name is the alexa device name and
the alexa_name is now the type.

The first attachment is with the new version.
The second attachment is the old.
Attachments
2017-04-19 18_00_02-Amazon Alexa.jpg
2017-04-19 18_00_02-Amazon Alexa.jpg (6.52 KiB) Viewed 231 times
2017-04-19 18_10_04-Amazon Alexa - Internet Explorer.png
2017-04-19 18_10_04-Amazon Alexa - Internet Explorer.png (2.7 KiB) Viewed 231 times
Last edited by borcon on Wednesday 19 April 2017 18:41, edited 1 time in total.

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

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

Postby Madgeni » Wednesday 19 April 2017 18:20

that is strange, as this is working for me. I forgot the devices and rediscovered them, all ok
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby borcon » Wednesday 19 April 2017 18:40

if i change the lines (306 and 307 from domapi.js) back to

friendlyName: dz_name,
friendlyDescription: devType,

than the old view with alexa_name and devType is back.
You had dz_name by friendlyDescription.
Did you want that?

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

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

Postby Madgeni » Wednesday 19 April 2017 18:54

so currently the code has:
friendlyName: device.name,
friendlyDescription: dz_name

where dz_name is either the alexa_name, or the default device.name (again).

Is the preference for the friendlyname to be the custom name, or friendlydescription? I'm not sure of the effect, as it can be called using either (in my experience)
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby borcon » Wednesday 19 April 2017 19:04

i prefer the friendlyname to be the custom name (alexa_name) and the friendlyDescription to be the devType.
The ha bridge does the same.
If someone want the domoticz device name in the friendlyDescription, then the person can change the line. :-)

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

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

Postby Madgeni » Wednesday 19 April 2017 19:06

done :)
Like my code? Want to buy me beer? https://paypal.me/madgeni

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

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

Postby qwerk » Wednesday 19 April 2017 21:53

nice, I got a lot further.
The names and alexa_names are ok now.
I can get temperature readings ( in test) . It will only read temp devices not thermostat devices. Is that a amazon/alexa "thing" Or do I need to reconfigure somethings? I already tried the Whatami settting in your test template.


Return to “Show your projects”

Who is online

Users browsing this forum: No registered users and 2 guests