UPNP Device Default Value Change

Hello All. I have written a program in JAVA that successfully controls my WEMO LightSwitch. However there is a bit of an issue. The default binary state is 0 (off). I was wondering if anyone had an idea on how to make the default binary state of a WEMO LightSwitch 1.?

in essence. in the eventservice.xml file on my device, I would like to change this :

“stateVariable sendEvents=“yes”
name>BinaryState</name
dataType>string</dataType
defaultValue>0</defaultValue
/stateVariable”

to this:

“stateVariable sendEvents=“yes”
name>BinaryState</name
dataType>string</dataType
defaultValue>1</defaultValue
/stateVariable”

If there is a way to do this programmatically, i would worship you!

No, you cannot change the device default.
I also do not understand what you try to do, as openHAB has a working WeMo Binding.

Hi. so i will explain in depth.

I bought some wemo light switches a while back and i live in Nigeria.

Nigeria embarrassingly, doesnt have constant electricity so electricity cuts off unpredictably and comes back. This mean that for instance, if my lights are on in my room using the wemo light switch and electricity cuts off, once it comes back, the lights will be off. I would like for them to return to the state they were in before the electricity momentarily cut off. This is because the default binary state is 0 (off).

The only workaround i can see for this is for the JAVA Code i wrote to control binary state to also change the default binary state at the point of changing the binary state. For instance, When i turn the lights on from my code, it will change the binary state to 1 as well as the default binary state to 1. that way, when the eletricty cuts off and comes back, the default value will mean the switch will return to the on state. same will apply for off.

The only other solution i have is to have the code store the state of the switch and re-command the light switched upon reconnection to the wifi network after electricity reconnects; but that will result in a delay of being off after electricity returns for the connection, detection and re-command.

Do you have any other way to work around this?

I just googled a bit and found a comment in the WeMo community that this behaviour is for safety reason and not going to be changed. Therefore I have no solution for you.

Okay. Thank You.