Hoymiles OpenDTU setup with OH3 (mqtt)

Hey all, as I could not find anything on the integration of OpenDTU, i did this quick and dirty thing/item config for OH3. The Inverter needs to be powered on with at least one solar panel attached, otherwise it won’t send any data to the DTU. OpenDTU is a free implementation of the DTU-Protocol used for Hoymiles inverters. My config is based on a HM1200, possibly adjustable to other inverters aswell (mine has 4 Inputs, 2 MPPT trackers, similar to the HM1500, but i would recommend the MQTT-Explorer or similar, to figure that out)

Aready discussed in the forum
*.items-file:

Group       OpenDTU
Number      OpenDTU1_uptime					"OpenDTU1 uptime"                   (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:uptime"}
String      OpenDTU1_ip						"OpenDTU1 IP"                       (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:ip"}
Number      OpenDTU1_wifi_rssi				"OpenDTU1 WiFi RSSI"                (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:rssi"}
// Inverters
String      OpenDTU1_inv1_name				"OpenDTU1 inv1 name"                (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_name"}
Number      OpenDTU1_inv1_pow				"OpenDTU1 inv1 power (AC)"          (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_pow"}
Number      OpenDTU1_inv1_voltage			"OpenDTU1 inv1 voltage (AC)"        (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_voltage"}
Number      OpenDTU1_inv1_current			"OpenDTU1 inv1 current (AC)"        (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_current"}
Number      OpenDTU1_inv1_frequency			"OpenDTU1 inv1 frequency (AC)"      (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_frequency"}
Number      OpenDTU1_inv1_efficiency		"OpenDTU1 inv1 efficiency (AC)"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_efficiency"}
Number      OpenDTU1_inv1_powerfactor		"OpenDTU1 inv1 powerfactor (AC)"	(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_powerfactor"}
Number      OpenDTU1_inv1_reactivepower		"OpenDTU1 inv1 reactivepower (AC)"	(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_reactivepower"}
Number      OpenDTU1_inv1_pow_dc			"OpenDTU1 inv1 power (DC)"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_pow_dc"}
Number      OpenDTU1_inv1_temp				"OpenDTU1 inv1 temperature"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_temp"}
Number      OpenDTU1_inv1_yieldday			"OpenDTU1 inv1 yield (day)"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_yieldday"}
Number      OpenDTU1_inv1_yieldtotal		"OpenDTU1 inv1 yield (total)"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_yieldtotal"}
// String 1
Number      OpenDTU1_inv1_s1_voltage		"OpenDTU1 inv1 s1 voltage"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s1_voltage"}
Number      OpenDTU1_inv1_s1_current		"OpenDTU1 inv1 s1 current"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s1_current"}
Number      OpenDTU1_inv1_s1_pow			"OpenDTU1 inv1 s1 power"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s1_pow"}
Number      OpenDTU1_inv1_s1_yieldday		"OpenDTU1 inv1 s1 yield (day)"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s1_yieldday"}
Number      OpenDTU1_inv1_s1_yieldtotal		"OpenDTU1 inv1 s1 yield (total)"	(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s1_yieldtotal"}
Number      OpenDTU1_inv1_s1_irradiation	"OpenDTU1 inv1 s1 irradiation"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s1_irradiation"}
// String 2
Number      OpenDTU1_inv1_s2_voltage		"OpenDTU1 inv1 s2 voltage"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s2_voltage"}
Number      OpenDTU1_inv1_s2_current		"OpenDTU1 inv1 s2 current"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s2_current"}
Number      OpenDTU1_inv1_s2_pow			"OpenDTU1 inv1 s2 power"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s2_pow"}
Number      OpenDTU1_inv1_s2_yieldday		"OpenDTU1 inv1 s2 yield (day)"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s2_yieldday"}
Number      OpenDTU1_inv1_s2_yieldtotal		"OpenDTU1 inv1 s2 yield (total)"	(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s2_yieldtotal"}
Number      OpenDTU1_inv1_s2_irradiation	"OpenDTU1 inv1 s2 irradiation"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s2_irradiation"}
// String 3
Number      OpenDTU1_inv1_s3_voltage		"OpenDTU1 inv1 s3 voltage"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s3_voltage"}
Number      OpenDTU1_inv1_s3_current		"OpenDTU1 inv1 s3 current"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s3_current"}
Number      OpenDTU1_inv1_s3_pow			"OpenDTU1 inv1 s3 power"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s3_pow"}
Number      OpenDTU1_inv1_s3_yieldday		"OpenDTU1 inv1 s3 yield (day)"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s3_yieldday"}
Number      OpenDTU1_inv1_s3_yieldtotal		"OpenDTU1 inv1 s3 yield (total)"	(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s3_yieldtotal"}
Number      OpenDTU1_inv1_s3_irradiation	"OpenDTU1 inv1 s3 irradiation"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s3_irradiation"}
// String 4
Number      OpenDTU1_inv1_s4_voltage		"OpenDTU1 inv1 s4 voltage"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s4_voltage"}
Number      OpenDTU1_inv1_s4_current		"OpenDTU1 inv1 s4 current"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s4_current"}
Number      OpenDTU1_inv1_s4_pow			"OpenDTU1 inv1 s4 power"			(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s4_pow"}
Number      OpenDTU1_inv1_s4_yieldday		"OpenDTU1 inv1 s4 yield (day)"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s4_yieldday"}
Number      OpenDTU1_inv1_s4_yieldtotal		"OpenDTU1 inv1 s4 yield (total)"	(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s4_yieldtotal"}
Number      OpenDTU1_inv1_s4_irradiation	"OpenDTU1 inv1 s4 irradiation"		(OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_s4_irradiation"}
// Inverter info
Number      OpenDTU1_inv1_bl_version		"OpenDTU1 inv1 bootloader version"  (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_bl_version"}
Number      OpenDTU1_inv1_fw_build_version  "OpenDTU1 inv1 firmware version"    (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_fw_build_version"}
DateTime    OpenDTU1_inv1_fw_build_datetime "OpenDTU1 inv1 fw build datetime"   (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_fw_build_datetime"}
Number      OpenDTU1_inv1_hw_partnumber     "OpenDTU1 inv1 hardware partnumber" (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_hw_partnumber"}
Number      OpenDTU1_inv1_hw_version        "OpenDTU1 inv1 hardware version"    (OpenDTU)       {channel="mqtt:topic:default:OpenDTU1:inv1_hw_version"}
// Settings
Number      OpenDTU1_inv1_limit				"OpenDTU1 inv1 limit"				(OpenDTU)		{channel="mqtt:topic:default:OpenDTU1:inv1_limit"}

And the things-file:

Bridge mqtt:broker:default "MQTT Local" [host="localhost", secure=false, clientID="OH3_Inbuilt"]  
{
    Thing topic OpenDTU1 "OpenDTU-123456" @ "Network" [availabilityTopic="ESP/OpenDTU/dtu/status", payloadAvailable="online", payloadNotAvailable="offline"]
    {
        Channels:
        // Technical things
        Type number : uptime					"OpenDTU uptime"		[stateTopic="ESP/OpenDTU/dtu/uptime"]
        Type string : ip						"OpenDTU IP"			[stateTopic="ESP/OpenDTU/dtu/ip"]
        Type number : rssi						"OpenDTU rssi"			[stateTopic="ESP/OpenDTU/dtu/rssi"]
        // First inverter, serial: <inverter-serial>
        Type string : inv1_name					"Inverter name"			[stateTopic="ESP/OpenDTU/<inverter-serial>/name"]
        // Main values
        Type number : inv1_pow					"Total (AC) power"		[stateTopic="ESP/OpenDTU/<inverter-serial>/0/power"]
        Type number : inv1_voltage				"I1 AC voltage"			[stateTopic="ESP/OpenDTU/<inverter-serial>/0/voltage"]
        Type number : inv1_current				"I1 AC current"			[stateTopic="ESP/OpenDTU/<inverter-serial>/0/current"]
        Type number : inv1_frequency			"I1 AC Frequency"		[stateTopic="ESP/OpenDTU/<inverter-serial>/0/frequency"]
        Type number : inv1_efficiency			"I1 AC efficiency"		[stateTopic="ESP/OpenDTU/<inverter-serial>/0/efficiency"]
        Type number : inv1_powerfactor			"I1 AC powerfactor"		[stateTopic="ESP/OpenDTU/<inverter-serial>/0/powerfactor"]
        Type number : inv1_reactivepower		"I1 AC reactivepower"	[stateTopic="ESP/OpenDTU/<inverter-serial>/0/reactivepower"]
        Type number : inv1_pow_dc				"DC Power (total)"		[stateTopic="ESP/OpenDTU/<inverter-serial>/0/powerdc"]
        Type number : inv1_temp					"Inverter temperature"	[stateTopic="ESP/OpenDTU/<inverter-serial>/0/temperature"]
        Type number : inv1_yieldday				"Yield day"				[stateTopic="ESP/OpenDTU/<inverter-serial>/0/yieldday"]
        Type number : inv1_yieldtotal			"Yield total"			[stateTopic="ESP/OpenDTU/<inverter-serial>/0/yieldtotal"]
        // Inverter 1 - String 1
        Type number : inv1_s1_voltage			"I1 S1 voltage"			[stateTopic="ESP/OpenDTU/<inverter-serial>/1/voltage"]
        Type number : inv1_s1_current			"I1 S1 current"			[stateTopic="ESP/OpenDTU/<inverter-serial>/1/current"]
        Type number : inv1_s1_pow				"I1 S1 power"			[stateTopic="ESP/OpenDTU/<inverter-serial>/1/power"]
        Type number : inv1_s1_yieldday			"I1 S1 yield day"		[stateTopic="ESP/OpenDTU/<inverter-serial>/1/yieldday"]
        Type number : inv1_s1_yieldtotal		"I1 S1 yield total"		[stateTopic="ESP/OpenDTU/<inverter-serial>/1/yieldtotal"]
        Type number : inv1_s1_irradiation		"I1 S1 irradiation"		[stateTopic="ESP/OpenDTU/<inverter-serial>/1/irradiation"]
        // Inverter 1 - String 2
        Type number : inv1_s2_voltage			"I1 S2 voltage"			[stateTopic="ESP/OpenDTU/<inverter-serial>/2/voltage"]
        Type number : inv1_s2_current			"I1 S2 current"			[stateTopic="ESP/OpenDTU/<inverter-serial>/2/current"]
        Type number : inv1_s2_pow				"I1 S2 power"			[stateTopic="ESP/OpenDTU/<inverter-serial>/2/power"]
        Type number : inv1_s2_yieldday			"I1 S2 yield day"		[stateTopic="ESP/OpenDTU/<inverter-serial>/2/yieldday"]
        Type number : inv1_s2_yieldtotal		"I1 S2 yield total"		[stateTopic="ESP/OpenDTU/<inverter-serial>/2/yieldtotal"]
        Type number : inv1_s2_irradiation		"I1 S2 irradiation"		[stateTopic="ESP/OpenDTU/<inverter-serial>/2/irradiation"]
        // Inverter 1 - String 3
        Type number : inv1_s3_voltage			"I1 S3 voltage"			[stateTopic="ESP/OpenDTU/<inverter-serial>/3/voltage"]
        Type number : inv1_s3_current			"I1 S3 current"			[stateTopic="ESP/OpenDTU/<inverter-serial>/3/current"]
        Type number : inv1_s3_pow				"I1 S3 power"			[stateTopic="ESP/OpenDTU/<inverter-serial>/3/power"]
        Type number : inv1_s3_yieldday			"I1 S3 yield day"		[stateTopic="ESP/OpenDTU/<inverter-serial>/3/yieldday"]
        Type number : inv1_s3_yieldtotal		"I1 S3 yield total"		[stateTopic="ESP/OpenDTU/<inverter-serial>/3/yieldtotal"]
        Type number : inv1_s3_irradiation		"I1 S3 irradiation"		[stateTopic="ESP/OpenDTU/<inverter-serial>/3/irradiation"]
        // Inverter 1 - String 4
        Type number : inv1_s4_voltage			"I1 S4 voltage"			[stateTopic="ESP/OpenDTU/<inverter-serial>/4/voltage"]
        Type number : inv1_s4_current			"I1 S4 current"			[stateTopic="ESP/OpenDTU/<inverter-serial>/4/current"]
        Type number : inv1_s4_pow				"I1 S4 power"			[stateTopic="ESP/OpenDTU/<inverter-serial>/4/power"]
        Type number : inv1_s4_yieldday			"I1 S4 yield day"		[stateTopic="ESP/OpenDTU/<inverter-serial>/4/yieldday"]
        Type number : inv1_s4_yieldtotal		"I1 S4 yield total"		[stateTopic="ESP/OpenDTU/<inverter-serial>/4/yieldtotal"]
        Type number : inv1_s4_irradiation		"I1 S4 irradiation"		[stateTopic="ESP/OpenDTU/<inverter-serial>/4/irradiation"]
        // Inverter info
        Type number : inv1_bl_version			"I1 bootloader version"	[stateTopic="ESP/OpenDTU/<inverter-serial>/device/bootloaderversion"]
        Type number : inv1_fw_build_version		"I1 firmware version"	[stateTopic="ESP/OpenDTU/<inverter-serial>/device/fwbuildversion"]
        Type datetime : inv1_fw_build_datetime	"I1 fw build datetime"	[stateTopic="ESP/OpenDTU/<inverter-serial>/device/fwbuilddatetime"]
        Type number : inv1_hw_partnumber		"I1 hw part number"		[stateTopic="ESP/OpenDTU/<inverter-serial>/device/hwpartnumber"]
        Type number : inv1_hw_version			"I1 hw version"			[stateTopic="ESP/OpenDTU/<inverter-serial>/device/hwversion"]
        // Settings
        Type string : inv1_limit				"Inverter limit"		[stateTopic="ESP/OpenDTU/<inverter-serial>/settings/limit"]
    }
}

Feel free to use it :wink:
Best regards,
Dominic