Amazon Echo to Domoticz Bridge: switches, sensors & more

Alexa, Google Home and Siri

Moderator: leecollings

pandel
Posts: 1
Joined: Wednesday 17 May 2017 17:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by pandel »

Hi!

Just registered to say "Many, many thanks for your effort, madgeni!"

And regarding the very last problem markk is facing: I stumbled upon the same problem trying to upload my zip file and had to use your "Archive2.zip" file. I just changed conf.json, stuffed it back into the archive and even though I used total commander for that again, everything worked fine).

Now I have to try if evewrything is working fine! I'm still a beginner with domoticz, so I have to find my way through... :D

Many thanks!
Holger
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by markk »

Madgeni wrote: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?
Thanks Madgeni. The files in the test zip uploaded with no errors. I've added a couple of new switches and they were discovered by alexa. Havent had a chance to test fully yet but looks good so far. Thanks for your help and patience.
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: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

pleased it's working - will look at what i've done!
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

right, this should be ok now, the dependency was incorrect
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

pandel wrote:Hi!

Just registered to say "Many, many thanks for your effort, madgeni!"

And regarding the very last problem markk is facing: I stumbled upon the same problem trying to upload my zip file and had to use your "Archive2.zip" file. I just changed conf.json, stuffed it back into the archive and even though I used total commander for that again, everything worked fine).

Now I have to try if evewrything is working fine! I'm still a beginner with domoticz, so I have to find my way through... :D

Many thanks!
Holger
Thanks Holger, glad it's of use :)
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

Update: Have added door lock controls - those of you who have them, give it a go, and give me some feedback!
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

I wil try them,
what can I do with doorlock control :D
Can I query > are all my doors locked?

Or is this to open a door remotely?
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

perfect, a willing victim!
Currently you can lock/unlock a door - but i've coded this blind, so you can help me :)

You'll need to discover them (hopefully i've got the type right), then you should see them, and be able to lock/unlock (if you check the README on my repo, i've put example utterances in there).
I'm working on GetState right now, but this is completely blind, so there's logging in there to capture the lock info from Domoticz. If you can pm me that, i can probably get it working!

you could use this as your test in your Lambda - just add the IDX for your lock

Code: Select all

{

  "header":{
    "messageId":"01ebf625-0b89-4c4d-b3aa-32340e894688",
    "name":"GetLockStateRequest",
    "namespace":"Alexa.ConnectedHome.Query",
    "payloadVersion":"2"
  },
  "payload":{
    "accessToken":"1234",
    "appliance":{
      "applianceId":"[Device ID for front door lock appliance]",
      "additionalApplianceDetails":{
        "WhatAmI":"lock"
      }
    }
  }

}
Last edited by Madgeni on Thursday 18 May 2017 10:03, edited 2 times in total.
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

I am willing but I use my doorlocks (better said) door contacts as open/closed notifications.
sorry, can't help you here. they are seen as switches.
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

that might still be ok - in Domoticz, under Devices - what are their subType? is there any reference to being door contacts/locks?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

I have 5 door contacts.
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

help me out - can you give me a screenshot of them in Devices on Domoticz?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

yes we can.
doors.JPG
doors.JPG (25.72 KiB) Viewed 1943 times
I uploaded the latest version from github :
{
"errorMessage": "Cannot find module 'hsl-to-rgb-for-reals'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:276:25)",
"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)"
]
}
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

ok, so subType (if you check the Devices page), is "Door Contact"?

re: module error, this should be fixed now, re-pull from github and try
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

Hi all -

in an attempt to be more organised, i've re-factored my code base.
If you look in my repo, you should now see another folder - 'domo-code' - this now holds the modules which handle discovery, as well as the various control methods. Hopefully this way I can narrow changes down, and minimise impact to other areas of control.

You'll need to include this in any download and zip before committing to your lambda from now on. Cheers :)
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

after uploading new version no erros in logs.

wrong type I guess
type.JPG
type.JPG (21.55 KiB) Viewed 1890 times
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

Could you try something for me?
line23 31 of get_devices.js (in the domo-code folder) is some logging. Could you uncomment it (del the //), zip and test a discovery in your lambda?

Warning, it will be quite alot of logging, but it will give you all the detail Domoticz has on your devices, and could you paste in one line for one of your contacts? or PM it to me?
Thanks
Last edited by Madgeni on Thursday 18 May 2017 16:33, edited 1 time in total.
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

see pm ( in 1 minute)
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Madgeni »

yet another update -
Added Kelvin control to lights - this is based on the Amazon Smart Home Skill API ref:
Shades of White
warm, warm white
incandescent, soft white
white
daylight, daylight white
cool, cool white

Test away, and if anyone wants to give me some info on door locks/contacts as above, that would be great :)
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
qwerk
Posts: 222
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands
Contact:

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

Post by qwerk »

I can not get devices recognized as door locks/contacts, sorry


{
"applianceId": "1039",
"manufacturerName": "Weer-script",
"modelName": "Switch",
"version": "Door Lock",
"friendlyName": "door study",
"friendlyDescription": "Light/Switch",
"isReachable": true,
"actions": [
"incrementPercentage",
"decrementPercentage",
"setPercentage",
"turnOn",
"turnOff"
],
"additionalApplianceDetails": {
"maxDimLevel": 100,
"switchis": "Door Lock",
"WhatAmI": "light"
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest