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.
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: 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.
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.
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.