---
title: "Z_Wave_Vera_TemperatureSetpoint"
canonical: "https://docs.cuesystem.com/space/CVCDD/609059077/Z_Wave_Vera_TemperatureSetpoint"
format: markdown
---
> Macro (toc)

---

The definition of **TemperatureSetpoint1** device is defined as TemperatureSetpoint1 UPnP device type.

Note that most products of TemperatureSetpoint1 type are combined with TemperatureSensor1 device type - both sharing the same “ID”.

#### Note 1

The setting Of TemperatureSetpoint1 in the Vera project is defining if the temperature is to be expressed in °F or °C! This setting is valid for all temperatures concerning this device.

# Properties

|  |  |  |  |
| --- | --- | --- | --- |
| Property name | Data type | Default value | Description |
| Device |
| ID | Byte | 0 | ID of this device - see [https://cue.atlassian.net/wiki/spaces/CVCDD/pages/619446713](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/619446713). |
| Pooling |
| Period | Time | :1 | Time period in which the driver is pooling the actual device to check its current status to recognize its status changes to generate event. |
| Event OnStatusChange |
| Enable | Boolean | No | Yes/No enables/disables generation of event when device status change was detected |
| Debug |
| Debug print | Boolean | No | Yes/No enables/disables the debug prints report from the driver. |

# Events

## OnSetpointChange

This event is generated whenever the driver recognizes the change in the device Setpoint temperature. Note that event must be enabled by appropriate property (see above). The current status of the device is pooled in time period also set by the driver property (see above).

#### Syntax

```visualbasic
Event OnSetpointChange As Process(newSetpoint As Double)
```

#### Parameters

newSetpoint

Double - new Setpoint temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)**)

#### Example

```visualbasic
Process Z_Wave_TemperatureSetpoint1_OnSetpointChange(newSetpointTemp As Double) Link Z_Wave_TemperatureSetpoint1.OnSetpointChange
  DebugPrintFormat ("NEW Setpoint {n}",newSetpointTemp)
End Process
```

## OnTemperatureChange

This event is generated whenever the driver recognizes the change in the device ambient temperature. Note that event must be enabled by appropriate property (see above). The current status of the device is pooled in time period also set by the driver property (see above).

#### Syntax

```visualbasic
Event OnTemperatureChange As Process(newTemperature As Double)
```

#### Parameters

newTemperature

Double - new ambient temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)**)

#### Example

```visualbasic
Process Z_Wave_SetpointTemperature1_OnTemperatureChange( newTemp As Double)                             Link Z_Wave_TemperatureSetpoint1.OnTemperatureChange
  DebugPrintFormat ("NEW Temperature {n}",newTemp)
End Process
```

# Commands

## GetMyID

This command retuns current value of this device property “ID”,

#### Syntax

```visualbasic
Function GetMyId() As Byte
```

#### Return value

Byte - ID in range 3-255

#### Example

```visualbasic
Id := Z_Wave_TemperatureSetpoint1.GetMyId()
//reads ID of this TemperatureSetpoint1 device
```

## GetCurrentTemperature

This command reads ambient temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)**)

#### Syntax

```visualbasic
Function GetCurrentTemperature() As Double
```

#### Return value

Double - current ambient temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)**)

#### Example

```visualbasic
iTemp := Z_Wave_TemperatureSetpoint1.GetCurrentTemperature()
//reads ambient temperature from this TemperatureSetpoint1 device
```

## GetCurrentSetpoint

This command reads current Setpoint from Z_Wave device of type TemperatureSetpoint1

#### Syntax

```visualbasic
Function GetCurrentSetpoint() As Double
```

#### Return value

Double  -  Setpoint temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)**)

#### Example

```visualbasic
iTemp := Z_Wave_TemperatureSetpoint1.GetCurrentSetpoint()
//reads current Setpoint value from Z_Wave_TemperatureSetpoint1 device
```

## SetSetpoint

This command sends new status to Z_Wave device type TemperatureSetpoint1

#### Syntax

```visualbasic
Function SetSetpoint (iNewSetpoint As Double)
```

#### Parameters

iNewSetpoint

Double - new Setpoint temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)**) 

#### Example

```visualbasic
Z_Wave_TemperatureSetpoint1.Setpoint (19.5)
//set  Setpoint to 19.5°  on TemperatureSetpoint1 device
```

#### Note 2

The Z-Wave Thermostats – the TemperatureSetpoint1 devices are frequently waking up once within rather long period – could be some 20-30minutes or even more thus the value of newSetpoint temperature is first stored just in Vera device in variable named  “SetpointTarget” and there the value is waiting for new wake up of the thermostat.  Then this value is transferred to the device. The actual value of “SetpointTarget” can be checked by function GetSetpointTarget() see next command.

## GetSetpointTarget

This command reads current Setpoint Target ( See **[Note 2](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z+Wave+Vera+TemperatureSetpoint#Note-2)** for details<u>)</u>

#### Syntax

```visualbasic
Function GetSetpointTarget() As Double
```

#### Return value

Double - SetpointTarget temperature (see **[Note 1](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-1)** and **[Note 2](https://cue.atlassian.net/wiki/spaces/CVCDD/pages/609059077/Z_Wave_Vera_TemperatureSetpoint#Note-2)**)

#### Example

```visualbasic
iTemp := Z_Wave_TemperatureSetpoint1.GetSetpointTarget()
//reads current SetpointTarget value
```