Page 29 of 36
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 17:36
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...
Many thanks!
Holger
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 18:35
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.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 19:03
by Madgeni
pleased it's working - will look at what i've done!
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 19:45
by Madgeni
right, this should be ok now, the dependency was incorrect
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Wednesday 17 May 2017 19:45
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...
Many thanks!
Holger
Thanks Holger, glad it's of use
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 9:40
by Madgeni
Update: Have added door lock controls - those of you who have them, give it a go, and give me some feedback!
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 9:47
by qwerk
I wil try them,
what can I do with doorlock control
Can I query > are all my doors locked?
Or is this to open a door remotely?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 9:56
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"
}
}
}
}
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 10:00
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.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 10:05
by Madgeni
that might still be ok - in Domoticz, under Devices - what are their subType? is there any reference to being door contacts/locks?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 10:40
by qwerk
I have 5 door contacts.
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 10:49
by Madgeni
help me out - can you give me a screenshot of them in Devices on Domoticz?
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 11:00
by qwerk
yes we can.
- doors.JPG (25.72 KiB) Viewed 1933 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)"
]
}
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 11:07
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 14:42
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 15:20
by qwerk
after uploading new version no erros in logs.
wrong type I guess
- type.JPG (21.55 KiB) Viewed 1880 times
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 15:25
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Thursday 18 May 2017 15:28
by qwerk
see pm ( in 1 minute)
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 19 May 2017 13:59
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
Re: Amazon Echo to Domoticz Bridge: switches, sensors & more
Posted: Friday 19 May 2017 14:33
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"
}