Package: keba-keenergy-api
KEBA KeEnergy APIA Python wrapper for the KEBA KeEnergy API.Getting startedpipinstallkeba-keenergy-apiUsageimportasynciofromtypingimportAnyfromkeba_keenergy_apiimportKebaKeEnergyAPIfromkeba_keenergy_api.constantsimportHeatCircuitasyncdefmain()->None:client=KebaKeEnergyAPI(host="YOUR-IP-OR-HOSTNAME",ssl=True)# Get current outdoor temperatureoutdoor_temperature:float=awaitclient.get_outdoor_temperature()# Get heat circuit temperature from heat circuit 2heat_circuit_temperature:float=awaitclient.heat_circuit.get_temperature(position=2)# Read multiple valuesdata:dict[str,tuple[float|int|str]]=awaitclient.read_data(request=[HeatCircuit.TEMPERATURE,HeatCircuit.DAY_TEMPERATURE,],)# Enable "day" mode for heat circuit 2awaitclient.heat_circuit.set_operating_mode(mode="day",position=2)# Write multiple valuesawaitclient.write_data(request={HeatCircuit.DAY_TEMPERATURE:(20,None,5),# Write heat circuit on position 1 and 3HeatCircuit.NIGHT_TEMPERATURE:(16,),# Write night temperature on position 1},)asyncio.run(main())By default, the library creates a new connection toKEBA KeEnergy APIwith each coroutine. If you are calling a large number of coroutines, anaiohttp ClientSession()can be used for connection pooling:importasynciofromkeba_keenergy_apiimportKebaKeEnergyAPIfromaiohttpimportClientSessionasyncdefmain()->None:asyncwithClientSession()assession:client=KebaKeEnergyAPI(host="YOUR-IP-OR-HOSTNAME",session=session,ssl=True)...asyncio.run(main())API endpointsEndpointDescription.read_data(request, position, human_readable)Get multiple values with one http request..write_data(request)Write multiple values with one http request.SystemEndpointResponseDescription.get_info()strGet system information..get_device_info()strGet device information..get_outdoor_temperature()floatGet outdoor temperature..get_operating_mode(position, human_readable)intorstrGet operating mode as integer (0 isSTANDBY, 1 isSUMMER, 2 isAUTO_HEAT, 3 isAUTO_COOLand 4 isAUTO)..set_operating_mode(0, position, human_readable)intorstrSet operating mode.Hot water tankEndpointRequest/ResponseDescription.get_lower_limit_temperature(position)intGet lower limit temperature..get_upper_limit_temperature(position)intGet upper limit temperature..get_temperature(position)floatGet temperature..get_operating_mode(position, human_readable)intorstrGet operating mode as integer (0 isOFF, 1 isAUTO, 2 isDAYand 3 isNIGHT)..set_operating_mode(0, position, human_readable)intorstrSet operating mode..get_min_temperature(position)floatGet minimum temperature..set_min_temperature(20, position)floatSet minimum temperature..get_max_temperature(position)floatGet maximum temperature..set_max_temperature(22, position)floatSet maximum temperature..get_heat_request(position)intorstrGet heat request.Heat pumpEndpointResponseDescription.get_name(position)strGet head pump model name..get_state(position, human_readable)intorstrGet heat pump state as integer (0 isSTANDBY, 1 isFLOWand 2 isAUTO)..get_operating_mode(position, human_readable)intorstrGet operating mode as integer (0 isOFF, 1 isON, 2 isBACKUP)..get_circulation_pump(position)floatGet circulation pump in percent..get_inflow_temperature(position)floatGet inflow temperature..get_reflux_temperature(position)floatGet reflux temperature..get_source_input_temperature(position)floatGet source input temperature..get_source_output_temperature(position)floatGet source output temperature..get_compressor_input_temperature(position)floatGet compressor input temperature..get_compressor_output_temperature(position)floatGet compressor output temperature..get_compressor(position)floatGet compressor in percent..get_high_pressure(position)floatGet high pressure..get_low_pressure(position)floatGet low pressure..get_heat_request(position)intorstrGet heat request.Heat circuitEndpointRequest/ResponseDescription.get_temperature(position)floatGet temperature..get_day_temperature(position)floatGet day temperature..set_day_temperature(20, position)floatSet day temperature..get_day_temperature_threshold(position)floatGet day temperature threshold..get_night_temperature(position)floatGet night temperature..set_night_temperature(16, position)floatSet night temperature..get_night_temperature_threshold(position)floatGet night temperature threshold..get_holiday_temperature(position)floatGet holiday temperature..set_holiday_temperature(14, position)floatSet holiday temperature..get_temperature_offset(position)floatGet temperature offset..set_temperature_offset(2, position)floatSet temperature offset..get_operating_mode(position, human_readable)intorstrGet operating mode (0 isOFFand 3 isHEAT_UP)..set_operating_mode(3, position)intorstrSet operating mode..get_heat_request(position)intorstrGet heat request..get_external_cool_request(position)intorstrGet external cool request..get_external_heat_request(position)intorstrGet external heat request.ChangelogThe changelog lives in theCHANGELOG.mddocument. The format is based onKeep a Changelog.ContributingWe're happy about your contributions to the project!You can get started by reading theCONTRIBUTING.md.DonationWe put a lot of time into this project. If you like it, you can support us with a donation.