Announcement

Collapse
No announcement yet.

Remotec ZRC-90 Toggle Script

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

  • Remotec ZRC-90 Toggle Script

    I have a Remotec ZRC-90, and it has Button Press, Double Press, and Hold 2sec per button. I'd rather have a Toggle Button to where you press once and device on, and press again for device off. I'm guessing it can be done with a script that first determines the status of the device before making the change. I actually found a script that I think is pretty close if not spot on, but I'm not very familiar with Homeseer in general as I just got my unit. Where does it go? What changes does it need?

    Code:
    Sub Main(ByVal theDevice As String)
    	' Toggle the Specified Device ON/OFF
    	' DIM is considered ON
    	' Specify the Device ID as the Parameter
    	Dim devValue As Double
    
    	' Get the Device Status
    	devValue = hs.DeviceValue(theDevice)
    	' Toggle it
    	Select Case devValue
    		Case Is > 0
    		' Device ON or DIM, turn it OFF
    		hs.CAPIControlHandler(hs.CAPIGetSingleControl(theDevice,true ,"off",false,true))
    		Case 0
    		' Device OFF, turn it ON
    		hs.CAPIControlHandler(hs.CAPIGetSingleControl(theDevice,true ,"on",false,true))
    	End Select
    End Sub
    Attached Files

  • #2
    OK so I guess I didn't really need a script, I just needed to figure out how to manipulate the Events dialogs. So I have this working. So maybe this post doesn't really belong in the scripting forum. Although, it would be nice to know where scripts go, and if you can look at the script this made?
    Attached Files

    Comment


    • #3
      If you also use Easy Trigger, this adds additional options other then the 4 per switch. An example below display toggling. This could be simple On/Off or more complex incremental changes.


      Comment


      • #4
        I don't see the easy trigger option. Is that a plugin?

        Comment


        • #5
          Originally posted by tome10 View Post
          I don't see the easy trigger option. Is that a plugin?
          Yes, it's a plugin.
          HS 3.0.0.532: 1963 Devices 1141 Events
          Z-Wave 3.0.1.261: 122 Nodes on one Z-Net

          Comment

          Working...
          X