smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 23 forks source link

Viessmann: gas consumption summaries for today, week, month, year not working since upgrade to openhab-3.4 #450

Closed deadbabylon1 closed 1 year ago

deadbabylon1 commented 1 year ago

Hi,

after upgrading to openhab-3.4 the gas consumption summaries are only showing UNDEF.

openhab> bundle:list | grep -i viess
307 │ Active │  80 │ 3.2.15                 │ SmartHome/J Add-ons :: Bundles :: Viessmann Binding
openhab> openhab:items list | grep ViessmannDevice0_Gasconsumption
ViessmannDevice0_GasconsumptionDHWthisWeek (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Warmwasser: aktuelle Woche, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptionheatingthisMonth (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Heizung: aktueller Monat, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_Gasconsumptionheatingtoday (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Heizung: heute, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptionheatingthisWeek (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Heizung: aktuelle Woche, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptiontotalthisWeek (Type=NumberItem, State=UNDEF, Label=Gas consumption total thisWeek, Category=, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_Gasconsumptiontotaltoday (Type=NumberItem, State=UNDEF, Label=Gas consumption total today, Category=, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptionDHWtoday (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Warmwasser: heute, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptionheatingthisYear (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Heizung: aktuelles Jahr, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptionDHWthisYear (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Warmwasser: aktuelles Jahr, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptionDHWthisMonth (Type=NumberItem, State=UNDEF, Label=Gasverbrauch Warmwasser: aktueller Monat, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptiontotalthisYear (Type=NumberItem, State=UNDEF, Label=Gasverbrauch gesamt: aktuelles Jahr, Category=gas, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_GasconsumptiontotalthisMonth (Type=NumberItem, State=UNDEF, Label=Gas consumption total thisMonth, Category=, Tags=[Point], Groups=[ViessmannDevice0]

You will certainly need more information. But I would need help on how to provide them.

rogrun commented 1 year ago

Please try the following steps for trouble shooting:

  1. Delete the device thing and add it again (items can still remain linked to the channels) - Maybe thats it.
  2. Delete and add the consumption items -> check if its work
  3. More debugging is needed: set the log level to TRACE via the openHAB console log:set TRACE org.smarthomej.binding.viessmann send me the trace from the API response including the json to my mail: ronny.grun@t-online.de

It could be that the unit of the item is wrong. E.g. m3 is provided instead of kWh

deadbabylon1 commented 1 year ago

Sorry for the delay. I've ste the TRACE to "log:set TRACE org.smarthomej.binding.viessmann" But I need some help what I should send to you.

rogrun commented 1 year ago

After setting the log level to TRACE, type log:tail in the OpenHAB console.

After that, copy the log and email it to me for further troubleshooting.

deadbabylon1 commented 1 year ago

Hi,

here is the log output. Waited for around 10 minutes.

Mit besten Grüßen

Sebastian Vahl

Am Sa., 4. Feb. 2023 um 17:03 Uhr schrieb Ronny Grun < @.***>:

After setting the log level to TRACE, type log:tail in the OpenHAB console.

After that, copy the log and email it to me for further troubleshooting.

— Reply to this email directly, view it on GitHub https://github.com/smarthomej/addons/issues/450#issuecomment-1416789119, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5QCZ72I3PDN5NDS67JEXFTWVZ4ULANCNFSM6AAAAAAUIX27ZQ . You are receiving this because you authored the thread.Message ID: @.***>

deadbabylon1 commented 1 year ago

I'v send the log to you. Strange thing is, I've not seen eg. openhab:items list | grep ViessmannDevice0_Gasconsumption in the logs.

rogrun commented 1 year ago

Hi Sebastian, I did not get any mail. Please send them again to ronny.grun@t-online.de

rogrun commented 1 year ago

I got your log but I can't find the error.

Which openHAB version are you running?

deadbabylon1 commented 1 year ago

I'm having this problems since I've upgraded from openhab-3.3 to openhab-3.4. I also see no errors in the logs, but I've seen that all this items/links are not showing in the logs (and stay as UNDEF):

The power consumption seems to be working fine, eg:

openhab> openhab:items list | grep ViessmannDevice0_Powerconsumption
ViessmannDevice0_PowerconsumptionDHWthisWeek (Type=NumberItem, State=0 kWh, Label=Stromverbrauch Warmwasser: aktuelle Woche, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptionDHWthisMonth (Type=NumberItem, State=0.1 kWh, Label=Stromverbrauch Warmwasser: aktueller Monat, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptionDHWtoday (Type=NumberItem, State=0 kWh, Label=Stromverbrauch Warmwasser: heute, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptionheatingthisMonth (Type=NumberItem, State=9.2 kWh, Label=Stromverbrauch Heizung: aktueller Monat, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptiontotalthisWeek (Type=NumberItem, State=4 kWh, Label=Power consumption total thisWeek, Category=, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_Powerconsumptionheatingtoday (Type=NumberItem, State=0.9 kWh, Label=Stromverbrauch Heizung: heute, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptionDHWthisYear (Type=NumberItem, State=1 kWh, Label=Stromverbrauch Warmwasser: aktuelles Jahr, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptionheatingthisWeek (Type=NumberItem, State=4 kWh, Label=Stromverbrauch Heizung: aktuelle Woche, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptiontotalthisMonth (Type=NumberItem, State=9.299999999999999 kWh, Label=Power consumption total thisMonth, Category=, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_Powerconsumptiontotaltoday (Type=NumberItem, State=0.9 kWh, Label=Power consumption total today, Category=, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptiontotalthisYear (Type=NumberItem, State=38.4 kWh, Label=Power consumption total thisYear, Category=, Tags=[Point], Groups=[ViessmannDevice0])
ViessmannDevice0_PowerconsumptionheatingthisYear (Type=NumberItem, State=37.4 kWh, Label=Stromverbrauch Heizung: aktuelles Jahr, Category=energy, Tags=[Point], Groups=[ViessmannDevice0])

I've also tried to remove the former "ViessmannDevice0_GasconsumptiontotalthisYear" and re-added it in the model (the webinterface, forgot the english name for it, I'm not using text files anymore). I could use "Create points from thing" from the ViessmannDevice0 and use the then "unlinked" showed "heatingGasConsumptionTotal#thisYear". But in my logs this happens:

2023-02-09 19:58:55.220 [TRACE] [smann.internal.handler.DeviceHandler] - ChannelUID: viessmann:device:2fd7ff7bf7:0:heatingGasConsumptionTotal#thisYear | Properties: {feature=heating.gas.consumption.total}

2023-02-09 20:02:59.128 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Viessmann_Device_0_Gas_consumption_total_thisYear' changed from NULL to UNDEF

(Notice the difference between the two openhab versions: working in openhab-3.3: ViessmannDevice0_GasconsumptionheatingthisYear not working but newly discovered in openhab-3.4: Viessmann_Device_0_Gas_consumption_total_thisYear

What is still working are the items with the commas (don't know how to label them):

openhab> openhab:items list | grep Viessmann_Device_0_Gas_consumption_total
Viessmann_Device_0_Gas_consumption_total_year (Type=StringItem, State=[123.9, 227.29999999999998], Label=Gas consumption total year, Category=Text, Tags=[Point], Groups=[ViessmannDevice0])
Viessmann_Device_0_Gas_consumption_total_day (Type=StringItem, State=[4.7, 4.8, 4.7, 4.6000000000000005, 3.5, 3.6, 2.6, 3.3000000000000003], Label=Gas consumption total day, Category=Text, Tags=[Point], Groups=[ViessmannDevice0])
Viessmann_Device_0_Gas_consumption_total_thisYear (Type=NumberItem, State=UNDEF, Label=Gas consumption total thisYear, Category=, Tags=[Point])

With openhab-3.3 I was able to query at a specific time one of the items and could get the actual used m3. This is not working anymore, because the items are UNDEF.

deadbabylon1 commented 1 year ago

This issue was resolved with the help of the developer. But we both wasn't sure, why the issue occured. However, everything is working again.

So this Bug can be closed.