Announcement

Collapse
No announcement yet.

HS2 - HS3

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

    HS2 - HS3

    Hi I have a simple script that worked fine for years in HS2 I have juat changed to HS3 and ZWAVE I am wondering what changes I need to make to the script.

    All it does is check the value of a virtual device if it isn't 5 it sets to 5 and then turns on 2 lights via x10. I believe hs.ExecX10 still works and I am using the Z wave device as the address??

    Code:
    Sub Main
    
    dim curr_timer_value
    
    curr_timer_value = hs.DeviceValue("T1")
    
    IF curr_timer_value = 0 Then
    
       hs.SetDeviceValue "T1",5
       hs.ExecX10 "Q111","on"
       hs.ExecX10 "Q143","on"
    
    else
    
      hs.SetDeviceValue "T1",5
      Exit Sub
    
    End If
    
    End Sub

    #2
    I do not believe ExecX10 exists in HS3.

    Also, SetDeviceValue may change the value stored in the device, but will not effect a physical device dimming level.

    You need to convert to CAPI commands for Device Control.

    Check out this utility that displays info about each of your devices, including the available CAPI commands for each device. It will also generate the script code to execute any of these commands and place it on the clipboard so you can easily paste it into your script editor.

    http://tenholder.net/tenWare2/tenScriptAid/default.aspx


    View the videos.

    tenholde
    tenholde

    Comment


      #3
      This looks like this could be done in HS3 with out a script as counters are part of HS3 and can be used as triggers.
      -Rupp
      sigpic

      Comment


        #4
        Originally posted by tenholde View Post
        I do not believe ExecX10 exists in HS3.
        The capability to issue an X10 command in a script does exist in HS3, but the structure and the syntax are completely different from HS2 because X10 is no longer the organizing structure of HS. It is just another plug-in.
        See this thread: https://forums.homeseer.com/showthread.php?t=178701
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Or, why not just use the following:


          hs.CAPIControlHandler(hs.CAPIGetSingleControl(194,True,"On", False,False))


          to turn on the X10 device with a DevRef of 194

          tenholde
          tenholde

          Comment


            #6
            basic script

            Hi Thanks for all your advice and looking into various solutions

            I am trying to get a simple script to work

            Code:
            Sub Main
            
                hs.SetDeviceValueByRef(727, 60.54, True)
            
            End Sub
            When I try to run it I get

            VB.Net script exception(0), re-starting: Object reference not set to an instance of an object.

            as you can see from the attachment I have a virtual device with an address of 727

            I can't figure out what I am doing wrong..

            thanks
            Attached Files

            Comment


              #7
              I think that is a vb.net function. Try changing the script's first line to

              Sub Main(ByVal Parm As Object)

              then save it as a .vb file.
              Mike____________________________________________________________ __________________
              HS3 Pro Edition 3.0.0.548, NUC i3

              HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

              Comment


                #8
                worked

                Originally posted by Uncle Michael View Post
                I think that is a vb.net function. Try changing the script's first line to

                Sub Main(ByVal Parm As Object)

                then save it as a .vb file.
                That worked a treat!!

                thanks

                Comment

                Working...
                X