Announcement

Collapse
No announcement yet.

is there a difference between easy trigger Disable Event and hs.DisableEvent?

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

    is there a difference between easy trigger Disable Event and hs.DisableEvent?

    I am trying to write some scripts to synchronize some Insteon keypads with z-wave door locks and I am seeing different behavior between script function calls versus HS3 events using Easy Trigger. I have been using Easy Trigger to disable events and the events do not trigger as expected. If I use hs.DisableEvent and hs.EnableEvent function calls in a script I see different behavior. My script is structured as follows:

    1. Disable lock/keypad change events
    2. Process Keypad or Lock Status changes.
    3. Update Keypads and Locks.
    4. Wait 2 seconds to allow Z-Wave and Insteon to finish.
    5. Enable lock/keypad change events.

    When I look at the HS log, I see an Insteon keypad event 2 seconds after the script is run. If I increase the delay, the event occurs later by the same amount. I looked at the HS event queue with the tenHSEvent tool and I saw no backlog of events so there must be some difference between HS and Easy Trigger implementation.

    #2

    &hs.DisableEvent:... works in HS3. In HS4, I couldn't get it to work with that script. EasyTrigger has one of the options to do that...So true in your findings.


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

    Comment


      #3
      Originally posted by Eman View Post

      &hs.DisableEvent:... works in HS3. In HS4, I couldn't get it to work with that script.
      Eman.
      Did you try &nhs ? Not using HS4 yet but seen threads mentioning the change for some commands.
      HS3, HSTouch Designer, ESP8266 based devices and sensors, Tasmota, OpenMQTTGateway, RTL433, DIY ground plane antenna, BlueIris + LAN cams, USB-UIRT, ATON DLA amp, Winamp, Multiple Android tablets for control.
      Plug-Ins Enabled: Restart:,mcsMonitor:,EnvCan:,EasyTrigger:,CM15A:,BLUSBUIRT:, BLLAN:,BLBackup:,Pushover 3P:,mcsMQTT:

      Comment


        #4
        Originally posted by 123qweasd View Post

        Did you try &nhs ? Not using HS4 yet but seen threads mentioning the change for some commands.
        No!, Am not any good at scripts so found comfort in EasyTrigger


        Anyway what does n stand for?

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

        Comment


          #5
          I think n was a typo.

          I am working in HS3 with external VB scripts. I'm a bit gun shy of HS4 and the state of the Insteon plugins. It really looks like those functions are not working but I see plenty of references to them on the forums.

          Comment


            #6
            https://forums.homeseer.com/forum/de...86#post1475186

            https://forums.homeseer.com/forum/hs...95#post1347795

            HS3, HSTouch Designer, ESP8266 based devices and sensors, Tasmota, OpenMQTTGateway, RTL433, DIY ground plane antenna, BlueIris + LAN cams, USB-UIRT, ATON DLA amp, Winamp, Multiple Android tablets for control.
            Plug-Ins Enabled: Restart:,mcsMonitor:,EnvCan:,EasyTrigger:,CM15A:,BLUSBUIRT:, BLLAN:,BLBackup:,Pushover 3P:,mcsMQTT:

            Comment


              #7
              OIC It specifies different script engines if I ever write a single line script.

              Comment


                #8
                spud Is there a way I can call Easy Trigger Disable Event from a script?

                Comment


                  #9
                  Originally posted by pmendiuk View Post
                  spud Is there a way I can call Easy Trigger Disable Event from a script?
                  Here is the code for EnableEvent/DisableEvent in Easytrigger:

                  Code:
                          public void EnableEvent(int evRef)
                          {
                              try
                              {
                                  m_hs.EnableEventByRef(evRef);
                              }
                              catch (Exception e)
                              {
                                  Logger.LogError(e.Message);
                                  Logger.LogDebug(e.StackTrace);
                              }
                          }
                  
                          public void DisableEvent(int evRef)
                          {
                              try
                              {
                                  m_hs.DisableEventByRef(evRef);
                              }
                              catch (Exception e)
                              {
                                  Logger.LogError(e.Message);
                                  Logger.LogDebug(e.StackTrace);
                              }
                          }
                  so those easytrigger actions should be exactly the same than calling EnableEventByRef / DisableEventByRef from a script.

                  and no they are not available as scripting functions in EasyTrigger.

                  Comment


                    #10
                    spud Thank you for the clarification. I will try the ByRef function.

                    Comment

                    Working...
                    X