Revision history  [back]

How do i get a sensor value using the EnergyPlus Python api?

What I'm trying right now is to get the "Zone Air Temperature" for "Thermal Zone 1" and the "System Node Temperature" of my "Setpoint Node".

zone_air_temperature = api.exchange.get_variable_handle(state, u"ZONE AIR TEMPERATURE", u"Thermal Zone 1")

setpoint_node_temperature = api.exchange.get_variable_handle(state, u"SYSTEM NODE TEMPERATURE", u"SETPOINT NODE")

If i call api.exchange.get_variable_value on them it always returns 0. Am I doing this wrong?

Thanks in advance.