Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Python and python framework

Moderator: leecollings

Post Reply
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

I’ve created Luxtronik Heat Pump Controller Plugin for Domoticz for my Alpha Innotec. This plugin is designed to seamlessly integrate Luxtronik-based heat pump controllers with Domoticz, providing real-time monitoring, control, and advanced device management for your heating system.

Background and Inspiration
This project builds upon the excellent work of ajarzyn, whose plugin served as the foundation for this version.

What Does the Plugin Do?
The plugin allows you to:
  • Communicate with your Luxtronik heat pump controller via socket connections.
  • Monitor critical parameters such as temperatures (heat supply, heat return, domestic hot water, etc.), pressures (high, low, superheat), pump speeds, and energy consumption.
  • Automatically create and update Domoticz devices to represent sensors and control points.
  • Control operating modes including heating, hot water, and cooling through selector switches.
  • Switch the DHW (Domestic Hot Water) inverter mode between Normal (energy-efficient) and Luxury (increased performance) modes via a dedicated selector device.
  • Configure update intervals and debug levels to fine-tune performance and troubleshooting.
  • Enjoy multi-language support for English, Polish, Dutch, German, and French.
Key Features and Capabilities
  • Real-Time Monitoring: See live sensor data for better insight into your heat pump’s performance.
  • Comprehensive Device Management: The plugin automatically creates devices for temperature, pressure, power, and energy metrics, ensuring you always have the latest information.
  • Operating Mode Control: Easily switch between heating, hot water, and cooling modes – including the ability to change the DHW power mode between Normal and Luxury.
  • Robust Communication: Reliable socket communication with built-in retry logic and command echo verification.
  • Customizable Settings: Adjust heartbeat intervals and debug levels to match your system’s needs.
  • Time-Based Graphing Updates: Graphing devices will only resend their value at set intervals (every 5 minutes) when sensor values remain constant, changes are sent immediately ensuring accurate long-term trend analysis.
  • Multi-Language Support: Use the plugin in your preferred language with support for English, Polish, Dutch, German, and French.
Installation and Configuration
1. Download and Install:
Navigate to your Domoticz plugins directory and clone the repository:

Code: Select all

git clone https://github.com/Rouzax/luxtronik-domoticz-plugin.git
2. Restart Domoticz:
Restart the Domoticz service to load the new plugin.
3. Setup the Plugin in Domoticz:
In the Domoticz web interface, go to Setup > Hardware, add a new hardware device, select “Luxtronik Heat Pump Controller,” and fill in the necessary configuration details (IP Address, Port, Update Interval, Language, Debug Level, etc.).

Debug Logging
The plugin has extensive debug logging to show what is happening

Code: Select all

2025-03-10 10:06:12.043 WP: Pushing 'onHeartbeatCallback' on to queue
2025-03-10 10:06:12.093 WP: Processing 'onHeartbeatCallback' message
2025-03-10 10:06:12.093 WP: Acquiring GIL for 'onHeartbeatCallback'
2025-03-10 10:06:12.094 WP: Calling message handler 'onHeartbeat' on 'module' type object.
2025-03-10 10:06:12.094 WP: [ALL] Heartbeat - Starting full device update
2025-03-10 10:06:12.094 WP: [ALL] Heartbeat update started
2025-03-10 10:06:12.094 WP: [ALL] Connected to 192.168.2.63:8889 (Local: ('192.168.2.61', 45048))
2025-03-10 10:06:12.094 WP: [ALL] Sending READ_CALCUL command
2025-03-10 10:06:12.101 WP: [ALL] READ_CALCUL: Received 272 values
2025-03-10 10:06:12.101 WP: [ALL] Update decision for Device 1 (WP - Heat supply temp): No changes, next update in 240s
2025-03-10 10:06:12.101 WP: [ALL] Update decision for Device 2 (WP - Heat return temp): No changes, next update in 159s
2025-03-10 10:06:12.101 WP: [ALL] Update decision for Device 3 (WP - Return temp target): No changes, next update in 159s
2025-03-10 10:06:12.102 WP: [ALL] Update decision for Device 4 (WP - Outside temp): No changes, next update in 179s
2025-03-10 10:06:12.102 WP: [ALL] Update decision for Device 5 (WP - Outside temp avg): No changes, next update in 199s
2025-03-10 10:06:12.102 WP: [ALL] Update decision for Device 6 (WP - DHW temp): Values changed -- sValue: 58.7 (normalized: 58.7) -> 58.6 (normalized: 58.6)
2025-03-10 10:06:12.102 (WP - DHW temp) Updating device from 0:'58.7' to have values 0:'58.6'.
2025-03-10 10:06:12.111 WP: [ALL] Update decision for Device 8 (WP - WP source in temp): Values changed -- sValue: 13.6 (normalized: 13.6) -> 13.7 (normalized: 13.7)
2025-03-10 10:06:12.111 (WP - WP source in temp) Updating device from 0:'13.6' to have values 0:'13.7'.
2025-03-10 10:06:12.122 WP: [ALL] Update decision for Device 9 (WP - WP source out temp): Values changed -- sValue: 14.8 (normalized: 14.8) -> 14.9 (normalized: 14.9)
2025-03-10 10:06:12.122 (WP - WP source out temp) Updating device from 0:'14.8' to have values 0:'14.9'.
2025-03-10 10:06:12.130 WP: [ALL] Update decision for Device 10 (WP - MC1 temp): No changes, next update in 160s
2025-03-10 10:06:12.130 WP: [ALL] Update decision for Device 11 (WP - MC1 temp target): No changes, next update in 160s
2025-03-10 10:06:12.130 WP: [ALL] Update decision for Device 12 (WP - MC2 temp): No changes, next update in 240s
2025-03-10 10:06:12.130 WP: [ALL] Update decision for Device 13 (WP - MC2 temp target): No changes, next update in 199s
2025-03-10 10:06:12.130 WP: [ALL] Update decision for Device 18 (WP - Working mode): Non-graphing device, no changes
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 19 (WP - Flow): No changes, next update in 199s
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 20 (WP - Compressor freq): No changes, next update in 199s
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 21 (WP - Room temp): No changes, next update in 19s
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 22 (WP - Room temp target): No changes, next update in 199s
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 23 (WP - Power total): No changes, next update in 199s
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 24 (WP - Power heating): No changes, next update in 199s
2025-03-10 10:06:12.131 WP: [ALL] Update decision for Device 25 (WP - Power DHW): No changes, next update in 199s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 26 (WP - Heat out total): No changes, next update in 199s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 27 (WP - Heat out heating): No changes, next update in 199s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 28 (WP - Heat out DHW): No changes, next update in 200s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 29 (WP - COP total): No changes, next update in 200s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 30 (WP - Heating pump speed): No changes, next update in 200s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 31 (WP - Brine pump speed): No changes, next update in 200s
2025-03-10 10:06:12.132 WP: [ALL] Update decision for Device 32 (WP - Hot gas temp): Values changed -- sValue: 46.8 (normalized: 46.8) -> 46.7 (normalized: 46.7)
2025-03-10 10:06:12.132 (WP - Hot gas temp) Updating device from 0:'46.8' to have values 0:'46.7'.
2025-03-10 10:06:12.140 WP: [ALL] Update decision for Device 33 (WP - Suction temp): Values changed -- sValue: 34.2 (normalized: 34.2) -> 34.1 (normalized: 34.1)
2025-03-10 10:06:12.140 (WP - Suction temp) Updating device from 0:'34.2' to have values 0:'34.1'.
2025-03-10 10:06:12.148 WP: [ALL] Update decision for Device 34 (WP - Superheat): Values changed -- sValue: 10.0 (normalized: 10.0) -> 9.9 (normalized: 9.9)
2025-03-10 10:06:12.148 (WP - Superheat) Updating device from 0:'10.0' to have values 0:'9.9'.
2025-03-10 10:06:12.156 WP: [ALL] Update decision for Device 35 (WP - High pressure): No changes, next update in 279s
2025-03-10 10:06:12.156 WP: [ALL] Update decision for Device 36 (WP - Low pressure): Values changed -- sValue: 8.95 (normalized: 8.95) -> 8.96 (normalized: 8.96)
2025-03-10 10:06:12.156 (WP - Low pressure) Updating device from 0:'8.95' to have values 0:'8.96'.
2025-03-10 10:06:12.162 WP: [ALL] Update decision for Device 37 (WP - Brine temp diff): No changes, next update in 279s
2025-03-10 10:06:12.162 WP: [ALL] Update decision for Device 38 (WP - Heating temp diff): No changes, next update in 240s
2025-03-10 10:06:12.162 WP: [ALL] READ_CALCUL: Actually updated 7 devices
2025-03-10 10:06:12.163 WP: [ALL] Connected to 192.168.2.63:8889 (Local: ('192.168.2.61', 45064))
2025-03-10 10:06:12.163 WP: [ALL] Sending READ_PARAMS command
2025-03-10 10:06:12.193 WP: [ALL] READ_PARAMS: Received 1162 values
2025-03-10 10:06:12.193 WP: [ALL] Update decision for Device 7 (WP - DHW temp target): No changes, next update in 200s
2025-03-10 10:06:12.193 WP: [ALL] Update decision for Device 14 (WP - Heating mode): Non-graphing device, no changes
2025-03-10 10:06:12.193 WP: [ALL] Update decision for Device 15 (WP - Hot water mode): Non-graphing device, no changes
2025-03-10 10:06:12.193 WP: [ALL] Update decision for Device 16 (WP - Cooling): Non-graphing device, no changes
2025-03-10 10:06:12.193 WP: [ALL] Update decision for Device 17 (WP - Temp +-): No changes, next update in 200s
2025-03-10 10:06:12.194 WP: [ALL] Update decision for Device 39 (WP - DHW Power Mode): Non-graphing device, no changes
2025-03-10 10:06:12.194 WP: [ALL] READ_PARAMS: Actually updated 0 devices
2025-03-10 10:06:12.194 WP: Acquiring GIL for 'onHeartbeatCallback' 
Screenshots

Here are some of the devices that get created

Utilities
Utility.png
Utility.png (97.08 KiB) Viewed 842 times
Temperatures
Temperatures.png
Temperatures.png (43.64 KiB) Viewed 842 times
Switches
Switches.png
Switches.png (13.99 KiB) Viewed 842 times
JaapB
Posts: 21
Joined: Friday 17 February 2023 13:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by JaapB »

Nice piece of work and after testing on a spare system installed it.
Some extra features that are very welcome but I encountered one glitch and that is abouth the setpoints and the use of them in blockly.

The setpoints are found under devices and show up as a utility but trying to use it in blockly as it did work with the old plugin I get the message nog setpoints found.
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by waltervl »

@ragdag Looking at your plugin code it seems that it is using the legacy plugin framework instead of the new and better DomoticzEx. Bugs in legacy plugin framework code are not going to be fixed.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

waltervl wrote: Thursday 13 March 2025 11:34 @ragdag Looking at your plugin code it seems that it is using the legacy plugin framework instead of the new and better DomoticzEx. Bugs in legacy plugin framework code are not going to be fixed.
Do you have a documentation on this?
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

JaapB wrote: Thursday 13 March 2025 11:07 Nice piece of work and after testing on a spare system installed it.
Some extra features that are very welcome but I encountered one glitch and that is abouth the setpoints and the use of them in blockly.

The setpoints are found under devices and show up as a utility but trying to use it in blockly as it did work with the old plugin I get the message nog setpoints found.
Which setpoint are you talking about?
Can you set it outside of a blocky?
JaapB
Posts: 21
Joined: Friday 17 February 2023 13:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by JaapB »

Ragdag wrote: Thursday 13 March 2025 12:52
JaapB wrote: Thursday 13 March 2025 11:07 Nice piece of work and after testing on a spare system installed it.
Some extra features that are very welcome but I encountered one glitch and that is abouth the setpoints and the use of them in blockly.

The setpoints are found under devices and show up as a utility but trying to use it in blockly as it did work with the old plugin I get the message nog setpoints found.
Which setpoint are you talking about?
Can you set it outside of a blocky?
It's the setpoint for watertemperature and is is visible in the utility-tab.
Image
Image
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

JaapB wrote: Thursday 13 March 2025 14:18
Ragdag wrote: Thursday 13 March 2025 12:52
JaapB wrote: Thursday 13 March 2025 11:07 Nice piece of work and after testing on a spare system installed it.
Some extra features that are very welcome but I encountered one glitch and that is abouth the setpoints and the use of them in blockly.

The setpoints are found under devices and show up as a utility but trying to use it in blockly as it did work with the old plugin I get the message nog setpoints found.
Which setpoint are you talking about?
Can you set it outside of a blocky?
It's the setpoint for watertemperature and is is visible in the utility-tab.
Image
Image
I am able to set it directly in the GUI and see the change reflected on the Heat Pump, not sure whet is happening there. I never use Blocky
Can't you just type the required set point and save it?
JaapB
Posts: 21
Joined: Friday 17 February 2023 13:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by JaapB »

Ragdag wrote: Thursday 13 March 2025 14:27
JaapB wrote: Thursday 13 March 2025 14:18
Ragdag wrote: Thursday 13 March 2025 12:52

Which setpoint are you talking about?
Can you set it outside of a blocky?
It's the setpoint for watertemperature and is is visible in the utility-tab.
Image
Image
I am able to set it directly in the GUI and see the change reflected on the Heat Pump, not sure whet is happening there. I never use Blocky
Can't you just type the required set point and save it?
Setting it directly is no problem here either, it's just in blockly that it does not register as a setpoint, to be set

Image

Picture above is in my test system using the old plugin.
Probably a small thing in namegiving of this setpoint.
Allready tried restarting domoticz and rebooting the system just to be shure that is not the problem.
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by waltervl »

Is it really a setpoint device in Domoticz or just a temperature device/custom sensor? Can you set the setpoint from Domoticz User interface?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by waltervl »

Ragdag wrote: Thursday 13 March 2025 12:07
waltervl wrote: Thursday 13 March 2025 11:34 @ragdag Looking at your plugin code it seems that it is using the legacy plugin framework instead of the new and better DomoticzEx. Bugs in legacy plugin framework code are not going to be fixed.
Do you have a documentation on this?
See the wiki https://wiki.domoticz.com/Developing_a_ ... _Framework
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

JaapB wrote: Thursday 13 March 2025 14:52
Ragdag wrote: Thursday 13 March 2025 14:27
JaapB wrote: Thursday 13 March 2025 14:18
It's the setpoint for watertemperature and is is visible in the utility-tab.
Image
Image
I am able to set it directly in the GUI and see the change reflected on the Heat Pump, not sure whet is happening there. I never use Blocky
Can't you just type the required set point and save it?
Setting it directly is no problem here either, it's just in blockly that it does not register as a setpoint, to be set

Image

Picture above is in my test system using the old plugin.
Probably a small thing in namegiving of this setpoint.
Allready tried restarting domoticz and rebooting the system just to be shure that is not the problem.
I think it is because I'm not setting all the Setpoint options during creation.
You can work around by editing the device and Updating it without changing anything
Image

Looking further it has nothing to do with the options I set, as the Temp +/- does have the proper options ans also does not show.
Think this is a quirck of Blocky/Domoticz
JaapB
Posts: 21
Joined: Friday 17 February 2023 13:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by JaapB »

waltervl wrote: Thursday 13 March 2025 16:56 Is it really a setpoint device in Domoticz or just a temperature device/custom sensor? Can you set the setpoint from Domoticz User interface?
It is aan setpoint device and it did work as a setpointdevice in blockly in the older luxtronic plugin.
JaapB
Posts: 21
Joined: Friday 17 February 2023 13:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by JaapB »

Ragdag wrote: Thursday 13 March 2025 16:59
JaapB wrote: Thursday 13 March 2025 14:52
Ragdag wrote: Thursday 13 March 2025 14:27
I am able to set it directly in the GUI and see the change reflected on the Heat Pump, not sure whet is happening there. I never use Blocky
Can't you just type the required set point and save it?
Setting it directly is no problem here either, it's just in blockly that it does not register as a setpoint, to be set

Image

Picture above is in my test system using the old plugin.
Probably a small thing in namegiving of this setpoint.
Allready tried restarting domoticz and rebooting the system just to be shure that is not the problem.
I think it is because I'm not setting all the Setpoint options during creation.
You can work around by editing the device and Updating it without changing anything
Image

Looking further it has nothing to do with the options I set, as the Temp +/- does have the proper options ans also does not show.
Think this is a quirck of Blocky/Domoticz
Your workaround works, still strange how just this differs from the setpoint that's provided in the old plugin.
Still impressed by the surplus of possibilties in your plugin.Thannks for the help.
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

Have added a fix (hopefully) to correctly set Cooling as Working Mode. The Alpha Innotec does passive Cooling by using the brine ground loop, this was not correctly captured in the plugin
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Luxtronik Heat Pump Controller Plugin for Domoticz

Post by Ragdag »

Have added some more devices, the RBE Temp setpoint is now also available.
Image
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest