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

Duplicate devices after Node-RED restart #24

Closed jonathanschneider closed 4 years ago

jonathanschneider commented 6 years ago

When I restart Node-RED, Alexa discovers the same devices again and creates duplicates. I have set unique IDs and ports but Alexa still detects them as new devices.

umbm commented 6 years ago

I have a similar problem. I get the duplicates if I added a new device to node-red without restarting node-red. Alexa discovers the new device and adds the already existing devices additional with same name. All devices are set with a unique port and ID.

tomjmul commented 6 years ago

Same issue. I've tested by directly creating device emulations with wemore 0.6 and it does appear horribly broken with the Alexa discovery mechanism. Every time the emulator is restarted and discovery run, a new Wemo device will appear and the old one hangs around. Even without restarting Alexa will often discover the same device again.

@biddster Would you be open to PRs on this?

maddinla commented 6 years ago

I have the same problem. When I will add a new device I get duplicates and Alexa doesn´t work because the names are not only for one device.

JoJ123 commented 5 years ago

I also run into this issue today. Until now I didn't found a solution

MrPasty commented 5 years ago

same issue here, would love to see a fix because removing dups from alexa is a real pain. is this bug being tracked?

DENightOne commented 5 years ago

Have the same problem.....didnt know about it till i looked at the alexa web app and say over 50 duplicates... I used to use node-red-contrib-alexa-local for all my IOT things but sadly it sees everything as a light... I changed to node-red-contrib-wemo-emulator so that I can set it as a switch or a light in the alexa app (android)

biddster commented 5 years ago

Sorry for the radio silence folks, been super busy on the job that pays the bills. @tomjmul, I'd really welcome a PR, all help very welcome as I don't have a huge amount of time still.

I was considering replacing wemore with fauxmojs, but that seems to have issues too.

Blackink90 commented 5 years ago

@biddster I really love your node, I was going to replace alexa-home with yours cause i HATE depending on someone else's site that is often down, but your node it's duplicating devices for me too, after every "deploy". I tried alexa-local but with my plus it's not doing a thing. I'm looking forward for a fix, this is sure going to be my first choice :)

nnhhuu commented 5 years ago

hello, any update on this?

rodymary commented 5 years ago

Also I've got such duplicated devices each time I'm restarting Node-Red or my Pi. I'm now better using fauxmoESP library (https://bitbucket.org/xoseperez/fauxmoesp) on a tiny esp8266 and it's working like a charm. If it could help.

tomjmul commented 5 years ago

I asked @biddster if he was open to a PR but got no reply. I've created a new contribution which scraps the wemore library and uses lower-level networking to get around this duplicate devices problem. Please try it out and let me know if it works for you - node-red-fake-wemo . Many thanks to @biddster for his excellent contribution which I've used for a long time until this issue came up.

biddster commented 5 years ago

4 comments up @tomjmul :

@tomjmul, I'd really welcome a PR, all help very welcome as I don't have a huge amount of time still.

Either way, I'm really glad you've got it sorted as I haven't had the time.

I had planned to help the chaps here and fix up fauxmojs https://github.com/dsandor/fauxmojs/issues/21

tomjmul commented 5 years ago

@biddster I missed your reply, my apologies

Shaquu commented 5 years ago

Have you managed to fix this?

biddster commented 5 years ago

I'm sorry - I haven't had any time to look at this.

jonathanschneider commented 5 years ago

I asked @biddster if he was open to a PR but got no reply. I've created a new contribution which scraps the wemore library and uses lower-level networking to get around this duplicate devices problem. Please try it out and let me know if it works for you - node-red-fake-wemo . Many thanks to @biddster for his excellent contribution which I've used for a long time until this issue came up.

@tomjmul Could you please still provide that pull request? I'd like to stick with node-red-contrib-wemo-emulator.

Andy4handy commented 4 years ago

I have assigned a fixed port to my devices. The easiest way is to enter the last port that was assigned in Node-Red. Then restart flows and new search on Alexa. Even after a reboot I could press switches.

biddster commented 4 years ago

I think I have a fix, I'll look to publish in the next few days.

biddster commented 4 years ago

Fix released in version 1.0.0. Please let me know how you get on.

You will get one more duplicate device after upgrading to 1.0.0, that's unavoidable unfortunately. However, you can remove all of the old duplicate devices and you should not get any more duplicates.

jonathanschneider commented 4 years ago

No more duplicates! Great job! Thank you!

MattL0 commented 4 years ago

@jonathanschneider still no duplicates? Thanks

MattL0 commented 4 years ago

did you use that library ? https://github.com/n8henrie/fauxmo/tree/dev

@biddster

jonathanschneider commented 4 years ago

Yes, still no duplicates!

biddster commented 4 years ago

@MattL0 this node uses https://github.com/dhleong/wemore