dfetzer Posted June 12, 2015 Posted June 12, 2015 Thx cmacnichol { "name" : "bedroom lamp", "deviceType" : "switch", "onUrl" : "http://192.168.1.94/rest/nodes/26%205B%209F%201/cmd/DFON", "offUrl" : "http://192.168.1.94/rest/nodes/26%205B%209F%201/cmd/DFOF" } When i try them direct in the browser they function properly Quote
dfetzer Posted June 12, 2015 Posted June 12, 2015 You can see its trying to change state: 2015-06-12 17:16:22.976 INFO 1904 --- [nio-8080-exec-5] com.armzilla.ha.hue.Hue Mulator : hue api root requested: from 192.168.1.73 2015-06-12 17:16:24.545 INFO 1904 --- [io-8080-exec-11] com.armzilla.ha.hue.Hue Mulator : hue light requested: fr om 192.168.1.73 2015-06-12 17:16:24.546 INFO 1904 --- [io-8080-exec-11] com.armzilla.ha.hue.Hue Mulator : found device named: west office light 2015-06-12 17:16:24.694 INFO 1904 --- [io-8080-exec-12] com.armzilla.ha.hue.Hue Mulator : hue state change requested: from 192.168.1.73 2015-06-12 17:16:24.695 INFO 1904 --- [io-8080-exec-12] com.armzilla.ha.hue.Hue Mulator : hue stage change body: {"on": true} Quote
dfetzer Posted June 12, 2015 Posted June 12, 2015 found answer to my second question...send delete rest url: http://yourmachine:8080/api/devices/ deviceID - replace device ID with the id shown in the api URL http://192.168.1.201:8080/api/devices returns: [{"content":[{"id":"ffa3ffeb-cb39-4e06-9199-5a283612d41b","name":"west office light","deviceType":"switch","offUrl":"http://192.168.1.94/rest/nodes/21%20F0%20DF%201/cmd/DFOF Quote
cmacnichol Posted June 12, 2015 Posted June 12, 2015 (edited) Yeah, had not used the delete function before. That might be your issue right there with the URL. A lot of URL'S do not handle spaces well. Plus, do you have Security on your ISY? Here is an example from my setup with the User\Pass reset to default. Notice the %20 in every space. http://admin:admin@192.168.2.50/rest/nodes/1F%2021%205%201/cmd/DON Here it is without the Security. http://192.168.2.50/rest/nodes/1F%2021%205%201/cmd/DON Edited June 12, 2015 by cmacnichol Quote
dfetzer Posted June 13, 2015 Posted June 13, 2015 (edited) Yeah, had not used the delete function before. That might be your issue right there with the URL. A lot of URL'S do not handle spaces well. Plus, do you have Security on your ISY? Here is an example from my setup with the User\Pass reset to default. Notice the %20 in every space. http://admin:admin@192.168.2.50/rest/nodes/1F%2021%205%201/cmd/DONHere it is without the Security. http://192.168.2.50/rest/nodes/1F%2021%205%201/cmd/DON I had the %20 in there originally but the forum rendered it as a url and changed it...when i use the link directly in my browser it works, maybe I'll see if I can get arms latest build...I can also try to secure my isy and try that run as well Edited June 13, 2015 by dfetzer Quote
jruben4 Posted June 13, 2015 Posted June 13, 2015 Correct, you can't have spaces in the URL or java bombs out. Have to use the %20 code. Quote
dfetzer Posted June 13, 2015 Posted June 13, 2015 (edited) could it be that these are the insteon bulbs and not actual switches? checked with regular switches and with %20 and it still doesnt work: You can see that it finds the device, tries to set he state to on, but then the echo actually says 'sorry I could not find the device name basement living' All devices show in the echo app 2015-06-13 10:32:16.717 INFO 3388 --- [io-8080-exec-10] com.armzilla.ha.hue.Hue Mulator : found device named: basement living 2015-06-13 10:32:16.879 INFO 3388 --- [nio-8080-exec-7] com.armzilla.ha.hue.Hue Mulator : hue state change requested: m8n2WwN5zEvreKPJzu872p8dfYnTj7Sl XNdO1AEK from 192.168.1.73 2015-06-13 10:32:16.880 INFO 3388 --- [nio-8080-exec-7] com.armzilla.ha.hue.Hue Mulator : hue stage change body: {"on": true} Not sure what to do from here Edited June 13, 2015 by dfetzer Quote
btreinders Posted June 13, 2015 Posted June 13, 2015 Has anyone run into a 28 device limit with the emulator? Once I add 29 and run Add new devices on the Echo app, all devices show offline. Quote
dfetzer Posted June 13, 2015 Posted June 13, 2015 Hope, I'm not overextending my bounds here - but downloaded the 1.3 jar and forgot all devices and readded and now everything works...Not sure where the error was - but definitely URL related as you could see the following 200 HTTP status code once I updated: 2015-06-13 10:46:19.991 INFO 8740 --- [nio-8080-exec-5] com.armzilla.ha.hue.Hue Mulator : calling GET on URL: http://192.168.1.94/rest/nodes/26%205B%2 09F%201/cmd/DFON 2015-06-13 10:46:20.009 INFO 8740 --- [nio-8080-exec-5] com.armzilla.ha.hue.Hue Mulator : GET on URL responded: 200 Happy as a pig in you know what Quote
ferdies Posted June 14, 2015 Posted June 14, 2015 Hi, Is there a way to send Rest command from ISY to hue_emulator? I will like to control GE link lights on hue emulator bridge via ISY motion sensors. Thanks. Quote
larryllix Posted June 15, 2015 Posted June 15, 2015 Hi, Is there a way to send Rest command from ISY to hue_emulator? I will like to control GE link lights on hue emulator bridge via ISY motion sensors. Thanks. You would require the Network Module installed in ISY. Then you can send almost any style command you desire. Quote
MWareman Posted June 15, 2015 Posted June 15, 2015 Hi, Is there a way to send Rest command from ISY to hue_emulator? I will like to control GE link lights on hue emulator bridge via ISY motion sensors. Thanks. Have you actually been able to link Hue lights to the Hue emulator? I tried to link a Wink hub to it, and the two don't talk at all.... Quote
kgividen Posted June 15, 2015 Posted June 15, 2015 I have an Amazon Echo and I also have an Echo Developer license and I've been looking at the API. I'm also familiar with the ISY REST interface as I wrote the mobile xControl app using that. I'm interested in writing an application for the Echo that will allow us to control the ISY without the HUE adapter but I don't want to duplicate anything if it's already being done. Are there others doing this right now? Quote
Quietminded Posted June 15, 2015 Posted June 15, 2015 I don't code but am hopeful someone will do this Quote
ngeren Posted June 15, 2015 Posted June 15, 2015 (edited) I've started messing with something basic ... working on a relay method now to send the commands to the ISY (when it's behind a firewall), as the Echo can't speak to devices on the LAN from what I can tell. Edited June 15, 2015 by ngeren Quote
ferdies Posted June 15, 2015 Posted June 15, 2015 Have you actually been able to link Hue lights to the Hue emulator? I tried to link a Wink hub to it, and the two don't talk at all.... I tried linking a GE link bulb and I could not, unfortunatey. Hue Lights app (Android version) found the Hue emulator UPnP but the Ge link bulb could not be found. Hue emulator version I am using is 0.4 and I was thinking it is just really for emulation and not actual replacement of the bridge. As the developer mentioned - "It allows developers who don't have access to a Philips Hue system (i.e. A Bridge + Hue Light Bulbs) to write hue apps." From this link https://github.com/SteveyO/Hue-Emulator. What do you think? Or anyone around has successfully linked a Philips or Ge bulbs to the emulator? I may have to buy Philips Hue bridge to do further testing. Planning to use GE link bulbs since they are cheaper than Philips bulbs. And next step is to have Amazon echo voice controlling Insteon, GE, Venstar and others .... Quote
PurdueGuy Posted June 15, 2015 Posted June 15, 2015 You cannot link a bulb to the emulator. The emulator is just software, to look/act like a hub to other devices on the network. If you actually have a GE Link, Cree or Hue bulb, you need an actual Hue bridge to communicate with/control them. Quote
kck Posted June 16, 2015 Posted June 16, 2015 Got my Echo working with ISY via a RPi with the Hue emulator. Works well if a bit awkward. By the way - one thing to be sure of when setting it up is that capitalization counts. The "offUrl" is exactly that and not offURL as one might have expected (being an acronym after all). Spell it wrong and the actual offUrl gets set to null which results in a device not found back from Alexa. My biggest issues setting it up was pulling in my 20 year old Unix knowledge from some lost part of my aging brain. Been a long time since I banged on Unix stuff but it does come back to you when you play with it. My main problem now is that my RPi doesn't want to successfully boot with only the WiFi adapter in it so I have it hanging on enet which isn't ideal. Have to debug that one when I get a chance. Quote
PurdueGuy Posted June 16, 2015 Posted June 16, 2015 Using the included "configurator.html" makes it easier to setup the emulator. For the best experience, change the "Bridge server" if needed. On line 18, change "localhost" to the IP where the Hue emulator runs. Then open it in a web browser, The file it setup to configure a Vera, but you can ignore that. Just set the "On URL" and "Off URL" and hit "Add device" configurator.html Quote
kgividen Posted June 16, 2015 Posted June 16, 2015 Using the included "configurator.html" makes it easier to setup the emulator. For the best experience, change the "Bridge server" if needed. On line 18, change "localhost" to the IP where the Hue emulator runs. Then open it in a web browser, The file it setup to configure a Vera, but you can ignore that. Just set the "On URL" and "Off URL" and hit "Add device" I liked the idea of this page so I enhanced it for use with the ISY. You can get to it at https://github.com/kgividen/EchoBridgeConfigurator Here are some features new and old: - See what is currently added into the emulator (existing feature) - Delete devices from the emulator (existing feature) - Button to get all ISY devices from the REST API. (new feature) - Rename devices before adding them. (new feature) - Button to click and add ISY devices to the HUE emulator. (new feature) This way you can quickly add ISY devices into the HUE emulator and control them with the ECHO Quote
kck Posted June 17, 2015 Posted June 17, 2015 I liked the idea of this page so I enhanced it for use with the ISY. You can get to it at https://github.com/kgividen/EchoBridgeConfigurator Here are some features new and old: - See what is currently added into the emulator (existing feature) - Delete devices from the emulator (existing feature) - Button to get all ISY devices from the REST API. (new feature) - Rename devices before adding them. (new feature) - Button to click and add ISY devices to the HUE emulator. (new feature) This way you can quickly add ISY devices into the HUE emulator and control them with the ECHO I tried you version. It gets the current devices in the emulator fine but doesn't seem to get anything from the ISY. I edited the js to insert my IP address and username/password but pushing the get devices button doesn't do anything. This was on an instance of Chrome launched with the no web security flag per your instructions. If I just manually reference http://usr:pwd@isyaddr/rest/nodes I get a very long listing of my nodes. Quote
kck Posted June 17, 2015 Posted June 17, 2015 Are there errors in the browser console? Just looked (hadn't earlier). Error is: GET http://192.168.1.15/rest/nodes/ 401 (OK)(anonymous function) @ angular.js:9902sendReq @ angular.js:9703serverRequest @ angular.js:9415processQueue @ angular.js:13292(anonymous function) @ angular.js:13308Scope.$eval @ angular.js:14547Scope.$digest @ angular.js:14363Scope.$apply @ angular.js:14652(anonymous function) @ angular.js:21678b.event.dispatch @ jquery.min.js:3v.handle @ jquery.min.js:3 configurator.html:1 XMLHttpRequest cannot load http://192.168.1.15/rest/nodes/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 401. I imagine it is the "No Access-Control-Allow-Origin" item. I supplied my username and password for my ISY though they don't show here. Actually, since I have already accessed the ISY from this machine it seems that the node list gets returned even without actually supplying the authentication info on the REST URL. Quote
kgividen Posted June 18, 2015 Posted June 18, 2015 Just looked (hadn't earlier). Error is: GET http://192.168.1.15/rest/nodes/ 401 (OK)(anonymous function) @ angular.js:9902sendReq @ angular.js:9703serverRequest @ angular.js:9415processQueue @ angular.js:13292(anonymous function) @ angular.js:13308Scope.$eval @ angular.js:14547Scope.$digest @ angular.js:14363Scope.$apply @ angular.js:14652(anonymous function) @ angular.js:21678b.event.dispatch @ jquery.min.js:3v.handle @ jquery.min.js:3 configurator.html:1 XMLHttpRequest cannot load http://192.168.1.15/rest/nodes/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 401. I imagine it is the "No Access-Control-Allow-Origin" item. I supplied my username and password for my ISY though they don't show here. Actually, since I have already accessed the ISY from this machine it seems that the node list gets returned even without actually supplying the authentication info on the REST URL. We might want to move this to the github issues page so as not to clutter up this thread since this is really meant as a thread on the echo/isy. Whichever is better... In any case...based on this console error it seems one or two things might be happening. 1) The URL does not look correct as I would expect it to say something like http://username:pwd@192.168.1.15/rest/nodes/ Hence the 401 which means bad authorization. You said you edited the JS to add your ip address, username and password but this shouldn't have been necessary if you used the configurator.html page. There are fields for these on that page. I would recommend using those. Additionally, if you open the chrome developer tools and look at the network tab when getting the devices you'll see the exact GET and the URL being used to make sure the username and password are being passed through. 2) The No Access Control Origin error is usually related to CORS and I wouldn't expect that if Chrome was loaded without the security. I've only tested this on the MAC so maybe there's something additional you have to do if you're using windows. But the URL still needs to be corrected. Quote
Michel Kohanim Posted June 18, 2015 Posted June 18, 2015 Hello, Can anyone help me? I want to use our ISYPortal (proxies to ISY as if you are talking to ISY directly) to do some tests. I do have an Amazon Echo but have not yet received developer credentials. Thank you. With kind regards, Michel Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.