armzilla / amazon-echo-ha-bridge

emulates philips hue api to other home automation gateways
Apache License 2.0
721 stars 168 forks source link

Feature Request: Way to expose and pass along information about source amazon echo device making the request #88

Open tomchapin opened 7 years ago

tomchapin commented 7 years ago

Is there any way to see which Amazon Echo on the network is making the request to the hue emulator? Like the IP address of the device making the request, or perhaps even the name of the Amazon Echo making the request? If so, then we could script room-specific smart activities!

Example: Living Room Amazon Echo (ip address: 192.168.1.151) makes a request to "turn on the current room's lights", triggering a fake hue bulb named "current room" on the emulator. This then triggers an HTTP request to my separate home automation server, including the source IP of 192.168.1.151 in the request as a parameter of some sort. The home automation server receives the request and matches the source IP with the Living Room Amazon Echo device and the various (real) hue bulbs in that corresponding room. It then fires off a script to turn on those lights.

That's just one example, but I could think of hundreds of other location-specific uses for scripts, if we had this type of functionality. For example, I currently use amazon echo to control my home theater in my living room via voice commands (which trigger scripts to control my harmony hub). If I had a way to hone in on which amazon echo was the one that fired the scripts, I could then expand the functionality so I could use the exact same commands to control the television in my other room, too, just based on where I was located and which amazon echo heard me when I gave the command.

tomchapin commented 7 years ago

As a side note, I would be happy to make a donation of some sort (either to the contributor, or to a charity of the contributor's choice), or maybe even buy someone an Amazon Echo, if they were willing to build this functionality. This piece of software has proven to be very useful to me, and this extra feature would just really be amazing. I would build it myself, but I'm afraid that my Java skills aren't up to par at this point in time.

nanowebcoder commented 7 years ago

My Java skills aren't so good either (which is why I tend to gravitate to .NET). If you aren't in need of a JAVA based version, I have a fork of this in .NET that could be re-tooled to do what you are seeking. Would probably have it use the MAC address of the Echo device as opposed to its IP (as an IP might be dynamically assigned in some environments).

If interested, check out my project at: https://github.com/nanowebcoder/NanoVeraHuesBridge and let me know. For windows environments, the VeraHuesBridge runs a lot lighter on memory and is a standard windows service (so a bit easier to start/stop control with WMI, etc)... but if you are a Raspberry Pie Man or something, you'll probably want to stick with JAVA.

tomchapin commented 7 years ago

@nanowebcoder I will check your project out! My home automation box is actually running Windows 10 with amazon-echo-ha-bridge set up to run as a service, and I'm using EventGhost as the tool for handling the web requests to trigger things, so it sounds like your .NET tool would work if you were able to add either the MAC address or IP address functionality as described. Either approach would work for me, since I am able to do IP address allocation within my local network.

nanowebcoder commented 7 years ago

Let me know if you like the .net version. If so, I’ll add the MAC/IP stuff to it (I just don’t want to spend the time, especially with the holidays here, unless it’s something someone definitely wants to use).

From: Tom Chapin [mailto:notifications@github.com] Sent: Tuesday, November 22, 2016 7:35 PM To: armzilla/amazon-echo-ha-bridge amazon-echo-ha-bridge@noreply.github.com Cc: Kevin Casey kcasey@nanoweb.com; Mention mention@noreply.github.com Subject: Re: [armzilla/amazon-echo-ha-bridge] Feature Request: Way to expose and pass along information about source amazon echo device making the request (#88)

@nanowebcoderhttps://github.com/nanowebcoder I will check your project out! My home automation box is actually running Windows 10 with amazon-echo-ha-bridge set up to run as a service, so it sounds like your .NET tool would work just as well for me, if you were able to add the MAC address or IP address functionality. Either approach would work for me, since I am able to do IP address allocation within my local network.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/armzilla/amazon-echo-ha-bridge/issues/88#issuecomment-262407669, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQjlVBvZW9MrbnTfxAHrAmgIPrCdGAYFks5rA4pMgaJpZM4K32XK.