All, Im apparently having a brain fart. Im trying to setup virtual devices to show room status (lights on or off) for HStouch. I have the event working to turn on the virtual device when any light is on in a room - but I'm having issues with turning the virtual device off when all the lights are off in that room. Below are my settings - If someone could please tell me what I'm missing i'd be forever in your debt!
Announcement
Collapse
No announcement yet.
Virtual Device Event
Collapse
X
-
There are always a number of ways to achieve a result. The simplest event to create would be a recurring trigger
IF the event will automatically trigger every 10s
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
AND IF Downstairs Dining Room Chandelier has a value equal to Off
AND IF Downstairs Dining Hallway has a value equal to Off
AND IF Downstairs Dining Room Cove Lights has a value equal to Off
Then Set Device Downstairs Dining Room Dining Room Virtual Indicator to Off
The more efficient event would take a little more effort to build
IF Downstairs Dining Room Chandelier has its value set to Off
AND IF Downstairs Dining Hallway has a value equal to Off
AND IF Downstairs Dining Room Cove Lights has a value equal to Off
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
OR IF Downstairs Dining Room Hallway has its value set to Off
AND IF Downstairs Dining Chandelier has a value equal to Off
AND IF Downstairs Dining Room Cove Lights has a value equal to Off
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
OR IF Downstairs Dining Room Cove Lights has its value set to Off
AND IF Downstairs Dining Hallway has a value equal to Off
AND IF Downstairs Dining Room Chandelier has a value equal to Off
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
Then Set Device Downstairs Dining Room Dining Room Virtual Indicator to Off
While the first event checks every 10 seconds, it will only run once when the virtual device is on and all the lights are Off. The second event checks when any of the three lights are turned Off. If the virtual device is On and the other two lights are Off, it turns the virtual device Off.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
-
Originally posted by rprade View PostThere are always a number of ways to achieve a result. The simplest event to create would be a recurring trigger
IF the event will automatically trigger every 10s
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
AND IF Downstairs Dining Room Chandelier has a value equal to Off
AND IF Downstairs Dining Hallway has a value equal to Off
AND IF Downstairs Dining Room Cove Lights has a value equal to Off
Then Set Device Downstairs Dining Room Dining Room Virtual Indicator to Off
The more efficient event would take a little more effort to build
IF Downstairs Dining Room Chandelier has its value set to Off
AND IF Downstairs Dining Hallway has a value equal to Off
AND IF Downstairs Dining Room Cove Lights has a value equal to Off
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
OR IF Downstairs Dining Room Hallway has its value set to Off
AND IF Downstairs Dining Chandelier has a value equal to Off
AND IF Downstairs Dining Room Cove Lights has a value equal to Off
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
OR IF Downstairs Dining Room Cove Lights has its value set to Off
AND IF Downstairs Dining Hallway has a value equal to Off
AND IF Downstairs Dining Room Chandelier has a value equal to Off
AND IF Downstairs Dining Room Dining Room Virtual Indicator has a value equal to On
Then Set Device Downstairs Dining Room Dining Room Virtual Indicator to Off
While the first event checks every 10 seconds, it will only run once when the virtual device is on and all the lights are Off. The second event checks when any of the three lights are turned Off. If the virtual device is On and the other two lights are Off, it turns the virtual device Off.
Thanks I'll try that...of course the second event example has the least system overhead since I'm doing this for 20+ rooms!
Sent from my iPhone using Tapatalk
Comment
-
Originally posted by Derek View PostThanks I'll try that...of course the second event example has the least system overhead since I'm doing this for 20+ rooms!
Sent from my iPhone using TapatalkHS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Originally posted by rprade View PostThat is correct, but understand that triggering an event that is prevented from running due to conditions, has very, very little impact on system resources. As I said, the second event is more efficient, but not by a margin that would impact system performance, even with dozens of them running.
I probably should just ignore this, but I'm actually puzzled.
There seem to be lots of assumptions, but not much hard information about the impact of event trigger structure on overhead.
Without knowing the internal workings of the event engine, how is it possible to know the impact of alternative event triggering options? It could be that HS evaluates every device value continually, regardless of whether it is an event trigger, event condition, or neither. Are you aware of any relevant documentation?
I have not seen any impact of event structure on performance, nor am I aware of anyone posting any data that sheds light on the subject. Have I just missed it?Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
Originally posted by Uncle Michael View PostRandy,
I probably should just ignore this, but I'm actually puzzled.
For an event to trigger seems to take little CPU. If the Boolean logic of the condition(s) is not met, the event does nothing until the next time the trigger is true and again the condition(s) are evaluated. Only when the trigger and conditions are all true does the event run actions. The action then causes CPU traffic because it has to control a device and wait for it to report back, run a script or simply write a log entry.
The evaluation of IFs, OR Ifs and AND IFs are simply true false evaluations. I did a test in 2014 with 100 events using the same trigger of a virtual device and a common condition of another virtual device. This was on a system with a Z-Wave and Arduino plug-ins. All other plug-ins were disabled. The actions in the events were to control different devices or write log entries or both. I wanted to see how much load trigger evaluation caused. I could see no impact whatsoever on CPU when I added the 100 events. I went back and forth by swapping .hsd files and there was no difference in nominal CPU usage. Turning on the trigger device did not affect it at all. Turning the virtual device on and then turning on the trigger device caused CPU load to increase considerably.
In my system with lots of events and devices, plug-ins are the biggest consumer of system resources.
I certainly would like to hear from anyone who can show me that I am mistaken and that triggered events that fail the conditions consume any significant amount of system resources.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Originally posted by rprade View PostRegardless of the inner workings, it defies logic to me how the true/false evaluation of triggers and conditions could tax resources much at all. Especially as compared to all the work that has to be done for any action.
I could see no impact whatsoever on CPU when I added the 100 events.
In my system with lots of events and devices, plug-ins are the biggest consumer of system resources.
I certainly would like to hear from anyone who can show me that I am mistaken and that triggered events that fail the conditions consume any significant amount of system resources.
To your last point, it would seem to be a useful piece of information to have so that people could get past the barrier of adding events because they fear that evaluating the trigger will add overhead to their system, when, in fact, it seems pretty clear that an event uses resources only when it actually runs.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
Comment