Anyone have any insights on how the Wemo app selects the hub it uses when it sets up a device?

So I have been using node-red-node-wemo for years. I originally had some weird issues that I somehow managed work around, and everything has been running smoothly for a very long time. It was all very reliable.

But recently, I bought 3 new (used, but new to me) Wemo devices: and insight (my first one) and a motion sensor/outlet combo.

I got the insight first about a month or so ago and it all seemed to go ok, but shortly after, I realized that the power toggles for all my Wemo devices were 1. Misrepresenting their state 2. Would allow me to toggle them, but actually did not change the actual states of the outlets. And if I went to the home app, the buttons in the home app were both accurate and working. And after manipulating them in the home app, the Wemo app would start working again.

For a few weeks, I just ignored it and figured I would work it out later. Then I bought the motion sensor/outlet combo.

Those devices went through setup in the Wemo app without any errors or issues, but at the end, they would not appear in the Wemo app's devices tab. However, the devices, with the names I gave them during setup, appeared in the Wemo config node on node red and seemed to work fine in node red.

Last week, I started to realize that the sensor had stopped sending motion events and on the weekend, I started debugging why that was... I couldn't figure it out. The node had a "found" green status under it and the physical sensor lit up when I tripped it, but no events were being emitted from the node. My other sensor seemed to work just fine, so I was baffled.

I spent over an hour yesterday talking to belkin support and they concluded the devices were faulty and that I should return them.

But I continued to debug it that evening and I think I figured out the source of the problem: the sensor and outlet had been added to my homebridge instance!

I have homebridge still set up because it has plugins for some devices for which there exist no node red nodes. But I'd forgotten that I still had the Wemo plug-in installed! I was using homebridge for a few years before I got into node red.

I will eventually see if removing the Wemo plugin from homebridge and creating homekitd nodes to replace them will work, though I'm not completely sure that will solve the problem...

Setting that question aside for the moment, I'm curious about how the Wemo app selects the "bridge" that it uses both during setup and eventually after reboots etc, because it definitely was working and stopped working without any intentional setup changes. And I'm curious how the Wemo node reacts during the Wemo app setup procedure, if at all?

I don't think that the homekitd node is involved in this issue, because the Wemo nodes are independent, is that right? So is it the Wemo node and/or the homekitd node configuring a "hapjs"(? Not sure I'm remembering the name right) instance, which is where the wemo config node is getting the info from to add those newly added devices (via setup in the wemo app). And is the Wemo app arbitrarily selecting between "some node red hapjs bridge" and homebridge? Or is it randomly selecting which bridge it belongs to at any given time? And is the devices tab on the Wemo app populating from a single bridge instance, which may differ from the bridge the device is added to?

EDITED: And I could be wrong in my hunches - and I hope what I've said makes sense. I would just like to understand where the contention is and how it selects which bridge to add the device to: whether it be a bridge controlled by node-red or homebridge. I assume a device cannot be listed on 2 bridges, yet there's at least partial evidence in each case that the sensor has a representation in each bridge. And once it's added, what governs where it sends events and which fridge's representation can issue commands?

And how can the sensor work in homebridge, yet the Wemo node can find it? Is it connecting locally or remotely (to the belkin server)?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.