Announcement

Collapse
No announcement yet.

Need help debugging - resets device value on every run but should not be

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

  • Need help debugging - resets device value on every run but should not be

    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 27th, 2018, 04:16 PM.

  • #2
    Can you further explain the issue, its not really clear from your post. Here is a typical section that changes the device:

    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)

    What is it you see causing an issue?

    Comment


    • #3
      bsobel Yes, that is the only area that writes value & status text... so I don't know what the problem is.

      I changed the TRUE to FALSE and now the events where I use Easy Trigger do not run at all. So, that is not a fix.

      see the screenshots of the log and the events
      ... a working Event that uses normal Device as a trigger -- see log, shows it runs
      ... a not working Event using Easy Trigger (Security Status All Door Locks) as the trigger -- not in the log

      Comment


      • #4
        I found it, simple fix. 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. Thx for putting another set of eyes on it with me!

        Comment

        Working...
        X