Homeautomation: Read values from a Luxtronic2 Heatpump to a MQTT broker

Hi,

during automation of my home with OpenHab I had to include my Alpha Innotec Headpump because I want to display some values like temperature, errors…

I found some scripts which reads the values from the machine but only displays them in the screen. But I want to use them in Openhab.

Writing values to a file and read them with OpenHab was not an option.

Therefore I tried to write the values to an MQTT Broker, in my case mosquitto, so that other Homeautomationsystems like Nodered can use them too.

The script was written in python because libraries for all tasks (Read socket, write mqtt) are available and they are easy to use.

The publish path is defined my the prefix sPrefixPublishPath='home/heatpump/0/', followed by the Valuename of the Heatpump.

For example the outside temperatures publish path is : home/heatpump/0/Temperatur_TA.

The payload is an json object:

{
"Description" : "Aussentemperatur (°C)",
"Name" : "Temperatur_TA",
"Field" : 15,
"Value" : 8.2,
"Details" : ""
}
{
"Description" : "Abtauen seit (hh:mm:ss)",
"Name" : "Time_AbtIn",
"Field" : 141,
"Value" : 595,
"Details" : "0:09:55"
}

  • Name: is the variable name
  • Field: is the index of the Data(One packet with ~200 4 Bytes Integer Values) returned by the Heatpump
  • Value: is the raw value returned
  • Description: is defined for each variable name in aValueDefinition
  • Details: further details if available(IP Address, Heatpumptype, OperatingState…)

I’m not 100% sure if the Datatypes of the fields greater 120 are defined correct. Any improvements are welcome. Script is also published at github. Please send pull requests!

To run the script the following python modules are requiered:

apt-get install 
pip3 install setuptools wheel
pip3 install paho-mqtt

I used python3 but it should also work with 2.7.

Michael

Read operating values from a Luxtronics driven Heatpump
Read operating values from a Luxtronics driven Heatpump
heatpump2mqtt.7z
Version: v20180315
9.2 KiB
309 Downloads
Details...

Leave a Reply