Amazon Echo to Domoticz Bridge: switches, sensors & more

Alexa, Google Home and Siri

Moderator: leecollings

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 »

working on light colour control - one issue is controlling multiple lights. As you control one device at a time, i'm not sure of the user experience you'll get if you have to do this one light at a time!
any thoughts anyone?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
borcon
Posts: 20
Joined: Thursday 05 January 2017 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Contact:

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

Post by borcon »

@swifty: sorry for late reply.
My nginx reverse proxy has a self-signed webserver certificate.
Amazon AWS is talking to my proxy and forwards the packages to domoticz. Thats all.
In aws i have no own (client) certificates. AWS accepts in dev mode self signed certs.

@Madgeni, i will send you a new version of the manual
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 »

Thanks Borcon - it's been uploaded.

Also, i've added the ability to set colours (i've only tested it at the lambda, not via Alexa). I had to create the ability in the node module for Domoticz, I convert it to hex, so took a little while.
Still not convinced that turning each Hue on (or any RGBW) one by one is a great experience!
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 »

so - just heard that Alexa Notifications are coming soon. As my Product Owners ;) - can you provide me with some user stories for notifications, and i'll get thinking
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
User avatar
heggink
Posts: 978
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

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

Post by heggink »

Wow, interesting. How would that work?
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
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 »

@madgeni is that like push messages?
and you need use cases specific for alexa-domo?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Lokonli »

My use case for Alexa push notifications: when someone enters the garage this is detected by a PIR sensor. This triggers Alexa to say 'We have a guest' (or whatever you want)

I have this working. I have modified the Alexa AVS sample app to send a pre-recorded MP3 file to the Alexa server. This triggers a custom skill which gets the text that needs to be speech synthesized from Domoticz.
The delay between PIR detection and the moment Alexa starts talking is a few seconds. Acceptable.

Verstuurd vanaf mijn SM-G800F met Tapatalk
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 »

@lokonli that's the kind off things I had in mind.
I had a homey, and let domoticz speak through it.
Doorbell actions, specific confirmations, and PIR's but only after time checking etc.
So a way to let Domoticz to tell Alexa what to say, would be perfect for me.

The nicest way is to let it happen without "man in the middle" so domoticz >> the skill by madgeni >> alexa.

How did you make this function, is there a manual ???
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Lokonli »

qwerk wrote:@lokonli that's the kind off things I had in mind.
I had a homey, and let domoticz speak through it.
Doorbell actions, specific confirmations, and PIR's but only after time checking etc.
So a way to let Domoticz to tell Alexa what to say, would be perfect for me.

The nicest way is to let it happen without "man in the middle" so domoticz >> the skill by madgeni >> alexa.

How did you make this function, is there a manual ???
I've derived it from:
https://github.com/jbreed/AlexaDomoticz

See:
http://www.domoticz.com/forum/viewtopic.php?t=8755


Verstuurd vanaf mijn SM-G800F met Tapatalk
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 »

I'd considered another skill just for push notifications - using mqtt to the AWS iot - but the ideal is for it to be built into the Smart Home Skill Api Amazon provide. It might still be a couple of months away, but at least we know it's now on the horizon.
As people have said, obvious things are about state changes to devices, based on criteria.

As soon as I get any info, i'll pass it on
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
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 »

Hi
I'm trying to update to the latest version but keep getting this error:

Code: Select all

{
  "errorMessage": "Cannot find module 'hsl-to-rgb-for-reals'",
  "errorType": "Error",
  "stackTrace": [
    "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)"
  ]
}
What am I doing wrong?
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 »

Hi markk - you'll need to pull the node_modules folder also - i've included a couple of libraries to convert hue to hex
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
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 »

hi Madgeni

I downloaded the whole zip from github into a separate folder, changed the config.json and then zipped all 4 new files, including the node_modules folder together !
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 »

weird - and that module is in the node_modules folder?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
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 »

yep

here's the folder. The zip contains the three downloaded today plus the amended conf.json :?
Attachments
alexa4.jpg
alexa4.jpg (97.9 KiB) Viewed 2187 times
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 »

i've just tested it again on the lambda, and all seems well this end?

this is the test i use:

Code: Select all

{
  "header": {
    "messageId": "ABC-123-DEF-456",
    "namespace": "Alexa.ConnectedHome.Control",
    "name": "SetColorRequest",
    "payloadVersion": "2"
  },
  "payload": {
    "accessToken": "123",
    "appliance": {
      "applianceId": "157",
      "additionalApplianceDetails": {
        "WhatAmI": "light"
      }
    },
    "color": {
      "hue": 180.0,
      "saturation": 1.0000,
      "brightness": 97.0000
    }
  }
}
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: RE: Re: Amazon Echo to Domoticz Bridge: switches, sensors & more

Post by qwerk »

Lokonli wrote:
qwerk wrote:@lokonli that's the kind off things I had in mind.
I had a homey, and let domoticz speak through it.
Doorbell actions, specific confirmations, and PIR's but only after time checking etc.
So a way to let Domoticz to tell Alexa what to say, would be perfect for me.

The nicest way is to let it happen without "man in the middle" so domoticz >> the skill by madgeni >> alexa.

How did you make this function, is there a manual ???
I've derived it from:
https://github.com/jbreed/AlexaDomoticz

See:
http://www.domoticz.com/forum/viewtopic.php?t=8755

I don't see how to get a message to alexa with this skill. Alexa seems to be the trigger in the jbreed story and I am looking for a way to let ( in my case) domoticz be the trigger. please correct me if I am wrong
When I reed back my earlier post, it says "without man in the middle" I do not see the madgeni skill as a "man in the middle" but as a necessary and good step from domoticz to alexa.
I meant without an extra man in the middle. just to set things straight.
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 »

How odd.

just tried again with your test but still no good. Here's the cloud watch report:

Code: Select all

START RequestId: 9641d249-3ae4-11e7-8db5-ab8d427fed42 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)
at Object.<anonymous> (/var/task/node_modules/hsl-to-hex/index.js:3:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
END RequestId: 9641d249-3ae4-11e7-8db5-ab8d427fed42
REPORT RequestId: 9641d249-3ae4-11e7-8db5-ab8d427fed42	Duration: 9.78 ms	Billed Duration: 100 ms Memory Size: 512 MB	Max Memory Used: 36 MB	
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 »

i must have broken something - i'll go through it again
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 »

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?
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest