A specialist script for this oddball boiler (with comms to OH) does sound like the best way to proceed.
Use of MQTT comms should be future proof and useful for non-OH people too.
I was curious enough to have a long think, though. So far as I can make out from many parts of many translated posts of other peoples experiments
Some de Dietrich boilers run modified modbus-RTU. (Bastardised I would call it - verging on abuse )
Physically, there are two miniDIN connectors for RS485 (allowing easy cascade cabling).
For 5 seconds, boiler acts as a modbus master, sending “write registers” to a set of slave addresses. Apparently if one responds, there can be a dialogue. The boiler/master then issues a “read”, and the slave can feed modified registers back. Seems the expected responses are not-quite-standard modbus, extra padding added.
People have hacked into that by emulating the expected slave, but not something we can do directly in openHAB.
‘Delta’ versions do only this master mode, and are simply dormant for the next 5 seconds. Slave emulating would be the only way to go.
‘Diematic’ versions however, spend the next five seconds being modbus slaves. During this period, another modbus master can read/write to the boiler at address x0A
It would take a lot of trial and error experiments - but it may be possible to get openHAB binding to play nicely during this period.
You would need to set long timeout periods, and possibly inter-message gaps, to make sure attempted polls from OH can get over the “bad” 5 sec. Just trying your luck like this is going to log errors and retry like crazy, which doesn’t feel good.
It’s going to cause real collisions on the bus - this could potentially upset the boiler as well.
Need a way to synchronize the OH end to only work during the “good” 5 secs. Otherwise it’s either write your own code or use extra hardware, which defeats the point of attempting to use existing OH binding anyway.
The only straw I can think of to grasp at is OH binding setting for a minimum inter-message gap, or quiet time.
If - if - that takes account of other people’s traffic, and if the boiler chatters fairly continuously during its own turn with the 5 secs - then a gap setting of a second or so would synch OH into the good 5 secs. Should work for writes, as well as reads? (OH writes are asynchrounous rather than scheduled polls, but modbus message is modbus message either way)
That still leaves the issue of whether OH binding will simply ignore incoming alien ‘master’ messages, or flag the unsolicited data as error.
I do not know. And there may be other pitfalls I haven’t thought of. Do you have an opinion here, Sami @ssalonen ?
Just as an aside, I would never try to put any other modbus devices on this same RS485 serial bus. Fortunately OH binding allows more than one bus if needed.