Announcement

Collapse
No announcement yet.

Fan Control Switch Status Graphics/Text

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

    #16
    Please try the ver. 118, I did round down the number, so you should read 25, 50 and 75. I did post in the beta (so you can install before they release it) and in the regular update.

    please give me your feedback.

    Comment


      #17
      Originally posted by DonMor View Post
      Please try the ver. 118, I did round down the number, so you should read 25, 50 and 75. I did post in the beta (so you can install before they release it) and in the regular update.

      please give me your feedback.
      Don--it still does not work correctly. All is fine when I control the fan with HS3. However, when I first turn on the fan with the wall switch, it goes to 74.9. The status graphic in HS3 is the orange 51-75 fan graphic, but no value (medium high) is shown next to the graphic. Also, when I use the wall switch to turn off the fan, the graphic and status in HS3 still says the fan is on. This is how it looks after I first turn it on, and the same when I turn it off:

      Click image for larger version  Name:	Capture.JPG Views:	0 Size:	12.2 KB ID:	1373987
      Here is the advanced tab after I turn off the fan using the switch:

      Click image for larger version

Name:	Capture2.JPG
Views:	34
Size:	63.9 KB
ID:	1373992

      Comment


        #18
        try the beta 120

        Comment


          #19
          Originally posted by DonMor View Post
          try the beta 120
          That seems to have worked. The wall switch and the HS3 interface are in sync. Thanks!

          EDIT: I solved the problem with setting the device value with a script. I had to use a CAPI command.

          I still have one problem. I have written scripts to increase or decrease the fan speed that I use in HSTouch. When I run these scripts the device value in HS3 changes, but the fan does respond in any way. Do I need to do something different to actually control the fan? Here is one of the scripts:

          Code:
          Sub Main(param As Object)
          
          '   This script decreases the fan speed by 25 percent.
          '   Use only for fan switches that have speeds of 0, 25, 50, 75, 100.
          
          '###############################################################################################
              Dim Fan_Switch as integer = 64     ' Device Number of Fan Switch
              Dim CurrentSpeed as integer
              Dim NewSpeed as integer
          
          '###############################################################################################
          
              CurrentSpeed = hs.DeviceValue(Fan_Switch)
          
              If CurrentSpeed > 0 Then
                 NewSpeed = CurrentSpeed - 25
                 hs.SetDeviceValueByRef(Fan_Switch, NewSpeed, True)
              End If
          
          End Sub

          Comment


            #20
            the setdevicevalue only change the value, to control see this example:

            ref is integer
            newspeed need string

            Select Case true
            Case currentspeed < 26
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(ref, False, "Off", False, True))
            Case currentspeed > 74
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(ref, False, "On", False, True))
            Case currentspeed > 0
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(ref, False, newspeed, False, True))
            End Select

            Comment


              #21
              Thanks Don. Here is the solution I came up with:

              Code:
               CurrentSpeed = hs.CAPIGetStatus(64).Status
              
                  If CurrentSpeed = "High" Then
                     hs.CAPIControlHandler(hs.CAPIGetSingleControl(64,True,"Medium High",False,False))
                  ElseIf CurrentSpeed = "Medium High" Then
                     hs.CAPIControlHandler(hs.CAPIGetSingleControl(64,True,"Medium",False,False))
                  ElseIf CurrentSpeed = "Medium" Then
                     hs.CAPIControlHandler(hs.CAPIGetSingleControl(64,True,"Low",False,False))
                  ElseIf CurrentSpeed = "Low" Then
                     hs.CAPIControlHandler(hs.CAPIGetSingleControl(64,True,"Off",False,False))
              
                  End If

              Comment

              Working...
              X