OpenHab 2 and Stiebel Eltron

just verified . everything is checked in. See channelgroup-types.xml

<channel-group-type id="channelGroupTypeVersion">
	<label>Version</label>
	<description>Version information of heat pump firmware</description>
	<channels>
		<!-- at least 1 channel-group with id = version must be included -->
		<channel id="version" typeId="version" />
		<channel id="dumpResponse" typeId="dumpResponse" />
		**<channel id="refreshTime" typeId="refreshDateTime" />**	
	</channels>
</channel-group-type>

if this channel is not showing after update then this is most probably because the existing thing is based on y version before without that channel. Probably recreating the thing would help

That’s weird. When I open your link the marked line is missing in my browser. I have tried different browsers now, the line is not there.

Is it correct that the last change is from 4 days ago?

If I take your jar file out of the post (version 7) then I have the channel in Openhab. Only the one I compile from the git code does not work with.

you are fully right my commitments were block by git , i saw them committed locally but they were blocked.
Sorry, should now be in

I’m currently working on a - it’s still very basic - rule for setting the vent levels.

I had to cast the values to compare it to a Z-Wave sensor.Both deliver values like 12,34 °C.
Both Items are configured as the same type (Number).

rule "LĂŒftungssteuerung"

when Item StiebelHeatPumpLWZ303509_CurrentValues_OutsideTemperature received update

then
logInfo("Regel-LĂŒftungssteuerung", "FĂŒhre die  Regel 'LĂŒftungssteuerung'")

if ( StiebelHeatPumpLWZ303509_CurrentValues_OutsideTemperature as DecimalFormat >= ZWAeotecMultisensorGen6_Temperature26 ){

    /*Schalte die LĂŒftung aus*/
    logInfo("Regel-LĂŒftungssteuerung", "Aktuelle LĂŒftungsstufe'" + StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard.toString)
    StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard = 0
    logInfo("Regel-LĂŒftungssteuerung", "Neue LĂŒftungsstufe'" + StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard.toString)



}else{
    /*Schalte die LĂŒftung an*/

    logInfo("Regel-LĂŒftungssteuerung", "Aktuelle LĂŒftungsstufe'" + StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard.toString)
    StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard = 2
    logInfo("Regel-LĂŒftungssteuerung", "Neue LĂŒftungsstufe'" + StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard.toString)

}
logInfo("Regel-LĂŒftungssteuerung", "Ende der Regel 'LĂŒftungssteuerung'")
end

Edit:

Hmm
 how to set the fan stage via a rule? NumberItem seems to be a bit
.picky
. :frowning:

Did you tried sendCommand?

StiebelHeatPumpLWZ303509_NominalValues_P07FanStageStandard.sendCommand("2")

Yep
 thank you. Sometimes the obvious thing is just around the corner :wink:

Forgive me the OT


A comparison operator between to identical numerical types does not work

what am i doing wrong here? (The way over var xyz = abc as DecinalFomat doesn’t work either)

I would try it like this (untested as I don’t have a system available at the moment)

((ITEM1.state as DecimalType).doubleValue) >= ((ITEM2.state as DecimalType).doubleValue)

Ok i think i found the problem.
I have absolutley no idea why my LVM was only 4 GB big on my openhab rig. Yes it was late as i sat it up but i can not remember setting it to 4GB. The consequence was hat the disk ran full. OH couldn’t save any more stuff i guess
. After a reboot all i did in the last 7 days is gone
. :frowning:
Maybe this was a reason for the incorrect parsing error. It now works with DecimalFormat.

So yeah
 i have to re-set everythingup from new
.

Last question

why not using DecimalFormat?

I haven’t used it yet.
What I could find on this topic it is more for formatting the values.

Unfortunately, I cannot find the mistake myself.
Maybe someone who knows more about it can have a look at it.

With the current FHEM module I can read the values p07-p09 correctly:
grafik

But the binding causes an error that the response is not valid:

2020-05-20 09:35:46.496 [DEBUG] [atpump.internal.CommunicationService] - Loading data for request  ...
2020-05-20 09:35:46.498 [DEBUG] [atpump.internal.CommunicationService] - Request : Name -> , Description ->  , RequestByte -> 17
2020-05-20 09:35:46.498 [DEBUG] [atpump.internal.CommunicationService] - Sending start communication
2020-05-20 09:35:46.501 [DEBUG] [belheatpump.protocol.SerialConnector] - Send request message : (00)01 00 18 17 (04)10 03 
2020-05-20 09:35:46.517 [DEBUG] [atpump.internal.CommunicationService] - reached end of response message.
2020-05-20 09:35:46.518 [DEBUG] [.stiebelheatpump.protocol.DataParser] - verification of response failed : org.openhab.binding.stiebelheatpump.internal.StiebelHeatPumpException: invalid response on request of data, response is neither get nor set: e
2020-05-20 09:35:46.519 [DEBUG] [atpump.internal.CommunicationService] - Sending start communication
2020-05-20 09:35:47.529 [ERROR] [atpump.internal.CommunicationService] - heat pump communication could not be established ! no data availabel!
2020-05-20 09:35:47.530 [ERROR] [atpump.internal.CommunicationService] - Error reading data : org.openhab.binding.stiebelheatpump.internal.StiebelHeatPumpException

grafik

I can’t handle the FHEM code at all :confused:

yes, this is all about reverse engineering a closed source heatpump :laughing:
This i how it is implemented.
Here you can see how the handcheck should be done to receive data.

if data are received the it will be checked

it looks like the heat pump just send no data.
does it happen all the time or only once.
the request 17 is about the nominal setting and should send data if available.

i will improve the error message so the byte are better readable. sorry

is there a chance that you can activate some logging in the FHEM or add some debug prints in the code to see how the bytes are parsed for you heatpump?
what are the %parsinghash you use in the FHEM?
some how you define which parsingrules should be used
maybe we can try to start from their log messages

Yes, I was hoping that someone who is better at reading FHEM’s Perl code might find the solution easier :smiley:

I don’t get data on any channel group except version, operationCounters and currentValues. As soon as I add another item that is not queried via Request Byte 09 or FD, the heater seems to stop responding or send an empty response?

The error comes with all other values also every time. FD and 09 still work without problems.

I will try to find out more tomorrow. Maybe I’ll have luck and find the error :wink:

Good idea.
Tomorrow I’ll add log outputs at all places that might fit and connect the heat pump to the other Raspi again.
I would then contact you again with further information if I don’t get it :slight_smile: Thanks

Sry
.but this perl code is hard to read :wink:
I was thinking about setting up a perl env and mocking the module.
So that one can copy the HEX from the oh-log and “paste” it into the perl module.

Could this be worth the time?

I uploaded new version
version 8

change log:

  • added retry for register data load in case it not working at first try, now have 3 retries. (feedback hogan)
  • separated schedules for sensor / status and settings
  • add linked setting load a separated task
  • measure time for refresh and added to debug log
  • all settings are loaded at start
  • refresh of setting is done once per day
  • refresh of time done once per week
  • any setting change done with the binding will update the values in OH
  • refined debug log (feedback Pierre)
  • available serial ports are now as pick list in thing property

some background.
with 9600 baud the reading of data is not fast, the real data that need continues update are the sensor and status measurements. To keep them fast and simple i decided the have loading of sensor/status and settings separated.

  • all my setting are loaded ~ 21-25 seconds
  • sensor / status ~ 10-12 seconds

hope that stabilize the binding a bit and we can focus on getting the other versions in.
The FHEM code is very hard to understand and nearly has no documentation.
Hope that some of you using FHEM in the moment are able to get log messages with the parsing rules applied for data for their version and share them here

btw
does somebody has experience in the habpanel development.
i think it could make sense to have a widget for the heatpump programs , hp1 etc
what do you think?

happy testing.

2 Likes

Hi, I’m having a LWZ504 7.59. Testing the latest jar at this moment. I was really looking forward to a binding so really happy this exist now! Thanks for all the energy and effort you and others are putting into this.

I noticed some errors:

  • “Operation counter heating mode” shows me the value of the DHW
  • “Operation counter DHW mode” is actually the value of the booster used for DHW

I was wondering. How can I help? Not a die-hard IT’er but I would be happy to help. Maybe I can try to match some data, position, length 
 with values I can read from the control screen on my pump? That’s how I could see the errors above. Is something like that possible? Other suggestions? I’m certainly willing to invest the time to improve this binding and helping others with the same pump. I just think I will need some help to start up the proces. Let me know!

Ow, I’m also wondering if “amount of heat” and “power consumption” could be read by the binding? Is that something for the future?

this are exactly the things you can do.
in the binding there are xml files per thingtype in which the parsing rules for the data are described.
Yours is here.
LWZ_THZ504_7_59.xml

the basic description you can find here OpenHab 2 and Stiebel Eltron

the xml is embedded in the jar and you can replace this easy in the jar and test your own configuration.
when doing that please enable debug in the karaf console.

Hi @kreutzer_peter

Question 1: matching channel-group types
Just to be sure, there is no other way than to look at the logs, for example

2020-05-21 18:38:51.304 [DEBUG] [.stiebelheatpump.protocol.DataParser] - Parse bytes: (00)01 00 57 09 (04)08 C5 00 00 (08)00 ED 00 05 (12)00 00 00 00 (16)05 89 10 03 

and then search for groups of bytes to see which data is inside that group and match it? No problem if that’s the case, but just to be sure because it’s a painstaking proces :slight_smile: would hate to find out later if that was not necessary :slight_smile:

Question 2: spelling in the binding
I noticed that there are mixes English and German: for example outsideTemperatur <-> condenserTemperature. I think it’s better to do everything in English. Offcourse this will be breaking, so not sure if we want to do this. What do you think?

Question 3: New channel-group types
I think I found a new value, not existing at this moment in the channelgroup-types.xml (Heatpump -> Compressor starts). How do we want to do this? Do I pass this information to you, do I make a pull request on your fork?

1:
the data you see ate the raw byte[] you receive from the heatpump before the parse tries to decode.
i remember that 4 years ago i dumped it to excel and played around to see which data could be in .

what i can offer is to take the current xml, parse it also log the parsed data. would that help?

  1. oh yes i am sure that there are many :wink:
    if you are familiar with git you could also do a PR on my git repository.
    you can also edit the file and send it to my, then i merge the changes.
    thanks you

this is no problem.
if the channel groups are different per version we can make a copy of the existing channelgroup type and give it a new meaningful name. you can see similar approach in FHEM.
we can add the channe group type into the existing file of add a new file.

PR would be best
many thanks for your support.