Announcement

Collapse
No announcement yet.

How to make a new variable device?

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

    How to make a new variable device?

    I'm trying to add a device that I want to count doorbell rings.

    The only device I see under add new device types is interface variable. But when I make it there is no increment or decrement on the status page for the new device.

    How do I make one that will be able to increment and decrement?

    Thanks

    -Tim
    -Tim

    HSPro - 3.XXX - Dell mini W7 x32
    Way2 Call
    Elk M1 Gold
    UPB HAI switches
    HAI RC2000 Thermostat

    #2
    Just create a dimmable lamp device. Then use the device "dim" command Action to increment up (and down) from 0 to100 in steps of 1.

    Comment


      #3
      But then you could only get 100 doorbell rings, which might be limiting.


      I'd create a "Status Only" device, and let's for the example's sake say that the house/device code is Q99.

      Then create a Event and set it up to trigger when the doorbell rings. Let it have one action and that is to run a script. Create a new script (with ".vb" ending) and paste the following:

      Code:
      Public Sub Main(parm as object)
          Dim cur as Integer = hs.DeviceValue("Q99")
      
          hs.SetDeviceValue("q99", cur + 1)
          hs.SetDeviceString("q99", "# of doorbell rings: " & cur + 1)
      End Sub
      This stores the number of doorbell rings as the device value.
      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
      Running on Windows 10 (64) virtualized
      on ESXi (Fujitsu Primergy TX150 S8).
      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

      Comment


        #4
        I have my HS interfaced to a Stargate. When HS imported the devices it made interface variables that you can increment and decrement easily from the status page.

        I was hoping to be able to create one of these variables in homeseer.

        I don't really do scripting yet.
        -Tim

        HSPro - 3.XXX - Dell mini W7 x32
        Way2 Call
        Elk M1 Gold
        UPB HAI switches
        HAI RC2000 Thermostat

        Comment


          #5
          Originally posted by email68 View Post
          I was hoping to be able to create one of these variables in homeseer.
          You can. It's not hard.


          Originally posted by email68 View Post
          I don't really do scripting yet.
          This sounds like an excellent excuse to get started!
          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
          Running on Windows 10 (64) virtualized
          on ESXi (Fujitsu Primergy TX150 S8).
          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

          Comment

          Working...
          X