I would like to have a virtual switch which turns off every light, dimmer and wallplug in my house.
Offcourse I can make a scene and in that scene click all devices I have to “off”, but if I include a new device it’s a bit of hassle. Is there a code I can use to switch all devices on the network to off?
Would be nice if I can differentiate between lights , dimmers and wallplugs.
It didn’t work for me when I inserted it in a scene. I am running Vera3 with 1.5.408 .
Maybe it is good it didn’t work, since when I am thinking about it , it would not work with my setup anyway.
I have about 7 fibaro relais , 5 of them functioning as lights on-off switches , but 2 of them operate my garagedoor and gate. They are programmed as a pulse switch , when they are triggered on or off , they will go off after 1 second. This will operate the garagedoor or gate.
It would mean that when I switch “all lights to off” also these 2 relais will be activated ( to off) which will open or close the gate , which I obviously don’t want.
Is there a code I can use to switch all “lights”, “wallplugs”, “fibaro relais” to off, except fibaro relais with ID 18 and 4
In regard to [tt]All On[/tt] / [tt]All Off[/tt], there are ways to tell an individual device whether or not it should react to [tt]On[/tt] and/or [tt]Off[/tt]. Now, I’m not sure how reliable it would be, as the command may not get to devices that are not in direct radio reach.
Unfortunately, Vera doesn’t appear to offer some flavor of group control. (It’s been proposed on the beta side.) However, the ImperiHome Android app, for instance, offers an [tt]on/off[/tt] per ‘room’.
I have our home split up in zones and can turn zones on/off. But it does require maintenance in terms of when nodes are being added/(re)moved etc., like you said.
I was looking to do something similar with thermostats and GCal’s. Basically what I was researching was how to enumerate all the devices. You may be able to capitalize on this discussion:
Either by checking device category, room, or using a simple naming convention for all the devices you want included (like “* Light” or “* Switch”) you should be able to use the LUUP loop of Devices to set the On or Off.
A more advanced solution would require getting and parsing the services data to truly identify the proper devices without a convention. That is discussed at the end of that thread. (You don’t want to accidentally send an Off to a thermostat just because it implements SwitchPower1, so either you segregate your devices by room/name/other or you have to figure out the details of each device to include a certain subset.)
It’s more than one line of code to write the loop, but adding future devices wouldn’t require modifications, just adherence to whichever convention you adopt in your code. Hope that helps.
Probems for a general solution:
Unknown Device Types
Unknown Exceptions … do you really want to turn the power off to your Router ?
do you really want to turn on your hot water circulation pump ?
Unknown Side Effects from Automation Logic (Things that are triggered when things start and/or stop.
Taking all of these problems into consideration, and the amount of effort to correct for the deficiencies … it’s just a whole lot easier and safer to do this in a scene. You can visually see all the devices and decide what do do … If you have ordering issues … and I DO, than you can create schedules to caused things to happen in a logical order, not necessarily the order the devices where created.