Announcement

Collapse
No announcement yet.

Complex Events - Is there an easier way? Are they bad?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Uncle Michael View Post
    Randy,
    Maybe I'm missing something, but how does that reduce the event complexity? It would seem that you would still need a long list of conditions, one for each of the devices.
    I didn't suggest it would reduce the complexity. I was only stating that you do not need to script as was suggested by John in post #11 above. It does allow a little reduction in complexity for the triggering of a test for all devices off, since this trigger could call a manually triggered event with all the conditions as in the first post, since you wouldn't need to stack an OR IF for every device included in the called event. Even simpler you could just use IF Any Device changed as the trigger, with all of the same conditions.

    I am surprised by how many people don't know that is a standard trigger. It can be useful.
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #17
      Originally posted by rprade View Post
      I didn't suggest it would reduce the complexity. I was only stating that you do not need to script as was suggested by John in post #11 above. It does allow a little reduction in complexity for the triggering of a test for all devices off, since this trigger could call a manually triggered event with all the conditions as in the first post, since you wouldn't need to stack an OR IF for every device included in the called event. Even simpler you could just use IF Any Device changed as the trigger, with all of the same conditions.

      I am surprised by how many people don't know that is a standard trigger. It can be useful.
      OK, I created a successful script to do the logic I needed. However, I found myself in this new predicament. When I have it run every 15 seconds, it works fine. However, if I have it trigger whenever a device's value changes, the CPU for the HS process shoots really high and the system becomes fairly slow and unresponsive. Based on some tests I've done with logging the start/end of the script, it takes less than a second, so I don't understand why this is happening. Any ideas?

      Comment


        #18
        Originally posted by marco500 View Post
        OK, I created a successful script to do the logic I needed. However, I found myself in this new predicament. When I have it run every 15 seconds, it works fine. However, if I have it trigger whenever a device's value changes, the CPU for the HS process shoots really high and the system becomes fairly slow and unresponsive. Based on some tests I've done with logging the start/end of the script, it takes less than a second, so I don't understand why this is happening. Any ideas?
        Make sure you use The Device Value has changed, not set or changed. This could cause it to trigger more frequently. I could see it being a problem if all of the devices are off because it would hammer your virtual device every time any device in your system changes. Add the virtual device to the conditions:

        AND IF System Virtual vLight - Downstairs is equal to On

        This will stop it from running and hammering the script and virtual device every time something changes after the virtual device is turned Off.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #19
          Originally posted by marco500 View Post
          OK, I created a successful script to do the logic I needed. However, I found myself in this new predicament. . . . if I have it trigger whenever a device's value changes, the CPU for the HS process shoots really high and the system becomes fairly slow and unresponsive. . . . Any ideas?
          You could also try setting a Do not retrigger time.

          Do you have conditions on your event? As Randy noted, adding a condition based on the output virtual device state should make a significant difference unless your script can change the device from on to off or off to on. In that case, you could try a test of the device time of the virtual device as a condition.

          What happens if you change the recurring event to once a second or every 5 seconds? Does every 15 seconds introduce too much latency?
          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


            #20
            jumping in late, but I would just execute a script and use code. I find clicking THAT many things to set conditions way too cumbersome. I'd rather copy/paste some code.

            This has disadvantages as well - so it is not all roses over here, but as I tell youngsters that I work with, you need to find the <job/career/etc> that has negatives that you do not care about. Then it IS all roses for you!

            In this case, the annoyances of working with scripts, FOR ME, are really nothing, compared to the time it takes for me to click that many things in a webpage!

            I'd rather the PC execute my script 100x over and have the IF cases just not run anything or "exit sub" 100x, than have to spend 20 minutes clicking that many thing.

            Personal preference! As has been mentioned, if it is working, the point is really MUTE and you can move on. If you need to do a second one, I'd suggest the script as the THIRD time you need this, you can copy/paste!

            --Dan
            Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

            Comment


              #21
              I use the BLRADAR plugin which checks groups of motion sensors and switches a virtual device if any of them are triggered.

              Sent from my Nexus 6 using Tapatalk

              Comment

              Working...
              X