sarkonovich / Alexa-Hue

Control Hue Lights with Alexa
131 stars 28 forks source link

Support for multiple hubs?? #20

Closed MikeTheWatchGuy closed 8 years ago

MikeTheWatchGuy commented 8 years ago

OK, so I don't write code every day anymore, but did for decades so I am up for doing some work if needed :-)

I am wondering if this code as it is now is capable of working with multiple hue bridges. I have 3 bridges in my home and would LOVE to get this skill working with all of them.

So far I have managed to get my server running and am able to request the list of lights, groups, scenes, etc. It was a major victory just to get this far with the server setups, etc. I subscribed to NGROK so that I have a dedicated address now. THANK YOU for doing all this work. I wish I could contact Steven directly but haven't figured out yet how to do that!

Regardless, thank you for doing so much work, making it public, etc. Would love to donate to the cause.

-mike

sarkonovich commented 8 years ago

Hello! Why don't you email me here: arkonovs@reed.edu and we can talk about this. As is, it won't work, but doesn't seem hard to adapt it.

eschizoid commented 8 years ago

Any ideas if this is still going to happen?

sarkonovich commented 8 years ago

I don't really see how to do it, on reflection. The most natural use case is that you want different Alexa devices to control different hubs. But currently there is no way to get information about which Alexa device the request is coming from.

MikeTheWatchGuy commented 8 years ago

Yes is the answer to the question if I’m still looking at this.

I’m learning still. It’s a slow process but I have managed to get the plumbing working!! You left great instructions. My Alexas (both real and the virtual ones) are able to get my skill command from me and return the list of lights. That’s as far as I’ve gotten. I don’t know why yet my individual lights are not being found. I find them sometimes. I don’t know enough about Ruby to debug and I haven’t been able to get the debugger to set breakpoints and dump out variable information.

Like any side project this one is going in spurts. I’ve got another couple of side projects including building a database of Gruen watch movements on my vintage Gruen watch site (www.GruenWristwatches.com http://www.GruenWristwatches.com ). That’s my primary activity, doing research and publishing books on Gruen watches.

I need to learn more of Ruby and start to seriously debug what I have. After that I can turn my attention to actually getting the stuff to WORK correctly.

The hack I had in mind for dealing with my THREE different bridges is to have a different skill for each bridge. Yes, ugly, major hack kind of stuff, but it gets me around the problem of multiple bridges if each skill only deals with one bridge. I don’t know enough about your code, Ruby, the whole Alexa universe, and Hue lights to speak in an intelligent manner on the topic.

Thank you for checking in….. I need someone to poke me like you did to keep me moving. I’ll go back to trying to get RDE to work correctly on Windows 10. Once I get that going I can better debug and educate myself on how Hue and Alexa work together.

Thank you for your time

-mike

From: sarkonovich [mailto:notifications@github.com] Sent: Wednesday, August 31, 2016 10:49 AM Subject: Re: [sarkonovich/Alexa-Hue] Support for multiple hubs?? (#20)

I don't really see how to do it, on reflection. The most natural use case is that you want different Alexa devices to control different hubs. But currently there is no way to get information about which Alexa device the request is coming from.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/20#issuecomment-243788544 , or mute the thread https://github.com/notifications/unsubscribe-auth/AND8wcmKukIB19PLnDPgeB6flWqzvtcyks5qlZRSgaJpZM4JjRMQ . https://github.com/notifications/beacon/AND8wTYriVRAhVl-OJUw1wpNb-5h4vxsks5qlZRSgaJpZM4JjRMQ.gif

eschizoid commented 8 years ago

@sarkonovich Are you totally sure that as part of the raw request that Alexa sends, there is no metadata that we can extract to determine the Echo device? I find that hard to believe.

Maybe we can check the HTTP headers and see if there is something useful there?

It would be Ideal to submit this as an enhancement to the Amazon Echo team, if there is no way of getting a unique identifier (mac address, uuid or something unique per device) as par of the raw request.

MikeTheWatchGuy commented 8 years ago

Why are multiple Echo devices part of the equation? It’s multiple BRIDGES that are what I’m wanting to control. It should be completely Echo device agnostic. I use two physical echo devices, one is a normal Echo the other a dot, and I use the “Lexa” app on MANY different phones and tablets.

Bear in mind that I’m working in the dark at the moment. I have not yet reverse engineered the code nor been able to dump out the contents of variables to see what is coming and going to the Echo units.

Perhaps you can point me towards the debugger you used for Ruby?? I’ve been trying to get RDE to work, but it won’t catch the breakpoints. I’ve been able to get it to run the app and it does handle getting commands from the skill so I know it’s at least running the code. I haven’t been able to set a breakpoint nor break into running code so that I can examine variables. I know this is a really basic thing to be asking about, but it’s where I am at the moment. I focused initially on getting the basic plumbing to work of the Lambda pass through, then through grocer, and into the running Ruby code. Now that all of that works I’m drilling down the next level which is to get my basic development environment setup for Ruby. Since I’m new to Ruby, I don’t know what people are using. Help with this would be very appreciated!!

Thank you for your time, I’m sure you’re plenty busy with other things.

take care

-mike

From: Mariano Gonzalez [mailto:notifications@github.com] Sent: Wednesday, August 31, 2016 12:37 PM Subject: Re: [sarkonovich/Alexa-Hue] Support for multiple hubs?? (#20)

@sarkonovich https://github.com/sarkonovich Are you totally sure that as part of the raw request that Alexa sends, there is no metadata that we can extract to determine the Echo device? I find hard to believe that.

Maybe we can also check the HTTP headers and see if there is something useful there?

It would be Ideal to submit this as an enhancement to the Amazon Echo team, if there is no way of getting a unique identifier for the physical device.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/20#issuecomment-243823600 , or mute the thread https://github.com/notifications/unsubscribe-auth/AND8weZRuyBpGAvv77v1aeupSCDd8lS0ks5qla3DgaJpZM4JjRMQ . https://github.com/notifications/beacon/AND8wSoGLT6sikSkZncUyuenE9ekBXMkks5qla3DgaJpZM4JjRMQ.gif

sarkonovich commented 8 years ago

@eschizoid Yes, I'm sure. Getting the hardware ID, or even the hardware type (dot or echo or tap) is a highly requested feature. As far as I know, Amazon has not yet implemented it.

@MikeTheWatchGuy Fair enough. I was imagining a large house that needed multiple hubs for different parts of the house/different Alexa devices. Just sending the request to multiple hubs is definitely possible. If I get some time, I can probably send you a hack that will make it work...

armisis commented 6 years ago

Saw this thread, I am trying to get 2 hubs working on two different networks with 6 different alexa devices that are unified under one account even though they are in different locations (two houses), What I am looking for is something that will allow me to control all my lights with all the features scenes etc from any of my alexa wherever I am. Turn on and off and adjust lights from one house at the other. Right now they have two meethue accounts and are kinda linked but one house cannot change colors just on and off and dimming via alexa the other can control all features. Any idea how to fix this?? Thanks,

Dave