WeMo Long Press Support

I could be wrong, but based on my understanding of the eventservice.xml file hosted by the WeMo lightswitches, it looks like they now support the long press event via UPnP. My switches are running firmware version “WeMo_WW_2.00.10937.PVT-OWRT-LS” which I got on Jan 25, 2017. Here is my eventservice.xml contents:

http://pastebin.com/zJgesnAc

I’ve highlighted the two sections regarding long presses. The first looks to be for simulating a long press on the WeMo and the second appears to be an event that can be subscribed to. Here are those sections pulled out:

Action (In Action List)

<action>
<name>SimulateLongPress</name>
<argumentList>
<argument>
<name>LongPress</name>
<direction>out</direction>
<relatedStateVariable>LongPress</relatedStateVariable>
</argument>
</argumentList>
</action>

Event (In Service State Table)

<stateVariable sendEvents="yes">
<name>LongPress</name>
<dataType>string</dataType>
<defaultValue>0</defaultValue>
</stateVariable>

Is it possible that support for this feature could get added? I’d LOVE to be able to detect long presses on the buttons to run alternative scripts (like activate my bedtime mode if the button is pressed, or activate the reading mode if it is long pressed).

Thanks!

1 Like

I was looking into this, but stopped because my current use case the Wemo light switch just directly controls the wemo outlet.

I believe that pywemo currently doesn’t support long press (at least I didn’t see it when I looked), so adding it there first will be a priority before adding the capability to HA.

Oh, that makes sense. I’ve opened up an issue, now, with pywemo to see if we can get it added then.

https://github.com/pavoni/pywemo/issues/61

Thanks!

Has there been any progress yet?

We’ve made some recent progress in understanding how to do this. I have a prototype working in HomeAssistant. More details in the previously mentioned pywemo issue: https://github.com/pavoni/pywemo/issues/61#issuecomment-748569226