Combination Virtual switch plugin (UI5)

QNimbus, power use is definitely on the to do list. Version 6 does this.

Version 6 tests power consumption (watts). You can provide a range and the condition is true when the power consumption is inside that range. For open-ended tests (less than or equal; greater than or equal) leave a text box empty.

Give MCV a day or so to approve it; many of them are having a major holiday now.

QNimbus, if that’s your four-star review on apps.mios.com, you’ll need to edit it now. :slight_smile:

hello

have you a switch for a calendar with a event ? it’s ideal no ?

thansk for your job

best regards

[quote=“davidd1205, post:23, topic:171904”]hello

have you a switch for a calendar with a event ? it’s ideal no ?

thansk for your job

best regards[/quote]

Why not use the google calendar switch app?

  • Garrett

[quote=“garrettwp, post:24, topic:171904”][quote=“davidd1205, post:23, topic:171904”]hello

have you a switch for a calendar with a event ? it’s ideal no ?

thansk for your job

best regards[/quote]

Why not use the google calendar switch app?

  • Garrett[/quote]

my scene has a event to ggogle calendar and 2 another switch and it’s simplifiy with your plugin to control all the switch

Here’s how I used the Combination switch as a toggle:
Lets say I want to toggle a light on and off on each press of a scene controller button.
Let’s call the light LightToBeToggled
Let’s call the scene controller button SCB
Create Two Combination Switches - IsOff and IsOn
IsOff is set to be ON when the LightToBeToggled is OFF
IsOn is set to be ON when the LightToBeToggled is ON
Create Two Scenes - LTBTOn and LBTBOff
LTBTOn Turns on LightToBeToggled and is Triggered by Combination Switch IsOff being On
LTBTOff Turns off LightToBeToggled and is Triggered by Combination Switch IsOn being On
Now create a scene called ToggleLight
ToggleLight activates the Trigger button of BOTH IsOn and IsOff
ToggleLight is Triggered by SCB being pressed.

Now every press of SCB toggles the light.

I actually added another virtual switch EnableToggle, which is an AND condition in both IsOn and IsOff, This allows me to disable the toggle behavior.

Note that there is a race condition here which means that another possible outcome of this logic is the light continually blinking on and off. Since this doesn’t happen I assume that all triggers are evaluated before any scenes are activated. This could change in a future rev of Vera, and this setup would stop working. (I’m using UI5 1.5.408)

Hi Dolphran,

Thanks for posting that example. It’s exactly the kind of thing that I’m trying to do with the Combination Switch. I’ll stick a link to your post from the index (third) post of this thread.

Users might find they are able to get away with only one Combination Switch in this scenario, using the “Triggered while switch is off” event, if they don’t want to copy the Enable Toggle feature.

Edit: second paragraph.

Thanks for the great plugin! It has enabled me to do something I’ve been wanting to do for some time. I have numerous schedules set up for numerous devices (mostly lights and shades) to make the house look lived in when we are away. But when we’re home those schedules can be a bit annoying so they get turned off. It can be a bit tedious enabling/disabling a few tens of schedules every time we go away/return.

Your plugin has enabled me to create one “Vacation Mode” virtual switch that turns all of the vacation schedules on or off with one click. (I borrowed the idea from your example scenario to turn on a light on when a door is opened during certain hours - so thanks for that too.) I have set my system up so that each scheduled event activates a virtual switch for that event. Then I set up combination virtual switches which look for each scheduled virtual switch and the master “Vacation Mode” virtual switch to both be on. That then is used as triggers for the scenes to activate the lights/shades. Works slick.

Version 7 can do conditions that depend on temperature sensors, even fractional and (you’ll have to test this for me) negative values. I imagine that it also works on the temperature field of the Google Weather plugin.

Now… a favour please. I know you Northerners like your thermostats. What sorts of comparisons involving thermostats have you found yourselves needing to write Luup code for? (Here there is a grand total of one Z-Wave thermostat on the market, and it’s not compatible with most gas central heaters on sale here, mine included.)

@futzle, I thank you for this device and believe all the requests display how useful and dynamic this is. By the way, the one thermostat you are more than likely referring too is actually compatible with most our central gas heaters, but requires a separate power supply. This is the same for several wifi models. However, none are compatible with evaporative cooler and therefore, no good during summer. I believe this will explain http://forum.micasaverde.com/index.php?topic=786.0

Indeed, in my house it’s about fifty-fifty whether it’s easier to run a power supply to the spot where the thermostat is, or use a nearby existing 5 V line and connect an Arduino and a DS1820 temperature sensor and an optoisolator for a relay. Probably it’ll be summer before I do anything about it, at which point I will be whinging about the aforementioned evaporative cooling. But I digress.

Indeed, in my house it’s about fifty-fifty whether it’s easier to run a power supply to the spot where the thermostat is, or use a nearby existing 5 V line and connect an Arduino and a DS1820 temperature sensor and an optoisolator for a relay. Probably it’ll be summer before I do anything about it, at which point I will be whinging about the aforementioned evaporative cooling. But I digress.[/quote]

And other than the odd occasions we do not have the extremes of the northern… But on those days like when hit 49 c here, an automated system on an evaporative cooler would not have worked anyway. Hence the combo switch could be used.
And I am old enough to know how to use my fingers to turn things on, off, up or down.

Hi there,

I wanted to use Combination Virtual Switch plugin on my Vera 3 (1.5.408) with conditions :

  • Power is at maximum 20W
  • Power switch is on

All of above conditions are true (this is AND condition).

Plugins seems to work well, but when I want to use this as a trigger to switch off the plug that I monitor, it doesn’t seems to work. Worse doesn’t seems to notify anything.

Is there any issue / bug ?

I saw that version 7.0 seems to be in MCV process. Do you have ETA when it will be publised?

Kind regards

Have a look at the light icon on the Combination Switch. Does it ever change from lit to unlit, or vice versa? If not, then you have inadvertently created a set of conditions that is always true, or always false.

Events occur only when the Combination Switch moves from lit to unlit, or from unlit to lit. For example, if your device is off, then it is changed to on but with power more than 20 watts, there will be no event because never were both conditions simultaneously true.

If you can describe in English what you want to do, I can see if what you have programmed the Combination Switch to do matches this. At the moment it is not at all clear to me what you are expecting.

Edit: I made a combination switch with two conditions: switch power is on, power consumption is from (blank) to 20 W, threshold = 2. It lights up as expected when I vary that device’s wattage (it was a dimmer, so easy to adjust its power consumption). The combination switch icon lights up mostly as expected. More on this shortly.

Then I made a scene, triggered by Combination Switch > virtual switch status changes > switch turns on, and made it turn the light off completely. This fired as expected.

(Conjecture: you are using the events “Triggered when …” “Poked when …”. Don’t use these. Use the event “virtual switch status changes”.)

So, I can confirm that events do fire, and that it’s possible that your scene trigger is testing for the wrong event.

That said, I think that you need to tweak the conditions that you are using. Using the conditions in my test, I found that turning the device (the dimmed light) on from cold also caused the Combination Switch event to fire, turning it right back off again, because the Watts were less than 20. My advice is to take out the Switch Power Status check, and rely only on the power. This way the event will be caused only by the power consumption transitioning from over 20 W to under 20 W, which I assume is only going to happen while the switch is turned on anyway.

Try that and see how you go.

I saw that version 7.0 seems to be in MCV process. Do you have ETA when it will be publised?

It’s out of my hands. MCV are the gatekeepers. Outside weekends, updates tend to take 0 to 48 hours. Edit: Version 7 is published.

I have been in hospital for the last few days. My wife and children just visited and my wife said ref automation stuff, the kids were playing with the toaster… I’d like this to automatically turn off power after x.

This is not a problem but it got me thinking about this… I can write the script or use this. This is simple as 1. 2 3. So I will walk my wife through this and no doubt she’ll discover more and more uses as time goes on.

But the extension of this thought crossed my mind is re-education or education on best use of these setup. So now I am considering try to map the bad practices around the home that become vampires on my pocket, put the condition in to correct them eg turn tv off when no ones is present after predetermined time then notify my family by either email or SMS where there have failed to correct the conditions specified. Tie this app in with countdown timer (I need to reserve that for the sake of education as time elapsed in their face scenario), variable container and dataMine and there are the very great and useful tools to do this with.

Thanks.
My point here is this is easy I need not do it myself and my wife is very intelligent and all I need to do is get out of her way.

quote=“futzle, post:34, topic:171904”
Try that and see how you go.[/quote]

Seems after reworking all my stuff from scratch and this is working good… Thanks for your kind module !

Another day, another plugin. Version 8 can test the Google Weather plugin from apps.mios.com and match the current weather condition.

Normally you will want to select a range of weather conditions (as in the screenshot here), with a threshold of 1. To combine that with another condition (“rain or showers or storms, and also less than 10º”), use two combination switches: remember that combination switches can test other combination switches.

futzle,

You are on a roll!

  • Garrett

Loving it.

My mind is getting warped thinking about this! Typical newb problem I assume…

:stuck_out_tongue:

So here is what i am attempting to achieve:
I have a door that leads from the garage to the interior of the house. I have door sensor on it.

I want the lights to turn on (kitchen, hallway, living room) when the sensor is triggered and its night time. I don’t care if the door is armed or bypassed, just triggered. However I don’t want it to turn the lights on when someone is already home.

The way I’m thinking about how to achieve the home presence is to turn on a virtual switch when the door is opened. I have a remote button that will turn off all the lights and the virtual switch when I leave home.

So here is how it should all work:
I leave home turn off all the light (this turns off the virtual switch as well).
I come home, open the door, the virtual switch gets turned on and the lights get turned on.
Go about my business, my wife opens the door to go to the garage, nothing happens because the virtual switch is on.

Is that correct? And then the magic question, how do I achieve that with the combination switch or luup code?

I would greatly appreciate any insights you could provide.

Thank you,
Akash