Wemo switch and insight smart plug


#141

Thank you so much @jason0x43


#142

Ok, there's a new version of the Connect app out (Last updated: 2019-05-21, 21:58:02-0400). This likely won't help with dimmers directly, but it should give us a clearer picture of the discovery process and of what addresses the Connect app is using to talk to devices.


#143

So the goal here would be to update the Connect app, open it, log what's happening for a bit, then try to subscribe or resubscribe on a child device and log that, too.


#144

@jason0x43
I just updated the user app, then opened the Wemo Connect app.

Here are the logs:
app:1942019-05-25 03:31:11.036 pm errorjava.lang.NullPointerException: Cannot get property 'value' on null object on line 424 (updated)

app:1942019-05-25 03:31:11.026 pm traceLooking for selected device 24F5A2C6FAEB in known devices...

dev:1702019-05-25 03:31:10.974 pm traceparse()

dev:1702019-05-25 03:31:10.834 pm traceNotify: BinaryState = 0

dev:1702019-05-25 03:31:10.828 pm traceScheduling resubscription in 270 s

dev:1702019-05-25 03:31:10.812 pm traceUpdating subscriptionId to 0858db50-1dd2-11b2-a2b4-dfc6454f763e

dev:1702019-05-25 03:31:10.767 pm traceparse()

dev:1702019-05-25 03:31:10.760 pm traceparse()

dev:1702019-05-25 03:31:10.650 pm traceGetBinaryResponse: brightness = 50

dev:1702019-05-25 03:31:10.643 pm traceGetBinaryResponse: BinaryState = 0

dev:1702019-05-25 03:31:10.563 pm traceparse()

dev:1702019-05-25 03:31:10.444 pm debugpoll()

app:1942019-05-25 03:31:10.398 pm debugchildTimeSyncResponse(Living Room Fan Light)

app:1942019-05-25 03:31:10.387 pm traceSubscribing to 24F5A2454B3F at 10.0.0.32:49154

app:1942019-05-25 03:31:10.379 pm traceClearing existing sid

app:1942019-05-25 03:31:10.372 pm debugchildSubscribe(Living Room Fan Light)

app:1942019-05-25 03:31:10.365 pm debugchildRefresh(Living Room Fan Light)

dev:1702019-05-25 03:31:10.343 pm debugrefresh()

app:1942019-05-25 03:31:10.327 pm traceSetting up device subscription...

app:1942019-05-25 03:31:10.320 pm traceDevice Living Room Fan Light with id 24F5A2454B3F already exists

app:1942019-05-25 03:31:10.292 pm traceFound device; looking for existing child with dni 24F5A2454B3F

app:1942019-05-25 03:31:10.286 pm traceLooking for selected device 24F5A2454B3F in known devices...

dev:1632019-05-25 03:31:10.215 pm traceNotify: BinaryState = 0

dev:1632019-05-25 03:31:10.133 pm traceScheduling resubscription in 270 s

dev:1632019-05-25 03:31:10.119 pm traceUpdating subscriptionId to 07f54dce-1dd2-11b2-9052-8a5ca10612cd

dev:1632019-05-25 03:31:10.111 pm traceparse()

dev:1632019-05-25 03:31:10.080 pm traceparse()

dev:1632019-05-25 03:31:09.992 pm traceGetBinaryResponse: BinaryState = 0

dev:1632019-05-25 03:31:09.900 pm traceparse()

dev:1632019-05-25 03:31:09.654 pm debugpoll()

app:1942019-05-25 03:31:08.973 pm debugchildTimeSyncResponse(Entry)

app:1942019-05-25 03:31:08.949 pm traceSubscribing to 24F5A2602E55 at 10.0.0.33:49153

app:1942019-05-25 03:31:08.936 pm traceClearing existing sid

app:1942019-05-25 03:31:08.928 pm debugchildSubscribe(Entry)

app:1942019-05-25 03:31:08.921 pm debugchildRefresh(Entry)

dev:1632019-05-25 03:31:08.890 pm debugrefresh()

app:1942019-05-25 03:31:08.872 pm traceSetting up device subscription...

app:1942019-05-25 03:31:08.866 pm traceDevice Entry with id 24F5A2602E55 already exists

app:1942019-05-25 03:31:08.779 pm traceFound device; looking for existing child with dni 24F5A2602E55

app:1942019-05-25 03:31:08.772 pm traceLooking for selected device 24F5A2602E55 in known devices...

app:1942019-05-25 03:31:08.756 pm traceInitializing devices

app:1942019-05-25 03:31:08.743 pm debugInitializing

app:1942019-05-25 03:31:08.737 pm debugUpdated

app:1942019-05-25 03:30:45.874 pm traceKnown devices: [24F5A2602E55:Entry, 24F5A2454B3F:Living Room Fan Light, 24F5A2C6FAEB:Wemo Dimmer, 24F5A24B6325:Wemo Switch, 58EF68F434F9:Wemo Switch, 30230307C89D:Wemo Switch, 302303085A61:Wemo Switch, 24F5A24B61E1:Wemo Switch, 302303085AF1:Wemo Switch, 24F5A2459241:Wemo Dimmer]

app:1942019-05-25 03:30:45.866 pm traceAdded already-installed device 24F5A2459241:Wemo Dimmer

app:1942019-05-25 03:30:45.860 pm traceAdded already-installed device 302303085AF1:Wemo Switch

app:1942019-05-25 03:30:45.854 pm traceAdded already-installed device 24F5A24B61E1:Wemo Switch

app:1942019-05-25 03:30:45.847 pm traceAdded already-installed device 302303085A61:Wemo Switch

app:1942019-05-25 03:30:45.841 pm traceAdded already-installed device 30230307C89D:Wemo Switch

app:1942019-05-25 03:30:45.834 pm traceAdded already-installed device 58EF68F434F9:Wemo Switch

app:1942019-05-25 03:30:45.828 pm traceAdded already-installed device 24F5A24B6325:Wemo Switch

app:1942019-05-25 03:30:45.811 pm traceAdded already-installed device 24F5A2C6FAEB:Wemo Dimmer

app:1942019-05-25 03:30:45.805 pm traceAdded discovered device 24F5A2454B3F:Living Room Fan Light

app:1942019-05-25 03:30:45.800 pm traceAdded discovered device 24F5A2602E55:Entry

app:1942019-05-25 03:30:45.780 pm traceCreating list of known devices

app:1942019-05-25 03:30:45.774 pm traceVerifying devices

app:1942019-05-25 03:30:15.638 pm traceKnown devices: [24F5A2602E55:Entry, 24F5A2454B3F:Living Room Fan Light, 24F5A2C6FAEB:Wemo Dimmer, 24F5A24B6325:Wemo Switch, 58EF68F434F9:Wemo Switch, 30230307C89D:Wemo Switch, 302303085A61:Wemo Switch, 24F5A24B61E1:Wemo Switch, 302303085AF1:Wemo Switch, 24F5A2459241:Wemo Dimmer]

app:1942019-05-25 03:30:15.630 pm traceAdded already-installed device 24F5A2459241:Wemo Dimmer

app:1942019-05-25 03:30:15.623 pm traceAdded already-installed device 302303085AF1:Wemo Switch

app:1942019-05-25 03:30:15.615 pm traceAdded already-installed device 24F5A24B61E1:Wemo Switch

app:1942019-05-25 03:30:15.605 pm traceAdded already-installed device 302303085A61:Wemo Switch

app:1942019-05-25 03:30:15.595 pm traceAdded already-installed device 30230307C89D:Wemo Switch

app:1942019-05-25 03:30:15.588 pm traceAdded already-installed device 58EF68F434F9:Wemo Switch

app:1942019-05-25 03:30:15.581 pm traceAdded already-installed device 24F5A24B6325:Wemo Switch

app:1942019-05-25 03:30:15.574 pm traceAdded already-installed device 24F5A2C6FAEB:Wemo Dimmer

app:1942019-05-25 03:30:15.563 pm traceAdded discovered device 24F5A2454B3F:Living Room Fan Light

app:1942019-05-25 03:30:15.556 pm traceAdded discovered device 24F5A2602E55:Entry

app:1942019-05-25 03:30:15.485 pm traceCreating list of known devices

app:1942019-05-25 03:30:15.457 pm traceVerifying devices

--- Live Log Started, waiting for events ---


#145

Hello Jason @jason0x43

I was using your excellent Wemo drivers successfully for more then a year, but unfortunately some switch devices stopped responding to commands and I decided to start from scratch. I didn't delete the devices, but I've deleted Wemo Connect app and reinstalled your latest one. All devices had been rediscovered, but I can't use any of them, because something wrong with the these 2 commands below called from Wemo Connect

def on() {
log.debug 'on()'
parent.childSetBinaryState(device, '1')
}

def off() {
log.debug 'off()'
parent.childSetBinaryState(device, '0')

The log error:
dev:4542019-05-27 14:03:15.243 errorjava.lang.IllegalArgumentException: null on line 45 (on)
The same error when ON/OFF command when is called from Wemo Switch and Insight Switch and I have 20 of them.
Can you look what can be wrong?

Also I see this error in the log
app:16802019-05-27 16:25:03.587 errorjava.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI on line 454 (updated)


#146

@aryvin
The following is from another post.
Change the line in the WeMo Connect app as shown and it should start working for you. (I hope). :wink:

THANK YOU! That did the trick. I changed line 451 from deviceData.address to deviceData.mac and my Wemo devices are being discovered and successfully added to Devices.


#147

Ack! Sorry for the delay in getting to this, and thanks to @chuck.schwer and @bobbles for pointing out the issue. That explains why everyone's been having trouble adding devices (because the error was in the child device creation code), and why I didn't notice it myself (I haven 't tried adding any devices recently).

A new version of the Connect app is out with the fix.


Wemo Mini Outlets
#148

Any plan to add support for the Holmes Wemo humidifier and the Wemo space heater to this?

Thanks for this BTW


#149

@jason0x43

Jason, I removed my WEMO devices, updated WEMO Connect, then ran discover. It has found all but one of the devices. I am starting to see some very odd behavior.

When the device is initially discovered, the device name appears correct in the discovery drop down and in the Device page. Over time, I see the name change on the drop down box from the original name to a descriptive name. It used to say Living Room Spot, now it says Wemo Switch or Dimmer.

As I wrote this, I went to take a screen shot and it had discovered the last of the ten devices. All of the names are now back to normal. This is very odd. I have seen this happen now three times as it was going through discover.


#150

@YapFlapper That was an issue with how the list of devices was being setup. It's a combination of existing devices and newly discovered devices. There were some issues with how that list was being created in earlier versions of the code...and apparently in more recent versions as well. The behavior you were seeing was due to a newly-discovered (and nameless) version of an existing device overwriting the already known device in the list (until the proper name had been re-discovered).

I pushed an update. Give that a shot.


#151

@jason0x43

I have fully tested the WEMO Connect app and plug, switch, & dimmer drivers and I am seeing devices discovered, dimmer slider control brightness, switches switching on and off, etc. all working as designed.
:cowboy_hat_face:
Thank you so much Jason. I really appreciate the effort.

YF


#152

Excellent! :grin:


#153

Hi Jason (@jason0x43)

Getting this error on a Wemo Insight plug when doing a refresh:

I have updated the Wemo Connect app, and am running the latest Hubitat release. As an aside, I do not know if the error was present prior to me updating the Connect app or hub firmware.

FYI: The error is not present with the Wemo Switch driver.

Any ideas?

Thanks
J


#154

I pushed updated versions of the Connect app and the Insight driver that have some additional logging statements. Hopefully that will give us a better idea of what's breaking. Install both of those, then try doing a Refresh or a Poll from your Insight switch and record the logs for both the Connect app and the Insight switch device.

You don't need to uninstall the app or drivers, just update the driver and app code and then try one of the device operations.


#155

Here's an error that popped up when I updated with the latest APP & DRIVER code.

2019-06-03 12:17:37.375 [error] java.lang.NullPointerException: Cannot get property 'value' on null object on line 427 (updated)


#156

@walksonair Ah, it looks like there was a case where the Connect app assumed that a device would be found in a list of devices, but apparently sometimes it wasn't.

I pushed an updated version of the Connect app that should behave better. The fact that the error was occurring at all points to some deeper issue, but the newer version of the app should tell us a bit more about what's happening.


#157

Hi Jason (@jason0x43)

Thanks for the update to fix the Insight code errors. With the latest I downloaded the java.lang error has disappeared.

J


#158

The error should be gone, so that part's good. There may still be an issue somewhere, though, because it was weird that error was happening in the first place. Does everything seem to be working properly?


#159

Thanks for the latest update! :+1:

As far as everything working...I constantly keep losing Hubitat connection with some of my WEMOs...not sure why. I'd try to use Hubitat to turn off or on a switch and it wont respond but the WEMO will when I ask Alexa to do the same command. The Amazon Echo Alexa has all my WEMO's added as devices in its smart home tab.


#160

I am seeing g the same issue with Google Home. I think I it is on the Wemo side.