Announcement

Collapse
No announcement yet.

Always triggers no matter the value... If Value was ___ and becomes ___

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

    Always triggers no matter the value... If Value was ___ and becomes ___

    SOLVED...
    The loop was causing multiple writes to the vDevice. I moved the routine that did the writes, out of the loop and it seems to be working as expected now.
    Last edited by Ltek; October 27, 2018, 04:18 PM.

    #2
    could you post some debug logs when the event triggers incorrectly

    Comment


      #3
      Originally posted by spud View Post
      could you post some debug logs when the event triggers incorrectly
      attached ET debug.
      Attached Files

      Comment


        #4
        what is the ref id of the device?
        and could you not filter on EasyTrigger so that I can see when the Event is triggered?

        thanks

        Comment


          #5
          In the device configuration, there is a setting that says not to update the last change time if the value does not change. That might be something to play with.

          Comment


            #6
            Originally posted by logbuilder View Post
            In the device configuration, there is a setting that says not to update the last change time if the value does not change. That might be something to play with.
            Well, I don't think this is the cause of the problem here, because the ET plugin does not look at the last change time, it looks for an actual value change between old and new value.

            Comment


              #7
              Originally posted by spud View Post

              Well, I don't think this is the cause of the problem here, because the ET plugin does not look at the last change time, it looks for an actual value change between old and new value.
              You surely know better than me. Just throwing it out.

              Comment


                #8
                Originally posted by spud View Post
                what is the ref id of the device?
                and could you not filter on EasyTrigger so that I can see when the Event is triggered?

                thanks
                I have identical separate events for multiple separate devices...

                436 door locks
                650 garage
                207 doors
                208 windows

                I think I did the log debug with 436 (door locks) but it might have also captured others too. I had to turn off those events as they were false positive triggering a ton

                Comment


                  #9
                  Originally posted by Ltek View Post

                  I have identical separate events for multiple separate devices...

                  436 door locks
                  650 garage
                  207 doors
                  208 windows

                  I think I did the log debug with 436 (door locks) but it might have also captured others too. I had to turn off those events as they were false positive triggering a ton
                  as I said you should post some logs without filtering so that we can see what event is triggered, but so far everything looks ok in your log: the event is fired when the value changes:

                  Code:
                  Oct-19 1:25:10 PM           EasyTrigger     DEBUG Firing event 63
                  Oct-19 1:25:10 PM           EasyTrigger     DEBUG Device 436 value changed from 255 to 0

                  Comment


                    #10
                    I have dozens of events using the same Easy Trigger Trigger without issue.

                    I think it is something going on in the script. The test would be to create a temporary event setting one of the suspect event device’s value. If setting the device to the same value doesn’t trigger the event, then it would have to be something in the script. I’m guessing that the script might be setting the device more than once in each pass.
                    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #11
                      Originally posted by rprade View Post
                      I have dozens of events using the same Easy Trigger Trigger without issue.

                      I think it is something going on in the script. The test would be to create a temporary event setting one of the suspect event device’s value. If setting the device to the same value doesn’t trigger the event, then it would have to be something in the script. I’m guessing that the script might be setting the device more than once in each pass.
                      You are correct sir!

                      Looks like my script code is setting the value back to 255 but I dont see anywhere I'm telling it to... I'll post the script in the script forum, if you can help be debug it that would be highly appreciated!

                      Comment


                        #12
                        spud & ... after testing more, I'm not sure what's happening. In the script, the only device changes happen with these commands...

                        hs.SetDeviceValueByRef(Motion_ID,1,true)
                        hs.SetDeviceString(Motion_ID, mstr,true)
                        Else
                        hs.SetDeviceValueByRef(Motion_ID,0,true)
                        hs.SetDeviceString(Motion_ID, Motion_none,true)

                        ... so, I changed the TRUE to FALSE and then Events using Easy Trigger do not run at all. So, that is not a fix.


                        Comment


                          #13
                          I’m not very proficient at scripting, but I will try to look at it again tonight. Your script is well commented, but I need to better understand all that is going on. I think I see where a virtual device could be set more than once as the script rolls though all of your HS devices, but I am not certain. I need to get in front of a real monitor and not this iPad so that I can visualize it better. I also could be wrong. I do know that another person had a problem when the string was set HS saw the value as being set as well. I’m not saying that is the problem, but it is a fact. You possibly could change “True” to “False” on the lines setting strings.
                          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #14
                            The script runs any/every time an affected REAL device is changed (motion, door, lock, window). Then the script look at every REAL device and sets the vDevice status for the "group" (Composite Device). So,yes, it will set the device value and text on every pass.
                            <EDIT>
                            That maybe be it... I wonder if the double value set is happening on each pass. the First lock is 0 so it is setting the value to 0.

                            I need to look at that...

                            Comment


                              #15
                              SOLVED...
                              The loop was causing multiple writes to the vDevice. I moved the routine that did the writes, out of the loop and it seems to be working as expected now.

                              Sorry for the false alarm on ET!

                              Comment

                              Working...
                              X