Package: htheatpump
HtHeatpumpEasy-to-use Python communication module forHeliothermandBrötje BSW NEOheat pumps.GitHub repo:https://github.com/dstrigl/htheatpumpDocumentation:https://htheatpump.readthedocs.ioFree software:GNU General Public License v3IntroductionThis library provides a pure Python interface to accessHeliothermandBrötje BSW NEOheat pumps
over a serial connection. It’s compatible with Python version 3.7 and 3.8.Featuresread the manufacturer’s serial number of the heat pumpread the software version of the heat pumpread and write the current date and time of the heat pumpread the fault list of the heat pumpquery whether the heat pump is malfunctioningquery for several parameters of the heat pumpchange parameter values of the heat pumpfast query of MP data points / parameters (“Web-Online”)read and write the time programs of the heat pumpTested with[*]Heliotherm HP08S10W-WEB, SW 3.0.20Heliotherm HP10S12W-WEB, SW 3.0.8Heliotherm HP08E-K-BC, SW 3.0.7BHeliotherm HP05S07W-WEB, SW 3.0.17 and SW 3.0.37Heliotherm HP12L-M-BC, SW 3.0.21Heliotherm HP07S08W-WEB, SW 3.0.37Heliotherm HP-30-L-M-WEB, SW 3.0.21Brötje BSW NEO 8 SW 3.0.38[*]thanks to Kilian, Hans, Alois, Simon, Felix (FelixPetriconi) and Matthias for contributionInstallationYou can install or upgradehtheatpumpwith:$pipinstallhtheatpump--upgradeOr you can install from source with:$gitclonehttps://github.com/dstrigl/htheatpump.git$cdhtheatpump$pythonsetup.pyinstallGetting startedTo usehtheatpumpin a project take a look on the following example. After establishing a connection
with the Heliotherm heat pump one can interact with it by different functions like reading or writing
parameters.fromhtheatpumpimportHtHeatpumphp=HtHeatpump("/dev/ttyUSB0",baudrate=9600)try:hp.open_connection()hp.login()# query for the outdoor temperaturetemp=hp.get_param("Temp. Aussen")print(temp)# ...finally:hp.logout()# try to logout for an ordinary cancellation (if possible)hp.close_connection()fromhtheatpumpimportAioHtHeatpumphp=AioHtHeatpump("/dev/ttyUSB0",baudrate=9600)try:hp.open_connection()awaithp.login_async()# query for the outdoor temperaturetemp=awaithp.get_param_async("Temp. Aussen")print(temp)# ...finally:awaithp.logout_async()# try to logout for an ordinary cancellation (if possible)hp.close_connection()A full list of supported functions can be found in thehtheatpumpdocumentation atreadthedocs.io.There are also some sample scripts that are part of thehtheatpumppackage and
can be run immediately after installation, e.g.:$htquery--device/dev/ttyUSB1"Temp. Aussen""Stoerung"Stoerung:FalseTemp.Aussen:5.0LoggingThis library uses theloggingmodule. To set up logging to standard output, putimportlogginglogging.basicConfig(level=logging.DEBUG)at the beginning of your script.DisclaimerWarningPlease note that any incorrect or careless usage of this module as well as
errors in the implementation can damage your heat pump!Therefore, the author does not provide any guarantee or warranty concerning
to correctness, functionality or performance and does not accept any liability
for damage caused by this module, examples or mentioned information.Thus, use it on your own risk!ContributingContributions are always welcome. Please review thecontribution guidelinesto get started.
You can also help byreporting bugs.Wanna support me?CreditsCreated withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Project dependencies scanned byPyUp.io.LicenseDistributed under the terms of theGNU General Public License v3.History1.3.2 (2022-01-13)updated copyright statementssome minor improvements in the testsfix: removed log of loaded definition file path (HTHEATPUMP: load parameter definitions ...)
to get a clean JSON output in the sample scripts (e.g.htquery.py)1.3.1 (2021-01-20)replaced Travis CI by GitHub Actionsadded async version of console scriptsupdated copyright statementssome minor cleanup and improvements1.3.0 (2020-12-28)added new classAioHtHeatpumpfor asynchronous communication (async/await) with the heat pumpPython code reformatting usingBlackandisortmoved protocol related constants and functions toprotocol.pydropped support for Python 3.5 and 3.61.2.4 (2020-04-20)added support for Python 3.8some minor cleanup and improvementschanged log statements to the form with the preferred and well-known%s(and%d,%f, etc.)
string formatting indicators (due to performance reasons)added additional heat pump parameter (data points)Hauptschalterinhtparams.csv1.2.3 (2020-03-31)changed behaviour ofHtHeatpump.reconnect(), which will now also establish a connection if still not connectedadded sample scripts (e.g.htcomplparams,htquery, etc.) to be part of thehtheatpumppackageclean-up ofsetup.pyandMANIFEST.in1.2.2 (2020-03-29)added sample filehtparams-xxxxxx-3_0_20-273.csvwith a complete list of all heat pump parameters
from a Heliotherm heat pump with SW 3.0.20added new sample scripthtcomplparams.pyto create a complete list of all heat pump parametersadded some more heat pump parameters (data points) inhtparams.csvPython code reformatting usingBlackchanged package requirements structure; some changes insetup.py,setup.cfg,tox.ini, etc.1.2.1 (2020-02-07)updated copyright statementsadded factory functionfrom_jsonto classesTimeProgPeriod,TimeProgEntryandTimeProgramfixed issue with fault lists with larger number of entries (inHtHeatpump.get_fault_list());
thanks to Alois for reportingadded new functionHtParam.check_value_typeto verify the correct type of a passed value;
the type of a passed value toHtHeatpump.set_param()will now be verifiedfixed issue with passing a larger number of indices toHtHeatpump.fast_query()1.2.0 (2019-06-10)added support for Python’s “with” statement for theHtHeatpumpclassadded some more unit-tests (especially for the time program functions)extended the sample scriptshthttp.pyto query for time programs of the heat pumpadded new samplesamples/httimeprog.pyto read the time programs of the heat pumpadded new functions to write/change time program entries of the heat pump (seeHtHeatpump.set_time_prog...)added new functions to read the time program of the heat pump (seeHtHeatpump.get_time_prog...)added type annotations and hints for static type checking (usingmypy)splitted up propertyHtHeatpump.verify_paramtoHtHeatpump.verify_param_actionandHtHeatpump.verify_param_errorrenamed exceptionParamVerificationExceptiontoVerificationExceptionadded support for Python 3.7dropped support for Python 3.4added some more heat pump parameters (data points) inhtparams.csv1.1.0 (2019-02-23)added some more heat pump parameters (data points) inhtparams.csvextended sample scripthtfaultlist.pyby the possibility to write a JSON/CSV fileadded new sample scriptshthttp.pyandhtfastquery.pyfixed some formatting (flake8) errorssome improvement for the reconnect in thelogin()method of classHtHeatpumpchanged return type ofHtHeatpump.get_fault_list()fromdicttolistadded support for Python 3.6added support for a user specific parameter definition file under~/.htheatpump/htparams.csvextended samplehtbackup.pyto store also the limits (MIN and MAX) of each data pointadded method to verify the parameter definitions inhtparams.csvduring aHtHeatpump.get_param(),HtHeatpump.set_param()orHtHeatpump.query(); this is just for safety to be sure that the
parameter definitions inHtParamsare correct (deactivated by default, but can be activated by
setting the propertyHtHeatpump.verify_paramtoTrue)added new methodHtHeatpump.fast_query()to retrieve “MP” data point values in a faster way (“Web-Online”)extended theHtHeatpump.login()method to perform an update of the parameter limits if desired1.0.0 (2018-01-12)First release on PyPI.