[RELEASE] Enhanced Wemo (Connect)

wemo

(Ule) #1

Hi, this is a new Wemo attempt to get a working wemo devices.
The principal problem with Lan devices like wemo is the timer problem from ST, lan devices need the subscription to known the status, every time a change occurs in the device , this information its send to ST, but this subscription can be broken, by time or by problems in device.
If the device is overloaded with request it can restart the config and lost the subscriptions, a new subscription must to received.
If a subscription finish, because every subscription have a time limit, a new subscription must to be received.
Then if ST timers fails, no new subscription is sent to wemo and no status its received.

The secondary problem its a change in ip or port from device, most of the time a lan device like wemo retains the port and ip, but if network restart or a wemo is disconected from network can take another port, the wemo conect must to check if something change in the devices , this is checked by schedule, but if ST timers fails, the check is not posible,

I have mod the wemo connect to verify if the timers are working, if not, the timers are restored, to achieve this we need some triggers to verify (because timers do not work) , then I have added some fields to get some events form your other devices, ex. a temp device send a event each time the temperature change , this event can be used to verify if the timers are working, you can use door contacts , power meter , motion , etc the refresh time in the wemo connect is 5 minutes, every 5 minutes must to run the subscription and the verify ip, if the timer do not launch this task your other devices can launch the task.

This app and device handlers must to be installed in the IDE, then works form the cloud, my wemo are stable and working fine

I use a power meter device (aeon power meter) to send the back up timer, this device send a event every minute to known the power , in this way the subscription task and check ip are always working even if ST timers fails.

https://github.com/SmartThingsUle/Wemo


ST isn't seeing Wemo switch & Wemo switch is offline
Does the Old Wemo Connect App not work anymore?
Resolved. Wemo's are offline
Wemo (Connect) - error java.lang.ArrayIndexOutOfBoundsException
WeMo set-up in UK
Adding Wemo
Wemo Outlets
How to get a WeMo Switch back online?
WEMO Insight power meter
Smartthings cannot connect to more than 1 WeMo switches?
WeMo Switch unresponsive
Smartthings cannot connect to more than 1 WeMo switches?
ST isn't seeing Wemo switch & Wemo switch is offline
Another laundry monitor question
Wemo Lights Compatibility?
Wemo vs ST Wall Sockets
Wemo switch "offline"
#2

I installed the device drivers ans app and once installed it eventually discovers all 15 switches, sensors, etc… After selecting each switch and hitting Done the app returns to the first/main preference page. There I hit done again and then after a lengthy period I get an error (iOS= can’t save page. Android=You have network issues) neither make any sense. Tried modifying then saving one of my other app without issue. Not sure where to go from here


(Ule) #3

Hi @cdikland , I think the time to install 15 devices is to much to ST,

  1. try to install just 1 (select just 1 in discovered devices) and save, in this way we check that all is working fine
  2. Install the other devices in increments of 5 units

Other way is to make a group of devices, install several wemo conect to install several wemo devices, ex
connect 1 - 5 switches
connect 2 - 8 insight switches
connext 3 - 6 motion
connect 4 - 3 light switches

right now the connect have a parameter to no install several apps, you must remove it

if you want to install several instances of connect app
remove : singleInstance: true,

try and feedback


#4

That is what I tried already. I started with one and eventually got 3 installed. The 4th one created an error so I unchecked it. Selected another wemo and this time got as far as 5 installed. The 6th created an error. Unchecked it and tried each of the remainder. Errors for each. Eventually even the 5 that did initially installed created an error. I removed each one at the time and eventually had NONE checked. Had to remove the app and haven’t retried since.


#5

Installed by groups as you recommended and all was good :slight_smile:

I think the install “problem” was really issues at the ST server side and nothing to do with this app. Although I did install 4 different instances (one for each type of wemo) I noticed the multiple wemo devices process/install this morning went much faster than last night when I tried just 1 device. So, this morning after setting up 4 groups/installs I started to remove adevices from one install and add them to one of the others. Eventually I removed 2 installs. I believe that I could probably get down to one install for all my 15 devices but its all working well now so… why take the chance :laughing:


(claman) #6

Thanks for addressing this Wemo issue. I was able to get the connect installed but I’m getting an error when attempting to installing the switch and motion.

Switch: “No signature of method: script14559841955911543597513.metadata() is applicable for argument types: (script14559841955911543597513$_run_closure1) values: [script14559841955911543597513$_run_closure1@19dd879e] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)”

Motion: “startup failed: script14559836641181532028234.groovy: 18: unexpected token: + @ line 18, column 1. + metadata { ^ 1 error”


(Ule) #7

Hi @claman, the connect it’s a smart app , the motion, switch, light , insight are handler devices, I think you are installing all in smart apps


(claman) #8

Thanks for the quick reply. Yup, that’s exactly what I was doing wrong. So the device handlers, and the smart app are loaded but I can seem to finish setting up the smart app. The discovery process found all my devices: 6 switches and one motion, but when I go to finish setting up the smart app by pressing “done”, I get an error: “Failed to save page: MainPage”. Sorry to bother.


(claman) #9

Even tried to load just one device. Same error


(Ule) #10

Hi, could you share the logs, to see what error is, are you sure you have publish all the device handlers?


#11

What the heck does the option “Watchdog” do???


#12

Ok… Something interesting is happening within the Smartapp function

def locationHandler(evt) {
	def description = evt.description
	def hub = evt?.hubId
	def parsedEvent = parseDiscoveryMessage(description)
	parsedEvent << ["hub":hub]
    def msg = parseLanMessage(description)
    log.debug "msg $msg"

parseLanMessage() is actually picking up a non-wemo related responses from my webserver. The log.debug msg prints out starting with msg [index:17…. followed by the default (index.html) webpage. This occurs after another ST smartapp sends an event packet to this server. Not unusual for the server to respond but I thought it was a bit unusual for this app to pick it up. In the interim, I have disable the log.debug msg statement so I dont get this web page shwing up in my log… :wink:


(claman) #13

I’m embarrassed to report that I’m not sure how to share the logs. Is this what you want?

798f731d-8b56-4d4c-aaf0-0daef321dde8 10:48:40 AM EST: debug msg [devicetype:04, mac:000E5865048E, networkAddress:0A000114, deviceAddress:0578, stringCount:04, ssdpPath:/xml/device_description.xml, ssdpUSN:uuid:RINCON_000E5865048E01400, ssdpTerm:null, ssdpNTS:ssdp:alive]
798f731d-8b56-4d4c-aaf0-0daef321dde8 10:48:16 AM EST: debug msg [devicetype:04, mac:00178822BE6E, networkAddress:0A000170, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178822be6e, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:null]
798f731d-8b56-4d4c-aaf0-0daef321dde8 10:48:16 AM EST: debug msg [devicetype:04, mac:00178822BE6E, networkAddress:0A000170, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178822be6e, ssdpTerm:uuid:2f402f80-da50-11e1-9b23-00178822be6e, ssdpNTS:null]
798f731d-8b56-4d4c-aaf0-0daef321dde8 10:48:16 AM EST: debug msg [devicetype:04, mac:00178822BE6E, networkAddress:0A000170, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178822be6e::upnp:rootdevice, ssdpTerm:upnp:rootdevice, ssdpNTS:null]
798f731d-8b56-4d4c-aaf0-0daef321dde8 10:48:16 AM EST: debug msg [devicetype:04, mac:00178822BE6E, networkAddress:0A000170, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178822be6e, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:null]
798f731d-8b56-4d4c-aaf0-0daef321dde8 10:48:16 AM EST: debug msg [devicetype:04, mac:00178822BE6E, networkAddress:0A000170, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178822be6e, ssdpTerm:uuid:2f402f80-da50-11e1-9b23-00178822be6e, ssdpNTS:null]


(claman) #14

ok found an error when i tried to hit done again

798f731d-8b56-4d4c-aaf0-0daef321dde8 11:04:01 AM EST: error grails.validation.ValidationException: Validation Error(s) occurred during save():

  • Field error in object ‘physicalgraph.device.Device’ on field ‘deviceNetworkId’: rejected value [08863B6DDDF1]; codes [physicalgraph.device.Device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique.error,device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.error.deviceNetworkId,device.deviceNetworkId.unique.error.java.lang.String,device.deviceNetworkId.unique.error,physicalgraph.device.Device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique,device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.deviceNetworkId,device.deviceNetworkId.unique.java.lang.String,device.deviceNetworkId.unique,unique.physicalgraph.device.Device.deviceNetworkId,unique.deviceNetworkId,unique.java.lang.String,unique]; arguments [deviceNetworkId,class physicalgraph.device.Device,08863B6DDDF1]; default message [{0} must be unique]
    @ line 321

(claman) #15

also this without me doing anything

798f731d-8b56-4d4c-aaf0-0daef321dde8 11:08:47 AM EST: error java.lang.ArrayIndexOutOfBoundsException


(Ule) #16

You already have that device in your system, uninstall all the old devices you have installed before ,


(Ben) #17

I have the SmartApp installed and the Wemo switch device handler all set up. I can get through the setup on my phone and the device shows in my device list, but when I tap to turn it on or off, the switch does nothing and the icon just stays on either ‘turning off’ or turning on’. After a while it will go back to the ‘on’ icon. Any ideas what I may be missing?

No errors in my log, just this:

f7dec0a9-fd8c-4658-ad64-3bfcefacdc00 11:06:03 AM: debug Parsing 'index:17, mac:94103E69C0F1, ip:C0A80023, port:C001, requestId:1f4d4350-e8e5-405c-b5fc-c2f56613d349, headers:SFRUUC8xLjEgNDAwIEJhZCBSZXF1ZXN0DQpTRVJWRVI6IFVuc3BlY2lmaWVkLCBVUG5QLzEuMCwgVW5zcGVjaWZpZWQNCkNPTk5FQ1RJT046IGNsb3NlDQpDT05URU5ULUxFTkdUSDogNTANCkNPTlRFTlQtVFlQRTogdGV4dC9odG1s, body:PGh0bWw+PGJvZHk+PGgxPjQwMCBCYWQgUmVxdWVzdDwvaDE+PC9ib2R5PjwvaHRtbD4='
f7dec0a9-fd8c-4658-ad64-3bfcefacdc00 11:06:03 AM: debug Using ip: C0A80023 and port: C001 for device: f7dec0a9-fd8c-4658-ad64-3bfcefacdc00
f7dec0a9-fd8c-4658-ad64-3bfcefacdc00 11:06:03 AM: debug Executing ‘off’


(Ule) #18

Hi @Dustjunky, I have updated the wemo connect and the wemo light switch, a bug was fixed.
update the wemo connect, it was using the wemo ligth switch instead the wemo switch, if you have a wemo ligth switch update the device handler too.


New Official Integration: Samsung Multiroom Audio
(Yustos) #19

Thanks @ule , will these solve the “offline” wemo switches problem and the inability of ST to discover some wemo switches? if so, for those of us who are new to this, would you please provide a detailed step by step installation to this update?
Thanks,

Yustos


(Ule) #20

Hi @Yustos, Yes, this solves the ofline problem, if you dont known how to use the IDE watch this video.