Page 23 of 36
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 14 April 2017 16:26
by qwerk
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?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 14 April 2017 18:00
by Madgeni
so are you saying it works with the device name - "terras tuin", but not the alexa_name "Garden"?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 14 April 2017 18:21
by qwerk
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 14 April 2017 18:30
by Madgeni
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?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 14 April 2017 19:59
by qwerk
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 14 April 2017 20:03
by qwerk
@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.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 16 April 2017 0:37
by borcon
@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.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Sunday 16 April 2017 7:49
by qwerk
@Borcon, I didn't think of that, but you are right. Thats is much easier and already implemented

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 18 April 2017 14:33
by markk
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

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Tuesday 18 April 2017 14:50
by Madgeni
excellent, thanks for testing

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 10:09
by Madgeni
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 14:45
by qwerk
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....
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 17:02
by Madgeni
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"
}
}
}
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 18:14
by borcon
@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.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 18:20
by Madgeni
that is strange, as this is working for me. I forgot the devices and rediscovered them, all ok
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 18:40
by borcon
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?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 18:54
by Madgeni
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)
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 19:04
by borcon
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.

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 19:06
by Madgeni
done

Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 19 April 2017 21:53
by qwerk
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.