Announcement

Collapse
No announcement yet.

Recurring trigger Event question (loop, cycle, round robin rules)

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

    Recurring trigger Event question (loop, cycle, round robin rules)

    Hi.

    Most of my execution rules are LOOP rules. That means the state of the devices is checked once a second (Do not log this event checked, of course). Why? Because it makes everything much simpler and reliable as the states are checked every second. In order not to flood the network (MQTT, Z-wave...) by sending out commands every second for every LOOP rule, the target was always a Virtual Device. Then there was 2 EVENTS that turned on/off the real device. OK, no problems there, everything works for years without any problem.

    But to eliminate the extra virtual devices and EVENTS I tried to add a line to eliminate loop sending out every second by adding AND IF "IS NOT EQUAL" to a same Control Device.


    The test EVENT:
    Click image for larger version

Name:	loop.jpg
Views:	72
Size:	58.3 KB
ID:	1439862

    It works perfectly. Will send out command to a control device only on a state change. Not every second! I would just like to ask if this is the correct approach, or should I expect any issues later on.

    Thank you

    Br,
    Dali

    #2
    The device should be either ON or OFF and your first AND IF has got Unknown device which will also cause problems


    Eman.
    TinkerLand : Life's Choices,"No One Size Fits All"

    Comment


      #3
      Unknown Unknown is just what HS3 assigns for the floor and room when you create a new device. It isn't "UNKNOWN", so it's not a problem.

      Comment


        #4
        Yes. Unknown Unknown refers to FLOOR and ROOM that was set automatically. It's a testing rule, therefore I didn't change.



        Comment


          #5
          While that can work, it's unnecessary to use a recurring trigger every second unless your goal is to always have the plug on, even then a trigger for the plug to change to an off sate would be more elegant and use less system resources. Presumably you're going to move the event logic that changed the state of your virtual device into this events conditional section. Why don't you do that then post the completed event and we can take a look and make suggestions.
          HS4 Pro on Shuttle NC10U, Win10; Z-NET
          Number of Devices: 449
          Number of Events: 210

          Plug-Ins: Arduino, BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, WeatherXML, Worx Landroid, Z-Wave

          External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

          Comment


            #6
            Originally posted by jmaddox View Post
            While that can work, it's unnecessary to use a recurring trigger every second unless your goal is to always have the plug on, even then a trigger for the plug to change to an off sate would be more elegant and use less system resources. Presumably you're going to move the event logic that changed the state of your virtual device into this events conditional section. Why don't you do that then post the completed event and we can take a look and make suggestions.
            Don't have the complete events as now in proces of testing and evaluating what seems to be working great so far.

            The very same LOOP EVENT also exist for Plug OFF. I just posted an example of ON event.

            I have a lot of settings Virtual devices.

            Windows Alerts ON/OFF
            Heating ON/OFF
            Security ON/OFF
            Power Peak Protection ON/OFF
            Motion detection ON/OFF
            Vstat modes
            + many more.

            Loop rules always check this before change the state of a CONTROL device. System resources are close to none. At today CPU power, a few second loop rules will not kill it


            However I can post current EVENTS where I control the Virtual Device instead of Control device directly. The trick from my initial post will eliminate the need of extra virtual devices and EVENTS.

            Why, because many non LOOP events are LAME as those will not get updated in HS restart.


            For ON its
            Click image for larger version  Name:	on1.jpg Views:	0 Size:	126.0 KB ID:	1439889

            FOR OFF its
            Click image for larger version  Name:	off1.jpg Views:	0 Size:	132.0 KB ID:	1439890

            Thank you

            Br,
            Dali

            Comment

            Working...
            X