Insteon added device types

So I’m working with the Insteon PLM 1.11 Snapshot binding and I have it loading just fine. I created a file my_devices.xml where I’m adding some features to the keypads that I use. I’ll copy it below:

<device productKey="F00.00.15">
	 <model>2334-232</model>
	 <description>Keypad Dimmer Switch, 6-Button </description>
	 <feature name="loaddimmer">LoadDimmerButton</feature>
	 <feature name="rampdimmer">LoadDimmerRamp</feature>
	 <feature name="manualchange">ManualChange</feature>
	 <feature name="fastonoff">LoadDimmerFastOnOff</feature>
	 <feature_group name="button_group" type="KeyPadButtonGroup">
		<feature name="keypadbuttonA">KeyPadButton3</feature>
		<feature name="keypadbuttonB">KeyPadButton4</feature>
		<feature name="keypadbuttonC">KeyPadButton5</feature>
		<feature name="keypadbuttonD">KeyPadButton6</feature>
	 </feature_group>
	 <feature_group name="fastonoff_button_group" type="FastOnOffButtonGroup">
		<feature name="fastonoffbuttonA">FastOnOffButton3</feature>
		<feature name="fastonoffbuttonB">FastOnOffButton4</feature>
		<feature name="fastonoffbuttonC">FastOnOffButton5</feature>
		<feature name="fastonoffbuttonD">FastOnOffButton6</feature>
	 </feature_group>
	 <feature_group name="manualchange_button_group" type="ManualChangeButtonGroup">
		<feature name="manualchangebuttonA">ManualChangeButton3</feature>
		<feature name="manualchangebuttonB">ManualChangeButton4</feature>
		<feature name="manualchangebuttonC">ManualChangeButton5</feature>
		<feature name="manualchangebuttonD">ManualChangeButton6</feature>
	 </feature_group>
     <feature name="lastheardfrom">GenericLastTime</feature>
 </device>
 
<device productKey="F00.00.16">
     <model>2334-232</model>
     <description>Keypad Dimmer Switch, 8-Button </description>
     <feature name="loaddimmer">LoadDimmerButton</feature>
     <feature name="rampdimmer">LoadDimmerRamp</feature>
     <feature name="manualchange">ManualChange</feature>
     <feature name="fastonoff">LoadDimmerFastOnOff</feature>     
     <feature_group name="button_group" type="KeyPadButtonGroup">
     	<feature name="keypadbuttonB">KeyPadButton2</feature>
     	<feature name="keypadbuttonC">KeyPadButton3</feature>
     	<feature name="keypadbuttonD">KeyPadButton4</feature>
     	<feature name="keypadbuttonE">KeyPadButton5</feature>
     	<feature name="keypadbuttonF">KeyPadButton6</feature>
     	<feature name="keypadbuttonG">KeyPadButton7</feature>
     	<feature name="keypadbuttonH">KeyPadButton8</feature>
     </feature_group>
	 <feature_group name="fastonoff_button_group" type="FastOnOffButtonGroup">
		<feature name="fastonoffbuttonB">FastOnOffButton2</feature>
		<feature name="fastonoffbuttonC">FastOnOffButton3</feature>
		<feature name="fastonoffbuttonD">FastOnOffButton4</feature>
		<feature name="fastonoffbuttonE">FastOnOffButton5</feature>
		<feature name="fastonoffbuttonF">FastOnOffButton6</feature>
		<feature name="fastonoffbuttonG">FastOnOffButton7</feature>
		<feature name="fastonoffbuttonH">FastOnOffButton8</feature>
	 </feature_group>
	 <feature_group name="manualchange_button_group" type="ManualChangeButtonGroup">
		<feature name="manualchangebuttonB">ManualChangeButton2</feature>
		<feature name="manualchangebuttonC">ManualChangeButton3</feature>
		<feature name="manualchangebuttonD">ManualChangeButton4</feature>
		<feature name="manualchangebuttonE">ManualChangeButton5</feature>
		<feature name="manualchangebuttonF">ManualChangeButton6</feature>
		<feature name="manualchangebuttonG">ManualChangeButton7</feature>
		<feature name="manualchangebuttonH">ManualChangeButton8</feature>
	 </feature_group>
     <feature name="lastheardfrom">GenericLastTime</feature>
 </device>

When I start the system I get the following error:

15:02:04.717 [ERROR] [g.insteonplm.InsteonPLMActiveBinding] - error reading additional devices from /var/lib/openhab2/insteonplm/my_devices.xml
org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 2; The markup in the document following the root element must be well-formed.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)[:1.8.0_144]
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)[:1.8.0_144]
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)[:1.8.0_144]
        at org.openhab.binding.insteonplm.internal.device.DeviceTypeLoader.loadDeviceTypesXML(DeviceTypeLoader.java:75)[239:org.openhab.binding.insteonplm:1.10.0]
        at org.openhab.binding.insteonplm.internal.device.DeviceTypeLoader.loadDeviceTypesXML(DeviceTypeLoader.java:98)[239:org.openhab.binding.insteonplm:1.10.0]
        at org.openhab.binding.insteonplm.InsteonPLMActiveBinding.processBindingConfiguration(InsteonPLMActiveBinding.java:301)[239:org.openhab.binding.insteonplm:1.10.0]
        at org.openhab.binding.insteonplm.InsteonPLMActiveBinding.updated(InsteonPLMActiveBinding.java:272)[239:org.openhab.binding.insteonplm:1.10.0]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]

When I delete device F00.00.16 I no longer get the error but as soon as I add it or any other device the error returns. What I copied above is the entirety of the file I created. Could anyone point me to where I’m formatting this file wrong?

Thanks for the help,
Matt

Anybody have a sample file I could look at by any chance?

I’m not familiar with the XML usage for Insteon but I can tell you what the error indicates from an XML stand point. When it tells you that you must have a well formed root element it is saying that it expects only one element at the top level. In your example you have two instances of at the top level. This is why it works when you remove one device. Will it support multiple files with a single device in each?

I’m not that familiar with XML in general so I’m willing to bet I missed something in my formatting. I’ll take a look over the examples again and see what I missed. Thanks for the information though that helped a good bit.

In the event that anyone else runs across this, what fixed the issue was adding the tags at the beginning of the file and at the end. Apparently my lack of XML knowledge shows. But that fixed it.

looking at the binding’s device_types.xml file, I think you are missing an overall < xml > and < /xml > (remove the extra spaces).