How to Control Twospeed heat pump using actuator?

asked 2025-01-06 14:05:53 -0600

updated 2025-01-06 16:27:55 -0600

I want to control an air-source two-speed heat pump using Python. Specifically, I would like to control the compressor staging or coil speed in real-time using the Python API. How can I implement this?

I am using the following handles to get and set values:

python
dx_coil_speed_var_handle = data_transfer.get_variable_handle(state, "Unitary System DX Coil Speed Level", "TWOSPEED HEAT PUMP 1")

cooling_setpoint_handle = data_transfer.get_actuator_handle(state, "Coil Speed Control", "TWOSPEED HEAT PUMP 1", "Unitary System DX Coil Speed Value")

I am defining a callback function using the API like this:

python
api.runtime.callback_inside_system_iteration_loop(state, callback_function)

Could you provide guidance or an example of how to implement this?

edit retag flag offensive close merge delete