Help with changing values of House Mode through scenes

I am trying to change the values of the switches and dimmers triggered by house mode changes under UI7 through a scene.
Anyone knows how to do that?

For my application:
I am trying to setup my vents to be in different settings depending on season and house modes. I got it working through triggers from my thermostat right now which changes settings with dependencies of house modes but I want to do it the other way,
Make the settings change from a house mode change trigger with dependencies on the thermostat.

Install the House Modes plugin and you can use scenes to set the house mode or use the house mode as a trigger.

If you install the HouseModes plugin you can trigger scenes when the mode changes.

Not quite what I was trying to do. That part is easy. What I am trying to do is to change the values of the different devices listed under the different house modes. I basically want to change the house mode setup using a scene.

Devices that change their modes based on house modes have a “ModeSetting” variable. A sensor will have a value like “1:;2:A;3:;4:A” which says how to alter the bypass state of the sensor for each of the four house modes. It is documented somewhere, but I don’t recall having seen it recently. Look around the forum or the wiki. You’ll need to use luup.variable_set() to modify the variable’s value. There’s a good chance that you’ll have to get your scene to trigger a Luup reload after setting the variable too, for the house mode engine to notice the change.

Thank you! I think you are correct. I am specifically looking for the variable I need to set. For switches and dimmers, the Mode settings variable seem to be all empty (1:;2:;3:;4::wink: even when the switches are turned on for that specific scene. It looks more like the variables I am looking for needs to called in the specific mode than in the device. I will keep on searching.

See http://wiki.micasaverde.com/index.php/House_Modes

Very cool! Thank you!
The wiki seems to indicate that unfortunately I can’t set % for dimmable switches. They can only be on and off?

Edit: I take it back. It is just not documented in the wiki. After experimenting a bit, the value can be set

e.g:
luup.variable_set(“urn:upnp-org:serviceId:Dimming1”,“ModeSetting”, “1:N,50;2:;3:F,4:F”, device_id)

After much testing, I can’t seem to get it to work. It keeps on creating a new ModeSetting variable and is not updating the correct service. I have tested all 3 services which would make sense:
HaDevice1
Dimming1
SwitchPower1

Edit: Alright made it work. The variable is actually under the HaDevice1 service (duh!). I had the service name wrong.

The correct syntax is:

luup.variable_set(“urn:micasaverde-com:serviceId:HaDevice1”, “ModeSetting”, “1:N,50;2:;3:F,4:F”, Device_id)

All of mine are “urn:micasaverde-com:serviceId:HaDevice1”. Have you checked your capitalization?

Yup! Thanks. I had figured it out while you were responding.

Now how do I delete all these useless variables I created in the different services?

Restore from a backup before you created the bad ones.

There are threads out there that describe how to edit the user_data.json file. But you need to be careful … Or have a good backup in case you mess up this file.

It’s the persistence storage for all of the user specified options for Vera and the plugins.

Hmm I created so many that I think the restore route is probably the safest… Thanks