DRU fireplace control using OH2, NodeRed & Modbus

We recently purchased a DRU Maestro Fireplace running on natural gas.
This Fireplace includes a so called “Wifi module” to allow control of the Fireplace using an app on your phone or tablet besides the standard remote that comes with the fireplace.

The Wifi module is actually a Honeywell Ethernet bridge, providing ethernet connectivity towards your LAN (that could be reached over Wifi hence the name Wifi module) whilst communicating with the fireplace using a 2-way radio communication protocol (most likely zigbee or zwave).

After a few weeks of use my family hates the app and feel the need to use the standard remote instead. OpenHAB and HA in general to the rescue!!

General setup information

  • DRU Fireplace Meastro 80 (dual burner + Eco-wave)
  • Honeywell Ethernet bridge (Honeywell brdg-EM01)
  • Modbus TCP protocol on port 502

The actual setup in a diagram:

After some investigation Modbus was mentioned as the protocol of choice for communication between the App and the Honeywell bridge.

I made a packet capture of all traffic between the bridge and the network to confirm Modbus is actually being used:

I’ve searched the internet for many hours to find information on all the correct Modbus registers and their values in order to control the fireplace with very limited succes. I finally decided to reverse engineer the Modbus traffic using more packet captures. This got me to the point where i could control the basic functionality of the DRU Fireplace. More advanced features like Eco-Wave were still out of my reach.

Since DRU, the manufacturer of the fireplace, mentions the ability for 3rd party application development in their documentation a few times, i figured there must be some information out there… somewhere…

After a few week, by pure coincidence, i stumbled upon the following documentation containing all Modbus registers and their values for the DRU Fireplace!

HOORAY!! With all the needed information available, intergration of the DRU fireplace into OpenHAB was suddenly looking a lot more achievable!

Click the link below to view the DRU Modbus documentation:
DRU Modbus documentation

Now to describe how i intergrated the DRU Fireplace in Openhab.

P.s. I use Node-Red as my main rule engine in combination with Openhab and could not get the Openhab Modbus binding to collaborate so i decided to use the Node-red Modbus node as well. You could ofcourse use the Modbus binding in Openhab instead (please share your config!)

My DRU items file:

Number DruRSSIGateway	"RSSI  Gateway[%d]"		<network>
Number DruRSSIDFGT		"RSSI  DFGT[%d]"		<network>
Number DruRoomTemp		"Room temp [%.1f C]"	<temperature>
String DruStatus		"Status [%s]"			<chart>
String DruFault			"Fault [%s]"			<siren>
Number DruAction		"Actie [%d]"			<setting>
Dimmer DruFlameHeight	"Vlamhoogte [%d]"		<fire>
Switch DruEcoWave		"EcoWave"				<fire>
String DruControl		"Bediening"				<fire>

Sitemap section containing all relevant DRU status and control items:
For safety the control items are only visible when we are at HOME, avoiding accidental ignition of the fireplace when we are not at home.

    Frame label="Gashaard"
    {
    Text label="Woonkamer" icon="fire" {
    	Frame label="Woonkamer" {
    		Switch item=DruControl mappings=[COMFORT="Comfort", ECO="Eco", OFF="Uit"] visibility=[Home_State==1]
    		Text item=DruStatus
    		Text item=DruFault
    	 	Text item=DruRoomTemp
    	 	Text item=DruRSSIGateway
        }
		}
	}

Below i will describe the different Modbus registers and their function along with the Node-Red code and a screenshot:
you can easily copy this code into Node-Red to replicate my configuration in your setup

First the Read Holding Registers that will allow us to read some valuable information from the Fireplace setup.

Register 40203 (FC3: Read Holding Register):

  • Read the general status of the DRU fireplace and send this string to OpenHAB String item "DruStatus. This registers contains information of all the different Fireplace running phases (ON, 1 burner, 2 burners, Eco-wave active etc)
[{"id":"56c45493.f45f0c","type":"modbus-read","z":"fb344059.73db6","name":"DRU_Status","topic":"","showStatusActivities":true,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40203","quantity":"1","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"e702863e.44b568","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":110,"y":60,"wires":[[],["cb42fc24.e27aa"]]},{"id":"e220cc80.d0ddc","type":"openhab2-out","z":"fb344059.73db6","name":"DruStatus","controller":"be8b0821.df18b8","itemname":"DruStatus","topic":"ItemUpdate","payload":"","x":860,"y":60,"wires":[[]]},{"id":"cb42fc24.e27aa","type":"change","z":"fb344059.73db6","name":"","rules":[{"t":"move","p":"payload.data[0]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":60,"wires":[["110a8e24.9a8ed2"]]},{"id":"110a8e24.9a8ed2","type":"change","z":"fb344059.73db6","name":"Translate modbus to string","rules":[{"t":"change","p":"payload","pt":"msg","from":"15360","fromt":"num","to":"OFF","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"48128","fromt":"num","to":"unknown 48128","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47116","fromt":"num","to":"Aan - 2 branders Actief","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47108","fromt":"num","to":"unknown 47108","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47628","fromt":"num","to":"Aan - EcoWave Actief","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47620","fromt":"num","to":"unknwon 47620 (1 brander aan?)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"48652","fromt":"num","to":"unknown 48652","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"48140","fromt":"num","to":"unknown 48140","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":60,"wires":[["e220cc80.d0ddc"]]},{"id":"3f569787.30d5d8","type":"comment","z":"fb344059.73db6","name":"Status 40203","info":"","x":110,"y":20,"wires":[]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000},{"id":"be8b0821.df18b8","type":"openhab2-controller","z":"","name":"Openhab2 - Prod","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]

Register 40204 (FC3: Read Holding Register):

  • Read the error status of the DRU fireplace and send this string to OpenHAB String item "DruFault. This registers contains information of all the different Fireplace errors (empty if none)
[{"id":"35eb9c21.bce5d4","type":"modbus-read","z":"fb344059.73db6","name":"DRU_Fault","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40204","quantity":"1","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"e702863e.44b568","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":100,"y":160,"wires":[[],["a8b23db7.55e0f"]]},{"id":"a8b23db7.55e0f","type":"change","z":"fb344059.73db6","name":"","rules":[{"t":"move","p":"payload.data[0]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":160,"wires":[["68703977.77f358"]]},{"id":"bb36708f.a1916","type":"comment","z":"fb344059.73db6","name":"Fault 40204","info":"","x":110,"y":120,"wires":[]},{"id":"1eeb5525.0ebe5b","type":"openhab2-out","z":"fb344059.73db6","name":"DruFault","controller":"be8b0821.df18b8","itemname":"DruFault","topic":"ItemUpdate","payload":"","x":860,"y":160,"wires":[[]]},{"id":"68703977.77f358","type":"change","z":"fb344059.73db6","name":"Translate modbus to string","rules":[{"t":"change","p":"payload","pt":"msg","from":"15360","fromt":"num","to":"OFF","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"48128","fromt":"num","to":"unknown 48128","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47116","fromt":"num","to":"unknown 47116 (aan 2 branders geen ecowave)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47108","fromt":"num","to":"unknown 47108","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47628","fromt":"num","to":"unknown 47628 (ecowave?)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"47620","fromt":"num","to":"unknwon 47620 (1 brander aan?)","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"48652","fromt":"num","to":"unknown 48652","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"48140","fromt":"num","to":"unknown 48140","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":160,"wires":[["1eeb5525.0ebe5b"]]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000},{"id":"be8b0821.df18b8","type":"openhab2-controller","z":"","name":"Openhab2 - Prod","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]

Register 40205 (FC3: Read Holding Register):

  • Read the RSSI value as reported by the Honeywell ethernet bridge of the DRU fireplace and send this value to OpenHAB Number item "DruRSSIGateway.
[{"id":"8c4ab8c2.8488b8","type":"modbus-read","z":"fb344059.73db6","name":"DRU_rssi","topic":"","showStatusActivities":true,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40205","quantity":"1","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"e702863e.44b568","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":100,"y":260,"wires":[[],["c2ac4bdd.d37e98"]]},{"id":"c2ac4bdd.d37e98","type":"change","z":"fb344059.73db6","name":"","rules":[{"t":"move","p":"payload.data[0]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":260,"wires":[["1cc4f326.bdd80d"]]},{"id":"a81cc53d.4ce998","type":"openhab2-out","z":"fb344059.73db6","name":"DruRSSIGateway","controller":"be8b0821.df18b8","itemname":"DruRSSIGateway","topic":"ItemUpdate","payload":"","x":890,"y":260,"wires":[[]]},{"id":"1cc4f326.bdd80d","type":"function","z":"fb344059.73db6","name":"payload multiplied by -0,5","func":"msg.payload = Number(msg.payload);\nmsg.payload = (msg.payload)*-0.5;\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":260,"wires":[["a81cc53d.4ce998"]]},{"id":"76696731.56b3d8","type":"comment","z":"fb344059.73db6","name":"RSSI Gateway 40205","info":"","x":140,"y":220,"wires":[]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000},{"id":"be8b0821.df18b8","type":"openhab2-controller","z":"","name":"Openhab2 - Prod","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]

Register 40206 (FC3: Read Holding Register):

  • Read the RSSI value as reported by the Fireplace itself and send this value to OpenHAB Number item "DruRSSIDFGT.
[{"id":"2494a4dc.98f60c","type":"modbus-read","z":"fb344059.73db6","name":"DFGT_rssi","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40206","quantity":"1","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"e702863e.44b568","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":100,"y":360,"wires":[[],["6867dfe3.29c35"]]},{"id":"6867dfe3.29c35","type":"change","z":"fb344059.73db6","name":"","rules":[{"t":"move","p":"payload.data[0]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":360,"wires":[["20cff2ba.3e2dce"]]},{"id":"20cff2ba.3e2dce","type":"function","z":"fb344059.73db6","name":"payload multiplied by -0,5","func":"msg.payload = Number(msg.payload);\nmsg.payload = (msg.payload)*-0.5;\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":360,"wires":[["6e9fa581.bd3b0c"]]},{"id":"7fac272e.06d568","type":"comment","z":"fb344059.73db6","name":"RSSI DFGT 40206","info":"","x":130,"y":320,"wires":[]},{"id":"6e9fa581.bd3b0c","type":"openhab2-out","z":"fb344059.73db6","name":"DruRSSIDFGT","controller":"be8b0821.df18b8","itemname":"DruRSSIDFGT","topic":"ItemUpdate","payload":"","x":880,"y":360,"wires":[[]]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000},{"id":"be8b0821.df18b8","type":"openhab2-controller","z":"","name":"Openhab2 - Prod","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]

Register 40207 (FC3: Read Holding Register):

  • Read the Room temperature value as reported by the Fireplace remote and send this value to OpenHAB Number item "DruRoomTemp.
[{"id":"91a59f3e.deea7","type":"modbus-read","z":"fb344059.73db6","name":"DRU_RoomTemp","topic":"","showStatusActivities":true,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40207","quantity":"1","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"e702863e.44b568","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":120,"y":460,"wires":[[],["c7e1b44f.e3f428"]]},{"id":"c6748d6a.a54f3","type":"function","z":"fb344059.73db6","name":"payload divided by 10","func":"msg.payload = Number(msg.payload);\nmsg.payload = (msg.payload)/10;\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":460,"wires":[["9dcd1810.870518"]]},{"id":"c7e1b44f.e3f428","type":"change","z":"fb344059.73db6","name":"","rules":[{"t":"move","p":"payload.data[0]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":460,"wires":[["c6748d6a.a54f3"]]},{"id":"9dcd1810.870518","type":"openhab2-out","z":"fb344059.73db6","name":"DruRoomTemp","controller":"be8b0821.df18b8","itemname":"DruRoomTemp","topic":"ItemUpdate","payload":"","x":880,"y":460,"wires":[[]]},{"id":"f4fafb96.5aadc8","type":"comment","z":"fb344059.73db6","name":"Roomtemp 40207","info":"","x":130,"y":420,"wires":[]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000},{"id":"be8b0821.df18b8","type":"openhab2-controller","z":"","name":"Openhab2 - Prod","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]

Now on the fun part… actually controlling the DRU Fireplace!!!

First the FC6 Preset Single Registers that will allow us to control the various functions of the DRU Fireplace. The first sections below allow you to control the individuale registers using Node-Red (useful for testing purposes) all full rule set follows later on.

Register 40200 (FC6: Preset Single Register):

  • This is the ACTION register that allows us to: Control the pilot flame (does not seem to work), Start up the fireplace with both burners ON ( if it has 2 burners), ON/OFF individual burners, Eco-wave ON/OFF, and turn of the Fireplace.
[{"id":"a7c00c20.04c02","type":"modbus-write","z":"fb344059.73db6","name":"40200","showStatusActivities":true,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40200","quantity":"1","server":"e702863e.44b568","x":890,"y":1300,"wires":[[],[]]},{"id":"c43cc5b6.c1a728","type":"inject","z":"fb344059.73db6","name":"Opstarten met alle branders","topic":"","payload":"101","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":960,"y":1460,"wires":[["a7c00c20.04c02"]]},{"id":"bee27537.7d9d58","type":"inject","z":"fb344059.73db6","name":"Brander 2 AAN","topic":"","payload":"102","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":920,"y":1520,"wires":[["a7c00c20.04c02"]]},{"id":"dff53a88.6677c8","type":"inject","z":"fb344059.73db6","name":"Brander 2 UIT","topic":"","payload":"4","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":910,"y":1580,"wires":[["a7c00c20.04c02"]]},{"id":"51086847.b60568","type":"comment","z":"fb344059.73db6","name":"Action register","info":"","x":920,"y":1260,"wires":[]},{"id":"5e457924.7027e8","type":"inject","z":"fb344059.73db6","name":"Waakvlam aan","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":920,"y":1420,"wires":[["a7c00c20.04c02"]]},{"id":"149b03cf.62a67c","type":"inject","z":"fb344059.73db6","name":"Ecowave AAN","topic":"","payload":"105","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":910,"y":1680,"wires":[["a7c00c20.04c02"]]},{"id":"def8736b.b3ac2","type":"inject","z":"fb344059.73db6","name":"EcoWave UIT","topic":"","payload":"7","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":910,"y":1720,"wires":[["a7c00c20.04c02"]]},{"id":"97a53992.bfe988","type":"inject","z":"fb344059.73db6","name":"UIT 1","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":890,"y":1620,"wires":[["a7c00c20.04c02"]]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000}]

Register 40201 (FC6: Preset Single Register):

  • This is the FLAME HEIGHT register that allows us to control the flame height (0-100%).
[{"id":"a0049e2e.410c3","type":"modbus-write","z":"fb344059.73db6","name":"40201","showStatusActivities":true,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40201","quantity":"1","server":"e702863e.44b568","x":230,"y":1300,"wires":[[],[]]},{"id":"be57153b.637d48","type":"inject","z":"fb344059.73db6","name":"100%","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":1360,"wires":[["a0049e2e.410c3"]]},{"id":"3a567415.734cdc","type":"comment","z":"fb344059.73db6","name":"Vlamhoogte register 40201","info":"","x":290,"y":1260,"wires":[]},{"id":"f24d6902.3f0408","type":"inject","z":"fb344059.73db6","name":"25%","topic":"","payload":"25","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":1400,"wires":[["a0049e2e.410c3"]]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000}]

Register 40220 (FC6: Preset Single Register):

  • This is the ECOWAVE INTERVAL register that allows us to control the INTERVAL (time in seconds) between every step in an Eco-Wave pattern. With Eco-Wave you can program a predefined Flame pattern (Wave) and the time in between the pattern steps to save gas consumption significantly.
[{"id":"ab4c7b06.a07df8","type":"modbus-write","z":"fb344059.73db6","name":"40420","showStatusActivities":true,"showErrors":true,"unitid":"2","dataType":"HoldingRegister","adr":"40420","quantity":"1","server":"e702863e.44b568","x":610,"y":1300,"wires":[[],[]]},{"id":"e8f90b24.c63dc8","type":"inject","z":"fb344059.73db6","name":"15 Seconden","topic":"","payload":"15","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":630,"y":1360,"wires":[["ab4c7b06.a07df8"]]},{"id":"faa7f9be.ccb1e8","type":"comment","z":"fb344059.73db6","name":"Eco Wave interval time","info":"","x":660,"y":1260,"wires":[]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000}]

Register 40221 (FC6: Preset Single Register):

  • This is the ECOWAVE Pattern register that allows us to define a desired flame pattern. This is a single register. For multiple pattern you need to overwrite this register. In my setup i have configured 2 patters (ECO and COMFORT) where i can alternate between them.
[{"id":"fb6a7742.8e6508","type":"inject","z":"fb344059.73db6","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":1500,"wires":[["6624e634.fec378"]]},{"id":"6624e634.fec378","type":"function","z":"fb344059.73db6","name":"Startup Values","func":"msg.payload = { value:[2569,3340,3854,3342,2572,1801,773,514,1027,2054], \n'fc': 16, \n'unitid': 2, \n'address': 40421, \n'quantity': 10 } \nreturn msg","outputs":1,"noerr":0,"x":420,"y":1500,"wires":[["e24f425c.735fb"]]},{"id":"e24f425c.735fb","type":"modbus-flex-write","z":"fb344059.73db6","name":"test flex write","showStatusActivities":true,"showErrors":true,"server":"e702863e.44b568","x":600,"y":1500,"wires":[[],[]]},{"id":"13b4349f.9fdcdb","type":"comment","z":"fb344059.73db6","name":"Eco Wave COMFORT","info":"","x":280,"y":1460,"wires":[]},{"id":"1f4db27c.1bcafe","type":"function","z":"fb344059.73db6","name":"Startup Values","func":"msg.payload = { value:[1797,2312,2569,2313,1800,1029,259,257,513,1283], \n'fc': 16, \n'unitid': 2, \n'address': 40421, \n'quantity': 10 } \nreturn msg","outputs":1,"noerr":0,"x":420,"y":1600,"wires":[["e24f425c.735fb"]]},{"id":"9d606100.4b5e3","type":"inject","z":"fb344059.73db6","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":1600,"wires":[["1f4db27c.1bcafe"]]},{"id":"1cfcc137.ff23df","type":"comment","z":"fb344059.73db6","name":"Eco Wave ECO","info":"","x":260,"y":1560,"wires":[]},{"id":"e702863e.44b568","type":"modbus-client","z":"","name":"DRU","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"172.16.11.51","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectTimeout":2000}]

Now for some slight automation:

I have defined a scene where:

  • The fireplace ingnites using both available burners
  • I set the initial flame height to 100% to get rid of the moisture build up in the Fireplace and get some initial heat going
  • after 10 minutes of burning at 100% Flame Height i select a preprogrammed Eco-wave pattern depending on the OH2 UI input (either COMFORT or ECO)
  • This program run until we switch to another program or decide to turn the DRU Fireplace off.

Check out my Github for the full code!

4 Likes

You could share it on GitHub. (Other cloud sharing facilities are available, of course)

Done… added it to the initial post

Wow - that’s amazing!!
I have a DRU fireplace and the Honeywell bridge - but zero node red knowledge - I’m all manual rules right now, but this will be awesome to implement and bridge with Alexa - adjust when the room gets too warm etc.
I’ll bookmark and look into getting this going. Thanks

Righto on review it looks like node-red is generating a gui rules engine (assume I’ll just need to enable this) and that the rules are stored as a Json objects (in the Json file on your Github)

I’m pretty sure I can use what you have posted to get me going.

Couple of quick questions

  1. are there any binding / service / transform dependencies that I need to include in my config to get this up and going?
  2. I’m guessing my Json will need to be different (e.g. ids etc) - is there an easy way to adapt the existing Json file, or will I need to capture traffic and generate new Json? If so - what tooling did you use for capturing the Json? Did you catch clear text Json, or need to do some sort of decoding?

Im sure I’ll have a load more questions …

Hi Alan,

Do you already have node red running?

if so… setting my code up in your install literally takes minutes because you can import my code into your Node-Red instance

Thanks Roel,

I was just reading the DRU doc.
Answers some of my questions like:

The Modbus over TCP/IP communication is not encrypted or protected in any way.

This is promising,
I haven’t got nodered running - I’ll need to back my current config up and then have a go though.

Thanks for the super write up.

You can use the information in my post (like the registers and the values for them) to set this up in OH2 using the OH2 modbus binding and use the native rule engine like you use today.

You don’t have to run Node-Red, for me it was easier because i’m using it for all my rules.

Let me know how things go and if i can help if needed.

Br

Roel

Thanks Roel for the info.

Just managed to get my Dru Maestro Fireplace up and running using the OpenHAB ModBus binding.
Now I can finally say “Ok Google, turn on the fireplace” and it will start up the sequence like you did as well (good tip to get rid of the moisture :slight_smile: ).

I am willing to share the config I am using, although I don’t know yet the best way to share it as I’ve configured most in PaperUI.

I only noticed that sometimes I get some errors in the communication between OpenHAB and the gateway. Perhaps too many polling? What polling interval are you using?

The DRU bridge only allows one simultaneous session/connection. Polling too fast will result in 1 session still open while the other is already trying to establish … this is most likely the cause of the errors you are seeing.

I poll all of my DRU modbus settings at a 10 second interval, but i make sure every poll for each individual item is delayed by 200ms to avoid multiple simultaneous polls.

Br

Roel

With the Modbus binding, you can poll all registers in one hit to reduce overheads.

By default, the binding will close the TCP connection between polls (thus allowing other apps to have a turn, so you’d probably want to keep it that way)

Writes are ad-hoc, asynchronous, so they could pop up in rapid succession. The binding does allow you to set a minimum time between transactions, probably needed in this case to allow TCP connection to close tidily before making a new one. Try 200mS.

I have 1 ModBUS poller which was running with an interval of 1000ms.
Changed it to 5000ms and looks like the errors are gone now. I will monitor it…

Update:

Unfortunately increasing the interval doesn’t seem to help.
I am not writing much values so don’t think that the problem either.
See screenshot for the errors I am getting.

It’s illegible. Please copy/paste sample error log text.

Note that your Modbus things configuration is still secret.

EDIT I found out how to view a better image.
You’ve got a
Modbus Slave Exception Error Code = 11

That means the remote end has rejected a request rom openHAB with a response 11.
This is quite a rare code, I’ve seen one description as -

Specialized use in conjunction with gateways, indicates that no response was obtained from the target device. Usually means that the device is not present on the network.

I understand this fireplace setup does actually employ a gateway box between modbus and device? Sounds like the communications between those in trouble.

Following is NOT a fix, it’s a suggestion to get better use from the bindings retry mechanism in your situation. It MIGHT improve automatic recovery - or it might not.

By default, the binding will retry a failing transaction three times before declaring it terminally failed.

Because this transaction is rejected by the remote end quickly, there’s little time between these retries. Whatever is wrong at the remote end, we’re not allowing it much time to go away.

I don’t think you changed your TCP Things parametertimeBetweenTransactionsMillis` to 200 mS as recommended yet? The log of retries shows them happening at around the default 60mS intervals.

Try 200. This will space out the retries - maybe it will recover.
If still failing all three tries, try 500. I wouldn’t go further than that, or it will begin to affect ordinary running.

Hi Guys,
As winter has rolled on, i have finally gotten round to wanting to set this up.
i have no experience with modbus (nor node-red) and would prefer to do this using the old school rules engine.

does anyone have a couple of quick screen grabs to help me get going?
I took this on with gusto - but go as far as adding things and realizing there are 4 options… and with that the gusto disappeared. Don;t really want to take risks with fire… and kids in the house

Took a stab in the dark - set the Honeywell up as a TCP slave and it looks OK (appears online etc)

After this, I had a crack at creating the read register (40203) - this is what I have set:

Unfortunately though, this does not work - I get the error:

Status: OFFLINE - CONFIGURATION_ERROR Thing modbus:data:1c46a4cb readStart=40203, and readValueType=uint64 were specified even though the data thing is child of endpoint (that is, write-only)!

Have I made simple, but stupid mistake?

Modbus is a polling technology.

The binding implementation requires a hierarchy of three Things for reading:
A Bridge Thing, TCP or serial, essentially defines the “device”.
Poller Thing(s), defines a block of registers to be read on schedule or demand
Data Thing(s), defines how to interpret one or more of the polled block.

You need to set up a Poller and have your data Thing as child of that. Normally you’d poll a bunch of registers in one hit, and have multiple Data things making sense of them.

Exceptionally it is possible to attach a Data Thing directly to a TCP Bridge for writing only - you’ve done this by accident, to explain the error message.

Thanks - you’re a legend. I’ll have a crack at it tonight.
I thought the 2 steps I had was enough, clearly misunderstood the design, but It’s a bunch clearer now.
I suspect this should be enough for me to get going. Thanks

Hmmm… a quick look shows this on the poller:

I am guessing I only need one?
Could you possibly share your config for this (and potentially the last of the 3 config too?) - pretty please

I tried and failed :slight_smile:

Status: OFFLINE - COMMUNICATION_ERROR Error with read: org.openhab.io.transport.modbus.ModbusConnectionException: Error connecting to endpoint ModbusTCPSlaveEndpoint@3299d674[address=192.168.0.49,port=502]

I couldn’t say. It depends on what you want to read, and how often. You may have more than one poller e.g. handling different register types. You may only need one poller to fetch a block of multiple similar registers.

Nope, I don’t have one. That’s okay, you can learn as we go :smiley:

'Length" parameter for a Poller Thing is specified in Modbus protocol native “raw units”. For holding type registers, that is 16-bit registers. You will certainly need more than one of those to make the 64-bit value that you were looking for earlier. I don’t know if you actually want a 64-bit value.

Some slaves will be smart enough to know their own register structure is 32 or 64-bit and blow out silly requests for partial data length or starting on the wrong odd/even address boundary etc. I couldn’t say what yours does.

I think that’s all incidental for now, though -

That looks pretty fundamental, cannot get the TCP connection to device.
Note, I think someone pointed out it only does one TCP connection at a time - cannot do openHAB and other app at same time?
Confident in your IP address and slave ID ?

@rossko57 - I appreciate your help.
I’ve tried hitting this from every angle - I’ve installed several apps to try trap mod is config.

Although the remote app for the fireplace is working, Abu connection from any other app returns a message like:

# CAS Modbus Scanner 0.0.19

11/12/2019 13:38:05

Analysis of Task: 192.168.0.49, Addr 2, Read Holding Register 40201-300

TX (Request)
02 03 00 C8 00 64
Slave ID, 2, (0x02)
Function, Read Holding Registers, (0x03)
Starting Address, 40201, (0x00 0xC8)
Quantity, 100, (0x00 0x64)

RX (Response)
02 83 0A
Slave ID, 2, (0x02)
Function, Exception, (0x83)
Exception Code, Gateway Path Unavailable, (0x0A)

If I change my config settings targeting a different IP or space id, the message is different. (Consistently so, so I am sure I have the right values here)

The fire place is as per the original dru spec at the start of this thread and so I would assume the config would be the same?

For those that have DRU fireplaces up and working… is there anything required on the Honeywell gateway to allow connectivity from Openhab (that I missed) do I somehow need to pair the gateway to my OH instanced? Also, did the DRU app continue functioning after adding Openhab?

It’s starting to feel like having both working is never going to happen?

Any help much appreciated.