Announcement

Collapse
No announcement yet.

BLStat & HSTouch Scripting

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

  • BLStat & HSTouch Scripting

    I am trying to build some HSTocuh screens for my two thermostats and have run into a few scripting issues that I need help with. I have essentially no knowledge of programming or scripting so hopefully these are simple things that I just don't know how to do correctly yet.

    1. Hold/Run buttons - I got the run button to work just fine. For the hold button, I have two text boxes on the screen. One to type in the temp I want to hold at and one to type in the length of time.

    I have the hold button action set to: "Run a HomeSeer script with values from elements(s)". I have ScriptParameter1 set to my first text box of HoldTemp1 and Script Parameter2 set to my second text box of HoldTime1. I don't know how to reference these Parameters in the script. This is what I have so far: "&hs.Plugin("BLStat").SetHoldOn(1). This works for changing BLStat into hold mode just fine but I don't know how to integrate the parameters. I've tried a few different ways to reference it that I can think of but it doesn't work.

    2. BLStat Hold/Run status. I would like my HSTouch screen to display the status of the BLStat mode - if the plug in is in hold or run. I see that there is a script of "Dim theMode As Integer = hs.Plugin("BLStat").GetHoldMode(1,1)" but I don't know how to utilize that to show the mode in my text label.

    Any help on either of these would be appreciated. Thanks!

  • #2
    Originally posted by travis010 View Post
    1. Hold/Run buttons - I got the run button to work just fine. For the hold button, I have two text boxes on the screen. One to type in the temp I want to hold at and one to type in the length of time.

    I have the hold button action set to: "Run a HomeSeer script with values from elements(s)". I have ScriptParameter1 set to my first text box of HoldTemp1 and Script Parameter2 set to my second text box of HoldTime1. I don't know how to reference these Parameters in the script. This is what I have so far: "&hs.Plugin("BLStat").SetHoldOn(1). This works for changing BLStat into hold mode just fine but I don't know how to integrate the parameters. I've tried a few different ways to reference it that I can think of but it doesn't work.
    You will need to pass the temp and length in minutes to the SetHoldOn call.
    I do not use HSTouch so I am not sure how to sub those fields from the screen into the script call. Someone on here will know.
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


    • #3
      Originally posted by travis010 View Post
      2. BLStat Hold/Run status. I would like my HSTouch screen to display the status of the BLStat mode - if the plug in is in hold or run. I see that there is a script of "Dim theMode As Integer = hs.Plugin("BLStat").GetHoldMode(1,1)" but I don't know how to utilize that to show the mode in my text label.!
      Have you tried this?

      [$SCRIPT=&hs.Plugin("BLStat").GetHoldMode(1,1)]
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


      • #4
        Originally posted by Blade View Post
        Have you tried this?

        [$SCRIPT=&hs.Plugin("BLStat").GetHoldMode(1,1)]
        I put it in but it seems to always return 0 despite what hold mode the plugin is in. It also returns "0" for the GetThermostatMode script. I think I'm doing it right though because the GetScheduleName script correctly returns the schedule name.

        Comment


        • #5
          OK that makes sense because it only returns the integer values.

          You could display the current run/hold mode by using the device

          [$SCRIPT=&hs.DeviceString("A1")]

          This is assuming A1 is the device code.
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


          • #6
            Originally posted by Blade View Post
            OK that makes sense because it only returns the integer values.

            You could display the current run/hold mode by using the device

            [$SCRIPT=&hs.DeviceString("A1")]

            This is assuming A1 is the device code.
            That didn't quite work for me. The Device for the BLStat Stat 1 operating mode is ^4. I put that in as my device string and it returns "<img src="Images/BLStat/operatingmode.gif">&nbsp;Heat"

            Also, I don't have a device that shows if the BLStat plug in is in Run (operating on schedule) or Hold mode.

            I'm fine with the output showing an integer value as I think I can manipulate that into text. The problem I have is using the [$SCRIPT=&hs.Plugin("BLStat").GetHoldMode(1,1)] script, it returns a value of 0 no mater what the plugin mode is. If I change it to Hold mode, the retuned value still stays 0. The same thing happens when I use the hs.Plugin("BLStat").GetCurrentMode(1,1) script, the value returned is always 0 regardless if I change the mode to heat or cool.

            Comment


            • #7
              Originally posted by Blade View Post
              OK that makes sense because it only returns the integer values.

              You could display the current run/hold mode by using the device

              [$SCRIPT=&hs.DeviceString("A1")]

              This is assuming A1 is the device code.
              That didn't quite work for me. The Device for the BLStat Stat 1 operating mode is ^4. I put that in as my device string and it returns "<img src="Images/BLStat/operatingmode.gif">&nbsp;Heat"

              Also, I don't have a device that shows if the BLStat plug in is in Run (operating on schedule) or Hold mode.

              I'm fine with the output showing an integer value as I think I can manipulate that into text. The problem I have is using the [$SCRIPT=&hs.Plugin("BLStat").GetHoldMode(1,1)] script, it returns a value of 0 no mater what the plugin mode is. If I change it to Hold mode, the retuned value still stays 0. The same thing happens when I use the hs.Plugin("BLStat").GetCurrentMode(1,1) script, the value returned is always 0 regardless if I change the mode to heat or cool.

              Comment


              • #8
                You are going to want to install my BLTouchString plugin.
                Then look at the help and there is an example to do what you want.
                It will remove all of the html code.
                Cheers,
                Bob
                Web site | Help Desk | Feature Requests | Message Board

                Comment


                • #9
                  BLTouchString solved fixed the heat/cool mode problem but I still can't seem to get the Run/Hold information for the plug in.

                  On the BLStat stat page, it shows run/hold but I do not have a HomeSeer device that has run/hold information to reference in the DeviceString script and the GetHoldMode Script doesn't seem to work - still always returns a 0 value and never a 1 regardless of Hold/Run mode setting.

                  Does [$SCRIPT=&hs.Plugin("BLStat").GetHoldMode(1,1)] work for anyone else?

                  Could BLStat create a HomeSeer device for hold/run mode? (I'll add that request to the Feature Request thread as well).

                  Comment


                  • #10
                    In the newest build I have added the following script calls:

                    hs.Plugin("BLStat").GetThermostatModeName(1,1)
                    hs.Plugin("BLStat").GetFanModeName(1,1)
                    hs.Plugin("BLStat").GetHoldModeName(1,1)

                    See the help for details.
                    I am going by memory but I think the call for the last one is either GetHoldModeName or GetRunHoldModeName.
                    Cheers,
                    Bob
                    Web site | Help Desk | Feature Requests | Message Board

                    Comment


                    • #11
                      Originally posted by travis010 View Post
                      GetHoldMode Script doesn't seem to work - still always returns a 0 value and never a 1 regardless of Hold/Run mode setting.
                      Are you saying that the run/hold mode always returns a 0 (which is run mode).
                      I will have a look at this.
                      Cheers,
                      Bob
                      Web site | Help Desk | Feature Requests | Message Board

                      Comment


                      • #12
                        Originally posted by Blade View Post
                        Are you saying that the run/hold mode always returns a 0 (which is run mode).
                        I will have a look at this.
                        Yes, even when it hold mode, it returns a "0" value. The same thing happens with GetCurrentMode. I get a "0" value regardless of what mode the Stat plugin is in.

                        I will try the name calls when I get home tonight.

                        Thanks!

                        Comment


                        • #13
                          I just installed the 1.0.2h version. The GetHoldMode script now works and correctly returns a 0 or 1 for run/hold. The GetCurrentMode is still not working for me and returns 0 regardless of mode.

                          All three of the Name script calls you just added are working great!

                          Comment


                          • #14
                            I will check GetCurrentMode when I get home
                            Cheers,
                            Bob
                            Web site | Help Desk | Feature Requests | Message Board

                            Comment


                            • #15
                              If you want the current mode of the stat then do not use GetCurrentMode.
                              You need to use GetThermostatMode or GetThermostatModeName
                              Cheers,
                              Bob
                              Web site | Help Desk | Feature Requests | Message Board

                              Comment

                              Working...
                              X