biddster / node-red-contrib-wemo-emulator

Why might you want to emulate Wemo? Well I wanted to be able to control my Node-RED Raspberry Pi using my Amazon Echo. The Echo has Wemo support built in so I thought I'd give it a try.
17 stars 8 forks source link

Identifiing asking Echo/Alexa #19

Open CarJu opened 6 years ago

CarJu commented 6 years ago

Hello Biddster! I have two echos in two rooms. I want to tell node-red to do different things, depending on the echo where the command comes from.

Is there any possibility to identify the IP or any kind of id where comes the command from?

For example: I build a flow for "lights". If I ask from livingroom "alexa turn lights on" then the livingroom-lights should turn on... in kitchen, lights of kitchen should reakt. From my opinion, that would be a "killer-feature"! :-)

THANK YOU for your great work!

biddster commented 6 years ago

I think this is a great idea @CarJu. However, I can't see any identifying information on the callback I get from Wemore.

I've raised an issue in Wemore asking the question. https://github.com/dhleong/wemore/issues/13

biddster commented 6 years ago

@CarJu, @dhleong has very kindly added support in wemore for identifying the callee. I'll look to incorporate that asap and get a release out.

CarJu commented 6 years ago

Oh, that are great news! I will be very happy to see your next update!

Thank You!

martinschki commented 6 years ago

Great! I'm too looking forward to this!!! It will simplify my multi Echo setup siginificantly

Thank you!!!

biddster commented 6 years ago

I've finally got around to do some testing and it seems that the origin of the request is always from the same alexa device, regardless of which device was spoken to.

I think I'll do a release anyway as it doesn't do any harm and you folks can see if it works for you.

biddster commented 6 years ago

0.5.1 released, give it a try.

CarJu commented 6 years ago

Hello Biddster, I'm sorry for late reply... I testet very much and it is not working and I'm sorry, it will not work! Amazon has changed handling of answering and so it is random which echo is shown.

If you are still interested in a solution, on this page I found a sh-script for asking amazon for the last alexa with voice command: https://wennez.wordpress.com/light-on-with-alexa-for-each-room/

heres the script on github: https://github.com/thorsten-gehrig/alexa-remote-control

I will now try to send all room-specific commands from Alexa over HABridge and http requests to note-red. It is much more complicated... but it seems to work,

Thank you for your great work! For simple "on" "off" your node is still my favorite!

martinschki commented 5 years ago

Could I also please ping this??? Is there a solution? Would be awesome