ferdies Posted June 24, 2015 Posted June 24, 2015 Hi, You guys may or may have already seen this - https://github.com/noelportugal/AmazonEchoApi In case someone is interested to dig into this further. Quote
kgividen Posted June 24, 2015 Posted June 24, 2015 @kingwr I definitely agree with you. I've written this bridge (Lambda function) which is more of a proof of concept. It does use the new ISY portal from UDI but it could easily be modified if your ISY has it's ports exposed on the internet. The code isn't as clean as it should be right now but it does work. A developer account is currently needed to use it since some values are hard coded like username and password. It automatically connects to the REST server and gets all of the devices. It uses the name of the device as the spoken name right now. https://github.com/kgividen/IsyEchoBridge However, even though this works, the HUE bridge is a cleaner solution for the reasons you've stated above. Maybe if all of use with developer accounts start talking to Amazon UDI could do something similar to what they've done with HUE. Additionally, another thought is to include something like the HUE bridge on the ISY some way in the meantime and use a wrapper like what @ferdies has talked about before. That way it would be connected directly to the ISY and wouldn't have to be run separately. Although it does sound like there's a 28 device limit there. Anyway...like @randyth said it's been interesting playing around with this API. Quote
Michel Kohanim Posted June 24, 2015 Posted June 24, 2015 Hello all, Thanks so very much for all the feedback. I must agree with you all that hue emulator is probably the right way to go for now. Notes is not currently accessible via REST. But if this makes things easier it would be relatively easy to add it. Thanks again. With kind regards, Michel Quote
jruben4 Posted June 24, 2015 Posted June 24, 2015 I wrote a quick and dirty 'mapper' that uses the 1.3 JAR. It reads off the emulator devices, and enumerated ISY programs, scenes and nodes. You double click an item to add/remove it. Seems to work pretty well. Alexa is doing great work with the light management now. The issue I ran into with 'not responding' was for an outletlinc. I couldn't get the REST API to work for either a node, or scene end point. I created a program with a simple then and else clause that changes the state and now Alexa controls that too. I haven't hit the 28 node limit, but with my mapper could test the Echo limits by adding the same device a bunch of times with different names. I ran into a similar problem controlling z-wave door lock state, but wrapped that in a program and voila, Alexa is locking the front door! I have some polish to put on the mapper (it has very little error handling and some proto-UI stuff) but would be willing to share. I am thinking about adding an automatic update to the Echo as well (forget ++ rediscover) but haven't decided yet if worth the effort... C. Looks nice! Would love to take a look at this. Quote
jruben4 Posted June 24, 2015 Posted June 24, 2015 Echo -> huebridge -> ISY -> lights, IR linq, REST commands to start music https://twitter.com/jruben4/status/613520576536252416/video/1 Quote
Goose66 Posted June 24, 2015 Posted June 24, 2015 @Michel, Accessing Notes via REST would be great. I could use Notes to store the spoken name, or maybe store a JSON object that can include whatever custom attributes I want, e.g.: { "spokenNames": ["Basement Hall Lights", "Basement Hall"], "includeInEchoList":true } However, long term I would think a "spoken name" attribute added to scenes, devices, programs, etc. would be useful to any third-party developer integrating a voice-activated controller. Quote
Goose66 Posted June 24, 2015 Posted June 24, 2015 @kingwr I definitely agree with you. I've written this bridge (Lambda function) which is more of a proof of concept. It does use the new ISY portal from UDI but it could easily be modified if your ISY has it's ports exposed on the internet. Thanks for posting your interface. I will complete mine (that's how you learn, right?) and then I will take a look and see what best practices could be developed. This is the project I chose for my first Echo app, so it's not wasted time even if the Hue bridge is the better solution. One thing I don't know yet - will the Hue bridge allow thermostat control? Quote
Xathros Posted June 24, 2015 Posted June 24, 2015 Echo -> huebridge -> ISY -> lights, IR linq, REST commands to start music https://twitter.com/jruben4/status/613520576536252416/video/1 -Xathros Quote
g1of4 Posted June 24, 2015 Posted June 24, 2015 Notes would be awesome. I was trying to figure out where to store mappings from ISY <-> HUE, adding as an item attribute would be great. Michael, any feedback on why there is a divergence of support over REST for Z-wave devices, and why I was having outletlinc issues with node URIs? I was able to control an outlet linc and a z-wave kwikset lock with programs in the end. C. Quote
jruben4 Posted June 24, 2015 Posted June 24, 2015 Screen Shot 2015-06-24 at 1.15.18 PM.jpg -Xathros Try this version Quote
ferdies Posted June 25, 2015 Posted June 25, 2015 Going back to the 28-device limit - any successful hack on this? Read that limitation really existed, but there's no confirmed number and I am stuck at 28 (http://www.developers.meethue.com/content/amazon-echo-and-hue-bridge-discovery-problems Quote
Michel Kohanim Posted June 25, 2015 Posted June 25, 2015 Hi kingwr, /rest/nodes//notes is added to REST in 4.3.9 (to be out shortly). Hi g1of4, unfortunately I really do not understand what you are referencing as everything should work as is. jruben4, beautiful on all levels! And, finally, we just got our account yesterday but, then again, I guess it's not a cause for celebration since so did everyone else! With kind regards, Michel Quote
madmartian Posted June 25, 2015 Author Posted June 25, 2015 (edited) Thanks for all the replies and research on this topic. I am trying to get the Hue bridge working. I created one device and said "Alexa, discover my devices", but Alexa could not find the device. I switched to the 1.3 version of the jar as someone else suggested, but still no discovery. I suspect it has something to do with port 1900 as I get the following netstat results: C:\Users\admin>netstat -ano | find "1900" UDP 0.0.0.0:1900 *:* 17380 UDP 0.0.0.0:1900 *:* 12752 UDP 127.0.0.1:1900 *:* 2720 UDP 192.168.0.2:1900 *:* 2720 UDP 192.168.56.1:1900 *:* 2720 UDP [::]:1900 *:* 12752 UDP [::1]:1900 *:* 2720 UDP [fe80::6d6b:f5a3:fb70:b1b3%19]:1900 *:* 2720 UDP [fe80::714c:8c8f:e077:f7f6%24]:1900 *:* 2720 I think the important one is: UDP 192.168.0.2:1900 *:* 2720 That's the machine the emulator is running on. Looking up PID 2720, I find the following: wcncsvc SSDPSRV FDResPub I don't believe these are things I can kill without consequences. How have others gotten past this problem? I'm on Windows 7 64 bit. Edited June 25, 2015 by madmartian Quote
Michel Kohanim Posted June 25, 2015 Posted June 25, 2015 Hello everyone, Just a quick comment:1. Added REST URL to get notes (/rest/nodes/ /notes)2. Added element to the notes object: Mars Hello world this is you and I. {a,b}}}}}} true HeyShould be available in 4.3.9.Now, the main question is: how can we get Amazon to let us have our own app instead of all the acrobatics with Hue.With kind regards,Michel Quote
madmartian Posted June 25, 2015 Author Posted June 25, 2015 Thanks for all the replies and research on this topic. I am trying to get the Hue bridge working. I created one device and said "Alexa, discover my devices", but Alexa could not find the device. I switched to the 1.3 version of the jar as someone else suggested, but still no discovery. I suspect it has something to do with port 1900 as I get the following netstat results: C:\Users\admin>netstat -ano | find "1900" UDP 0.0.0.0:1900 *:* 17380 UDP 0.0.0.0:1900 *:* 12752 UDP 127.0.0.1:1900 *:* 2720 UDP 192.168.0.2:1900 *:* 2720 UDP 192.168.56.1:1900 *:* 2720 UDP [::]:1900 *:* 12752 UDP [::1]:1900 *:* 2720 UDP [fe80::6d6b:f5a3:fb70:b1b3%19]:1900 *:* 2720 UDP [fe80::714c:8c8f:e077:f7f6%24]:1900 *:* 2720 I think the important one is: UDP 192.168.0.2:1900 *:* 2720 That's the machine the emulator is running on. Looking up PID 2720, I find the following: wcncsvc SSDPSRV FDResPub I don't believe these are things I can kill without consequences. How have others gotten past this problem? I'm on Windows 7 64 bit. Well, um, I was able to solve the problem. Perhaps this video will help explain it: I think the REAL problem was I had to uninstall CyberPowerDVD, which was also using the port, and even though the uninstall did not prompt me to reboot the computer it was necessary to reboot to reclaim the port. I am now in Echo/ISY nirvana. Thank you all very much. Quote
g1of4 Posted June 26, 2015 Posted June 26, 2015 Is there a build I can grab with notes somewhere? It looks like the beta forum post has 4.3.8. With respect to divergence: I was trying to understand from http://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interfacewhy Z-Wave devices don't expose control interfaces over REST in the same way as nodes. Certainly there are differences in the broad capabilities of devices, but it would be nice to be able to activate say a z-wave switch (or in my case a lock) with a REST construct. It could be I'm just not understanding. I ended up wrapping my Z-wave device in a program to get the desired outcome and use the runThen and runElse. With the outlet linc, when I navigate to the URI for the node with DON, I get an empty properties response. Here: http://isy/rest/nodes/2A%209E%20B4%201/DON resultsin: <properties/> A few people have tried out the C# Windows Forms app I cobbled together to configure the HUE Emulator based on the existing ISY devices. I would like to add 'alternate spoken names' to notes, hence the ask for 4.3.9. Keep up the great work, and welcome to the SDK If you happen to figure out the forget + rediscover design pattern please let me know so I can add that too C. Quote
PurdueGuy Posted June 26, 2015 Posted June 26, 2015 Z-Wave devices can be controlled the same as Insteon devices. Locks are different, see here: http://forum.universal-devices.com/topic/12373-lock-unlock-with-rest-interface/?hl=secmd&do=findComment&comment=101099 and here: http://forum.universal-devices.com/topic/13250-rest-lock-control/?hl=secmd&do=findComment&comment=109116 Quote
Fatty Posted June 26, 2015 Posted June 26, 2015 opened up yesterday https://developer.amazon.com/appsandservices/solutions/alexa/alexa-skills-kit Quote
kgividen Posted June 26, 2015 Posted June 26, 2015 There are a few challenges with the current SDK for UDI vs. HUE but none of them are deal breakers in my opinion and will probably be overcome. kingwr summarized them a bit but let me see if I can add some detail and context: 1) Voice Commands. Right now you have to say "Alexa, ask ISY to turn on kitchen light". vs. Hue you can just say "Alexa, turn on kitchen light" It's only three words. Additionally, you can say "Alexa, launch ISY" Then you can say "Turn on kitchen light" and then "turn on basement light" without having to re-launch. Not a huge deal and can be coded in preparation for UDI to make a deal with Amazon to get rid of the three extra words. 2) Registering the Echo. Right now you'd have to have a web page (or mobile app or something) where the user would have to register their Echo with some custom web service. You would have to store the User Login (or maybe some unique Echo number) for that user somewhere and associate that with either their ISY portal or IP address that is exposed on the internet. This is so when a request from an Echo hits the web service you know which Echo it is and where to send the REST commands. VS. Hue where they don't have to do this...you can go into a "discover devices" mode and it uses I think UPNP to find all the HUE devices on the network and automatically adds them. Then they are available to control via the Echo. This is probably the greatest challenge. However, it really wouldn't be that hard to create a web page to do this and one advantage is you could have the user set a "spoken command" at the time they register and they could select which items they wanted controlled by the Echo. 3) ISY Current Advantages. a) Right now there seems to be a 28 device limit with HUE (although I haven't hit it as I'm controlling less than that). I don't see why this would be with ISY and the Echo if the above is finished. It would be nice to be able to edit the spoken command easily c) You could expose much more control because the entire power of the ISY REST interface would be exposed/available. Anyway, even with my simple code it would be close to having #1 done. A simple version of #2 could probably be done without a ton of trouble. Then UDI can work with Amazon to figure out how to eliminate the three words and get some sort of auto discovery thing going. I'm willing to work on this a bit more to help UDI out. Specially if any of you familiar with this are interested in teaming up a bit. Quote
Guitartexan Posted June 26, 2015 Posted June 26, 2015 Today, Amazon announced an Alexa API set to let third-party developers easily build support for the system into their own apps. Alexa Voice Services would allow anyone to actually take Alexa and build it into their own hardware product, meaning Alexa is now officially unbundled from Echo GT Quote
Dale T Posted June 26, 2015 Posted June 26, 2015 (edited) Amazon launches a $100 million fund to support the AI brain behind its Echo device https://fortune.com/2015/06/25/amazon-alexa-fund/ Stacey Higginbotham/Fortune Amazon is letting developers use the voice recognition tech behind the Echo and has launched a $100 million Alexa fund. Amazon has taken the cloud-based intelligence behind its voice-controlled Echo device and is offering it up free to anyone who wants to use it. And to show how serious it is, it is also launching a $100 million investment fund, which already has made seven investments. Amazon made three related announcements on Thursday covering its plans for the artificial intelligence behind the Echo device. The first is that the voice-activation software development kit will be made available for free to developers who want to add high-quality speech recognition and links to Alexa’s cloud services to their devices. The second is that developers can now add integration to the Echo with a few lines of code, and finally it announced the $100 million investment fund. Amazon’s move is the equivalent of Apple opening up Siri for any device, and pushes Amazon to compete against Apple, Google and Microsoft in providing a personal assistant and user interface for the smart home. The service is designed for a world where our connected devices don’t have screens (or have really tiny ones). When lights and thermostats are connected, voice is an obvious control mechanism, and Amazon wants to get in on that game to ensure its relevance in the consumers’ life as our homes become smarter. It also turns the Echo, a device that combines a series of microphones and a speaker with cloud-based intelligence, into the hub of a smart home. But instead of just controlling connected lights or appliances, it also is a bridge to a variety of services on the web such as your calendar. So eventually you may be able to ask the Echo to “wake you up in time for your 8:30 meeting” and it will have the intelligence and means to do so. Today, by offering what Amazon calls Alexa Voice Services developers can use the natural language recognition that the Echo uses to control their own connected devices via voice. So a connected vacuum cleaner could understand a spoken command to “Vacuum the living room.” Already Amazon is working with Intuit, Glympse, StubHub, AOL and others to add voice capabilities to their products. Products using the Alexa voice recognition and speech services will launch later this year. That’s impressive, but Amazon is taking it one step further with the Alexa Skills Kit for developers. This will offer developers a way to integrate their products with the Echo devices in people’s homes. So with a few lines of code a connected oven maker can enable their product to work with the Echo. Amazon made the Echo generally available to consumers this week, and this announcement ensures that the device will only get more capable as time goes on. All Amazon has to do is ensure that there’s a large market of consumers who have and use the Echo, and developers will be forced to support the platform. To help with this, Amazon has built the investment fund which ensures that certain services and products will be working with the Echo. The fund has already made investments in The Orange Chef, a company making connected kitchen prep devices; Scout Alarm, a DIY connected security system; Garageio, which makes a connected garage door opener; Toymail, a company building connected toys; Dragon Innovation, which helps companies build consumer devices and will promote the Alexa services to its customers; MARA, a virtual running coach; and Mojio, a company making a device that plugs into a car’s diagnostics port. With these investments, customers who own the Echo and these devices will soon be able to ask their Echo “Is my garage door open?” or “Do I need gas in my car?” and get a spoken answer. What Amazon has done is unveil an entire ecosystem built around voice control for the smart home, apps and anything else, all in one week. So go spend $179.99 on the Amazon Echo. Because right now, it’s the device that gets you closest to living in the future. Edited June 26, 2015 by Dale T Quote
btreinders Posted June 26, 2015 Posted June 26, 2015 Does this mean Universal Devices will have an interface soon? Quote
ferdies Posted June 26, 2015 Posted June 26, 2015 If there will be an ISY Module for Alexa soon, I would definitely purchase it. 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.