-
Posts
33 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Eric2XU's Achievements
Newbie (1/6)
7
Reputation
-
I am a bit confused, can this "on everything" run on my original ISY99i (non-zwave)? My ISY hasn't been working correctly the last few weeks, power cycling didn't help, usually my next step is to apply firmware. Currently on 5.3.4. I also don't see in the release post how to get the files to apply the update. Sorry for the ignorance. Hoping for some guidance. Most of my programs are only half working, its very odd.
-
I dont see anything in the UI so I think I am out of luck but figured I would ask anyways. I have LED Strip Lights that are controlled via REST POST webservices calls. I would love button A on my multi-button inston light panel to trigger this LED strip. I can even write a middleware so all the ISY has to do is simply visit (HTTP GET) http://whatever/mydevicename/on Is there anyway to have this happen? Seems overdue to be honest in today's modern world of web services. I would pay for a module if needed.
-
I think I understand the limitation. Did the designers of Insteon consider this secondary KPL button out of sync issue and if so how do I make sure it doesn't happen. I am perplexed by the idea that the KPL Secondary key itself can effect a SwitchLinc switch to a dimmed value but I have not abilty to do the very same thing via the ISY console or in particular to this thread through the ISY API. Is there a REST API for adjusting the ramp rate? I dont mind setting it, turning it on, then reverting it back if that's needed but looking over the API I dont see the ability to do that.
-
I definitely don't have a problem with controlling more than one device, in fact my nodeJS app allows me to add an unlimited amount of ISY commands to a single Alexa command. However http://isy/rest/nodes/8052/cmd/DON/128or http://isy/rest/nodes/2B%20FD%2080%204/cmd/DON/128 just doesn't work to set the KPL directly. Can you give me insight to how you do it?
-
Somewhat unrelated but I wrote a NodeJS Web Service running on a Raspberry PI that is the middle man between Amazon Echo, Philips Hue, and the ISY. Things are great, I tell Alexa to turn on kitchen light to 25% and she can do it BUT because I am interacting with the device directly not the Scene which has the SwitchLinc and the KeypadLinc Button D part of, the keypadLinc button D does not light up (gets out of sync). Now sure I could control the Scene if I wanted straight on (100%) and off (0%) but what about when I want to turn on the lights to a dimmed value like 31%? As far as I know there is no API to allow the setting a KeypadLinc button to a dimmed percentage. BUT I know its possible, if I manually hold down the KeypadLinc button for a second and let go, sure enough both Scene members (KPL and SWL) set to 31% as shown in the photo below So is there anyway to do this or do I have to live with a 0/100 or KeypadLinc button out of Sync life? Some extra info, I have been using an ISY for about 5 years now, Scene's always seem to be the thing that derails all of my good ideas, hopefully I am just missing something?
-
Please excuse my ignorance but does this require the paid ISY cloud service from universal devices? So if I am running stand alone then I still need to use the HA bridge?
-
To be honest I am not sure. It also depends on what you want to do. I am pretty sure you need the fancier Home Control one if you want it to control lighting on the ISY, however I am unsure if a lesser model which still included the "hub" would allow Echo to control it. I think it would but again not sure.
-
We are days away from baby #2 (hence why I still have time to make a video lol) In the Amazon Echo Web App it is indeed a "Hue Light" Hope that helps. I pass the following to my web service from the bridge: http://<IP>/?operation=Nest&NestLevel=${intensity.percent}
-
I am able to get the Echo to pass the Hue Emulator any number including "73" as a percentage and I use that for temperature. I posted a video to youtube of it: Amazon Echo Controlling ISY99i (Insteon), Nest Thermostat, RainMachine, and Logitech Harmony Hub
-
I debated posting this as it may bring a tidal wave of PM's and whatnot that I don't have much time for (my second child is being born in a few days). However after more thought I figured I could at least give people some direction. I have finished writing code that pulls together Alexa, Hue Emulator 0.2.1, Logitech Harmony, Google Nest, and RainMachine. I can do things like: “Alexa turn on TV” “Alexa turn on Playstation” “Alexa set Thermostat 74” “Alexa turn on Sprinkler 2” It's the first C# app I have ever wrote, my code is sloppy, has hard coded values for IP, Username, and Passwords, not very oop, requires IIS/.Net4.5, and in no shape to share. But I will post as-is below as I thought I would let people know the basics of how I did it in case anyone else would like to make a more refined version. Everything gets setup in the Hue Bridge as a Light. All on and off urls point back at my custom Microsoft C# .NET ASPX web site. It's a single page takes in two URL parms (Operation and Intensity[Optional]) Thermostat uses Intensity Percentage to get back a numerical value, if its outside of 65 - 81 I hard code 74 to make sure things dont get out of hand Website has "If" sections for each Operation type, examples of Operations are like "Light-Kitchen-On" or "Nest" or "RainMahine-Zone2-On" In each If section I do whatever option is needed, for ISY I simply call the REST API accordingly for Harmony I actually call a prebuilt c++ application that takes command line parms (http://sourceforge.net/projects/harmonyhubcontrol/files/)Note: I really tried hard to use other 3rd party c# code to do it directly within the web app but I failed alot due to the messed up XMPP protocol Harmony uses and finally just had the website execute this exe which works flawlessly (and still quick) for the Nest I call their REST API accordingly for RainMachine again I call their REST API Accordingly Most of my web calls use the WebRequest or WebClient .NET classes Notes about Nest Nest's API's are great, you do have to go and sign up for a web developer account. Then create a program (put anything it wont really matter) Once you have a program you will get a client ID and Client Secret Go here in a browser and get a PIN https://home.nest.com/login/oauth2?client_id=<clientID>&state=Balls Then go here with your client ID, Client secret, and PIN (note: PIN is a one time use) https://api.home.nest.com/oauth2/access_token?code=<PIN>&client_id=<clientid>&client_secret=<client_secret>&grant_type=authorization_code You should get back a session key "{\"access_token\":\"c.fyCVHgmvY1bCXchYdfjhfjghfjhgfjgdfkhfkghfkghfFGRgrtR3rChnjrSEZmc\",\"expires_in\":315360000}" This session key can be hardcoded into the code below as its good for 10 years then you never have to worry about coding a logon to Nest (quicker too) Harmony Notes: Used this code to compile an exe: (http://sourceforge.net/projects/harmonyhubcontrol/files/) Simply call the exe with switches can use exe tool to discover commands, devices, activities RainMachine Notes: By far the best documented API, was quick and easy, you shouldn't have any problems with this one CODE: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Net; using System.Web.Script.Serialization; using System.Collections.Specialized; using System.Net.Http; using System.Net.Http.Headers; using System.Text; using System.Net.Security; namespace ISY_Pokey { public partial class _Default : System.Web.UI.Page { class RainMachine { public string Password { get; set; } public string access_token { get; set; } public string checksum { get; set; } public string expiration { get; set; } public string statusCode { get; set; } } public void ProcessURI(string URI) { try { WebClient webClient = new WebClient(); webClient.Credentials = new NetworkCredential("ISYUsername", "ISYPassword"); Stream stream = webClient.OpenRead(URI); } catch (WebException ex) { if (ex.Response is HttpWebResponse) { switch (((HttpWebResponse)ex.Response).StatusCode) { case HttpStatusCode.NotFound: break; default: throw ex; } } } } protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["operation"] != null) { int intLightLevel; string LightLevel = "255"; if (Request.QueryString["LightLevel"] != null) { if (int.TryParse(Request.QueryString["LightLevel"], out intLightLevel)) { LightLevel =intLightLevel.ToString(); } } int intNestLevel; string NestLevel = "76"; if (Request.QueryString["NestLevel"] != null) { if (int.TryParse(Request.QueryString["NestLevel"], out intNestLevel)) { if (intNestLevel > 68 && intNestLevel < 81) { NestLevel = intNestLevel.ToString(); } } } if (Request.QueryString["operation"] == "Light-On-LivingRoomLED") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/36981/cmd/DON/"); } if (Request.QueryString["operation"] == "Light-Off-LivingRoomLED") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/36981/cmd/DOF/"); } if (Request.QueryString["operation"] == "Light-On-LivingRoom") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/2F%20CF%20A6%201/cmd/DON/" + LightLevel); } if (Request.QueryString["operation"] == "Light-Off-LivingRoom") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/2F%20CF%20A6%201/cmd/DOF/"); } if (Request.QueryString["operation"] == "Light-On-Breakfast") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/8052/cmd/DON/" + LightLevel); } if (Request.QueryString["operation"] == "Light-Off-Breakfast") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/8052/cmd/DOF/" ); } if (Request.QueryString["operation"] == "Light-On-Kitchen") { ltNotify.Text = Request.QueryString["operation"]; //Breakfast ProcessURI("http://192.168.1.10/rest/nodes/8052/cmd/DON/"); //Kitchen Main ProcessURI("http://192.168.1.10/rest/nodes/21177/cmd/DON/"); //Kitchen Under Cab ProcessURI("http://192.168.1.10/rest/nodes/19847/cmd/DON/"); //Kitchen Island ProcessURI("http://192.168.1.10/rest/nodes/2B%20FD%2080%201/cmd/DON/"); } if (Request.QueryString["operation"] == "Light-Off-Kitchen") { ltNotify.Text = Request.QueryString["operation"]; //Breakfast ProcessURI("http://192.168.1.10/rest/nodes/8052/cmd/DOF/"); //Kitchen Main ProcessURI("http://192.168.1.10/rest/nodes/21177/cmd/DOF/"); //Kitchen Under Cab ProcessURI("http://192.168.1.10/rest/nodes/19847/cmd/DOF/"); //Kitchen Island ProcessURI("http://192.168.1.10/rest/nodes/2B%20FD%2080%201/cmd/DOF/"); } if (Request.QueryString["operation"] == "Light-On-Laundry") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/47290/cmd/DON/"); } if (Request.QueryString["operation"] == "Light-Off-Laundry") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/47290/cmd/DOF/"); } if (Request.QueryString["operation"] == "Light-On-Hallway") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/2F%20CB%2050%201/cmd/DON/" + LightLevel); } if (Request.QueryString["operation"] == "Light-Off-Hallway") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/2F%20CB%2050%201/cmd/DOF/"); } if (Request.QueryString["operation"] == "Light-On-Patio") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/48068/cmd/DON/" + LightLevel); } if (Request.QueryString["operation"] == "Light-Off-Patio") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/48068/cmd/DOF/"); } if (Request.QueryString["operation"] == "Light-On-Foyer") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/4669/cmd/DON/" + LightLevel); } if (Request.QueryString["operation"] == "Light-Off-Foyer") { ltNotify.Text = Request.QueryString["operation"]; ProcessURI("http://192.168.1.10/rest/nodes/4669/cmd/DOF/"); } if (Request.QueryString["operation"] == "Shit-On") { ltNotify.Text = Request.QueryString["operation"]; //TVLED ProcessURI("http://192.168.1.10/rest/nodes/36981/cmd/DON/"); //Breakfast ProcessURI("http://192.168.1.10/rest/nodes/8052/cmd/DON/"); //Kitchen Main ProcessURI("http://192.168.1.10/rest/nodes/21177/cmd/DON/"); //Kitchen Under Cab ProcessURI("http://192.168.1.10/rest/nodes/19847/cmd/DON/"); //Kitchen Island ProcessURI("http://192.168.1.10/rest/nodes/2B%20FD%2080%201/cmd/DON/"); //LivingRoom ProcessURI("http://192.168.1.10/rest/nodes/2F%20CF%20A6%201/cmd/DON/"); } if (Request.QueryString["operation"] == "Shit-Off") { ltNotify.Text = Request.QueryString["operation"]; //TVLED ProcessURI("http://192.168.1.10/rest/nodes/36981/cmd/DOF/"); //LivingRoom ProcessURI("http://192.168.1.10/rest/nodes/2F%20CF%20A6%201/cmd/DOF/"); //Breakfast ProcessURI("http://192.168.1.10/rest/nodes/8052/cmd/DOF/"); //Kitchen Main ProcessURI("http://192.168.1.10/rest/nodes/21177/cmd/DOF/"); //Kitchen Under Cab ProcessURI("http://192.168.1.10/rest/nodes/19847/cmd/DOF/"); //Kitchen Island ProcessURI("http://192.168.1.10/rest/nodes/2B%20FD%2080%201/cmd/DOF/"); //Laundry ProcessURI("http://192.168.1.10/rest/nodes/47290/cmd/DOF/"); //Downstairs Hallway ProcessURI("http://192.168.1.10/rest/nodes/2F%20CB%2050%201/cmd/DOF/"); //Patio ProcessURI("http://192.168.1.10/rest/nodes/48068/cmd/DOF/"); //Foyer ProcessURI("http://192.168.1.10/rest/nodes/4669/cmd/DOF/"); } if (Request.QueryString["operation"] == "Harmony-TV-On") { ltNotify.Text = Request.QueryString["operation"]; //Turn on TV var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "D:\\websites\\ISY_Pokey\\Tools\\HarmonyHubControl.exe"; p.StartInfo.Arguments = String.Format("logitechlogon logitechpassword 192.168.1.11 start_activity 15941161"); p.Start(); } if (Request.QueryString["operation"] == "Harmony-TV-OFF") { ltNotify.Text = Request.QueryString["operation"]; //Turn off TV var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "D:\\websites\\ISY_Pokey\\Tools\\HarmonyHubControl.exe"; p.StartInfo.Arguments = String.Format("logitechlogon logitechpassword 192.168.1.11 start_activity -1"); p.Start(); } if (Request.QueryString["operation"] == "Harmony-Playstation-On") { ltNotify.Text = Request.QueryString["operation"]; //Turn on Playstation var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "D:\\websites\\ISY_Pokey\\Tools\\HarmonyHubControl.exe"; p.StartInfo.Arguments = String.Format("logitechlogon logitechpassword 192.168.1.11 start_activity 15491165"); p.Start(); } if (Request.QueryString["operation"] == "Harmony-Playstation-OFF") { ltNotify.Text = Request.QueryString["operation"]; //Turn off Playstation var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "D:\\websites\\ISY_Pokey\\Tools\\HarmonyHubControl.exe"; p.StartInfo.Arguments = String.Format("logitechlogon logitechpassword 192.168.1.11 start_activity -1"); p.Start(); } if (Request.QueryString["operation"] == "Harmony-AppleTV-On") { ltNotify.Text = Request.QueryString["operation"]; //Turn on AppleTV var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "D:\\websites\\ISY_Pokey\\Tools\\HarmonyHubControl.exe"; p.StartInfo.Arguments = String.Format("logitechlogon logitechpassword 192.168.1.11 start_activity 15941146"); p.Start(); } if (Request.QueryString["operation"] == "Harmony-AppleTV-OFF") { ltNotify.Text = Request.QueryString["operation"]; //Turn off AppleTV var p = new System.Diagnostics.Process(); p.StartInfo.FileName = "D:\\websites\\ISY_Pokey\\Tools\\HarmonyHubControl.exe"; p.StartInfo.Arguments = String.Format("logitechlogon logitechpassword 192.168.1.11 start_activity -1"); p.Start(); } if (Request.QueryString["operation"] == "Nest") { ltNotify.Text = Request.QueryString["operation"]; PutObject("https://developer-api.nest.com/devices/thermostats/rUhPyxoY8fRMSEGr_d2q94RJ8Vs75QJ6/target_temperature_f?auth=<NestAPIAuthKey>", NestLevel); } if (Request.QueryString["operation"] == "Sprinkler-One-On") { ltNotify.Text = Request.QueryString["operation"]; string URI_Auth = "https://192.168.1.13/api/4/auth/login"; string PayLoad_Auth = "{\"pwd\":\"RainMachinePWD\",\"remember\": 1}"; string Content_Auth = HTTPPostJSONString(URI_Auth, PayLoad_Auth, 1); var json_serializer_Auth = new JavaScriptSerializer(); RainMachine RainMachine = json_serializer_Auth.Deserialize<RainMachine>(Content_Auth); Console.WriteLine(RainMachine.access_token); string URI_WaterZone_1 = "https://192.168.1.13/api/4/zone/1/start?access_token=" + RainMachine.access_token; string PayLoad_WaterZone_1 = "{\"time\":600}"; string Content_WaterZone_1 = HTTPPostJSONString(URI_WaterZone_1, PayLoad_WaterZone_1, 1); Console.WriteLine(Content_WaterZone_1); } if (Request.QueryString["operation"] == "Sprinkler-One-Off") { ltNotify.Text = Request.QueryString["operation"]; string URI_Auth = "https://192.168.1.13/api/4/auth/login"; string PayLoad_Auth = "{\"pwd\":\"RainMachinePWD\",\"remember\": 1}"; string Content_Auth = HTTPPostJSONString(URI_Auth, PayLoad_Auth, 1); var json_serializer_Auth = new JavaScriptSerializer(); RainMachine RainMachine = json_serializer_Auth.Deserialize<RainMachine>(Content_Auth); Console.WriteLine(RainMachine.access_token); string URI_WaterZone_1 = "https://192.168.1.13/api/4/zone/1/stop?access_token=" + RainMachine.access_token; string PayLoad_WaterZone_1 = "{\"time\":\"10\"}"; string Content_WaterZone_1 = HTTPPostJSONString(URI_WaterZone_1, PayLoad_WaterZone_1, 1); Console.WriteLine(Content_WaterZone_1); } if (Request.QueryString["operation"] == "Sprinkler-Two-On") { ltNotify.Text = Request.QueryString["operation"]; string URI_Auth = "https://192.168.1.13/api/4/auth/login"; string PayLoad_Auth = "{\"pwd\":\"RainMachinePWD\",\"remember\": 1}"; string Content_Auth = HTTPPostJSONString(URI_Auth, PayLoad_Auth, 1); var json_serializer_Auth = new JavaScriptSerializer(); RainMachine RainMachine = json_serializer_Auth.Deserialize<RainMachine>(Content_Auth); Console.WriteLine(RainMachine.access_token); string URI_WaterZone_2 = "https://192.168.1.13/api/4/zone/2/start?access_token=" + RainMachine.access_token; string PayLoad_WaterZone_2 = "{\"time\":600}"; string Content_WaterZone_2 = HTTPPostJSONString(URI_WaterZone_2, PayLoad_WaterZone_2, 1); ltNotify.Text = ltNotify.Text + "<br>" + Content_WaterZone_2; } if (Request.QueryString["operation"] == "Sprinkler-Two-Off") { ltNotify.Text = Request.QueryString["operation"]; string URI_Auth = "https://192.168.1.13/api/4/auth/login"; string PayLoad_Auth = "{\"pwd\":\"RainMachinePWD\",\"remember\": 1}"; string Content_Auth = HTTPPostJSONString(URI_Auth, PayLoad_Auth, 1); var json_serializer_Auth = new JavaScriptSerializer(); RainMachine RainMachine = json_serializer_Auth.Deserialize<RainMachine>(Content_Auth); Console.WriteLine(RainMachine.access_token); string URI_WaterZone_2 = "https://192.168.1.13/api/4/zone/2/stop?access_token=" + RainMachine.access_token; string PayLoad_WaterZone_2 = "{\"time\":\"10\"}"; string Content_WaterZone_2 = HTTPPostJSONString(URI_WaterZone_2, PayLoad_WaterZone_2, 1); Console.WriteLine(Content_WaterZone_2); } if (Request.QueryString["operation"] == "Sprinkler-Three-On") { ltNotify.Text = Request.QueryString["operation"]; string URI_Auth = "https://192.168.1.13/api/4/auth/login"; string PayLoad_Auth = "{\"pwd\":\"RainMachinePWD\",\"remember\": 1}"; string Content_Auth = HTTPPostJSONString(URI_Auth, PayLoad_Auth, 1); var json_serializer_Auth = new JavaScriptSerializer(); RainMachine RainMachine = json_serializer_Auth.Deserialize<RainMachine>(Content_Auth); Console.WriteLine(RainMachine.access_token); string URI_WaterZone_3 = "https://192.168.1.13/api/4/zone/3/start?access_token=" + RainMachine.access_token; string PayLoad_WaterZone_3 = "{\"time\":600}"; string Content_WaterZone_3 = HTTPPostJSONString(URI_WaterZone_3, PayLoad_WaterZone_3, 1); Console.WriteLine(Content_WaterZone_3); } if (Request.QueryString["operation"] == "Sprinkler-Three-Off") { ltNotify.Text = Request.QueryString["operation"]; string URI_Auth = "https://192.168.1.13/api/4/auth/login"; string PayLoad_Auth = "{\"pwd\":\"RainMachinePWD\",\"remember\": 1}"; string Content_Auth = HTTPPostJSONString(URI_Auth, PayLoad_Auth, 1); var json_serializer_Auth = new JavaScriptSerializer(); RainMachine RainMachine = json_serializer_Auth.Deserialize<RainMachine>(Content_Auth); Console.WriteLine(RainMachine.access_token); string URI_WaterZone_3 = "https://192.168.1.13/api/4/zone/3/stop?access_token=" + RainMachine.access_token; string PayLoad_WaterZone_3 = "{\"time\":\"10\"}"; string Content_WaterZone_3 = HTTPPostJSONString(URI_WaterZone_3, PayLoad_WaterZone_3, 1); Console.WriteLine(Content_WaterZone_3); } } else { ltNotify.Text = "<br><br><strong>Things that can be called</strong><hr><br>Light-On-LivingRoomLED<br>Light-Off-LivingRoomLED<br>Light-On-LivingRoom<br>Light-Off-LivingRoom<br>Light-On-Breakfast<br>Light-Off-Breakfast<br>Light-On-Kitchen<br>Light-Off-Kitchen<br>Light-On-Laundry<br>Light-Off-Laundry<br>Light-On-Hallway<br>Light-Off-Hallway<br>Light-On-Patio<br>Light-Off-Patio<br>Light-On-Foryer<br>Light-Off-Foryer<br>Other Stuff I am too lazy to put in here"; } } public void PutObject(string postUrl, string payload) { var request = (HttpWebRequest)WebRequest.Create(postUrl); request.Method = "PUT"; request.ContentType = "application/json"; if (payload != null) { Stream dataStream = request.GetRequestStream(); // Invoke GetBytes method. // ... You can store this array as a field! byte[] array = Encoding.ASCII.GetBytes(payload); // Loop through contents of the array. foreach (byte element in array) { Console.WriteLine("{0} = {1}", element, (char)element); } dataStream.Write(array, 0, array.Length); dataStream.Close(); } HttpWebResponse response = (HttpWebResponse)request.GetResponse(); string returnString = response.StatusCode.ToString(); } public static string HTTPPostJSONString(string URI, string payload, int DisableSSL) { if (DisableSSL == 1) { ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); } var http = (HttpWebRequest)WebRequest.Create(new Uri(URI)); http.Accept = "application/json"; http.ContentType = "application/json"; http.Method = "POST"; UTF8Encoding encoding = new UTF8Encoding(); Byte[] bytes = encoding.GetBytes(payload); Stream newStream = http.GetRequestStream(); newStream.Write(bytes, 0, bytes.Length); newStream.Close(); var response = http.GetResponse(); var stream = response.GetResponseStream(); var sr = new StreamReader(stream); var content = sr.ReadToEnd(); return content; } public static string HTTPGetString(string URI, int DisableSSL) { if (DisableSSL == 1) { ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); } WebClient clnt = new WebClient(); string strResponse = clnt.DownloadString(URI); return strResponse; } } }
-
Michel not sure if it will help or not but I had a problem seeing the Echo talk to the Hue Emulator. What I did to solve was two fold. First was to make sure I was using version 1.3 not the 1.1 release. Also the Echo remembers older SSID's. Turns out in my case Echo was jumping on a old SSID that was on a network that wasn't within broadcast range of the PC that was running the emulator. Once removed all SSIDs except for the one I wanted it started working consistently.
-
Anyone else using the Hue Emulator and noticing the Echo will stop working with it over time (like a day or two). When this happens I run TCPDump -i eth0 | grep 192.168.1.55 (it runs on a Hyper-V Linux VM and the echo is 192.168.1.55) and sure enough I never see anything from Echo. Its only after I power cycle it do I see traffic from it again. Not sure if there is a bug in Echo or if it ends up not liking the bridge emulator due to not interacting correctly. Just wondering if anyone else is noticing that or is it just me?
-
Ha, good point. I was just happen enough that I was able to get it under 160 and had a few left over so I tossed in a few extra.
-
I know its stupid but everyone should tweet @amazonecho telling them to let Micheal / Universal Devices in to the Dev program. This fits nicely in 160 char's: "@amazonecho plz take Michel Kohanim's dev API req seriously. His org's ISY is #1 Insteon home controller. http://bit.ly/1FS2INM I beg!!!!!!" In many companies the social media department tends to have more pull then support org's. Make some noise and it may just help.
-
tezjet, You are awesome! Sure enough I setup the Hue Emulator and created a simply ASP.NET Web Page that takes HTTP GET Requests (leveraging a url parameter to distinguish each device and on/off req) from the bridge emulator that in turn calls the ISY via Rest API (with authentication) and boom all my ISY related items in Echo. Is freaky fast! Alexa can not even finish saying OK before the lights go on or off. I would say happens within 1 to 2 seconds max. "Alexa turn off kitchen lights" <--- works! WooHoo! Going to work on making my ASP.NET Web Page also handle NEST Thermostat requests so, "Alexa turn on AC" would lower it by 2 and "Alexa turn off AC" would raise it by 2 So so happy!! Thanks again!