Announcement

Collapse
No announcement yet.

Setting and then Getting Setpoint Values Issue

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

    Setting and then Getting Setpoint Values Issue

    I am creating a script to set the setpoints by stepping them one degree at a time. I found that using the immediate set of the setpoints will cause the AC to turn on even if it shouldn't. For example, If it's 73 in the house, and the setpoint is currently 85 and I want to set it down to 76, the immediate set available in the RCS plugin will cause the AC to cycle on for the minimum time. It gets cold in the house this way!

    So I found that a script that uses the SPC- and SPC+ commands and adjusts the temperature won't cause the AC to cycle.

    What I would like to do is set the setpoint down by 1 and then get it so I can check it and make sure I don't set it past the requested setpoint. However, it doesn't seem to get the new setpoint value properly. I have HS waited for 45 seconds but that doesn't seem to wait long enough and it may be causing other issues by making HS wait that long. So is there a better way to set setpoint and then get it to make sure it was set propery?

    My code so far;

    For i= 1 To TempDifference
    'If i=5 Then Exit For

    hs.writelog "debugThermostat", "Adjusting Thermostat by:" & ThermostatAdjust

    call RCS.cmdsendcustom(1," " & ThermostatAdjust)

    hs.WaitEvents()
    hs.WaitSecs 45
    hs.WaitEvents()

    hs.writelog "debugThermostat", "After SetPoint Adjustment"
    ThermostatHeatSetPoint = RCS.GetHeatSet(1,1)
    hs.writelog "debugThermostat", "GetHeatSet:" & ThermostatHeatSetPoint
    ThermostatCoolSetPoint = RCS.GetCoolSet(1,1)
    hs.writelog "debugThermostat", "GetCoolSet:" & ThermostatCoolSetPoint

    msgbox("Thermostat Cool Setpoint: " & ThermostatCoolSetPoint & vbCrLf & _
    "Thermostat Heat Setpoint: " & ThermostatHeatSetPoint )

    hs.WaitSecs 45
    hs.WaitEvents()

    Next

    Thanks,

    Steve

    #2
    Originally posted by sponnath View Post
    I found that using the immediate set of the setpoints will cause the AC to turn on even if it shouldn't. For example, If it's 73 in the house, and the setpoint is currently 85 and I want to set it down to 76, the immediate set available in the RCS plugin will cause the AC to cycle on for the minimum time. It gets cold in the house this way!

    So I found that a script that uses the SPC- and SPC+ commands and adjusts the temperature won't cause the AC to cycle.

    What I would like to do is set the setpoint down by 1 and then get it so I can check it and make sure I don't set it past the requested setpoint.
    Steve, Have you tried the script command to change setpoint?

    In vb.net it has the form:
    hs.Plugin("RCS Serial Thermostats").CmdSetCool(TStat#, SetPoint, 1)

    In your example I expect it would look like this,
    Call RCS.CmdSetCool(1, 76, 1)

    I have not experienced the system running after changing settings this way.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

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

    Comment


      #3
      PS. All the scripting commands are in a sticky in the Thermostat General forum.
      http://board.homeseer.com/showthread.php?t=114698
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

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

      Comment


        #4
        Originally posted by Uncle Michael View Post
        Steve, Have you tried the script command to change setpoint?

        In vb.net it has the form:
        hs.Plugin("RCS Serial Thermostats").CmdSetCool(TStat#, SetPoint, 1)

        In your example I expect it would look like this,
        Call RCS.CmdSetCool(1, 76, 1)

        I have not experienced the system running after changing settings this way.
        Mike,

        I will try this. I have only tried, so far, using the available settings in the event. I have not attempted to script it. So, when I set the setpoints via that method, my AC kicks on for the minimum. I even upgraded my thermostat to the next version and then sent the units to RCS to have the latest firmware installed! this has been driving me nuts for a while. Some mornings, it can get pretty cold in the house if it's shifted the setpoint too often.

        I don't care how it gets accomplished and maybe that command will work just fine. It beats all the additional logic to create a loop to use the incremental command that I have to run custom.

        Thanks for the lead!

        Steve

        Comment


          #5
          Originally posted by Uncle Michael View Post
          Steve, Have you tried the script command to change setpoint?

          In vb.net it has the form:
          hs.Plugin("RCS Serial Thermostats").CmdSetCool(TStat#, SetPoint, 1)

          In your example I expect it would look like this,
          Call RCS.CmdSetCool(1, 76, 1)

          I have not experienced the system running after changing settings this way.
          Mike,

          I tried this tonight. Worked great when the thermostat was set in COOL mode. If the thermostat is set in OFF mode, HSTouch showed 0 as the set point! When I went back and checked the RCS plugin on the webpage, it showed 80 still, the orignal setting. Then HSTouch reverted to the 80.

          So, do you check the mode before you make the setting? It would seem like you could change the set points REGARDLESS of the mode. Or, at least the API should completely reject the request.

          Have you also seen this behavior?

          Thanks for your tip on this. It's definitely shorter than running a loop to set the temp one degree at a time. I just want to check and see if you have noticed that same condition that I should code to avoid.

          Thanks,

          Steve

          Comment


            #6
            Originally posted by sponnath View Post
            I tried this tonight. Worked great when the thermostat was set in COOL mode. If the thermostat is set in OFF mode, HSTouch showed 0 as the set point! When I went back and checked the RCS plugin on the webpage, it showed 80 still, the orignal setting. Then HSTouch reverted to the 80.

            So, do you check the mode before you make the setting? It would seem like you could change the set points REGARDLESS of the mode. Or, at least the API should completely reject the request.
            Yes, I do check the mode first. I've never tied it without checking the mode. I have a vague recollection that there was a reason I didn't think it would give predictable results. Something to do with an interaction between the heat set point and the cool set point.

            I have a script that runs whenever the mode changes, when we go to bed or get up, etc. that checks the HVAC mode and the state of the house, then selects the set points. I've included it below. Because I run the script whenever the mode changes, I've never tried to change set points when the mode is off, since that would have no practical effect.

            Code:
            Sub Main(parm as object)
            
                Dim intHome As Integer = hs.DeviceStatus("S1")
                Dim intVacation As Integer = hs.DeviceStatus("S11")
                Dim intUp As Integer = hs.DeviceStatus("S5")
                Dim intFirst2Bed As Integer = hs.DeviceStatus("M51")
                Dim intOutTemp As Integer = hs.DeviceValue("T60")
                Dim intCoolSet As Integer
            
                Dim objRCS As Object =  hs.Plugin("RCS Serial Thermostats")
            
                If objRCS.GetModeSet(2,1) = 1 Then                ' Heat Mode
            
                    If intHome = 3 Then                    ' Not home
            
                        objRCS.CmdSetHeat(1, hs.DeviceValue("T54"), 1)
                        objRCS.CmdSetHeat(2, hs.DeviceValue("T54"), 1)
            
                    Else If intUp = 3 Then                ' In bed
                
                        objRCS.CmdSetHeat(1, hs.DeviceValue("T55"), 1)
                        objRCS.CmdSetHeat(2, hs.DeviceValue("T55"), 1)
            
                    Else If intOutTemp < 10 Then                'Bump up set point if it is very cold outside
            
                        objRCS.CmdSetHeat(1, hs.DeviceValue("T53") +1, 1)
                        objRCS.CmdSetHeat(2, hs.DeviceValue("T53") +1, 1)
            
                    Else
            
                        objRCS.CmdSetHeat(1, hs.DeviceValue("T53"), 1)
                        objRCS.CmdSetHeat(2, hs.DeviceValue("T53"), 1)
            
                    End If    
                
                Else If objRCS.GetModeSet(2,1) = 2 Then            ' Cool Mode
            
                    If intVacation = 2 Then                    ' Extended time away
            
                         If intOutTemp > 88 Then                ' Set point is 10 deg below outside
                        intCoolSet = intOutTemp - 10            ' or stored value, whichever is greater
                         Else
                        intCoolSet = hs.DeviceValue("T51")
                         End If
            
                        objRCS.CmdSetCool(1, intCoolSet, 1)
                        objRCS.CmdSetCool(2, intCoolSet, 1)
            
                    Else If intUp = 3 OR intFirst2Bed = 2 Then        ' In bed
                
                        objRCS.CmdSetCool(1, hs.DeviceValue("T50"), 1)
                        objRCS.CmdSetCool(2, hs.DeviceValue("T52"), 1)
            
                    Else If intOutTemp < 85 Then                'Bump up LR set point if it is not very hot outside
            
                        objRCS.CmdSetHeat(1, hs.DeviceValue("T50") + 1, 1)
                        objRCS.CmdSetHeat(2, hs.DeviceValue("T50"), 1)
            
                    Else
            
                        objRCS.CmdSetCool(1, hs.DeviceValue("T50"), 1)
                        objRCS.CmdSetCool(2, hs.DeviceValue("T50"), 1)
            
                    End If    
                
                End If   
            
            End Sub
            Mike____________________________________________________________ __________________
            HS3 Pro Edition 3.0.0.548, NUC i3

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

            Comment


              #7
              Mike,

              Thanks! I will look your script over. The bedtime is my primary issue right now as the house goes vacant while we sleep. When we move, it goes back to occupied. I need a bedtime mode. Not sure how you set bedtime but I would be interested. I started to look at pressure sensors actually but hadn't gotten too far yet. Trying to solve the thermostat issue. I am close on the thermostat. I have my new upgraded thermostat installed and a complete backup set. My older TR40 is just sitting in a box. I need to try to sell them off yet. And, I got my system upgraded now with the heatpumpmadeeasy board.

              Using this script would allow me to stop using the thermostat based event controls. That's where the problems seem to be.

              Steve

              Comment


                #8
                Originally posted by Uncle Michael View Post
                I have a script that runs whenever the mode changes, when we go to bed or get up, etc. that checks the HVAC mode and the state of the house, then selects the set points. I've included it below. Because I run the script whenever the mode changes, I've never tried to change set points when the mode is off, since that would have no practical effect.
                While I agree with your position, I also believe it shouldn't matter what mode the system is in just to set the setpoints that will be used WHEN the appropriate mode is active.

                Thanks for your input, I am so much closer to finalizing my HVAC. Incorporating the heatpumpmadeeasy with the RCS and HS has been a long haul.

                I will have to take a pic of the boards I have in my HVAC now.

                Steve

                Comment


                  #9
                  Originally posted by sponnath View Post
                  I need a bedtime mode. Not sure how you set bedtime but I would be interested.
                  Initially I tried to find a way for HS to detect when we were in bed, but there was insufficient consistency, so I take a bute force approach. There are two of us. When we go to bed, we tell HS with a button press. The first person to bed (HS keeps count) causes a few changes, primarily in lighting in the bedroom and bathroom and the cool set point if the AC is on. The second to bed puts the house in sleep mode.

                  The house goes back into wake mode when the light in the master bath is turned on.
                  Mike____________________________________________________________ __________________
                  HS3 Pro Edition 3.0.0.548, NUC i3

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

                  Comment


                    #10
                    Originally posted by Uncle Michael View Post
                    Initially I tried to find a way for HS to detect when we were in bed, but there was insufficient consistency, so I take a bute force approach. There are two of us. When we go to bed, we tell HS with a button press. The first person to bed (HS keeps count) causes a few changes, primarily in lighting in the bedroom and bathroom and the cool set point if the AC is on. The second to bed puts the house in sleep mode.

                    The house goes back into wake mode when the light in the master bath is turned on.
                    Wow, that is great. Unfortunately, I haven't been able to 'train' my wife to do such things. She doesn't seem to interface to my Homeseer as I do. It is possible that I could better promote the advantages of cooperating with Proteus (Homeseer) so that she sees the benefit of participating in our relationship with Homeseer. Yeah, and I just had a shot of Midnight Moon that helps me believe that!

                    Thanks for your thoughts in this. I hope to finish the script tomorrow night. I had to work on real work tonight.

                    Steve

                    Comment


                      #11
                      Originally posted by sponnath View Post
                      I haven't been able to 'train' my wife to do such things. . . . It is possible that I could better promote the advantages of cooperating with Proteus (Homeseer) so that she sees the benefit of participating. . .
                      The lever that worked here was that my wife is usually the last one to bed. If she tells HS that we are in bed, then all the lights get turned off, the thermostat is reset, doors are checked, etc., which eliminates the need to run all over the house herself.
                      Mike____________________________________________________________ __________________
                      HS3 Pro Edition 3.0.0.548, NUC i3

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

                      Comment


                        #12
                        Originally posted by Uncle Michael View Post
                        doors are checked, etc., which eliminates the need to run all over the house herself.
                        How do you check your doors? Is that a check they are closed or that a bolt is thrown as well? My next project is to try and get the Ademco Nutech working. That wasn't very successful so I need to work with them. I have a slightly older panel but the guy said it should work fine.
                        Bummer, had to work tonight so haven't tried to correct the thermo script yet....

                        Comment


                          #13
                          Originally posted by sponnath View Post
                          How do you check your doors? Is that a check they are closed or that a bolt is thrown as well?
                          Just closed, unfortunately. I have found no way (easy enough for me to implement conveniently) to test for lock/unlock on all the flavors of door locks we have.
                          Mike____________________________________________________________ __________________
                          HS3 Pro Edition 3.0.0.548, NUC i3

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

                          Comment


                            #14
                            Finally had a chance to implement the changes to my scripts.

                            This works. Now I don't have my AC turning on even though I am below the setpoint.

                            I will see how it goes in the morning.

                            Finally, solved! The thermostat actions just have something weird in them.

                            Thanks!

                            Comment

                            Working...
                            X