Samsung AC Binding does not read device DUID correctly

Tags: #<Tag:0x00007f616d6b0730> #<Tag:0x00007f616d6b0640> #<Tag:0x00007f616d6b0578>

Hi to all,

During the last couple of days I have been experimenting with the Samsung AC binding, using openHAB 2.3 Stable operating on a Windows 7 x64 environment.

I successfully installed the binding via Paper UI and configured it as follows:

# Host and port of the first AC to control
ACNight.host=192.168.178.31
ACNight.mac=MY_PERSONAL_MAC
ACNight.token=MY_PERSONAL_TOKEN

Both MY_PERSONAL_TOKEN and MY_PERSONAL_MAC are correct (I took the first one via openSSL and the second from my router and the device label). The router also correctly connect the AC to the network.

Despite my efforts, the service starts just fine:

2018-08-18 23:01:17.023 [DEBUG] [org.openhab.binding.samsungac       ] - BundleEvent STARTED - org.openhab.binding.samsungac
2018-08-18 23:01:17.038 [DEBUG] [org.openhab.binding.samsungac       ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.samsungac.SamsungAcBindingProvider}={service.id=357, service.bundleid=225, service.scope=bundle, component.name=org.openhab.binding.samsungac.genericbindingprovider, component.id=232} - org.openhab.binding.samsungac
2018-08-18 23:01:17.038 [DEBUG] [org.openhab.binding.samsungac       ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={service.id=358, service.bundleid=225, service.scope=bundle, event.topics=openhab/*, service.pid=org.openhab.samsungac, component.name=org.openhab.binding.samsungac.activebinding, component.id=231} - org.openhab.binding.samsungac
2018-08-18 23:01:17.038 [DEBUG] [.samsungac.internal.SamsungAcBinding] - Started Samsung AC Binding

But, just immediately this follows:

2018-08-18 23:01:17.038 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=356, bundle=224/mvn:org.openhab.binding/org.openhab.binding.samsungac/1.12.0]: Unexpected problem updating configuration org.openhab.samsungac
java.lang.ArrayIndexOutOfBoundsException: 1
	at org.openhab.binding.samsungac.internal.SamsungAcBinding.updated(SamsungAcBinding.java:224) [224:org.openhab.binding.samsungac:1.12.0]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
	at java.lang.Thread.run(Unknown Source) [?:?]
2018-08-18 23:01:17.038 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=358, bundle=225/file:/C:/openhab/addons/org.openhab.binding.samsungac-1.12.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.samsungac

I think it is because of this:

2018-08-18 23:01:17.023 [DEBUG] [.samsungac.internal.SamsungAcBinding] - Configuration key is: <Request DUID

Is it possible that the binding fails to properly parse the received XML from the air conditioning unit and then populates its variables with garbage data, hence throwing the aforementioned exception?

Please help, I am seriously hitting my head with this.
Thank you all in advance!