OStrama / weishaupt_modbus

This integration allows you to monitor and controll your weishaupt heatpump via modbus.
MIT License
21 stars 7 forks source link

Many values "unknown" since update to 1.0.0 #34

Closed l3nkz closed 6 days ago

l3nkz commented 1 week ago

Describe the bug I updated two days ago to version 1.0.0. According to the update instructions, I deleted the old version (0.0.6) and installed it completely new from scratch. Unfortunately since the update, quite a number of sensors that I usually use (Rücklauftemperatur, Leistungsanforderung, ...) are not available anymore.

OStrama commented 1 week ago

Are they available under a different name ore completely missing? when adding a new device, sometimes it‘s necessary to press F5 in the browser to see all entities. However, when they are completely missing and had valid values before this sounds strange..

l3nkz commented 1 week ago

The entities exist, but they don't have a value.

OStrama commented 1 week ago

Could you make a screenshot?

l3nkz commented 1 week ago

Screenshot_20241114-204326_Home_Assistant.png

I also found something in the log which might be related ...

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/weishaupt_modbus/entities.py:358
integration: Weishaupt heat pump (documentation, issues)
First occurred: November 12, 2024, 22:52:26 (5523 occurrences)
Last logged: 20:53:26

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 266, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 481, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 176, in async_update_listeners
    update_callback()
  File "/config/custom_components/weishaupt_modbus/entities.py", line 334, in _handle_coordinator_update
    self._attr_native_value = self.translate_val(self._modbus_item.state)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/weishaupt_modbus/entities.py", line 358, in translate_val
    val_x = self.calc_temperature(val[1]) / 10
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
OStrama commented 1 week ago

All sensor values are missing, the Number_RO exist.. The error in the log is a result of it, since it calculates the heat power from some sensor values. @MadOne any idea why the sensors fail?

MadOne commented 1 week ago

Maybe the calculated sensor? A problem with the kennfeld?

OStrama commented 1 week ago

Then the others would be present. I‘ll do an update with some debug logging later today..

OStrama commented 1 week ago

Could you please download version 1.0.0deb1? It‘s a pre-release so you would need to select it in HACS manually. I did not change anything beside adding some debug traces.

After HA restart please do the following:

  1. open HA in browser, not in the app
  2. Enable debug log of the integration
  3. Reload the integration using the three dot menu of it
  4. Disable debug log
  5. Now the browser should download a log file. Please send this to us.

Thanks in advance!

maddinhome commented 1 week ago

Here is my logbook from a WSB 8 configured with the kennfield file for the WSB 8

home-assistant_weishaupt_modbus_2024-11-15T12-30-53.999Z.log

I hope this is helpful.

OStrama commented 1 week ago

Thank you @maddinhome ! I see that the sensor entities are read from the modbus and also added to the entity lists. Do you see them all?

maddinhome commented 1 week ago

Not all of them, but I don't think anything important is missing. It's just unpleasant when there are question marks or a value that you can't do anything with.

Screenshot 2024-11-15 173510 Screenshot 2024-11-15 173700 Screenshot 2024-11-15 173756 Screenshot 2024-11-15 173826

OStrama commented 1 week ago

Do you have a temp sensor in your „Pufferspeicher“? I don‘t and so I see zero here, too. The question mark up to now is only used for entities we do not exactly know. When the meaning is confirmed we‘ll change the unit. We try to filter out entities in the following way:

But some values are shown as a valid value of 0, even if there‘s no sensor behind it. I simply delete them in my dashboard.

maddinhome commented 1 week ago

I don't have a temp sensor in my "Pufferspeicher" for the heating. There is only an analog thermometer connected to the "Pufferspeicher". So ist ok if the value is zero.

I simply delete them in my dashboard. that's how I do it too now.

Thank you again for your great work. I'm totally amazed by it.

This is a bit off topic and I hope it's not too rude for me to ask this: I'm trying with Smart Appliance Enabler 2.3.1 Read out the current power consumption of the heat pump and send it to the SMA portal of my photovoltaic system. I use register 36701 for this, but there is no value that SMA can process. Maybe you have another tip for me.

36701 is Integer an Input (FC=4) and have 1 Dataword (?) ..and this is what comes out: Meter payload={"energy":0.08299998888888889,"power":9,"time":"2024-11-15T19:59:27.360862986","type":"MeterMessage"}

l3nkz commented 1 week ago

This is the log from my system. Hope this helps

debug_log_weishaupt_modbus.log

OStrama commented 6 days ago

@l3nkz it seems as your sensor „Luftansaugtemperatur“ is not available which leads to the crash of „Wärmeleistung“. Could you comment out the Line „Wärmeleistung“ in the ModbusItem list in hpconst.py?

MadOne commented 6 days ago

This is a bit off topic and I hope it's not too rude for me to ask this: I'm trying with Smart Appliance Enabler 2.3.1\nRead out the current power consumption of the heat pump and send it to the SMA portal of my photovoltaic system. I use register 36701 for this, but there is no value that SMA can process. Maybe you have another tip for me.\n\n36701 is Integer an Input (FC=4) and have 1 Dataword (?)\n..and this is what comes out:\nMeter payload={\"energy\":0.08299998888888889,\"power\":9,\"time\":\"2024-11-15T19:59:27.360862986\",\"type\":\"MeterMessage\"}

No it is not rude. But i think you better ask the question at at the smart appliance enabler. I have no clue what this is and cant test it. Anyways feel free to ask further questions.

OStrama commented 6 days ago

@maddinhome: The value you mentioned is an energy (kWh) value. Maybe, you‘d need a power (W) value for controlling your inverter? Since there‘s no direct power value on the modbus I installed a shelly 3 phase power meter that measures the complete power consumed by the heatpump including water pump, controller etc. Maybe, this would also be the easiest and most precise method for your application..

OStrama commented 6 days ago

Now I had some time to analyze the logs, thanks to everybody for providing them! It seems that the availbale sensors differ from one heatpump model to the other. Here's the state of the three logs: Available Iterms.xlsx I tested it with an unavailable entity for "Wärmeleistung" and I could reproduce the behavior that many entities are unavailable. In version 1.0.1 the follwoing is implemented:

l3nkz commented 6 days ago

Thanks for the fix! The values that were unknown are now available with this fix. However "Wärmeleistung" still does not seem to work for me. BTW I have a WGB and not a WBB heat pump. Maybe this is also the reason why I don't have a sensor for "Luftansaugtemperatur".

Another question, how did you create the Kennfeld files?

OStrama commented 5 days ago

You are welcome! Is Wärmeleistung available and wrong or unavailable?

An how-to for creating a power map file can be found here: https://github.com/OStrama/weishaupt_modbus/discussions/29#discussioncomment-11241297 If the values are wrong, an updated file could help..

l3nkz commented 5 days ago

It is still unknown. And I also didn't find anything in the debug log ...

MadOne commented 5 days ago

You have a "Sole" heatpump. So it is independent of the air temperature. Do you have wemportal? Do you see the incoming sole temperatur anywhere there or on the heatpump?

OStrama commented 5 days ago

Ahhh, thanks for checking! Yes, then the whole heat power calculation as implemented today makes no sense as it looks at the air temperature.. I think I first have to understand the diagrams in the manual of your HP ;-) And of course sole temp. Would be required..

l3nkz commented 5 days ago

I can see this value at the heatpump itself. Solevorlauf and Solerücklauf are available their. Does it make sense to ask Weishaupt for the corresponding Modbus registers? It seems as if WH is quite responsive in this regard.

MadOne commented 4 days ago

I can see this value at the heatpump itself. Solevorlauf and Solerücklauf are available their. Does it make sense to ask Weishaupt for the corresponding Modbus registers? It seems as if WH is quite responsive in this regard.

Every help in identifying is appreciated. You could also check some registers in question with a python script / mobile app.