Skip to content

Latest commit

 

History

History
537 lines (330 loc) · 10.5 KB

kronoterm_cloud_api_docs.md

File metadata and controls

537 lines (330 loc) · 10.5 KB

Table of Contents

client

KronotermCloudApi Objects

class KronotermCloudApi()

__init__

def __init__(username: str, password: str)

Kronoterm heat pump cloud API.

Arguments:

  • username: kronoterm cloud username
  • password: kronoterm cloud password

login

def login()

Log in to cloud.

get_raw

def get_raw(url: str, **kwargs)

GET response from given url API endpoint.

Arguments:

  • url: url of the request
  • kwargs: any other arguments that will be passed to requests.get()

Returns:

response

post_raw

def post_raw(url, **kwargs)

POST response from given url API endpoint.

Arguments:

  • url: url of the request
  • kwargs: any other arguments that will be passed to requests.post()

Returns:

response

update_heat_pump_basic_information

def update_heat_pump_basic_information()

Update heat pump information from INITIAL load data.

get_initial_data

def get_initial_data() -> dict

Get initial data.

Returns:

initial data

get_basic_data

def get_basic_data() -> dict

Get basic view data.

Returns:

basic view data

get_system_review_data

def get_system_review_data() -> dict

Get system review view data.

Returns:

system review data

get_heating_loop_data

def get_heating_loop_data(loop: HeatingLoop) -> dict

Get heating loop view data. Supports:

  • HEATING_LOOP_1
  • HEATING_LOOP_2
  • TAP_WATER

Returns:

heating loop data

get_alarms_data

def get_alarms_data() -> dict

Get alarm view data.

Returns:

alarm data

get_alarms_data_only

def get_alarms_data_only(alarms_data: dict | None = None) -> dict

Get only AlarmsData (list of alarms) part of the alarm response.

Arguments:

  • alarms_data: if supplied it will be parsed for AlarmsData otherwise make API request

Returns:

list of alarms

get_theoretical_use_data

def get_theoretical_use_data() -> dict

Get theoretical use view data. As displayed in 'Theoretical use histogram'.

Returns:

theoretical use data

get_outside_temperature

def get_outside_temperature() -> float

Get current outside temperature.

Returns:

outside temperature in [C]

get_working_function

def get_working_function() -> WorkingFunction

Get currently set HP working function

Returns:

WorkingFunction Enum

get_room_temp

def get_room_temp() -> float

Get current room temperature.

Returns:

room temperature in [C]

get_reservoir_temp

def get_reservoir_temp() -> float

Get current reservoir temperature.

Returns:

reservoir temperature in [C]

get_outlet_temp

def get_outlet_temp() -> float

Get current HP outlet temperature.

Returns:

HP outlet temperature in [C]

get_sanitary_water_temp

def get_sanitary_water_temp() -> float

Get current sanitary water temperature.

Returns:

sanitary water temperature in [C]

get_heating_loop_target_temperature

def get_heating_loop_target_temperature(loop: HeatingLoop) -> float

Get currently set heating loop target temperature.

Returns:

currently set heating loop target temperature in [C]

get_heating_loop_status

def get_heating_loop_status(loop: HeatingLoop) -> HeatingLoopStatus

Get HP working status.

  • ECO
    • NORMAL
    • COMFORT
    • OFF
    • AUTO

Returns:

HP working status

get_heating_loop_mode

def get_heating_loop_mode(loop: HeatingLoop) -> HeatingLoopMode

Get the mode of heating loop:

  • ON
    • OFF
    • AUTO

Arguments:

  • loop: for which loop to get mode

Returns:

mode: mode of the loop

get_heat_pump_operating_mode

def get_heat_pump_operating_mode() -> HeatPumpOperatingMode

Get the mode of heating loop:

  • COMFORT
    • AUTO
    • ECO

Returns:

mode: mode of the heat pumo

set_heating_loop_mode

def set_heating_loop_mode(loop: HeatingLoop, mode: HeatingLoopMode) -> bool

Set the mode of heating loop:

  • ON
    • OFF
    • AUTO

Arguments:

  • loop: for which loop to set mode
  • mode: mode of the loop

set_heat_pump_operating_mode

def set_heat_pump_operating_mode(mode: HeatPumpOperatingMode)

Set the heat pump operating mode:

  • COMFORT
    • AUTO
    • ECO

Arguments:

  • mode: mode of the heat pump

set_heating_loop_target_temperature

def set_heating_loop_target_temperature(loop: HeatingLoop,
                                        temperature: int | float) -> bool

Set heating loop temperature.

Arguments:

  • loop: for which loop to set temperature
  • temperature: temperature to set

get_theoretical_power_consumption

def get_theoretical_power_consumption()

Get theoretically calculated power consumption (calculated by HP and/or cloud).

Returns:

named tuple with latest daily power consumption in [kWh]

kronoterm_enums

HeatingLoop Objects

class HeatingLoop(Enum)

Heat pump heating loops

HEATING_LOOP_1

Radiators

HEATING_LOOP_2

Convectors

APIEndpoint Objects

class APIEndpoint(Enum)

API endpoints used to get data and set heat pump parameters

WorkingFunction Objects

class WorkingFunction(Enum)

Heat pump working functions

HeatingLoopStatus Objects

class HeatingLoopStatus(Enum)

Heat pump heating loop status dictated by heat pump operating mode and schedule

HeatingLoopMode Objects

class HeatingLoopMode(Enum)

Heat pump heating loop mode

HeatPumpOperatingMode Objects

class HeatPumpOperatingMode(Enum)

Heat pump operating mode

__init__