Wemo insight state toggling unexpectedly

Tags: #<Tag:0x00007fe05dbd0160> #<Tag:0x00007fe05dbd06d8>

(Bill) #1

I have an interesting problem with openhab2.3 using the wemo binding. I have a wemo insight that, when I toggle the state, the ui shows the switch quickly move back and forth between power states. I get two or three transitions before it settles. Sometimes it settles on the correct state, and other times openhab settles on the wrong one (the switch is in the other state).

I have tried restarting openhab and reloading the binding. I have tried removing and re-adding the device.

For example, if the switch is ON and I turn it OFF I get:

2018-09-06 22:03:22.786 [INFO ] [marthome.config.discovery.internal.PersistentInbox] - Added new thing ‘wemo:insight:Insight-1_0-231545K12006FE’ to inbox.
2018-09-06 22:05:36.191 [INFO ] [org.eclipse.smarthome.model.script.lambda ] - OFF
2018-09-06 22:05:47.907 [INFO ] [org.eclipse.smarthome.model.script.lambda ] - ON

In the UI, you actually see the switch move back and forth. The final state here is wrong. The device actually is OFF. Also, when I manually turn the switch ON/OFF, I only get one event and state change in openhab.

I don’t have any other rules that would do something on a state change from the insight.

I was wondering if anyone else had seen this on the insight? My other wemo device types don’t seem to have the problem.


(Vincent Regaud) #2

Can you publish your item and related rules, please?

(Bill) #3

There’s really not much going on that would toggle the state within a second or so.

lights.items:Switch Insight “Insight / Dehumid Sw” { channel=“wemo:insight:Insight-1_0-231545K12006FE:state” }

root@alarmpi:/etc/openhab2/rules# grep Insight *
dehumidifier.rules: Insight.sendCommand(ON)
dehumidifier.rules: Insight.sendCommand(OFF)
lambdas.rules: log.apply(Insight)


rule “Dehumidifier”
//Time cron “0 * * * * ?”
Time cron “0 0 0/1 1/1 * ?”
logInfo(“org.openhab”,"Check humidifier. Fcst " + WU_MaxForcTemp.state)
//var Number temp = (WU_MaxForcTemp.state as QuantityType)
var temp = (WU_MaxForcTemp.state as QuantityType).doubleValue
var temp2 = 0
temp2 = temp + 1
// logInfo(“org.openhab”,"Fcst as decimal " + temp + " " + temp2)
if (temp > 90 ) logInfo(“org.openhab”,“Outside fcst temp greater than 90”)
if (WU_MaxForcTemp.state > 100|“°F”) logInfo(“org.openhab”,“Outside fcst temp is greater than 100”)

            if (Dehumidifier.state==ON)
                    if ( ((Humidity.state >= 70) && (BasementHumidity.state >= 60)) || (Humidity.state == 0) )  // Turn on, fail on
                       logInfo("org.openhab","Enabling humidifier")
                       logInfo("org.openhab","Disabling humidifier")


import org.eclipse.xtext.xbase.lib.Functions

val Procedures$Procedure1 log= [ s |
logInfo(“lambda”, s.state.toString)
s.state.toString + " logged"


rule “Call Lambda”
Item Insight changed

(Vincent Regaud) #4

Could you put your code in code fences, please?


(Rossko57) #5

Try autoupdate=“false” in your Item’s bindings; maybe this device is a bit slow reporting it’s state.

(Bill) #6

Thanks I will try that.

Regarding the code fence: I did originally fence the post, but then I added more by editing the post rather than creating a new post. When I went to edit , I thought the markup tags were not clear or shown. I couldn’t un-escape my original code block to escape the overall block. Sorry about that.