Wemo Mini Outlets

@dan7 Glad you got it figured out. There were two things that tripped me up before I found that walk through.

  • Adding the App code in the "Apps Code" section in hubitat
  • Needing the Switch driver

I guess the second one makse sense if you think about it as you are really controlling a switch inside the plug, but still confusing. I wonder if the repo owner could update the readme. I think that is @jason0x43

Good call, that could definitely have used some instructions. I've updated the README. Let me know if more information would be helpful (or file an issue on the repo).

my entire system log is filled with this kind of events:
ssdpTerm urn:Belkin:device:controllee:1

anyway to turn it off?

thanks

So I've been using this for my dimmers, switches, and smart plugs for a while now and I just bought some new wemo mini smart plugs. For some reason the WeMo Connect app doesn't seem to be picking up these new devices. All the old ones work fine, I just can't find the new ones. It's been a while since I added a new WeMo device, but I do recall that earlier this year WeMo forced a new "WeMo Account" on me. Could this have broken the discovery? Or am I missing something entirely? I have the insight switch, dimmer, and switch drivers installed with all the latest versions.

So I attempted removing the wemo connect app and reinstalling. While that didn't fix the issue, it did show that all of the devices were re-discovered EXCEPT for the new WeMo Mini Plugs. I did notice that the hardware version on these is v4 (I thought v3 was the latest) so maybe something has changed in the way these are discovered? @jason0x43 I'm trying to look through your code now, but admittedly I'm not familiar with the WeMo devices and how to make calls to them correctly so I'm not having much luck on that end. If there's anything you can suggest I do to troubleshoot it would be appreciated.

So after a little more analysis it appears that these new plugs aren't responding on the same port as the previous ones. The old ones use port 49153, this one uses 49152. I was able to send a command to turn the wemo on/off on port 49152. My assumption is that for some reason the WeMo Connect app isn't hitting that port, but so far I haven't been able to really dig into the code to figure out why. Anyone have any thoughts before I try to dig into this?

I've been using this driver on and off for a while now for my Christmas lights. I noticed this year, although all the devices are working fine, my log is filled with these messages (see below). I've removed all devices and application then re-added, still the same problem.

any ideas?

app:33032020-12-08 08:05:10.124 pm errorjava.lang.NumberFormatException: For input string: "nu" on line 388 (childSubscribeIfNecessary)

app:33032020-12-08 08:05:02.703 pm errorjava.lang.NullPointerException: Cannot invoke method getAt() on null object on line 393 (handleSsdpEvent)

app:33032020-12-08 08:05:00.162 pm errorjava.lang.NumberFormatException: For input string: "nu" on line 388 (childGetBinaryState)

app:33032020-12-08 08:05:00.143 pm errorjava.lang.NumberFormatException: For input string: "nu" on line 388 (childSyncTime)

app:33032020-12-08 08:05:00.112 pm errorjava.lang.NumberFormatException: For input string: "nu" on line 388 (childResubscribe)

app:33032020-12-08 08:00:10.155 pm errorjava.lang.NumberFormatException: For input string: "nu" on line 388 (childSubscribeIfNecessary)

app:33032020-12-08 08:00:05.966 pm errorjava.lang.NullPointerException: Cannot invoke method getAt() on null object on line 393 (handleSsdpEvent)

I've been using the wemo connect app in my hubitat for a while and its been great, but as of maybe 2 or 3 days ago my automations stopped working. Finally got to take a look at the app and I've been getting the same errors as the post above me.

In addition I can't open the app and just run into this error:

Unexpected Error

An unexpected error has occurred trying to load the app. Check [Logs] for more information.

Error: Cannot invoke method getAt() on null object

The connect app only recognizes a particular set of Wemo devices (the ones with drivers that have been tested):

So the first step is to figure out what the deviceType for the smart plug is and make sure it's in that list.

Hmmm...nothing has changed in the Connect code or drivers for a while now, and nothing in any of the Wemo code calls getAt. Was there anything more detailed in the logs?

According to the setup.xml on the device the device type is <deviceType>urn:Belkin:device:controllee:1</deviceType>

Out of curiosity did you recently update your firmware? I was notified that there was new firmware for practically all of my WeMo devices today, and I'm hesitant to pull the trigger on that in case it's related to your issue.

These are what I get when trying to activate my wemo plugs from the dashboard;

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:05.906 pm [info](http://hubitat.lan/installedapp/configure/99)Setting binary state for Night light

[dev:131](http://hubitat.lan/logs#dev131)2020-12-12 06:07:05.897 pm [info](http://hubitat.lan/device/edit/131)Turning on

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:04.063 pm [error](http://hubitat.lan/installedapp/configure/99)java.lang.NumberFormatException: For input string: "nu" on line 387 (childSetBinaryState)

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:04.056 pm [info](http://hubitat.lan/installedapp/configure/99)Setting binary state for Lamps

[dev:133](http://hubitat.lan/logs#dev133)2020-12-12 06:07:04.047 pm [info](http://hubitat.lan/device/edit/133)Turning off

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:03.223 pm [error](http://hubitat.lan/installedapp/configure/99)java.lang.NumberFormatException: For input string: "nu" on line 387 (childSetBinaryState)

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:03.216 pm [info](http://hubitat.lan/installedapp/configure/99)Setting binary state for Backyard

[dev:130](http://hubitat.lan/logs#dev130)2020-12-12 06:07:03.207 pm [info](http://hubitat.lan/device/edit/130)Turning off

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:02.942 pm [error](http://hubitat.lan/installedapp/configure/99)java.lang.NumberFormatException: For input string: "nu" on line 387 (childSetBinaryState)

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:02.934 pm [info](http://hubitat.lan/installedapp/configure/99)Setting binary state for air conditioner

[dev:129](http://hubitat.lan/logs#dev129)2020-12-12 06:07:02.921 pm [info](http://hubitat.lan/device/edit/129)Turning off

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:02.351 pm [error](http://hubitat.lan/installedapp/configure/99)java.lang.NumberFormatException: For input string: "nu" on line 387 (childSetBinaryState)

[app:99](http://hubitat.lan/logs#app99)2020-12-12 06:07:02.343 pm [info](http://hubitat.lan/installedapp/configure/99)Setting binary state for kitchen

[dev:132](http://hubitat.lan/logs#dev132)2020-12-12 06:07:02.331 pm [info](http://hubitat.lan/device/edit/132)Turning off

Yes I did actually, whatever the newest firmware was available.

I also updated my WeMos FW recently: WeMo_WW_2.00.11452.PVT-OWRT-SNSV2

but I just checked and there is yet another new FW: 11565.PVT

Since my WeMos are working right now with Hubitat, just filling my log with error messages, I'm hesitant to upgrade.

@jason0x43 - is there anything in particular from the logs I can help provide?

did anyone find a solution to this problem?

I'm also seeing the same thing as @abalingit; where the app is giving me an error:

Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: Cannot invoke method getAt() on null object

One of my Wemo switches went offline last week. It would not connect but my other 9 worked fine. I tried accessing the Wemo Connect app and I was getting the same error as you. I tried deleting and reinstalling the app which then made all the other Wemo switches stop working. I restored a backup of my Hubitat and everything was back to square one with only the one Wemo switch not working. It seemed to be that the switch had lost its subscription ID. I removed that switch from my Hubitat and the Wemo Connect app started working again. I re-added the bad switch and everything began to work again. I'm not sure what the issue was but that seemed to work for me. I did also update all my switches to the latest firmware.

I decided to be adventurous and pull the trigger on the updated wemo firmware. It updated my old v1 swich, my v2 insight switch, my dimmer switches, and my 3-way switch. All appear to be working fine. Still can't get the app to detect my v4 mini's though.

@jason0x43 so I've been digging into your code, and with my limited knowledge of how Hubitat itself does things it would appear that when the app calls the lan discovery that my WeMo Minis aren't being found based on the debug logs. Lots of SSDP handler events for the existing devices, but no mention of the new ones. Unfortunately I haven't had the time to dig into how exactly lan discovery works so I'm not sure how to go about troubleshooting further. Is there a way for me to try to force lan discovery against the specific device and see what comes back? Trying to read through the documentation on this but I'm having a hard time getting specifics on how to call lan discovery. Are there any logs I can provide/look at to shed some light on this?

@war02orc Discovery is run periodically whenever the Connect app is open in the Hubitat UI. The types of devices targeted by the discovery requests are listed in the discoverAllWemoTypes function. That function actually sends out the request, and handleSsdpEvent processes any messages that are received.

If no SSDP events are ever received for the v4 plug, it's possible that it doesn't respond to any of the targets in discoverAllWemoTypes (entirely possible because I'm not sure what the target for a v4 plug would be, although I thought I saw someone mention it might be urn:Belkin:device:controllee:1).