luxtronik icon indicating copy to clipboard operation
luxtronik copied to clipboard

Add venting option

Open Gifford47 opened this issue 9 months ago • 4 comments

I've created this PR to add ventilation feature. It adds three additional entities: 1 Switch for ventilation activating, 1 Switch for selecting the HUP (heating circulation pump) and 1 number entity for changing the ventilation time (1...6 hours).

If you want to activate the ventilation, you have to switch in the following order:

  • Number ventilation time (Hours)
  • Switch ventilation HUP=ON
  • Switch ventilation active=ON

Note: The switches must be aktivated within several seconds otherwise the ventilation doesn't start.

Adds following venting features:

para: Number: 158   Name: ID_Einst_Entl_akt
para: Number: 155   Name: ID_Einst_Entl_time_akt
para: Number: 678   Name: ID_Einst_Entl_Typ_0

Tested and works:

2025-03-25 14:16:21.801 INFO (MainThread) [custom_components.luxtronik2] Parameter '155' set to '2'
2025-03-25 14:16:21.802 DEBUG (MainThread) [custom_components.luxtronik2] Data b'\x00\x00\x0b\xba\x00\x00\x00\x9b\x00\x00\x00\x02'
2025-03-25 14:16:21.814 DEBUG (MainThread) [custom_components.luxtronik2] Command 3002
2025-03-25 14:16:21.819 DEBUG (MainThread) [custom_components.luxtronik2] Value 155
2025-03-25 14:16:21.823 DEBUG (MainThread) [custom_components.luxtronik2] Command 3003
2025-03-25 14:16:21.824 DEBUG (MainThread) [custom_components.luxtronik2] Length 1141
2025-03-25 14:16:21.873 DEBUG (MainThread) [custom_components.luxtronik2] Read 1141 parameters
2025-03-25 14:16:21.877 DEBUG (MainThread) [custom_components.luxtronik2] Command 3004
2025-03-25 14:16:21.879 DEBUG (MainThread) [custom_components.luxtronik2] Stat 0
2025-03-25 14:16:21.879 DEBUG (MainThread) [custom_components.luxtronik2] Length 263
2025-03-25 14:16:21.889 DEBUG (MainThread) [custom_components.luxtronik2] Read 263 calculations
2025-03-25 14:16:21.893 DEBUG (MainThread) [custom_components.luxtronik2] Command 3005
2025-03-25 14:16:21.936 DEBUG (MainThread) [custom_components.luxtronik2] Length 365
2025-03-25 14:16:21.954 DEBUG (MainThread) [custom_components.luxtronik2] Read 365 visibilities
2025-03-25 14:16:21.956 INFO (MainThread) [custom_components.luxtronik2] LuxtronikDevice.write finished ID_Einst_Entl_time_akt value: "2"
2025-03-25 14:16:21.956 DEBUG (MainThread) [custom_components.luxtronik2] Manually updated luxtronik2 data
2025-03-25 14:49:21.139 DEBUG (MainThread) [custom_components.luxtronik2] Command 3003
2025-03-25 14:49:21.140 DEBUG (MainThread) [custom_components.luxtronik2] Length 1141
2025-03-25 14:49:21.160 DEBUG (MainThread) [custom_components.luxtronik2] Read 1141 parameters
2025-03-25 14:49:21.163 DEBUG (MainThread) [custom_components.luxtronik2] Command 3004
2025-03-25 14:49:21.205 DEBUG (MainThread) [custom_components.luxtronik2] Stat 0
2025-03-25 14:49:21.205 DEBUG (MainThread) [custom_components.luxtronik2] Length 263
2025-03-25 14:49:21.217 DEBUG (MainThread) [custom_components.luxtronik2] Read 263 calculations
2025-03-25 14:49:21.221 DEBUG (MainThread) [custom_components.luxtronik2] Command 3005
2025-03-25 14:49:21.264 DEBUG (MainThread) [custom_components.luxtronik2] Length 365
2025-03-25 14:49:21.273 DEBUG (MainThread) [custom_components.luxtronik2] Read 365 visibilities
2025-03-25 14:49:21.273 DEBUG (MainThread) [custom_components.luxtronik2] Manually updated luxtronik2 data
2025-03-25 14:49:21.316 DEBUG (MainThread) [custom_components.luxtronik2] Finished fetching luxtronik2 data in 0.180 seconds (success: True)
2025-03-25 14:49:25.617 INFO (MainThread) [custom_components.luxtronik2] Parameter '678' set to 'False'
2025-03-25 14:49:25.617 DEBUG (MainThread) [custom_components.luxtronik2] Data b'\x00\x00\x0b\xba\x00\x00\x02\xa6\x00\x00\x00\x00'
2025-03-25 14:49:25.622 DEBUG (MainThread) [custom_components.luxtronik2] Command 3002
2025-03-25 14:49:25.622 DEBUG (MainThread) [custom_components.luxtronik2] Value 678
2025-03-25 14:49:25.625 DEBUG (MainThread) [custom_components.luxtronik2] Command 3003
2025-03-25 14:49:25.626 DEBUG (MainThread) [custom_components.luxtronik2] Length 1141
2025-03-25 14:49:25.654 DEBUG (MainThread) [custom_components.luxtronik2] Read 1141 parameters
2025-03-25 14:49:25.657 DEBUG (MainThread) [custom_components.luxtronik2] Command 3004
2025-03-25 14:49:25.701 DEBUG (MainThread) [custom_components.luxtronik2] Stat 0
2025-03-25 14:49:25.701 DEBUG (MainThread) [custom_components.luxtronik2] Length 263
2025-03-25 14:49:25.712 DEBUG (MainThread) [custom_components.luxtronik2] Read 263 calculations
2025-03-25 14:49:25.716 DEBUG (MainThread) [custom_components.luxtronik2] Command 3005
2025-03-25 14:49:25.756 DEBUG (MainThread) [custom_components.luxtronik2] Length 365
2025-03-25 14:49:25.774 DEBUG (MainThread) [custom_components.luxtronik2] Read 365 visibilities
2025-03-25 14:49:25.775 INFO (MainThread) [custom_components.luxtronik2] LuxtronikDevice.write finished ID_Einst_Entl_Typ_0 value: "False"
2025-03-25 14:49:25.775 DEBUG (MainThread) [custom_components.luxtronik2] Manually updated luxtronik2 data
2025-03-25 14:49:34.839 INFO (MainThread) [custom_components.luxtronik2] Parameter '155' set to '1'
2025-03-25 14:49:34.839 DEBUG (MainThread) [custom_components.luxtronik2] Data b'\x00\x00\x0b\xba\x00\x00\x00\x9b\x00\x00\x00\x01'
2025-03-25 14:49:34.845 DEBUG (MainThread) [custom_components.luxtronik2] Command 3002
2025-03-25 14:49:34.845 DEBUG (MainThread) [custom_components.luxtronik2] Value 155
2025-03-25 14:49:34.862 DEBUG (MainThread) [custom_components.luxtronik2] Command 3003
2025-03-25 14:49:34.862 DEBUG (MainThread) [custom_components.luxtronik2] Length 1141
2025-03-25 14:49:34.940 DEBUG (MainThread) [custom_components.luxtronik2] Read 1141 parameters
2025-03-25 14:49:34.944 DEBUG (MainThread) [custom_components.luxtronik2] Command 3004
2025-03-25 14:49:34.944 DEBUG (MainThread) [custom_components.luxtronik2] Stat 0
2025-03-25 14:49:34.944 DEBUG (MainThread) [custom_components.luxtronik2] Length 263
2025-03-25 14:49:34.953 DEBUG (MainThread) [custom_components.luxtronik2] Read 263 calculations
2025-03-25 14:49:34.956 DEBUG (MainThread) [custom_components.luxtronik2] Command 3005
2025-03-25 14:49:35.000 DEBUG (MainThread) [custom_components.luxtronik2] Length 365
2025-03-25 14:49:35.015 DEBUG (MainThread) [custom_components.luxtronik2] Read 365 visibilities
2025-03-25 14:49:35.016 INFO (MainThread) [custom_components.luxtronik2] LuxtronikDevice.write finished ID_Einst_Entl_time_akt value: "1"
2025-03-25 14:49:35.016 DEBUG (MainThread) [custom_components.luxtronik2] Manually updated luxtronik2 data
2025-03-25 14:49:45.139 DEBUG (MainThread) [custom_components.luxtronik2] Command 3003
2025-03-25 14:49:45.140 DEBUG (MainThread) [custom_components.luxtronik2] Length 1141
2025-03-25 14:49:45.178 DEBUG (MainThread) [custom_components.luxtronik2] Read 1141 parameters
2025-03-25 14:49:45.181 DEBUG (MainThread) [custom_components.luxtronik2] Command 3004
2025-03-25 14:49:45.182 DEBUG (MainThread) [custom_components.luxtronik2] Stat 0
2025-03-25 14:49:45.183 DEBUG (MainThread) [custom_components.luxtronik2] Length 263
2025-03-25 14:49:45.192 DEBUG (MainThread) [custom_components.luxtronik2] Read 263 calculations
2025-03-25 14:49:45.195 DEBUG (MainThread) [custom_components.luxtronik2] Command 3005
2025-03-25 14:49:45.236 DEBUG (MainThread) [custom_components.luxtronik2] Length 365
2025-03-25 14:49:45.249 DEBUG (MainThread) [custom_components.luxtronik2] Read 365 visibilities
2025-03-25 14:49:45.250 DEBUG (MainThread) [custom_components.luxtronik2] Manually updated luxtronik2 data
2025-03-25 14:49:45.314 DEBUG (MainThread) [custom_components.luxtronik2] Finished fetching luxtronik2 data in 0.178 seconds (success: True)
2025-03-25 14:49:45.353 INFO (MainThread) [custom_components.luxtronik2] Parameter '158' set to 'True'
2025-03-25 14:49:45.353 DEBUG (MainThread) [custom_components.luxtronik2] Data b'\x00\x00\x0b\xba\x00\x00\x00\x9e\x00\x00\x00\x01'
2025-03-25 14:49:45.357 DEBUG (MainThread) [custom_components.luxtronik2] Command 3002
2025-03-25 14:49:45.357 DEBUG (MainThread) [custom_components.luxtronik2] Value 158
2025-03-25 14:49:45.361 DEBUG (MainThread) [custom_components.luxtronik2] Command 3003
2025-03-25 14:49:45.361 DEBUG (MainThread) [custom_components.luxtronik2] Length 1141
2025-03-25 14:49:45.387 DEBUG (MainThread) [custom_components.luxtronik2] Read 1141 parameters
2025-03-25 14:49:45.391 DEBUG (MainThread) [custom_components.luxtronik2] Command 3004
2025-03-25 14:49:45.436 DEBUG (MainThread) [custom_components.luxtronik2] Stat 0
2025-03-25 14:49:45.437 DEBUG (MainThread) [custom_components.luxtronik2] Length 263
2025-03-25 14:49:45.447 DEBUG (MainThread) [custom_components.luxtronik2] Read 263 calculations
2025-03-25 14:49:45.450 DEBUG (MainThread) [custom_components.luxtronik2] Command 3005
2025-03-25 14:49:45.496 DEBUG (MainThread) [custom_components.luxtronik2] Length 365
2025-03-25 14:49:45.515 DEBUG (MainThread) [custom_components.luxtronik2] Read 365 visibilities
2025-03-25 14:49:45.516 INFO (MainThread) [custom_components.luxtronik2] LuxtronikDevice.write finished ID_Einst_Entl_akt value: "True"
2025-03-25 14:49:45.517 DEBUG (MainThread) [custom_components.luxtronik2] Manually updated luxtronik2 data

Gifford47 avatar Mar 25 '25 14:03 Gifford47

I'd like to help out with testing.

  • Is this feature about circulation of water, ventilation of air or both?
  • Is the timer supported by some heatpumps or is it extra functionality added to the integration?

Adding a timer function in the integration is against the HA architecture since this can be implemented by the user using a simple automation of blueprint.

AJediIAm avatar Mar 26 '25 10:03 AJediIAm

This feature is about circulation of water and air. Normally it's used for pressing air out of the pipes. The timer is a software timer on the heatpump hardware. With this feature you can only adjust the timer value and initiate the start and/or end of ventilation.

Gifford47 avatar Mar 26 '25 13:03 Gifford47

BTW. Can somebody me explain what's the difference between calculation, visibilities and parameters?

Gifford47 avatar Mar 27 '25 07:03 Gifford47

I'd like to help out with testing.

  • Is this feature about circulation of water, ventilation of air or both?
  • Is the timer supported by some heatpumps or is it extra functionality added to the integration?

Adding a timer function in the integration is against the HA architecture since this can be implemented by the user using a simple automation of blueprint.

@AJediIAm did you do any tests?

Gifford47 avatar Apr 14 '25 06:04 Gifford47

It's in the testing queue. Is this option useful for all types of heatpumps? Can you update the branch to the latest version?

AJediIAm avatar Jul 13 '25 20:07 AJediIAm

Yes, it's useful for all heatpups as you can vent all your pipes.

I'll update the repo today!

Gifford47 avatar Jul 21 '25 06:07 Gifford47

Sry, what do you mean exactly? I looked at the code and all of the changed code here is for venting.

Gifford47 avatar Jul 22 '25 12:07 Gifford47

Sry, what do you mean exactly? I looked at the code and all of the changed code here is for venting.

I see the translation for smart grid. I wasn't aware it's related to venting. All in all not a big deal. We'll manage (hopefully) ;)

AJediIAm avatar Jul 22 '25 12:07 AJediIAm

it comes from BenPru/main I think. I've only merged my repo to be up-to-date :)

Gifford47 avatar Jul 22 '25 12:07 Gifford47

it comes from BenPru/main I think. I've only merged my repo to be up-to-date :)

That actually makes sense.

AJediIAm avatar Jul 22 '25 12:07 AJediIAm

There are still come failing tests. Is this something you can look into?

AJediIAm avatar Jul 22 '25 13:07 AJediIAm

sry. there was a duplicated key... it's corrected now can you include the merge in the current preversion?

Gifford47 avatar Jul 22 '25 14:07 Gifford47

It's part of https://github.com/BenPru/luxtronik/releases/tag/2025.7.22-beta. I'll install it this evening for testing.

AJediIAm avatar Jul 22 '25 14:07 AJediIAm

I see the venting entities, but I still have my doubts if this should be part of the integration and what the effects are on the heat pump. I cannot find a good description on what it does and if/when it should be used.

AJediIAm avatar Jul 22 '25 16:07 AJediIAm

It enables venting time and sets the bup to heating position like the manual configuration if you select it via display. Some users (including myself) asked how to power on circulation pump for heating (i.e. venting pipes, add second pv-heater, "dry" run, water filtering with bypass ...) This is what this PR does. It enables venting (for whatever reason) with the settings you set before via display. To start venting, you need both switches to set. One enables only the venting option and one starts the pump.

The entities could also be disabled initially because not every user needs this feature. But it should be part of the integration I think because the original FW has no possibility to "trigger" the external pump.

Gifford47 avatar Jul 22 '25 20:07 Gifford47

BTW. Can somebody me explain what's the difference between calculation, visibilities and parameters?

visibilities

Which options are available/visible (bool) in this heatpump. But some old visibilities have wrong values.

calculation

Calculated (read only) values.

parameters

Config parameters that are writable.

BenPru avatar Jul 22 '25 20:07 BenPru