Hi all, not sure how much traffic this subforum gets now that hs2 is old news. I still happily run it and its been great for me all of these years.
Recently, I've acquired an Amazon Echo Dot and have looked on the forums if anyone has connected it to HS2/Pro. It seems the HS3 methods don't work since they require the myhomeseer connection/service that connects with the amazon lambda function and associated skill.
Well after some searching on the interwebs, I've discovered a pretty good way to allow Alexa to send queries to my home automation system (Jarvis) without sending any of my home automation information over the internet.
The process is alittle complicated but basically it goes like this:
1) Create a "dummy" skill and "dummy" lambda function on the amazon's developer and web services. I say "dummy" since the only thing the skill does is have Alexa always reply with "OK." You can have her say whatever or nothing.
2) In a chrome/firefox browser on your home automation computer (that I assume is running 24/7), open up and sign-in to http://alexa.amazon.com/spa/index.html#settings/dialogs
3) press ctrl+shift+i to open developer tools in chrome, then click console tab
4) Inject javascript copy/paste (See below) into page. What this does is monitor each query you make to alexa via the alexa history webpage and if if finds your query to comprise a keyword (in my case "jarvis") it sends the query to my HS software
5) In HTML folder of HS, create an ASP page that receives GET request and processes the request based upon string of commands.
So yeah thats basically it. Step 5 isn't an easy thing to whip up but if you start slow and add one command function at a time you can append commands and ultimately end up with alot of functions.
Here is the javascript I referred to above:
Here is a sample of the ASP page I use:
Recently, I've acquired an Amazon Echo Dot and have looked on the forums if anyone has connected it to HS2/Pro. It seems the HS3 methods don't work since they require the myhomeseer connection/service that connects with the amazon lambda function and associated skill.
Well after some searching on the interwebs, I've discovered a pretty good way to allow Alexa to send queries to my home automation system (Jarvis) without sending any of my home automation information over the internet.
The process is alittle complicated but basically it goes like this:
1) Create a "dummy" skill and "dummy" lambda function on the amazon's developer and web services. I say "dummy" since the only thing the skill does is have Alexa always reply with "OK." You can have her say whatever or nothing.
2) In a chrome/firefox browser on your home automation computer (that I assume is running 24/7), open up and sign-in to http://alexa.amazon.com/spa/index.html#settings/dialogs
3) press ctrl+shift+i to open developer tools in chrome, then click console tab
4) Inject javascript copy/paste (See below) into page. What this does is monitor each query you make to alexa via the alexa history webpage and if if finds your query to comprise a keyword (in my case "jarvis") it sends the query to my HS software
5) In HTML folder of HS, create an ASP page that receives GET request and processes the request based upon string of commands.
So yeah thats basically it. Step 5 isn't an easy thing to whip up but if you start slow and add one command function at a time you can append commands and ultimately end up with alot of functions.
Here is the javascript I referred to above:
Code:
var lastCommand; $(document).ajaxComplete(function(){ command = $(".dd-title.d-dialog-title").first().text() if(lastCommand != command){ var pos = command.search("jarvis") if(pos >= 0){ var res = command.split("jarvis",2) $.get("http://username:password@localhost:port/jarvis.asp?command="+res[1]) lastCommand = command; } } })
Code:
<% 'VBSCRIPT - get jcommand = Request.QueryString("command") hs.writelog "Alexa","Received command: " & jcommand if InStr(lcase(jcommand), "second floor temperature") > 0 then hs.writelog "Alexa","Speaking: The current second floor temperature is " & int(hs.DeviceValue("Q61")) / 100 hs.speak "Hello, the current second floor temperature is " & int(hs.DeviceValue("Q61")) / 100 & ". Have a splendid day!", True end if %>
Comment