Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.