Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

# Revision history [back]

### Controlling Setpoint with python pluging

Hello everyone,

I want to get the value of setpoint in an EnergyPlus model with the python plugin. I tried this code but it returns -1:

    self.T1_handle = self.api.exchange.get_variable_handle(state, "Zone Thermostat Cooling Setpoint Temperature", "Perimeter_ZN_1")
T1 = self.api.exchange.get_variable_value(state, self.T1_handle)


Based on this post, the number of inputs is fine I think. When I change the variable_names to others such as "Zone Mean Air Temperature", and "People Occupant Count" It works. But it does not work for "Zone Thermostat Cooling Setpoint Temperature".

Thanks!

### Controlling Setpoint with python pluging

Hello everyone,

I want to get the value of setpoint in an EnergyPlus model with the python plugin. I tried this code but it returns -1:

    self.T1_handle = self.api.exchange.get_variable_handle(state, "Zone Thermostat Cooling Setpoint Temperature", "Perimeter_ZN_1")
T1 = self.api.exchange.get_variable_value(state, self.T1_handle)


Based on this post, the number of inputs is fine I think. When I change the variable_names to others such as "Zone Mean Air Temperature", and "People Occupant Count" It works. But it does not work for "Zone Thermostat Cooling Setpoint Temperature".Temperature". I found the variable_names from .eso file.

Thanks!

### Controlling Setpoint with python pluging

Hello everyone,

I want to get the value of setpoint in an EnergyPlus model with the python plugin. I tried this code but it returns -1:

    self.T1_handle = self.api.exchange.get_variable_handle(state, "Zone Thermostat Cooling Setpoint Temperature", "Perimeter_ZN_1")
T1 = self.api.exchange.get_variable_value(state, self.T1_handle)


Based on this post, the number of inputs is fine I think. When I change the variable_names to others such as "Zone Mean Air Temperature", and "People Occupant Count" It works. But it does not work for "Zone Thermostat Cooling Setpoint Temperature". I found the variable_names from .eso file.

Thanks!

### Controlling getting Setpoint value with python pluging

Hello everyone,

I want to get the value of setpoint in an EnergyPlus model with the python plugin. I tried this code but it returns -1:

    self.T1_handle = self.api.exchange.get_variable_handle(state, "Zone Thermostat Cooling Setpoint Temperature", "Perimeter_ZN_1")
T1 = self.api.exchange.get_variable_value(state, self.T1_handle)


Based on this post, the number of inputs is fine I think. When I change the variable_names to others such as "Zone Mean Air Temperature", and "People Occupant Count" It works. But it does not work for "Zone Thermostat Cooling Setpoint Temperature". I found the variable_names from .eso file.

Thanks!

 5 retagged shorowit 7405 ●63 ●8 https://www.nrel.gov/b...

### getting Setpoint value with python pluging

Hello everyone,

I want to get the value of setpoint in an EnergyPlus model with the python plugin. I tried this code but it returns -1:

    self.T1_handle = self.api.exchange.get_variable_handle(state, "Zone Thermostat Cooling Setpoint Temperature", "Perimeter_ZN_1")
T1 = self.api.exchange.get_variable_value(state, self.T1_handle)


Based on this post, the number of inputs is fine I think. When I change the variable_names to others such as "Zone Mean Air Temperature", and "People Occupant Count" It works. But it does not work for "Zone Thermostat Cooling Setpoint Temperature". I found the variable_names from .eso file.

Thanks!

### getting Setpoint value with python pluging

Hello everyone,

I want to get the value of setpoint in an EnergyPlus model with the python plugin. I tried this code but it returns -1:

    self.T1_handle = self.api.exchange.get_variable_handle(state, "Zone Thermostat Cooling Setpoint Temperature", "Perimeter_ZN_1")
T1 = self.api.exchange.get_variable_value(state, self.T1_handle)


Based on this post, the number of inputs is fine I think. When I change the variable_names to others such as "Zone Mean Air Temperature", and "People Occupant Count" It works. But it does not work for "Zone Thermostat Cooling Setpoint Temperature". I found the variable_names from .eso file.

Thanks!