Skip to content

Commit

Permalink
Source upgrade to 2.5.10
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Eckhardt <github@familie-eckhardt.eu>
  • Loading branch information
Markinus committed Oct 23, 2020
1 parent a76f808 commit 8621790
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 34 deletions.
6 changes: 4 additions & 2 deletions bundles/org.openhab.io.semp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.10-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.io.semp</artifactId>
Expand Down
12 changes: 6 additions & 6 deletions bundles/org.openhab.io.semp/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.io.semp-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-misc-semp" description="SEMP Service" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-mdns</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.io.semp/${project.version}</bundle>
</feature>
<feature name="openhab-misc-semp" description="SEMP Service" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-mdns</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.io.semp/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down Expand Up @@ -65,7 +65,6 @@ public SEMPUpnpServer(String discoPath, int webPort, String discoveryIP, String
logger.debug("Starting send and receive executor");
NotifyRunnable notifyRunnable = new NotifyRunnable();
executor.scheduleWithFixedDelay(notifyRunnable, 15, SEMPConstants.SSDP_VALIDITY_PERIOD / 6, TimeUnit.SECONDS);

}

public void shutdown() {
Expand Down Expand Up @@ -296,7 +295,5 @@ public void run() {
logger.debug("NotifyRunnable");
sendNotify(true);
}

}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2019 Contributors to the openHAB project
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
Expand Down Expand Up @@ -63,7 +63,7 @@ public String createXMLMessage(List<SEMPMessageType> typeList, Map<String, SEMPC
try {
icBuilder = icFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
logger.error("{}", e);
logger.error("{}", e.toString());
return null;
}
org.w3c.dom.Document doc = icBuilder.newDocument();
Expand Down Expand Up @@ -261,7 +261,7 @@ public String createXMLMessage(List<SEMPMessageType> typeList, Map<String, SEMPC
try {
transformer = TransformerFactory.newInstance().newTransformer();
} catch (TransformerConfigurationException | TransformerFactoryConfigurationError e) {
logger.error("{}", e);
logger.error("{}", e.toString());
return null;
}
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
Expand All @@ -275,7 +275,7 @@ public String createXMLMessage(List<SEMPMessageType> typeList, Map<String, SEMPC
try {
transformer.transform(source, new StreamResult(writer));
} catch (TransformerException e) {
logger.error("{}", e);
logger.error("{}", e.toString());
return null;
}
return writer.toString();
Expand All @@ -295,21 +295,21 @@ public String getXMLValue(ByteArrayInputStream xmlStream, String xPath) {
try {//
icBuilder = icFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
logger.error("{}", e);
logger.error("{}", e.toString());
return null;
}
try {
doc = icBuilder.parse(xmlStream);
} catch (SAXException | IOException e) {
logger.error("{}", e);
logger.error("{}", e.toString());
return null;
}
XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
try {
value = (String) xpath.evaluate(xPath, doc, XPathConstants.STRING);
} catch (XPathExpressionException e) {
logger.error("{}", e);
logger.error("{}", e.toString());
return null;
}
return value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0" xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0 https://openhab.org/schemas/config-description-1.0.0.xsd">
<config-description:config-descriptions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0 https://openhab.org/schemas/config-description-1.0.0.xsd">
<config-description uri="io:semp">
<parameter name="discoveryUUID" type="text" required="true">
<label>Universal Unique Identifier</label>
<description>An UUID (Universal Unique Identifier) is a 128-bit number used to uniquely identify some object or entity on the Internet. It is possible to use a random generated UUID.</description>
<description>An UUID (Universal Unique Identifier) is a 128-bit number used to uniquely identify some object or
entity on the Internet. It is possible to use a random generated UUID.</description>
<default></default>
</parameter>
<parameter name="discoveryIp" type="text" required="false">
<label>Optional discovery address</label>
<description>If your host has multiple IP addresses you may specify the IP you would like to advertise in the UPNP discovery process. You may safely leave this empty on most systems.</description>
<description>If your host has multiple IP addresses you may specify the IP you would like to advertise in the UPNP
discovery process. You may safely leave this empty on most systems.</description>
<default></default>
</parameter>
<parameter name="discoveryHttpPort" type="integer" required="false">
<label>Optional discovery web port</label>
<description>Some SEMP applications require a different port (80) then what openHAB runs on by default (8080). This option will only advertise a different port then what we are listening on. Useful if you have an iptables rule redirect traffic from this port to the openHAB port. </description>
<description>Some SEMP applications require a different port (80) then what openHAB runs on by default (8080). This
option will only advertise a different port then what we are listening on. Useful if you have an iptables rule
redirect traffic from this port to the openHAB port.
</description>
<advanced>true</advanced>
<default></default>
</parameter>
Expand Down

0 comments on commit 8621790

Please sign in to comment.