Announcement

Collapse
No announcement yet.

Zooz ZEN34 HS4 vs script edition problem

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

    Zooz ZEN34 HS4 vs script edition problem

    Hi everyone !
    I use a ZEN34 as a scene controller when I tap once `` on '' I have a code 1000, and my Device turn ON. If I type `` OFF '' once I have a 2000 code, my device turns off. If I tap twice `` on '' I have a code 1003, and my second Device turn ON. If I type `` OFF`` 2 times I have a 2003 code, my second device turns off .
    ​​​​​​​My problem is that if I put `` off '' my device manually or with a timer and later I want to reuse my ZEN34 for I put back `` ON '' I must go through `` OFF '' before. To correct this problem I must add this line after my device action, do a Script command & Hs.SetDeviceValueByRef (..............). For my example what are the values that I must put and where and how I do to find them.


    #2
    Hi Reggy Here's how I do it:

    Create an event that triggers whenever the Central Scene Feature is set to a value greater than 0 (zero). For the action, set the Central Scene value back to zero, after delaying 1 second. Use Hs.SetDeviceValueByRef to do this. This will ensure that a repeat button press will re-trigger events.

    Now, just use the Device state as a condition for ON or OFF. You'll need 2 events per device.

    Event 1: IF zen34 Central Scene is set to 1000 AND IF Device is equal to OFF THEN Turn Device ON.
    Event 2: IF zen34 Central Scene is set to 2000 AND IF Device is not equal to OFF THEN Turn Device OFF.

    Let me know what questions you have.

    Ken
    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

    Comment


      #3
      Hi Ken !
      My question was not how to do it, but rather the instruction '' Hs.SetDeviceValueByRef ''. This morning I found my information, in my case the value I have to write is '' node 15 '' and the new value has to be different from 1000 to 1006 and different from 2000 to 2006. I have to write '' hs. SetDeviceValueByRef (15,999, True). Now I understand how this command works!
      Now I can press the same button on my remote!

      Reggy

      Click image for larger version

Name:	Setdevice.png
Views:	236
Size:	30.2 KB
ID:	1503775



      Comment


        #4
        Reggy

        I have several of the ZEN34 controllers located around the house where it is impossible to add a regular wall switch using both single tap and multi tap functions.

        Rather than using

        "If Node 15 Test! Zooz Wall Controller Central Scene changes and becomes Scene 001 Key Pressed 1 Time"

        Change the trigger to

        "If Node 15 Test! Zooz Wall Controller Central Scene
        had its value set to Scene 001 Key Pressed 1 Time"

        This way, you don't care what the state of the controller was before you pressed a button, and you don't have to worry about resetting it to some predetermined invalid value between presses.

        Joe




        Comment


          #5
          Originally posted by jblogs12 View Post
          Reggy

          I have several of the ZEN34 controllers located around the house where it is impossible to add a regular wall switch using both single tap and multi tap functions.

          Rather than using

          "If Node 15 Test! Zooz Wall Controller Central Scene changes and becomes Scene 001 Key Pressed 1 Time"

          Change the trigger to

          "If Node 15 Test! Zooz Wall Controller Central Scene
          had its value set to Scene 001 Key Pressed 1 Time"

          This way, you don't care what the state of the controller was before you pressed a button, and you don't have to worry about resetting it to some predetermined invalid value between presses.

          Joe



          This will work as long as you are only using HS4. For my use case, I have the HS ASCII interface sending messages to a homebridge instance and the ASCII interface only sends a new message when the value actually changes, thus the reason for the reset event. Not sure if this is the way the webhook works as well. If so, you'd need this for NodeRed as well.
          "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

          Comment


            #6
            Thanks Joe!
            Yes at the moment i just use HS4, both ways are good, but with the command "This Device had its value set to" it's easier and less operation! But it allowed me to see another way of doing things. Thank you for this advice and the forum allows me to improve myself and we are always learning. !
            Reggy

            Comment


              #7
              Hi Ken!
              I take note of your comment and I am always looking for good comments. Thank you for the information.
              Reggy

              Comment

              Working...
              X