Announcement

Collapse
No announcement yet.

Range to + or - infinity?

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

    Range to + or - infinity?

    When checking the range, is there a concept of infinity or MAXINT? Like, I want to know if this device goes from 0 -> some other number > 1.

    The plugin gives some ridiculously large numbers here based on what AP the device is connected to....


    Click image for larger version

Name:	Screenshot 2023-02-22 at 7.01.00 PM.png
Views:	61
Size:	91.8 KB
ID:	1594583

    Right now, I just pasted the number and made the MSD a 9- but if the plugin gives a larger value someday I might be screwed...


    Click image for larger version

Name:	Screenshot 2023-02-22 at 7.03.44 PM.png
Views:	51
Size:	54.5 KB
ID:	1594584
    HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

    Plug-Ins Enabled:
    Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
    weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

    #2
    I encountered the same situation with the UniFi plugin. The way I see it, the problem is not necessarily the "ridiculously large numbers" (that made me laugh because it's true 😂), but more the fact that the upper end of the range (in the EasyTrigger condition) is unknown.

    So I addressed it by "flipping" the EasyTrigger condition. Instead of testing for when it becomes "in range [1,whatever]", I use a recurring trigger and test for when it becomes "not in range [0,0]".

    Something like this...

    Click image for larger version  Name:	image.png Views:	0 Size:	28.6 KB ID:	1594618​

    (If you want a more responsive trigger, you'll need to adjust the trigger time interval.)​

    Comment


      #3
      Originally posted by teladog01 View Post
      I encountered the same situation with the UniFi plugin. The way I see it, the problem is not necessarily the "ridiculously large numbers" (that made me laugh because it's true 😂), but more the fact that the upper end of the range (in the EasyTrigger condition) is unknown.

      So I addressed it by "flipping" the EasyTrigger condition. Instead of testing for when it becomes "in range [1,whatever]", I use a recurring trigger and test for when it becomes "not in range [0,0]".

      Something like this...

      Click image for larger version Name:	image.png Views:	0 Size:	28.6 KB ID:	1594618​

      (If you want a more responsive trigger, you'll need to adjust the trigger time interval.)​
      That works, but you would need some mechanism to keep the Event from running every minute the device is not offline.

      HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

      Comment


        #4
        Good point, randy. Thanks for pointing out that I simplified too much in that example My actual events are a little more complex using an ET group and a couple other conditions, one of them being the safety mechanism you mention.

        Click image for larger version  Name:	image.png Views:	0 Size:	91.8 KB ID:	1594662​

        I also now realize another difference is the use case, where I am setting a virtual device (Jack Home/Away) as opposed to simply sending a notification like in the OP. I then have other events that trigger off the (Jack Home/Away) virtual device and one of them takes care of sending any notifications.

        So I apologize if I've added more confusion than help Sheesh, I'll think it through better next time

        Comment


          #5
          Originally posted by teladog01 View Post

          So I apologize if I've added more confusion than help Sheesh, I'll think it through better next time
          No worries! We are all here to learn. There are almost always several ways of achieving the same results.

          HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon

          Comment

          Working...
          X