dhleong / wemore

A more awesome library for Belkin WeMo interactions
37 stars 11 forks source link

There is a possible mistake in emulate.js #14

Closed AlGu1 closed 6 years ago

AlGu1 commented 6 years ago

Hi,

i am using this Lib by biddster/node-red-contrib-wemo-emulator. And die node-red in my ioBroker to emulate devices from my homeautomation for Amazon Alexa. I have installed the lib "node-red-contrib-wemo-emulator" in my node-red and using it over Alexa speech control, that works fine. But in the Alexa App i can not control the device. It shows "Belkin International Inc." and loading icon. But when i change the row 178 in emulate.js into: UDN: "uuid:" + this.serial then can i control the device in the Alexa App.

I think it is a bug, but i can not check it in your using of this lib.

Thanks AlGu

dhleong commented 6 years ago

Have you tried discussing your issue there? I don't use that lib, but use this one directly and don't have any problems with Alexa.

AlGu1 commented 6 years ago

Ok mhh...but is the UDN with "uuid:" not the correct code?! Other emulations like node-red-contrib-alexa-local use it so. Greetings AlGu

dhleong commented 6 years ago

It seems to work for me without it. I would want a proper UUID if I'm going to prefix with uuid:; the serial number we're generating is definitely not a UUID.

jtai commented 6 years ago

FWIW I ran into the same issue as @AlGu1 using wemore directly. I was previously using https://github.com/kakopappa/arduino-esp8266-alexa-multiple-wemo-switch to emulate switches, which worked just fine. When I switched to wemore the alexa app hung as described above. Changing the UDN to prefix with uuid: made it work.

From reading through issues like https://github.com/kakopappa/arduino-esp8266-alexa-multiple-wemo-switch/issues/22, it sounds like different versions of echo hardware behave differently, which may account for the difference in experiences?

dhleong commented 6 years ago

Thanks for the report @jtai, that's very interesting. Would you mind testing with generating an actual UUID to be used after uuid: with something like UUID v4? If that still works for you then I'll be happy to verify that it still works on my setup and, assuming it does, implement it into the library.

jtai commented 6 years ago

Alexa seems ok with the UUID, at least on my echo. This works: https://github.com/jtai/wemore/commit/cd374c680897f867bb419c13b9a2cfa15c9f5096

dhleong commented 6 years ago

Hello everyone, thanks for your help here! I've released version 0.6.0 that uses the uuid: prefix. Please give it a try and let me know if it works for you!