Announcement

Collapse
No announcement yet.

CAPI for Z-Wave thermostats

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

  • CAPI for Z-Wave thermostats

    I read several posts about controlling my Z-Wave thermostats, and tried two approaches:

    1.
    hs.CAPIControlHandler(hs.CAPIGetSingleControl(306,true ,"68",false,true))

    2.
    hs.SetDeviceValueByName("My Thermostat", "68")
    hs.SetDeviceStringByName("My Thermostat", "68", True)

    While either solution seems to work initially (Status and Value both change on the Device List page), once the thermostats are polled, the (unchanged) values from the thermostat device are read and my values disappear...

    Not sure if this is important, but I use CT100 thermostats.

    And FYI - I can set the setpoints and modes just fine from the Device List page, but I also need to set them via scripts (e.g. it changes when the alarm is set on or off),

    Any ideas/suggestions?

    Thanks so much!

  • #2
    Have you tried:

    Code:
    hs.SetDeviceValueByName("My Thermostat",68)
    hs.SetDeviceStringByName("My Thermostat", "68", True)

    I also found that for my CT30 thermostats, the CAPI commands don't work.

    Cheers
    Al
    HS 3.0.0.532: 1963 Devices 1141 Events
    Z-Wave 3.0.1.261: 122 Nodes on one Z-Net

    Comment


    • #3
      Hi,

      I have two Z-Wave Secure SRT323 (HRT4-ZW) and i use this script to change setpoint of my thermostat

      Sub Main(ByVal Parm As Object)
      dim Value_temp as double
      Value_temp = Parm
      Dim cc as HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(hs.GetDeviceRefByName("Regulation Chauffage Couloir Haut Heating Setpoint"), True, "(value) C", False, False)
      cc.ControlValue = Value_temp
      Dim cr as HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
      Log("Valeur SetPoint " & cr)
      End Sub
      Sub Log(ByVal ParStr As String)
      hs.WriteLog("Thermostat", ParStr)
      End Sub
      Below, my event to change setpoint, i pass the temp as parameter

      Jean-Francois
      Attached Files

      Comment

      Working...
      X