Skip to content

Commit

Permalink
Rename binding.xml to addon.xml for OH 4.x.
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Dywicki <[email protected]>
  • Loading branch information
splatch committed Feb 29, 2024
1 parent 385788f commit 38b580e
Show file tree
Hide file tree
Showing 15 changed files with 160 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-amsads" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-amsads" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>AMS/ADS Binding</name>
<description>This binding provides integration with Beckhoff AMS/ADS PLCs based on Apache PLC4X project.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-askoheat" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-askoheat" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>Askoheat Binding</name>
<description>This binding allow to read and also consigure Askoheat over its http API.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
-
- SPDX-License-Identifier: GPL-3.0-or-later
-->
<binding:binding id="co7io-bacnet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-bacnet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>BACnet Binding</name>
<description>This binding provides BACnet integration based on BACnet4J client library.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-canopen" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-canopen" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>CANopen Binding</name>
<description>This binding provides interaction layer for CANopen enabled devices.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-fatek" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-fatek" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>Fatek Binding</name>
<description>This binding provides integration with Fatek PLCs (FBs line).</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-mbus" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-mbus" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>M-Bus Binding</name>
<description>This binding provides integration with M-Bus.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-ocpp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-ocpp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>OCPP Binding</name>
<description>This binding provides integration with electric vehicle chargers based on OCPP protocol.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-opcua" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-opcua" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>OPC UA Binding</name>
<description>This binding provides integration with OPC UA servers.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-relayweblog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-relayweblog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>Relay Weblog Binding</name>
<description>This binding scrap data from Relay Weblog devices allowing to collect MBus readings through ethernet/http link.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-s7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-s7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>S7 Binding</name>
<description>This binding provides integration with Siemens S7 PLCs based on Apache PLC4X project.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-smartme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-smartme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>Smart-Me.com Binding</name>
<description>Binding to scrap data from smart-me.com API.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
-
- SPDX-License-Identifier: Apache-2.0
-->
<binding:binding id="co7io-wmbus" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<addon:addon id="co7io-wmbus" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">

<type>binding</type>
<name>WM-Bus Binding</name>
<description>This binding provides integration with WM-Bus.</description>
<author>Łukasz Dywicki</author>
<connection>local</connection>

</binding:binding>
</addon:addon>
19 changes: 4 additions & 15 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<description>Parent for ConnectorIO supplied bindings and extensions.</description>

<properties>
<compiler.source>11</compiler.source>
<compiler.target>11</compiler.target>
<compiler.source>17</compiler.source>
<compiler.target>17</compiler.target>

<plc4x-extras.version>0.11.1-connectorio-1</plc4x-extras.version>
<bacnet4j-wrapper.version>1.3.0-alpha3</bacnet4j-wrapper.version>
Expand All @@ -44,7 +44,7 @@
<thing4.version>4.0.0-alpha-2</thing4.version>
<thing4-bom.version>${openhab.version}</thing4-bom.version>
<openhab-distro.version>${openhab.version}</openhab-distro.version>
<karaf.version>4.3.9</karaf.version>
<karaf.version>4.4.3</karaf.version>

<slf4j.version>1.7.36</slf4j.version>
<fasterxml-classmate.version>1.5.1</fasterxml-classmate.version>
Expand Down Expand Up @@ -735,17 +735,6 @@
<version>${milo.version}</version>
</dependency>

<dependency>
<groupId>javax.measure</groupId>
<artifactId>unit-api</artifactId>
<version>${unit-api.version}</version>
</dependency>
<dependency>
<groupId>tec.uom</groupId>
<artifactId>uom-se</artifactId>
<version>${unit-se.version}</version>
</dependency>

<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
Expand Down Expand Up @@ -974,6 +963,7 @@
<failOnDependencyChange>false</failOnDependencyChange>
<logDependencyChanges>false</logDependencyChanges>
<overwriteChangedDependencies>false</overwriteChangedDependencies>
<javase>${compiler.target}</javase>
</configuration>
<executions>
<execution>
Expand All @@ -991,7 +981,6 @@
<descriptor>file:${feature.file}</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>11</javase>
<framework>
<feature>framework</feature>
</framework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- SPDX-License-Identifier: Apache-2.0
-->
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="https://openhab.org/schemas/addon-1.0.0.xsd" uri="./xsd/openhab/addon-1.0.0.xsd"/>
<system systemId="https://openhab.org/schemas/binding-1.0.0.xsd" uri="./xsd/openhab/binding-1.0.0.xsd"/>
<system systemId="https://openhab.org/schemas/config-description-1.0.0.xsd" uri="./xsd/openhab/config-description-1.0.0.xsd"/>
<system systemId="https://openhab.org/schemas/thing-description-1.0.0.xsd" uri="./xsd/openhab/thing-description-1.0.0.xsd"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
targetNamespace="https://openhab.org/schemas/addon/v1.0.0">

<xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/>

<xs:element name="addon">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="addon:addonType"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="connection" type="addon:connectionType" minOccurs="0"/>
<xs:element name="countries" type="addon:countryType" minOccurs="0">
<xs:annotation>
<xs:documentation>Comma-separated list of two-letter ISO country codes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="service-id" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The ID (service.pid or component.name) of the main add-on service, which can be configured through OSGi configuration admin service. Should only be used in combination with a config description definition. The default value is &lt;type&gt;.&lt;name&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="config-description" type="config-description:configDescription"/>
<xs:element name="config-description-ref" type="config-description:configDescriptionRef"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="id" type="config-description:idRestrictionPattern" use="required">
<xs:annotation>
<xs:documentation>The id is used to construct the UID of this add-on to &lt;type&gt;-&lt;name&gt;</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:simpleType name="addonType">
<xs:restriction base="xs:string">
<xs:enumeration value="automation"/>
<xs:enumeration value="binding"/>
<xs:enumeration value="misc"/>
<xs:enumeration value="persistence"/>
<xs:enumeration value="transformation"/>
<xs:enumeration value="ui"/>
<xs:enumeration value="voice"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="connectionType">
<xs:restriction base="xs:string">
<xs:enumeration value="none">
<xs:annotation>
<xs:documentation>No interaction with external systems at all</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="local">
<xs:annotation>
<xs:documentation>Interaction with external systems, without internet access</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hybrid">
<xs:annotation>
<xs:documentation>Interaction with external systems, internet access required only for extended functionality (such as discovery)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cloud">
<xs:annotation>
<xs:documentation>Interaction with external systems, internet access required for normal operation</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="countryType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-z]{2}(,[a-z]{2})*"/>
</xs:restriction>
</xs:simpleType>

</xs:schema>

0 comments on commit 38b580e

Please sign in to comment.