From c5336c5618869df1469f2b3a43fe2e07fd65756b Mon Sep 17 00:00:00 2001 From: Andrew Fiddian-Green Date: Thu, 30 May 2024 20:03:58 +0100 Subject: [PATCH 01/50] New SDDP service for addon discovery and thing discovery (#4237) Signed-off-by: Andrew Fiddian-Green --- bom/openhab-core/pom.xml | 12 + .../.classpath | 29 ++ .../.project | 23 + .../NOTICE | 14 + .../pom.xml | 34 ++ .../discovery/addon/sddp/SddpAddonFinder.java | 166 +++++++ .../addon/sddp/test/SddpAddonFinderTests.java | 88 ++++ .../discovery/addon/AddonFinderConstants.java | 15 +- .../.classpath | 34 ++ .../.project | 23 + .../NOTICE | 14 + .../pom.xml | 25 + .../config/discovery/sddp/SddpDevice.java | 98 ++++ .../discovery/sddp/SddpDeviceParticipant.java | 29 ++ .../sddp/SddpDiscoveryParticipant.java | 58 +++ .../discovery/sddp/SddpDiscoveryService.java | 438 ++++++++++++++++++ .../sddp/test/SddpDiscoveryServiceTests.java | 158 +++++++ .../main/resources/OH-INF/config/addons.xml | 6 + .../resources/OH-INF/i18n/addons.properties | 2 + bundles/pom.xml | 2 + .../openhab-core/src/main/feature/feature.xml | 12 + 21 files changed, 1275 insertions(+), 5 deletions(-) create mode 100644 bundles/org.openhab.core.config.discovery.addon.sddp/.classpath create mode 100644 bundles/org.openhab.core.config.discovery.addon.sddp/.project create mode 100644 bundles/org.openhab.core.config.discovery.addon.sddp/NOTICE create mode 100644 bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml create mode 100644 bundles/org.openhab.core.config.discovery.addon.sddp/src/main/java/org/openhab/core/config/discovery/addon/sddp/SddpAddonFinder.java create mode 100644 bundles/org.openhab.core.config.discovery.addon.sddp/src/test/java/org/openhab/core/config/discovery/addon/sddp/test/SddpAddonFinderTests.java create mode 100644 bundles/org.openhab.core.config.discovery.sddp/.classpath create mode 100644 bundles/org.openhab.core.config.discovery.sddp/.project create mode 100644 bundles/org.openhab.core.config.discovery.sddp/NOTICE create mode 100644 bundles/org.openhab.core.config.discovery.sddp/pom.xml create mode 100644 bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java create mode 100644 bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDeviceParticipant.java create mode 100644 bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryParticipant.java create mode 100644 bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java create mode 100644 bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java diff --git a/bom/openhab-core/pom.xml b/bom/openhab-core/pom.xml index 905bfb7e0fd..a32a982de5d 100644 --- a/bom/openhab-core/pom.xml +++ b/bom/openhab-core/pom.xml @@ -328,6 +328,12 @@ ${project.version} compile + + org.openhab.core.bundles + org.openhab.core.config.discovery.addon.sddp + ${project.version} + compile + org.openhab.core.bundles org.openhab.core.config.discovery.addon.upnp @@ -346,6 +352,12 @@ ${project.version} compile + + org.openhab.core.bundles + org.openhab.core.config.discovery.sddp + ${project.version} + compile + org.openhab.core.bundles org.openhab.core.config.discovery.usbserial diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/.classpath b/bundles/org.openhab.core.config.discovery.addon.sddp/.classpath new file mode 100644 index 00000000000..d3d6b3c11b6 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/.classpath @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/.project b/bundles/org.openhab.core.config.discovery.addon.sddp/.project new file mode 100644 index 00000000000..f86bba378d1 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/.project @@ -0,0 +1,23 @@ + + + org.openhab.core.config.discovery.addon.upnp + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + + diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/NOTICE b/bundles/org.openhab.core.config.discovery.addon.sddp/NOTICE new file mode 100644 index 00000000000..6c17d0d8a45 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/NOTICE @@ -0,0 +1,14 @@ +This content is produced and maintained by the openHAB project. + +* Project home: https://www.openhab.org + +== Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the Eclipse Public License 2.0 which is available at +https://www.eclipse.org/legal/epl-2.0/. + +== Source Code + +https://github.com/openhab/openhab-core + diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml b/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml new file mode 100644 index 00000000000..f56d06abf95 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml @@ -0,0 +1,34 @@ + + + + 4.0.0 + + + org.openhab.core.bundles + org.openhab.core.reactor.bundles + 4.2.0-SNAPSHOT + + + org.openhab.core.config.discovery.addon.sddp + + openHAB Core :: Bundles :: SDDP Suggested Add-on Finder + + + + org.openhab.core.bundles + org.openhab.core.config.discovery.addon + ${project.version} + + + org.openhab.core.bundles + org.openhab.core.addon + ${project.version} + + + org.openhab.core.bundles + org.openhab.core.config.discovery.sddp + ${project.version} + + + diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/src/main/java/org/openhab/core/config/discovery/addon/sddp/SddpAddonFinder.java b/bundles/org.openhab.core.config.discovery.addon.sddp/src/main/java/org/openhab/core/config/discovery/addon/sddp/SddpAddonFinder.java new file mode 100644 index 00000000000..9c8448641f2 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/src/main/java/org/openhab/core/config/discovery/addon/sddp/SddpAddonFinder.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.addon.sddp; + +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.openhab.core.addon.AddonDiscoveryMethod; +import org.openhab.core.addon.AddonInfo; +import org.openhab.core.addon.AddonMatchProperty; +import org.openhab.core.config.discovery.DiscoveryService; +import org.openhab.core.config.discovery.addon.AddonFinder; +import org.openhab.core.config.discovery.addon.AddonFinderConstants; +import org.openhab.core.config.discovery.addon.BaseAddonFinder; +import org.openhab.core.config.discovery.sddp.SddpDevice; +import org.openhab.core.config.discovery.sddp.SddpDeviceParticipant; +import org.openhab.core.config.discovery.sddp.SddpDiscoveryService; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This is a {@link SddpAddonFinder} for finding suggested Addons via SDDP. + *

+ * It checks the binding's addon.xml 'match-property' elements for the following SDDP properties: + *

  • driver
  • + *
  • host
  • + *
  • ipAddress
  • + *
  • macAddress
  • + *
  • manufacturer
  • + *
  • model
  • + *
  • port
  • + *
  • primaryProxy
  • + *
  • proxies
  • + *
  • type
  • + *

    + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +@Component(service = AddonFinder.class, name = SddpAddonFinder.SERVICE_NAME) +public class SddpAddonFinder extends BaseAddonFinder implements SddpDeviceParticipant { + + public static final String SERVICE_TYPE = AddonFinderConstants.SERVICE_TYPE_SDDP; + public static final String SERVICE_NAME = AddonFinderConstants.SERVICE_NAME_SDDP; + + private static final String DRIVER = "driver"; + private static final String HOST = "host"; + private static final String IP_ADDRESS = "ipAddress"; + private static final String MAC_ADDRESS = "macAddress"; + private static final String MANUFACTURER = "manufacturer"; + private static final String MODEL = "model"; + private static final String PORT = "port"; + private static final String PRIMARY_PROXY = "primaryProxy"; + private static final String PROXIES = "proxies"; + private static final String TYPE = "type"; + + private static final Set SUPPORTED_PROPERTIES = Set.of(DRIVER, HOST, IP_ADDRESS, MAC_ADDRESS, MANUFACTURER, + MODEL, PORT, PRIMARY_PROXY, PROXIES, TYPE); + + private final Logger logger = LoggerFactory.getLogger(SddpAddonFinder.class); + private final Set foundDevices = new HashSet<>(); + + private @Nullable SddpDiscoveryService sddpDiscoveryService = null; + + @Activate + public SddpAddonFinder( + @Reference(service = DiscoveryService.class, target = "(protocol=sddp)") DiscoveryService discoveryService) { + if (discoveryService instanceof SddpDiscoveryService sddpDiscoveryService) { + sddpDiscoveryService.addSddpDeviceParticipant(this); + this.sddpDiscoveryService = sddpDiscoveryService; + } else { + logger.warn("SddpAddonFinder() DiscoveryService is not an SddpDiscoveryService"); + } + } + + @Deactivate + public void deactivate() { + SddpDiscoveryService sddpDiscoveryService = this.sddpDiscoveryService; + if (sddpDiscoveryService != null) { + sddpDiscoveryService.removeSddpDeviceParticipant(this); + this.sddpDiscoveryService = null; + } + unsetAddonCandidates(); + foundDevices.clear(); + } + + @Override + public void deviceAdded(SddpDevice device) { + foundDevices.add(device); + } + + @Override + public void deviceRemoved(SddpDevice device) { + foundDevices.remove(device); + } + + @Override + public String getServiceName() { + return SERVICE_NAME; + } + + @Override + public Set getSuggestedAddons() { + Set result = new HashSet<>(); + for (AddonInfo candidate : addonCandidates) { + for (AddonDiscoveryMethod method : candidate.getDiscoveryMethods().stream() + .filter(method -> SERVICE_TYPE.equals(method.getServiceType())).toList()) { + Map matchProperties = method.getMatchProperties().stream() + .collect(Collectors.toMap(AddonMatchProperty::getName, AddonMatchProperty::getPattern)); + + Set propertyNames = new HashSet<>(matchProperties.keySet()); + propertyNames.removeAll(SUPPORTED_PROPERTIES); + + if (!propertyNames.isEmpty()) { + logger.warn("Add-on '{}' addon.xml file contains unsupported 'match-property' [{}]", + candidate.getUID(), String.join(",", propertyNames)); + break; + } + + logger.trace("Checking candidate: {}", candidate.getUID()); + for (SddpDevice device : foundDevices) { + logger.trace("Checking device: {}", device.host); + if (propertyMatches(matchProperties, HOST, device.host) + && propertyMatches(matchProperties, IP_ADDRESS, device.ipAddress) + && propertyMatches(matchProperties, MAC_ADDRESS, device.macAddress) + && propertyMatches(matchProperties, MANUFACTURER, device.manufacturer) + && propertyMatches(matchProperties, MODEL, device.model) + && propertyMatches(matchProperties, PORT, device.port) + && propertyMatches(matchProperties, PRIMARY_PROXY, device.primaryProxy) + && propertyMatches(matchProperties, PROXIES, device.proxies) + && propertyMatches(matchProperties, TYPE, device.type)) { + result.add(candidate); + logger.debug("Suggested add-on found: {}", candidate.getUID()); + break; + } + } + } + } + return result; + } + + @Override + public void setAddonCandidates(List candidates) { + super.setAddonCandidates(candidates); + } +} diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/src/test/java/org/openhab/core/config/discovery/addon/sddp/test/SddpAddonFinderTests.java b/bundles/org.openhab.core.config.discovery.addon.sddp/src/test/java/org/openhab/core/config/discovery/addon/sddp/test/SddpAddonFinderTests.java new file mode 100644 index 00000000000..fff72278ce7 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/src/test/java/org/openhab/core/config/discovery/addon/sddp/test/SddpAddonFinderTests.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.addon.sddp.test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.junit.jupiter.api.Test; +import org.openhab.core.addon.AddonDiscoveryMethod; +import org.openhab.core.addon.AddonInfo; +import org.openhab.core.addon.AddonMatchProperty; +import org.openhab.core.config.discovery.addon.sddp.SddpAddonFinder; +import org.openhab.core.config.discovery.sddp.SddpDevice; +import org.openhab.core.config.discovery.sddp.SddpDiscoveryService; + +/** + * JUnit tests for the {@link SddpAddonFinder}. + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +public class SddpAddonFinderTests { + + private static final Map DEVICE_FIELDS = Map.of( + // @formatter:off + "From", "\"192.168.4.237:1902\"", + "Host", "\"JVC_PROJECTOR-E0DADC152802\"", + "Max-Age", "1800", + "Type", "\"JVCKENWOOD:Projector\"", + "Primary-Proxy", "\"projector\"", + "Proxies", "\"projector\"", + "Manufacturer", "\"JVCKENWOOD\"", + "Model", "\"DLA-RS3100_NZ8\"", + "Driver", "\"projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i\""); + // @formatter:on + + private List createAddonInfos() { + AddonDiscoveryMethod method = new AddonDiscoveryMethod().setServiceType(SddpAddonFinder.SERVICE_TYPE) + .setMatchProperties(List.of(new AddonMatchProperty("host", "JVC.*"))); + List addonInfos = new ArrayList<>(); + addonInfos.add(AddonInfo.builder("jvc", "binding").withName("JVC").withDescription("JVC Kenwood") + .withDiscoveryMethods(List.of(method)).build()); + return addonInfos; + } + + @Test + public void testFinder() { + SddpDevice device = new SddpDevice(DEVICE_FIELDS, false); + + List addonInfos = createAddonInfos(); + SddpAddonFinder finder = new SddpAddonFinder(mock(SddpDiscoveryService.class)); + + finder.setAddonCandidates(addonInfos); + + Set suggestions; + AddonInfo info; + + finder.deviceAdded(device); + suggestions = finder.getSuggestedAddons(); + assertFalse(suggestions.isEmpty()); + info = suggestions.stream().findFirst().orElse(null); + assertNotNull(info); + assertEquals("JVC Kenwood", info.getDescription()); + + finder.deviceRemoved(device); + suggestions = finder.getSuggestedAddons(); + assertTrue(suggestions.isEmpty()); + } +} diff --git a/bundles/org.openhab.core.config.discovery.addon/src/main/java/org/openhab/core/config/discovery/addon/AddonFinderConstants.java b/bundles/org.openhab.core.config.discovery.addon/src/main/java/org/openhab/core/config/discovery/addon/AddonFinderConstants.java index 8486506a869..774f3064bf2 100644 --- a/bundles/org.openhab.core.config.discovery.addon/src/main/java/org/openhab/core/config/discovery/addon/AddonFinderConstants.java +++ b/bundles/org.openhab.core.config.discovery.addon/src/main/java/org/openhab/core/config/discovery/addon/AddonFinderConstants.java @@ -35,6 +35,10 @@ public class AddonFinderConstants { public static final String CFG_FINDER_MDNS = "suggestionFinderMdns"; public static final String SERVICE_NAME_MDNS = SERVICE_TYPE_MDNS + ADDON_SUGGESTION_FINDER; + public static final String SERVICE_TYPE_SDDP = "sddp"; + public static final String CFG_FINDER_SDDP = "suggestionFinderSddp"; + public static final String SERVICE_NAME_SDDP = SERVICE_TYPE_SDDP + ADDON_SUGGESTION_FINDER; + public static final String SERVICE_TYPE_UPNP = "upnp"; public static final String CFG_FINDER_UPNP = "suggestionFinderUpnp"; public static final String SERVICE_NAME_UPNP = SERVICE_TYPE_UPNP + ADDON_SUGGESTION_FINDER; @@ -43,13 +47,14 @@ public class AddonFinderConstants { public static final String CFG_FINDER_USB = "suggestionFinderUsb"; public static final String SERVICE_NAME_USB = SERVICE_TYPE_USB + ADDON_SUGGESTION_FINDER; - public static final List SUGGESTION_FINDERS = List.of(SERVICE_NAME_IP, SERVICE_NAME_MDNS, SERVICE_NAME_UPNP, - SERVICE_NAME_USB); + public static final List SUGGESTION_FINDERS = List.of(SERVICE_NAME_IP, SERVICE_NAME_MDNS, SERVICE_NAME_SDDP, + SERVICE_NAME_UPNP, SERVICE_NAME_USB); public static final Map SUGGESTION_FINDER_TYPES = Map.of(SERVICE_NAME_IP, SERVICE_TYPE_IP, - SERVICE_NAME_MDNS, SERVICE_TYPE_MDNS, SERVICE_NAME_UPNP, SERVICE_TYPE_UPNP, SERVICE_NAME_USB, - SERVICE_TYPE_USB); + SERVICE_NAME_MDNS, SERVICE_TYPE_MDNS, SERVICE_NAME_SDDP, SERVICE_TYPE_SDDP, SERVICE_NAME_UPNP, + SERVICE_TYPE_UPNP, SERVICE_NAME_USB, SERVICE_TYPE_USB); public static final Map SUGGESTION_FINDER_CONFIGS = Map.of(SERVICE_NAME_IP, CFG_FINDER_IP, - SERVICE_NAME_MDNS, CFG_FINDER_MDNS, SERVICE_NAME_UPNP, CFG_FINDER_UPNP, SERVICE_NAME_USB, CFG_FINDER_USB); + SERVICE_NAME_MDNS, CFG_FINDER_MDNS, SERVICE_NAME_SDDP, CFG_FINDER_SDDP, SERVICE_NAME_UPNP, CFG_FINDER_UPNP, + SERVICE_NAME_USB, CFG_FINDER_USB); } diff --git a/bundles/org.openhab.core.config.discovery.sddp/.classpath b/bundles/org.openhab.core.config.discovery.sddp/.classpath new file mode 100644 index 00000000000..585aba264ee --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/.classpath @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.core.config.discovery.sddp/.project b/bundles/org.openhab.core.config.discovery.sddp/.project new file mode 100644 index 00000000000..29654a1ee13 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/.project @@ -0,0 +1,23 @@ + + + org.openhab.core.config.discovery.upnp + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/bundles/org.openhab.core.config.discovery.sddp/NOTICE b/bundles/org.openhab.core.config.discovery.sddp/NOTICE new file mode 100644 index 00000000000..6c17d0d8a45 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/NOTICE @@ -0,0 +1,14 @@ +This content is produced and maintained by the openHAB project. + +* Project home: https://www.openhab.org + +== Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the Eclipse Public License 2.0 which is available at +https://www.eclipse.org/legal/epl-2.0/. + +== Source Code + +https://github.com/openhab/openhab-core + diff --git a/bundles/org.openhab.core.config.discovery.sddp/pom.xml b/bundles/org.openhab.core.config.discovery.sddp/pom.xml new file mode 100644 index 00000000000..3e0fc524e57 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/pom.xml @@ -0,0 +1,25 @@ + + + + 4.0.0 + + + org.openhab.core.bundles + org.openhab.core.reactor.bundles + 4.2.0-SNAPSHOT + + + org.openhab.core.config.discovery.sddp + + openHAB Core :: Bundles :: Configuration SDDP Discovery + + + + org.openhab.core.bundles + org.openhab.core.config.discovery + ${project.version} + + + + diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java new file mode 100644 index 00000000000..cc7b9d8f202 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.sddp; + +import java.time.Instant; +import java.util.Map; +import java.util.Objects; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; + +/** + * A DTO class containing data from an SDDP device discovery result. + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +public class SddpDevice { + + public final String from; + public final String host; + public final String maxAge; + public final String type; + public final String primaryProxy; + public final String proxies; + public final String manufacturer; + public final String model; + public final String driver; + public final String ipAddress; + public final String port; + public final String macAddress; + public final Instant expireInstant; + + /** + * Constructor. + * + * @param headers a map of parameter name / value pairs. + * @param offline indicates if the device is being created from a NOTIFY OFFLINE announcement. + */ + public SddpDevice(Map headers, boolean offline) { + from = headers.getOrDefault("From", "").replaceAll("^\"|\"$", ""); + host = headers.getOrDefault("Host", "").replaceAll("^\"|\"$", ""); + maxAge = headers.getOrDefault("Max-Age", "").replaceAll("^\"|\"$", ""); + type = headers.getOrDefault("Type", "").replaceAll("^\"|\"$", ""); + primaryProxy = headers.getOrDefault("Primary-Proxy", "").replaceAll("^\"|\"$", ""); + proxies = headers.getOrDefault("Proxies", "").replaceAll("^\"|\"$", ""); + manufacturer = headers.getOrDefault("Manufacturer", "").replaceAll("^\"|\"$", ""); + model = headers.getOrDefault("Model", "").replaceAll("^\"|\"$", ""); + driver = headers.getOrDefault("Driver", "").replaceAll("^\"|\"$", ""); + + String[] fromParts = from.split(":"); + ipAddress = fromParts[0]; + port = fromParts.length > 1 ? fromParts[1] : ""; + + String[] hostParts = host.split("-|_"); + macAddress = hostParts.length <= 1 ? "" + : hostParts[hostParts.length - 1].replaceAll("(..)(?!$)", "$1-").toLowerCase(); + + expireInstant = offline ? Instant.now().minusMillis(1) + : Instant.now().plusSeconds(maxAge.isBlank() ? 0 : Integer.parseInt(maxAge)); + } + + /** + * Set uniqueness is determined by the From field only + */ + @Override + public boolean equals(@Nullable Object obj) { + if (obj instanceof SddpDevice other) { + return Objects.equals(from, other.from); + } + return false; + } + + /** + * Set uniqueness is determined by the From field only + */ + @Override + public int hashCode() { + return Objects.hash(from); + } + + /** + * Check if the creation time plus max-age instant is exceeded. + */ + public boolean isExpired() { + return Instant.now().isAfter(expireInstant); + } +} diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDeviceParticipant.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDeviceParticipant.java new file mode 100644 index 00000000000..e01aa7b5622 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDeviceParticipant.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.sddp; + +import org.eclipse.jdt.annotation.NonNullByDefault; + +/** + * A {@link SddpDeviceParticipant} that is registered as a service is picked up by the {@link SddpDiscoveryService} and + * can thus be informed when the SDDP service discovers or removes an {@link SddpDevice}. + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +public interface SddpDeviceParticipant { + + void deviceAdded(SddpDevice device); + + void deviceRemoved(SddpDevice device); +} diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryParticipant.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryParticipant.java new file mode 100644 index 00000000000..fd11375507f --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryParticipant.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.sddp; + +import java.util.Set; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.openhab.core.config.discovery.DiscoveryResult; +import org.openhab.core.thing.ThingTypeUID; +import org.openhab.core.thing.ThingUID; + +/** + * A {@link SddpDiscoveryParticipant} that is registered as a service is picked up by the {@link SddpDiscoveryService} + * and can thus contribute {@link DiscoveryResult}s from SDDP scans. + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +public interface SddpDiscoveryParticipant { + + /** + * Defines the list of thing types that this participant can identify + * + * @return a set of thing type UIDs for which results can be created + */ + Set getSupportedThingTypeUIDs(); + + /** + * Creates a discovery result for a SDDP device + * + * @param device the SDDP device found on the network + * @return the according discovery result or null, if device is not + * supported by this participant + */ + @Nullable + DiscoveryResult createResult(SddpDevice device); + + /** + * Returns the thing UID for a SDDP device + * + * @param device the SDDP device on the network + * @return a thing UID or null, if device is not supported + * by this participant + */ + @Nullable + ThingUID getThingUID(SddpDevice device); +} diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java new file mode 100644 index 00000000000..f54181b1955 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java @@ -0,0 +1,438 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.sddp; + +import java.io.IOException; +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.MulticastSocket; +import java.net.NetworkInterface; +import java.net.ServerSocket; +import java.net.SocketTimeoutException; +import java.net.StandardSocketOptions; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.Instant; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Future; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.openhab.core.config.discovery.AbstractDiscoveryService; +import org.openhab.core.config.discovery.DiscoveryResult; +import org.openhab.core.config.discovery.DiscoveryService; +import org.openhab.core.i18n.LocaleProvider; +import org.openhab.core.i18n.TranslationProvider; +import org.openhab.core.net.CidrAddress; +import org.openhab.core.net.NetworkAddressChangeListener; +import org.openhab.core.net.NetworkAddressService; +import org.openhab.core.thing.ThingTypeUID; +import org.openhab.core.thing.ThingUID; +import org.osgi.framework.FrameworkUtil; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Modified; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This is a {@link DiscoveryService} implementation, which can find SDDP devices in the network. + * Support for bindings can be achieved by implementing and registering a {@link SddpDiscoveryParticipant}. + * Support for finders can be achieved by implementing and registering a {@link SddpDeviceParticipant}. + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +@Component(immediate = true, service = DiscoveryService.class, property = "protocol=sddp", configurationPid = "discovery.sddp") +public class SddpDiscoveryService extends AbstractDiscoveryService + implements AutoCloseable, NetworkAddressChangeListener { + + private static final int SDDP_PORT = 1902; + private static final String SDDP_IP_ADDRESS = "239.255.255.250"; + private static final InetSocketAddress SDDP_GROUP = new InetSocketAddress(SDDP_IP_ADDRESS, SDDP_PORT); + + private static final int READ_BUFFER_SIZE = 1024; + private static final Duration SOCKET_TIMOUT = Duration.ofMillis(1000); + private static final Duration SEARCH_LISTEN_DURATION = Duration.ofSeconds(5); + private static final Duration CACHE_PURGE_INTERVAL = Duration.ofSeconds(300); + + private static final String SEARCH_REQUEST_BODY_FORMAT = "SEARCH * SDDP/1.0\r\nHost: \"%s:%d\"\r\n"; + private static final String SEARCH_RESPONSE_HEADER = "SDDP/1.0 200 OK"; + + private static final String NOTIFY_ALIVE_HEADER = "NOTIFY ALIVE SDDP/1.0"; + private static final String NOTIFY_OFFLINE_HEADER = "NOTIFY OFFLINE SDDP/1.0"; + + private final Logger logger = LoggerFactory.getLogger(SddpDiscoveryService.class); + private final Set foundDevicesCache = ConcurrentHashMap.newKeySet(); + private final Set discoveryParticipants = ConcurrentHashMap.newKeySet(); + private final Set deviceParticipants = ConcurrentHashMap.newKeySet(); + + private final NetworkAddressService networkAddressService; + + private boolean closing = false; + + private @Nullable Future listenBackgroundMulticastTask = null; + private @Nullable Future listenActiveScanUnicastTask = null; + private @Nullable ScheduledFuture purgeExpiredDevicesTask = null; + + @Activate + public SddpDiscoveryService(final @Nullable Map configProperties, // + final @Reference NetworkAddressService networkAddressService, // + final @Reference TranslationProvider i18nProvider, // + final @Reference LocaleProvider localeProvider) { + super((int) SEARCH_LISTEN_DURATION.getSeconds()); + + this.networkAddressService = networkAddressService; + this.i18nProvider = i18nProvider; + this.localeProvider = localeProvider; + + super.activate(configProperties); // note: this starts listenBackgroundMulticastTask + + purgeExpiredDevicesTask = scheduler.scheduleWithFixedDelay(() -> purgeExpiredDevices(), + CACHE_PURGE_INTERVAL.getSeconds(), CACHE_PURGE_INTERVAL.getSeconds(), TimeUnit.SECONDS); + } + + @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) + public void addSddpDeviceParticipant(SddpDeviceParticipant participant) { + deviceParticipants.add(participant); + foundDevicesCache.stream().filter(d -> !d.isExpired()).forEach(d -> participant.deviceAdded(d)); + startScan(); + } + + @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) + protected void addSddpDiscoveryParticipant(SddpDiscoveryParticipant participant) { + discoveryParticipants.add(participant); + foundDevicesCache.stream().filter(d -> !d.isExpired()).forEach(d -> { + DiscoveryResult result = participant.createResult(d); + if (result != null) { + DiscoveryResult localizedResult = getLocalizedDiscoveryResult(result, + FrameworkUtil.getBundle(participant.getClass())); + thingDiscovered(localizedResult); + } + }); + } + + /** + * Cancel the given task. + */ + private void cancelTask(@Nullable Future task) { + if (task != null) { + task.cancel(true); + } + } + + @Override + public void close() { + deactivate(); + } + + /** + * Optionally create an {@link SddpDevice) object from UDP packet data if the data is good. + */ + public Optional createSddpDevice(String data) { + if (!data.isBlank()) { + List lines = data.lines().toList(); + if (lines.size() > 1) { + String statement = lines.get(0).strip(); + boolean offline = statement.startsWith(NOTIFY_OFFLINE_HEADER); + if (offline || statement.startsWith(NOTIFY_ALIVE_HEADER) + || statement.startsWith(SEARCH_RESPONSE_HEADER)) { + Map headers = new HashMap<>(); + for (int i = 1; i < lines.size(); i++) { + String[] header = lines.get(i).split(":", 2); + if (header.length > 1) { + headers.put(header[0].strip(), header[1].strip()); + } + } + return Optional.of(new SddpDevice(headers, offline)); + } + } + } + return Optional.empty(); + } + + @Deactivate + @Override + protected void deactivate() { + closing = true; + + foundDevicesCache.clear(); + discoveryParticipants.clear(); + deviceParticipants.clear(); + + super.deactivate(); // note: this cancels and nulls listenBackgroundMulticastTask + + cancelTask(listenActiveScanUnicastTask); + listenActiveScanUnicastTask = null; + + cancelTask(purgeExpiredDevicesTask); + purgeExpiredDevicesTask = null; + } + + @Override + public Set getSupportedThingTypes() { + Set supportedThingTypes = new HashSet<>(); + discoveryParticipants.forEach(p -> supportedThingTypes.addAll(p.getSupportedThingTypeUIDs())); + return supportedThingTypes; + } + + /** + * Continue to listen for incoming SDDP multicast messages until the thread is externally interrupted. + */ + private void listenBackGroundMulticast() { + MulticastSocket socket = null; + NetworkInterface networkInterface = null; + + try { + networkInterface = NetworkInterface + .getByInetAddress(InetAddress.getByName(networkAddressService.getPrimaryIpv4HostAddress())); + + if (logger.isDebugEnabled()) { + logger.debug("listenBackGroundMulticast() starting on interface '{}'", + networkInterface.getDisplayName()); + } + + socket = new MulticastSocket(SDDP_PORT); + socket.joinGroup(SDDP_GROUP, networkInterface); + socket.setSoTimeout((int) SOCKET_TIMOUT.toMillis()); + + DatagramPacket packet = null; + byte[] buffer = new byte[READ_BUFFER_SIZE]; + + // loop listen for responses + while (!Thread.currentThread().isInterrupted()) { + try { + if (packet == null) { + packet = new DatagramPacket(buffer, buffer.length); + } + socket.receive(packet); + processPacket(packet); + packet = null; + } catch (SocketTimeoutException e) { + // socket.receive() will time out every 1 second so the thread won't block + } + } + } catch (IOException e) { + if (!closing) { + logger.warn("listenBackGroundMulticast error '{}'", e.getMessage()); + } + } finally { + if (socket != null && networkInterface != null) { + try { + socket.leaveGroup(SDDP_GROUP, networkInterface); + } catch (IOException e) { + if (!closing) { + logger.warn("listenBackGroundMulticast() error '{}'", e.getMessage()); + } + } + socket.close(); + } + } + } + + /** + * Send a single outgoing SEARCH 'ping' and then continue to listen for incoming SDDP unicast responses until the + * loop time elapses or the thread is externally interrupted. + */ + private void listenActiveScanUnicast() { + // get a free port number + int port; + try (ServerSocket portFinder = new ServerSocket(0)) { + port = portFinder.getLocalPort(); + } catch (IOException e) { + logger.warn("listenActiveScanUnicast() port finder error '{}'", e.getMessage()); + return; + } + + try (DatagramSocket socket = new DatagramSocket(port)) { + String ipAddress = networkAddressService.getPrimaryIpv4HostAddress(); + NetworkInterface networkInterface = NetworkInterface.getByInetAddress(InetAddress.getByName(ipAddress)); + + if (logger.isDebugEnabled()) { + logger.debug("listenActiveScanUnicast() starting on '{}:{}' on interface '{}'", ipAddress, port, + networkInterface.getDisplayName()); + } + + socket.setOption(StandardSocketOptions.IP_MULTICAST_IF, networkInterface); + socket.setSoTimeout((int) SOCKET_TIMOUT.toMillis()); + + DatagramPacket packet; + byte[] buffer; + + // send search request + String search = String.format(SEARCH_REQUEST_BODY_FORMAT, ipAddress, port); + buffer = search.getBytes(StandardCharsets.UTF_8); + packet = new DatagramPacket(buffer, buffer.length, new InetSocketAddress(SDDP_IP_ADDRESS, SDDP_PORT)); + socket.send(packet); + logger.trace("Packet sent to '{}:{}' content:\r\n{}", SDDP_IP_ADDRESS, SDDP_PORT, search); + + final Instant listenDoneTime = Instant.now().plus(SEARCH_LISTEN_DURATION); + buffer = new byte[READ_BUFFER_SIZE]; + packet = null; + + // loop listen for responses + while (Instant.now().isBefore(listenDoneTime) && !Thread.currentThread().isInterrupted()) { + try { + if (packet == null) { + packet = new DatagramPacket(buffer, buffer.length); + } + socket.receive(packet); + processPacket(packet); + packet = null; + } catch (SocketTimeoutException e) { + // receive will time out every 1 second so the thread won't block + } + } + } catch (IOException e) { + if (!closing) { + logger.warn("listenActiveScanUnicast() error '{}'", e.getMessage()); + } + } + } + + @Modified + @Override + protected void modified(@Nullable Map configProperties) { + super.modified(configProperties); + } + + /** + * If the network interfaces change then cancel and recreate all pending tasks. + */ + @Override + public synchronized void onChanged(List added, List removed) { + Future multicastTask = listenBackgroundMulticastTask; + if (multicastTask != null && !multicastTask.isDone()) { + multicastTask.cancel(true); + listenBackgroundMulticastTask = scheduler.submit(() -> listenBackGroundMulticast()); + } + Future unicastTask = listenActiveScanUnicastTask; + if (unicastTask != null && !unicastTask.isDone()) { + unicastTask.cancel(true); + listenActiveScanUnicastTask = scheduler.submit(() -> listenActiveScanUnicast()); + } + } + + /** + * Process the {@link DatagramPacket} content by trying to create an {@link SddpDevice} and eventually adding it to + * the foundDevicesCache, and if so, then notifying all listeners. + * + * @param packet a datagram packet that arrived over the network. + */ + private synchronized void processPacket(DatagramPacket packet) { + String content = new String(packet.getData(), 0, packet.getLength(), StandardCharsets.UTF_8); + if (logger.isTraceEnabled()) { + logger.trace("Packet received from '{}:{}' content:\r\n{}", packet.getAddress().getHostAddress(), + packet.getPort(), content); + } + Optional deviceOptional = createSddpDevice(content); + if (deviceOptional.isPresent()) { + SddpDevice device = deviceOptional.get(); + foundDevicesCache.remove(device); + + if (device.isExpired()) { + // device created from a NOTIFY OFFLINE announcement + discoveryParticipants.forEach(p -> { + DiscoveryResult discoveryResult = p.createResult(device); + if (discoveryResult != null) { + thingRemoved(discoveryResult.getThingUID()); + } + }); + deviceParticipants.forEach(f -> f.deviceRemoved(device)); + } else { + // device created from a NOTIFY ALIVE announcement or SEARCH response + foundDevicesCache.add(device); + discoveryParticipants.forEach(p -> { + DiscoveryResult discoveryResult = p.createResult(device); + if (discoveryResult != null) { + DiscoveryResult localizedResult = getLocalizedDiscoveryResult(discoveryResult, + FrameworkUtil.getBundle(p.getClass())); + thingDiscovered(localizedResult); + } + }); + deviceParticipants.forEach(f -> f.deviceAdded(device)); + } + + if (logger.isDebugEnabled()) { + logger.debug("processPacket() foundDevices={}, deviceParticipants={}, discoveryParticipants={}", + foundDevicesCache.size(), deviceParticipants.size(), discoveryParticipants.size()); + } + } + } + + /** + * Purge expired devices and notify all listeners. + */ + private synchronized void purgeExpiredDevices() { + Set devices = new HashSet<>(foundDevicesCache); + devices.stream().filter(d -> d.isExpired()).forEach(d -> { + discoveryParticipants.forEach(p -> { + ThingUID thingUID = p.getThingUID(d); + if (thingUID != null) { + thingRemoved(thingUID); + } + }); + deviceParticipants.forEach(f -> f.deviceRemoved(d)); + }); + foundDevicesCache.clear(); + foundDevicesCache.addAll(devices.stream().filter(d -> !d.isExpired()).collect(Collectors.toSet())); + } + + public void removeSddpDeviceParticipant(SddpDeviceParticipant participant) { + deviceParticipants.remove(participant); + } + + public void removeSddpDiscoveryParticipant(SddpDiscoveryParticipant participant) { + discoveryParticipants.remove(participant); + } + + @Override + protected void startBackgroundDiscovery() { + Future task = listenBackgroundMulticastTask; + if (task == null || task.isDone()) { + listenBackgroundMulticastTask = scheduler.submit(() -> listenBackGroundMulticast()); + } + } + + /** + * Schedule to send one single SDDP SEARCH request, and listen for responses. + */ + @Override + protected void startScan() { + Future task = listenActiveScanUnicastTask; + if (task == null || task.isDone()) { + listenActiveScanUnicastTask = scheduler.submit(() -> listenActiveScanUnicast()); + } + } + + @Override + protected void stopBackgroundDiscovery() { + cancelTask(listenBackgroundMulticastTask); + listenBackgroundMulticastTask = null; + } +} diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java b/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java new file mode 100644 index 00000000000..ee571e3bd62 --- /dev/null +++ b/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.core.config.discovery.sddp.test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.Optional; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.TestInstance.Lifecycle; +import org.openhab.core.config.discovery.sddp.SddpDevice; +import org.openhab.core.config.discovery.sddp.SddpDiscoveryService; +import org.openhab.core.i18n.LocaleProvider; +import org.openhab.core.i18n.TranslationProvider; +import org.openhab.core.net.NetworkAddressService; + +/** + * JUnit tests for parsing SDDP discovery results. + * + * @author Andrew Fiddian-Green - Initial contribution + */ +@NonNullByDefault +@TestInstance(Lifecycle.PER_CLASS) +public class SddpDiscoveryServiceTests { + + private static final String ALIVE_NOTIFICATION = """ + NOTIFY ALIVE SDDP/1.0 + From: "192.168.4.237:1902" + Host: "JVC_PROJECTOR-E0DADC152802" + Max-Age: 1800 + Type: "JVCKENWOOD:Projector" + Primary-Proxy: "projector" + Proxies: "projector" + Manufacturer: "JVCKENWOOD" + Model: "DLA-RS3100_NZ8" + Driver: "projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i" + """; + + private static final String BAD_HEADER = """ + SDDP/1.0 404 NOT FOUND\r + From: "192.168.4.237:1902"\r + Host: "JVC_PROJECTOR-E0DADC152802"\r + Max-Age: 1800\r + Type: "JVCKENWOOD:Projector"\r + Primary-Proxy: "projector"\r + Proxies: "projector"\r + Manufacturer: "JVCKENWOOD"\r + Model: "DLA-RS3100_NZ8"\r + Driver: "projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i"\r + """; + + private static final String BAD_PAYLOAD = """ + SDDP/1.0 200 OK\r + """; + + private static final String SEARCH_RESPONSE = """ + SDDP/1.0 200 OK\r + From: "192.168.4.237:1902"\r + Host: "JVC_PROJECTOR-E0DADC152802"\r + Max-Age: 1800\r + Type: "JVCKENWOOD:Projector"\r + Primary-Proxy: "projector"\r + Proxies: "projector"\r + Manufacturer: "JVCKENWOOD"\r + Model: "DLA-RS3100_NZ8"\r + Driver: "projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i"\r + """; + + private @NonNullByDefault({}) NetworkAddressService networkAddressService; + + @BeforeAll + public void setup() { + networkAddressService = mock(NetworkAddressService.class); + when(networkAddressService.getPrimaryIpv4HostAddress()).thenReturn("192.168.1.1"); + } + + @Test + void testAliveNotification() throws Exception { + try (SddpDiscoveryService service = new SddpDiscoveryService(null, networkAddressService, + mock(TranslationProvider.class), mock(LocaleProvider.class))) { + Optional deviceOptional = service.createSddpDevice(ALIVE_NOTIFICATION); + assertTrue(deviceOptional.isPresent()); + SddpDevice device = deviceOptional.orElse(null); + assertNotNull(device); + assertEquals("192.168.4.237:1902", device.from); + assertEquals("JVC_PROJECTOR-E0DADC152802", device.host); + assertEquals("1800", device.maxAge); + assertEquals("JVCKENWOOD:Projector", device.type); + assertEquals("projector", device.primaryProxy); + assertEquals("projector", device.proxies); + assertEquals("JVCKENWOOD", device.manufacturer); + assertEquals("DLA-RS3100_NZ8", device.model); + assertEquals("projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i", device.driver); + assertEquals("192.168.4.237", device.ipAddress); + assertEquals("e0-da-dc-15-28-02", device.macAddress); + assertEquals("1902", device.port); + } + } + + @Test + void testBadHeader() throws Exception { + try (SddpDiscoveryService service = new SddpDiscoveryService(null, networkAddressService, + mock(TranslationProvider.class), mock(LocaleProvider.class))) { + Optional deviceOptional = service.createSddpDevice(BAD_HEADER); + assertFalse(deviceOptional.isPresent()); + } + } + + @Test + void testBadPayload() throws Exception { + try (SddpDiscoveryService service = new SddpDiscoveryService(null, networkAddressService, + mock(TranslationProvider.class), mock(LocaleProvider.class))) { + Optional deviceOptional = service.createSddpDevice(BAD_PAYLOAD); + assertFalse(deviceOptional.isPresent()); + } + } + + @Test + void testSearchResponse() throws Exception { + try (SddpDiscoveryService service = new SddpDiscoveryService(null, networkAddressService, + mock(TranslationProvider.class), mock(LocaleProvider.class))) { + Optional deviceOptional = service.createSddpDevice(SEARCH_RESPONSE); + assertTrue(deviceOptional.isPresent()); + SddpDevice device = deviceOptional.orElse(null); + assertNotNull(device); + assertEquals("192.168.4.237:1902", device.from); + assertEquals("JVC_PROJECTOR-E0DADC152802", device.host); + assertEquals("1800", device.maxAge); + assertEquals("JVCKENWOOD:Projector", device.type); + assertEquals("projector", device.primaryProxy); + assertEquals("projector", device.proxies); + assertEquals("JVCKENWOOD", device.manufacturer); + assertEquals("DLA-RS3100_NZ8", device.model); + assertEquals("projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i", device.driver); + assertEquals("192.168.4.237", device.ipAddress); + assertEquals("e0-da-dc-15-28-02", device.macAddress); + assertEquals("1902", device.port); + } + } +} diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml b/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml index 752351223b7..ae137724fc6 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml @@ -34,6 +34,12 @@ Use IP network discovery broadcasts to suggest add-ons. Enabling/disabling may take up to 1 minute. + + true + + Use SDDP network scan to suggest add-ons. Enabling/disabling may take up to 1 minute. + true + true diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons.properties index 0d22f9d7de4..88e513f264c 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = IP-based Suggestion Finder system.config.addons.suggestionFinderIp.description = Use IP network discovery broadcasts to suggest add-ons. Enabling/disabling may take up to 1 minute. system.config.addons.suggestionFinderMdns.label = mDNS Suggestion Finder system.config.addons.suggestionFinderMdns.description = Use mDNS network scan to suggest add-ons. Enabling/disabling may take up to 1 minute. +system.config.addons.suggestionFinderSddp.label = SDDP Suggestion Finder +system.config.addons.suggestionFinderSddp.description = Use SDDP network scan to suggest add-ons. Enabling/disabling may take up to 1 minute. system.config.addons.suggestionFinderUpnp.label = UPnP Suggestion Finder system.config.addons.suggestionFinderUpnp.description = Use UPnP network scan to suggest add-ons. Enabling/disabling may take up to 1 minute. system.config.addons.suggestionFinderUsb.label = USB Suggestion Finder diff --git a/bundles/pom.xml b/bundles/pom.xml index d83958afe9b..25918c2b2b0 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -34,9 +34,11 @@ org.openhab.core.config.discovery.addon.ip org.openhab.core.config.discovery.addon.mdns org.openhab.core.config.discovery.addon.process + org.openhab.core.config.discovery.addon.sddp org.openhab.core.config.discovery.addon.upnp org.openhab.core.config.discovery.addon.usb org.openhab.core.config.discovery.mdns + org.openhab.core.config.discovery.sddp org.openhab.core.config.discovery.usbserial org.openhab.core.config.discovery.usbserial.linuxsysfs org.openhab.core.config.discovery.usbserial.ser2net diff --git a/features/karaf/openhab-core/src/main/feature/feature.xml b/features/karaf/openhab-core/src/main/feature/feature.xml index 9f55be0cd79..2305b15a214 100644 --- a/features/karaf/openhab-core/src/main/feature/feature.xml +++ b/features/karaf/openhab-core/src/main/feature/feature.xml @@ -105,6 +105,18 @@ mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.addon.usb/${project.version} + + openhab-core-base + openhab-core-config-discovery-addon + openhab-core-config-discovery-sddp + mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.addon.sddp/${project.version} + + + + openhab-core-base + mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.sddp/${project.version} + + kar openhab-core-base From 8aa6b28104b3e7728826d8e492855b588904e38d Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Fri, 31 May 2024 12:41:23 +0200 Subject: [PATCH 02/50] fix ip suggestion finder default param (#4262) Signed-off-by: Mark Herwege --- .../org.openhab.core/src/main/resources/OH-INF/config/addons.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml b/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml index ae137724fc6..49b3599dfad 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/config/addons.xml @@ -33,6 +33,7 @@ true Use IP network discovery broadcasts to suggest add-ons. Enabling/disabling may take up to 1 minute. + true true From 940a9905db4ab2c1130aa5e66c5e296032d9f287 Mon Sep 17 00:00:00 2001 From: mlobstein Date: Sat, 1 Jun 2024 03:15:59 -0500 Subject: [PATCH 03/50] Add support for SDDP IDENTIFY packets (#4263) Signed-off-by: Michael Lobstein --- .../discovery/sddp/SddpDiscoveryService.java | 3 +- .../sddp/test/SddpDiscoveryServiceTests.java | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java index f54181b1955..4e1076da590 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java @@ -85,6 +85,7 @@ public class SddpDiscoveryService extends AbstractDiscoveryService private static final String SEARCH_RESPONSE_HEADER = "SDDP/1.0 200 OK"; private static final String NOTIFY_ALIVE_HEADER = "NOTIFY ALIVE SDDP/1.0"; + private static final String NOTIFY_IDENTIFY_HEADER = "NOTIFY IDENTIFY SDDP/1.0"; private static final String NOTIFY_OFFLINE_HEADER = "NOTIFY OFFLINE SDDP/1.0"; private final Logger logger = LoggerFactory.getLogger(SddpDiscoveryService.class); @@ -160,7 +161,7 @@ public Optional createSddpDevice(String data) { if (lines.size() > 1) { String statement = lines.get(0).strip(); boolean offline = statement.startsWith(NOTIFY_OFFLINE_HEADER); - if (offline || statement.startsWith(NOTIFY_ALIVE_HEADER) + if (offline || statement.startsWith(NOTIFY_ALIVE_HEADER) || statement.startsWith(NOTIFY_IDENTIFY_HEADER) || statement.startsWith(SEARCH_RESPONSE_HEADER)) { Map headers = new HashMap<>(); for (int i = 1; i < lines.size(); i++) { diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java b/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java index ee571e3bd62..249bb97ad60 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java +++ b/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java @@ -54,6 +54,18 @@ public class SddpDiscoveryServiceTests { Driver: "projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i" """; + private static final String IDENTIFY_NOTIFICATION = """ + NOTIFY IDENTIFY SDDP/1.0 + From: "192.168.4.237:1902" + Host: "JVC_PROJECTOR-E0DADC152802" + Type: "JVCKENWOOD:Projector" + Primary-Proxy: "projector" + Proxies: "projector" + Manufacturer: "JVCKENWOOD" + Model: "DLA-RS3100_NZ8" + Driver: "projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i" + """; + private static final String BAD_HEADER = """ SDDP/1.0 404 NOT FOUND\r From: "192.168.4.237:1902"\r @@ -115,6 +127,29 @@ void testAliveNotification() throws Exception { } } + @Test + void testIdentifyNotification() throws Exception { + try (SddpDiscoveryService service = new SddpDiscoveryService(null, networkAddressService, + mock(TranslationProvider.class), mock(LocaleProvider.class))) { + Optional deviceOptional = service.createSddpDevice(IDENTIFY_NOTIFICATION); + assertTrue(deviceOptional.isPresent()); + SddpDevice device = deviceOptional.orElse(null); + assertNotNull(device); + assertEquals("192.168.4.237:1902", device.from); + assertEquals("JVC_PROJECTOR-E0DADC152802", device.host); + assertTrue(device.maxAge.isBlank()); + assertEquals("JVCKENWOOD:Projector", device.type); + assertEquals("projector", device.primaryProxy); + assertEquals("projector", device.proxies); + assertEquals("JVCKENWOOD", device.manufacturer); + assertEquals("DLA-RS3100_NZ8", device.model); + assertEquals("projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i", device.driver); + assertEquals("192.168.4.237", device.ipAddress); + assertEquals("e0-da-dc-15-28-02", device.macAddress); + assertEquals("1902", device.port); + } + } + @Test void testBadHeader() throws Exception { try (SddpDiscoveryService service = new SddpDiscoveryService(null, networkAddressService, From 7198c123a3fb618a77cbc38aa14fd26470b187c3 Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Sat, 1 Jun 2024 10:45:27 +0200 Subject: [PATCH 04/50] New Crowdin updates (#4261) * New translations addons.properties (Hungarian) * New translations defaultsystemchannels.properties (Hungarian) * New translations addons.properties (Danish) * New translations addons.properties (Italian) * New translations chart.properties (Finnish) * New translations languagesupport.properties (Portuguese) * New translations languagesupport.properties (Portuguese, Brazilian) * New translations addons.properties (Hebrew) --- .../OH-INF/i18n/DefaultSystemChannels_hu.properties | 2 ++ .../src/main/resources/OH-INF/i18n/chart_fi.properties | 5 +++++ .../src/main/resources/OH-INF/i18n/addons_da.properties | 2 ++ .../src/main/resources/OH-INF/i18n/addons_he.properties | 2 ++ .../src/main/resources/OH-INF/i18n/addons_hu.properties | 2 ++ .../src/main/resources/OH-INF/i18n/addons_it.properties | 2 ++ 6 files changed, 15 insertions(+) diff --git a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_hu.properties b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_hu.properties index df877e5f46c..a5967719e5d 100644 --- a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_hu.properties +++ b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_hu.properties @@ -56,3 +56,5 @@ channel-type.system.electric-voltage.label = Elektromos feszültség channel-type.system.electric-voltage.description = Aktuális elektromos feszültség channel-type.system.electrical-energy.label = Elektromos energia channel-type.system.electrical-energy.description = Aktuális elektromos energia +channel-type.system.uv-index.label = UV-index +channel-type.system.uv-index.description = Aktuális UV index diff --git a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fi.properties b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fi.properties index af4ffea706b..b305f5cdeee 100644 --- a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fi.properties +++ b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fi.properties @@ -6,5 +6,10 @@ system.config.chart.scale.label = Skaala system.config.chart.scale.description = Määrittää skaalauksen jota käytetään pyydettyyn kaavion korkeuteen (esim. jakaaksesi kahdella käytä arvoa 0.5). system.config.chart.maxWidth.label = Suurin leveys system.config.chart.maxWidth.description = Määrittää rakennettavan kaavion suurimman leveyden kuvapisteissä. +system.config.sitemap.groupMembersSorting.label = Ryhmän jäsenten lajittelu +system.config.sitemap.groupMembersSorting.description = Määrittää, miten ryhmän jäsenet lajitellaan käyttöliittymällä. +system.config.sitemap.groupMembersSorting.option.NONE = Ei lajittelua +system.config.sitemap.groupMembersSorting.option.LABEL = Järjestetty otsikon mukaan +system.config.sitemap.groupMembersSorting.option.NAME = Järjestetty nimen mukaan service.system.chart.label = Kaaviot diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_da.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_da.properties index c24992736b0..bd6bbcfe1ab 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_da.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_da.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = IP-baseret forslagsfinder system.config.addons.suggestionFinderIp.description = Brug IP-netværksopdagelsesudsendelser til at foreslå tilføjelser. Det kan tage op til et minut at slå til eller fra. system.config.addons.suggestionFinderMdns.label = mDNS forslagsfinder system.config.addons.suggestionFinderMdns.description = Brug mDNS netværksscanning til at foreslå tilføjelser. Det kan tage op til et minut at slå til eller fra. +system.config.addons.suggestionFinderSddp.label = SDDP forslagsfinder +system.config.addons.suggestionFinderSddp.description = Brug SDDP netværksscanning til at foreslå tilføjelser. Det kan tage op til et minut at slå til eller fra. system.config.addons.suggestionFinderUpnp.label = UPnP forslagsfinder system.config.addons.suggestionFinderUpnp.description = Brug UPnP netværksscanning til at foreslå tilføjelser. Det kan tage op til et minut at slå til eller fra. system.config.addons.suggestionFinderUsb.label = USB forslagsfinder diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_he.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_he.properties index 54f0d2cafce..850a2c3545f 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_he.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_he.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = מאתר הצעות מבוסס I system.config.addons.suggestionFinderIp.description = השתמש בסריקת רשת IP כדי להציע תוספים. הפעלה/השבתה עשויה להימשך עד דקה אחת. system.config.addons.suggestionFinderMdns.label = מאתר הצעות mDNS system.config.addons.suggestionFinderMdns.description = השתמש בסריקת רשת mDNS כדי להציע תוספים. הפעלה/השבתה עשויה להימשך עד דקה אחת. +system.config.addons.suggestionFinderSddp.label = מאתר הצעות SDDP +system.config.addons.suggestionFinderSddp.description = השתמש בסריקת רשת SDDP כדי להציע תוספות. הפעלה/השבתה עשויה להימשך עד דקה אחת. system.config.addons.suggestionFinderUpnp.label = מאתר הצעות UPnP system.config.addons.suggestionFinderUpnp.description = השתמש בסריקת רשת UPnP כדי להציע תוספים. הפעלה/השבתה עשויה להימשך עד דקה אחת. system.config.addons.suggestionFinderUsb.label = מאתר הצעות USB diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_hu.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_hu.properties index 1a1ead957b1..19f181b1194 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_hu.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_hu.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = IP cím alapú kiegészítő ker system.config.addons.suggestionFinderIp.description = IP hálózati kereső kötések javaslatához. Az engedélyezés és a eltiltás egy percet is igénybe vehet. system.config.addons.suggestionFinderMdns.label = mDNS alapú kötés kereső system.config.addons.suggestionFinderMdns.description = Az MDNS hálózat kereső kötések javaslatához. Az engedélyezés és a eltiltás egy percet is igénybe vehet. +system.config.addons.suggestionFinderSddp.label = SSDP alapú kötés kereső +system.config.addons.suggestionFinderSddp.description = Az SSDP hálózat kereső kötések javaslatához. Az engedélyezés és a eltiltás egy percet is igénybe vehet. system.config.addons.suggestionFinderUpnp.label = UPnP alapú kötés kereső system.config.addons.suggestionFinderUpnp.description = Az UPnP hálózat kereső kötések javaslatához. Az engedélyezés és a eltiltás egy percet is igénybe vehet. system.config.addons.suggestionFinderUsb.label = USB alapú kötés kereső diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_it.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_it.properties index b7fe133ebcb..82894dbd642 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_it.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_it.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = Finder Suggerimenti basato su IP system.config.addons.suggestionFinderIp.description = Usa le trasmissioni di ricerca della rete IP per suggerire componenti aggiuntivi. Abilitare/disabilitare potrebbe richiedere fino a 1 minuto. system.config.addons.suggestionFinderMdns.label = Suggerimento ricerca mDNS system.config.addons.suggestionFinderMdns.description = Usa la scansione della rete mDNS per suggerire componenti aggiuntivi. L'attivazione/disabilitazione potrebbe richiedere fino a 1 minuto. +system.config.addons.suggestionFinderSddp.label = Ricerca Suggerimenti SDDP +system.config.addons.suggestionFinderSddp.description = Utilizzare la scansione della rete SDDP per suggerire componenti aggiuntivi. Abilitare/disabilitare potrebbe richiedere fino a 1 minuto. system.config.addons.suggestionFinderUpnp.label = Suggerimento ricerca UPnP system.config.addons.suggestionFinderUpnp.description = Usa la scansione della rete UPnP per suggerire componenti aggiuntivi. L'attivazione/disabilitazione potrebbe richiedere fino a 1 minuto. system.config.addons.suggestionFinderUsb.label = Suggerimento ricerca via USB From ea71af9eadfcff3a4f656157724ce18d1633de16 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Sat, 1 Jun 2024 20:55:32 +0200 Subject: [PATCH 05/50] Upgrade Xtext to 2.35.0 (#4264) * Upgrade Xtext from 2.35.0.M1 to 2.35.0 final release, see release notes: https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/05/28/version-2-35-0 * Upgrade dependencies * Guava from 33.1.0 to 33.2.0 * Lsp4j from 0.22.0 to 0.23.1 Signed-off-by: Holger Friedrich --- bom/runtime/pom.xml | 2 +- features/karaf/openhab-core/src/main/feature/feature.xml | 2 +- features/karaf/openhab-tp/src/main/feature/feature.xml | 8 ++++---- itests/org.openhab.core.model.item.tests/itest.bndrun | 2 +- itests/org.openhab.core.model.rule.tests/itest.bndrun | 2 +- itests/org.openhab.core.model.script.tests/itest.bndrun | 2 +- itests/org.openhab.core.model.thing.tests/itest.bndrun | 2 +- pom.xml | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index d04315cbeac..59f25d5baae 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -794,7 +794,7 @@ com.google.guava guava - 33.1.0-jre + 33.2.0-jre compile diff --git a/features/karaf/openhab-core/src/main/feature/feature.xml b/features/karaf/openhab-core/src/main/feature/feature.xml index 2305b15a214..14dfd1e1dc0 100644 --- a/features/karaf/openhab-core/src/main/feature/feature.xml +++ b/features/karaf/openhab-core/src/main/feature/feature.xml @@ -404,7 +404,7 @@ openhab.tp;filter:="(&(feature=xtext-ide)(version>=2.35.0)(!(version>=2.36.0)))" openhab.tp-xtext-ide - openhab.tp;filter:="(&(feature=lsp4j)(version>=0.22.0)(!(version>=0.23.0)))" + openhab.tp;filter:="(&(feature=lsp4j)(version>=0.23.1)(!(version>=0.24.0)))" openhab.tp-lsp4j openhab-core-model-item-ide diff --git a/features/karaf/openhab-tp/src/main/feature/feature.xml b/features/karaf/openhab-tp/src/main/feature/feature.xml index f1d86be525c..f0cb668fbfd 100644 --- a/features/karaf/openhab-tp/src/main/feature/feature.xml +++ b/features/karaf/openhab-tp/src/main/feature/feature.xml @@ -205,9 +205,9 @@ - openhab.tp;feature=lsp4j;version=0.22.0 - mvn:org.eclipse.lsp4j/org.eclipse.lsp4j/0.22.0 - mvn:org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc/0.22.0 + openhab.tp;feature=lsp4j;version=0.23.1 + mvn:org.eclipse.lsp4j/org.eclipse.lsp4j/0.23.1 + mvn:org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc/0.23.1 openhab.tp-gson openhab.tp-xtext @@ -247,7 +247,7 @@ mvn:org.eclipse.xtend/org.eclipse.xtend.lib.macro/${xtext.version} mvn:com.google.guava/failureaccess/1.0.2 - mvn:com.google.guava/guava/33.1.0-jre + mvn:com.google.guava/guava/33.2.0-jre mvn:com.google.inject/guice/7.0.0 mvn:jakarta.inject/jakarta.inject-api/2.0.1 diff --git a/itests/org.openhab.core.model.item.tests/itest.bndrun b/itests/org.openhab.core.model.item.tests/itest.bndrun index 4e2efb0cb15..8d949e031b7 100644 --- a/itests/org.openhab.core.model.item.tests/itest.bndrun +++ b/itests/org.openhab.core.model.item.tests/itest.bndrun @@ -85,7 +85,7 @@ Fragment-Host: org.openhab.core.model.item com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ stax2-api;version='[4.2.1,4.2.2)',\ org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - com.google.guava;version='[33.1.0,33.1.1)',\ + com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ diff --git a/itests/org.openhab.core.model.rule.tests/itest.bndrun b/itests/org.openhab.core.model.rule.tests/itest.bndrun index eddced2a8bd..0489cdcbf41 100644 --- a/itests/org.openhab.core.model.rule.tests/itest.bndrun +++ b/itests/org.openhab.core.model.rule.tests/itest.bndrun @@ -89,7 +89,7 @@ Fragment-Host: org.openhab.core.model.rule.runtime com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ stax2-api;version='[4.2.1,4.2.2)',\ org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - com.google.guava;version='[33.1.0,33.1.1)',\ + com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ diff --git a/itests/org.openhab.core.model.script.tests/itest.bndrun b/itests/org.openhab.core.model.script.tests/itest.bndrun index b9c4542f1e5..7dbfc24ce77 100644 --- a/itests/org.openhab.core.model.script.tests/itest.bndrun +++ b/itests/org.openhab.core.model.script.tests/itest.bndrun @@ -93,7 +93,7 @@ Fragment-Host: org.openhab.core.model.script com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ stax2-api;version='[4.2.1,4.2.2)',\ org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - com.google.guava;version='[33.1.0,33.1.1)',\ + com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ diff --git a/itests/org.openhab.core.model.thing.tests/itest.bndrun b/itests/org.openhab.core.model.thing.tests/itest.bndrun index b4e4dd488de..ed7fbd52657 100644 --- a/itests/org.openhab.core.model.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.model.thing.tests/itest.bndrun @@ -94,7 +94,7 @@ Fragment-Host: org.openhab.core.model.thing com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ stax2-api;version='[4.2.1,4.2.2)',\ org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - com.google.guava;version='[33.1.0,33.1.1)',\ + com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ diff --git a/pom.xml b/pom.xml index f002fcf30cc..af257faea96 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ 4.4.6 0.16.0 2.0.12 - 2.35.0.M1 + 2.35.0 2.43.0 4.25 From 5f1b708f27a07c9112bb8c23bbb8e7cb4370fcd6 Mon Sep 17 00:00:00 2001 From: Andrew Fiddian-Green Date: Sat, 1 Jun 2024 22:22:27 +0100 Subject: [PATCH 06/50] Fix closing bracket in JavaDoc (#4265) Signed-off-by: Andrew Fiddian-Green --- .../core/config/discovery/sddp/SddpDiscoveryService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java index 4e1076da590..476d879457a 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDiscoveryService.java @@ -153,7 +153,7 @@ public void close() { } /** - * Optionally create an {@link SddpDevice) object from UDP packet data if the data is good. + * Optionally create an {@link SddpDevice} object from UDP packet data if the data is good. */ public Optional createSddpDevice(String data) { if (!data.isBlank()) { From d092c517f0f794c4a45dd744d316cd52f497241c Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Wed, 5 Jun 2024 18:14:52 +0200 Subject: [PATCH 07/50] Fix persist with date method (#4267) Signed-off-by: Mark Herwege --- .../core/persistence/extensions/PersistenceExtensions.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java index 257b18c14b6..42b08c4e447 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java @@ -140,7 +140,7 @@ private static void internalPersist(Item item, ZonedDateTime timestamp, State st } PersistenceService service = getService(effectiveServiceId); if (service instanceof ModifiablePersistenceService modifiableService) { - modifiableService.store(item, timestamp, state, effectiveServiceId); + modifiableService.store(item, timestamp, state); return; } LoggerFactory.getLogger(PersistenceExtensions.class) @@ -178,8 +178,8 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable TimeZoneProvider tzProvider = timeZoneProvider; ZoneId timeZone = tzProvider != null ? tzProvider.getTimeZone() : ZoneId.systemDefault(); if (service instanceof ModifiablePersistenceService modifiableService) { - timeSeries.getStates().forEach( - s -> modifiableService.store(item, s.timestamp().atZone(timeZone), s.state(), effectiveServiceId)); + timeSeries.getStates() + .forEach(s -> modifiableService.store(item, s.timestamp().atZone(timeZone), s.state())); return; } LoggerFactory.getLogger(PersistenceExtensions.class) From f7f4b7653cbd95605b040edb2b109f01e7e52baa Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Wed, 5 Jun 2024 18:30:36 +0200 Subject: [PATCH 08/50] PersistenceExtensions: Support state as string for persist method (#4268) Signed-off-by: Florian Hotze --- .../extensions/PersistenceExtensions.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java index 42b08c4e447..6fa709b794d 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java @@ -41,6 +41,7 @@ import org.openhab.core.persistence.QueryablePersistenceService; import org.openhab.core.types.State; import org.openhab.core.types.TimeSeries; +import org.openhab.core.types.TypeParser; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -147,6 +148,42 @@ private static void internalPersist(Item item, ZonedDateTime timestamp, State st .warn("There is no modifiable persistence service registered with the id '{}'", effectiveServiceId); } + /** + * Persists a state at a given timestamp of an item through the default + * persistence service. + * + * @param item the item to store + * @param timestamp the date for the item state to be stored + * @param stateString the state to be stored + */ + public static void persist(Item item, ZonedDateTime timestamp, String stateString) { + internalPersist(item, timestamp, stateString, null); + } + + /** + * Persists a state at a given timestamp of an item through a + * {@link PersistenceService} identified by the serviceId. + * + * @param item the item + * @param timestamp the date for the item state to be stored + * @param stateString the state to be stored + * @param serviceId the name of the {@link PersistenceService} to use + */ + public static void persist(Item item, ZonedDateTime timestamp, String stateString, @Nullable String serviceId) { + internalPersist(item, timestamp, stateString, serviceId); + } + + private static void internalPersist(Item item, ZonedDateTime timestamp, String stateString, + @Nullable String serviceId) { + State state = TypeParser.parseState(item.getAcceptedDataTypes(), stateString); + if (state != null) { + internalPersist(item, timestamp, state, serviceId); + } else { + LoggerFactory.getLogger(PersistenceExtensions.class).warn("State '{}' cannot be parsed for item '{}'.", + stateString, item.getName()); + } + } + /** * Persists a timeSeries of an item through the default persistence service. * From 8e3ca9db44d520056e989608f27fb99716d0c29a Mon Sep 17 00:00:00 2001 From: Andrew Fiddian-Green Date: Sat, 8 Jun 2024 23:24:58 +0100 Subject: [PATCH 09/50] SddpDevice provide JavaDoc for fields (#4270) Signed-off-by: Andrew Fiddian-Green --- .../config/discovery/sddp/SddpDevice.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java index cc7b9d8f202..f911261f22c 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java @@ -27,18 +27,85 @@ @NonNullByDefault public class SddpDevice { + /** + * The network address of the device. + * For example: 192.168.4.237:1902 + */ public final String from; + + /** + * The host address of the device. + * For example: JVC_PROJECTOR-E0DADC152802 + * Note: the last 12 characters represent the MAC address of the device. + */ public final String host; + + /** + * The number of seconds after which the device shall no longer considered to be alive on the network. + * For example: 1800 (a String value). + */ public final String maxAge; + + /** + * The type of the device. Usually a colon delimited combination of a manufacturer id and a device type id. + * For example: JVCKENWOOD:Projector + */ public final String type; + + /** + * The id of the primary proxy that provides device services. + * For example: projector + */ public final String primaryProxy; + + /** + * A comma delimited list of proxies. + * For example: projector,thingy,etc + * Normally the first entry is the primary proxy. + */ public final String proxies; + + /** + * The device manufacturer. + * For example: JVCKENWOOD + */ public final String manufacturer; + + /** + * The model number of the device. + * For example: DLA-RS3100_NZ8 + */ public final String model; + + /** + * The driver id. + * For example: projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i + */ public final String driver; + + /** + * The dotted IP address part of the 'from' field. + * For example: 192.168.4.237 + */ public final String ipAddress; + + /** + * The port part of the 'from' field. + * For example: 1902 (a String value) + */ public final String port; + + /** + * The MAC address of the device as derived from the last 12 characters of the host field. + * It is presented in lower-case, dash delimited, format. + * For example: e0-da-dc-15-28-02 + * Therefore it may be used as a (unique) sub- part of a Thing UID. + */ public final String macAddress; + + /** + * The instant after which the device shall be considered as having left the network. + */ public final Instant expireInstant; /** From 2aacdcd4e8a6f2dcc5dca83a28267cd0e44f6cd6 Mon Sep 17 00:00:00 2001 From: joerg1985 <16140691+joerg1985@users.noreply.github.com> Date: Mon, 10 Jun 2024 20:39:11 +0200 Subject: [PATCH 10/50] Fixed a deadlock in the PoolBasedSequentialScheduledExecutorService (#4247) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörg Sautter --- ...sedSequentialScheduledExecutorService.java | 94 ++++++++++++++----- .../core/common/ThreadPoolManagerTest.java | 32 +++++++ 2 files changed, 104 insertions(+), 22 deletions(-) diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java index 3b49427cf62..4e6f6574d94 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java @@ -18,6 +18,7 @@ import java.util.IdentityHashMap; import java.util.List; import java.util.Set; +import java.util.WeakHashMap; import java.util.concurrent.Callable; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -31,9 +32,11 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; import java.util.function.Function; +import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; @@ -50,10 +53,13 @@ * @author Jörg Sautter - Initial contribution */ @NonNullByDefault -class PoolBasedSequentialScheduledExecutorService implements ScheduledExecutorService { +final class PoolBasedSequentialScheduledExecutorService implements ScheduledExecutorService { + + private static final WeakHashMap PENDING_BY_POOL = new WeakHashMap<>(); private final WorkQueueEntry empty; private final ScheduledThreadPoolExecutor pool; + private final AtomicInteger pending; private final List> scheduled; private final ScheduledFuture cleaner; private @Nullable WorkQueueEntry tail; @@ -75,6 +81,20 @@ public PoolBasedSequentialScheduledExecutorService(ScheduledThreadPoolExecutor p tail = empty; + // we need one pending counter per pool + synchronized (PENDING_BY_POOL) { + AtomicInteger fromCache = PENDING_BY_POOL.get(pool); + + if (fromCache == null) { + // set to one does ensure at least one thread more than tasks running + fromCache = new AtomicInteger(1); + + PENDING_BY_POOL.put(pool, fromCache); + } + + pending = fromCache; + } + // clean up to ensure we do not keep references to old tasks cleaner = this.scheduleWithFixedDelay(() -> { synchronized (this) { @@ -100,22 +120,24 @@ public PoolBasedSequentialScheduledExecutorService(ScheduledThreadPoolExecutor p tail = empty; } } - }, 2, 4, TimeUnit.SECONDS); + }, + // avoid cleaners of promptly created instances to run at the same time + (System.nanoTime() % 13), 8, TimeUnit.SECONDS); } @Override public ScheduledFuture schedule(@Nullable Runnable command, long delay, @Nullable TimeUnit unit) { return schedule((origin) -> pool.schedule(() -> { - // we block the thread here, in worst case new threads are spawned - submitToWorkQueue(origin.join(), command).join(); + // we might block the thread here, in worst case new threads are spawned + submitToWorkQueue(origin.join(), command, true).join(); }, delay, unit)); } @Override public ScheduledFuture schedule(@Nullable Callable callable, long delay, @Nullable TimeUnit unit) { return schedule((origin) -> pool.schedule(() -> { - // we block the thread here, in worst case new threads are spawned - return submitToWorkQueue(origin.join(), callable).join(); + // we might block the thread here, in worst case new threads are spawned + return submitToWorkQueue(origin.join(), callable, true).join(); }, delay, unit)); } @@ -126,13 +148,13 @@ public ScheduledFuture scheduleAtFixedRate(@Nullable Runnable command, long i CompletableFuture submitted; try { - // we block the thread here, in worst case new threads are spawned - submitted = submitToWorkQueue(origin.join(), command); + submitted = submitToWorkQueue(origin.join(), command, true); } catch (RejectedExecutionException ex) { // the pool has been shutdown, scheduled tasks should cancel return; } + // we might block the thread here, in worst case new threads are spawned submitted.join(); }, initialDelay, period, unit)); } @@ -144,13 +166,13 @@ public ScheduledFuture scheduleWithFixedDelay(@Nullable Runnable command, lon CompletableFuture submitted; try { - // we block the thread here, in worst case new threads are spawned - submitted = submitToWorkQueue(origin.join(), command); + submitted = submitToWorkQueue(origin.join(), command, true); } catch (RejectedExecutionException ex) { // the pool has been shutdown, scheduled tasks should cancel return; } + // we might block the thread here, in worst case new threads are spawned submitted.join(); }, initialDelay, delay, unit)); } @@ -255,20 +277,21 @@ public boolean awaitTermination(long timeout, @Nullable TimeUnit unit) throws In @Override public Future submit(@Nullable Callable task) { - return submitToWorkQueue(null, task); + return submitToWorkQueue(null, task, false); } - private CompletableFuture submitToWorkQueue(RunnableFuture origin, @Nullable Runnable task) { + private CompletableFuture submitToWorkQueue(RunnableFuture origin, @Nullable Runnable task, boolean inPool) { Callable callable = () -> { task.run(); return null; }; - return submitToWorkQueue(origin, callable); + return submitToWorkQueue(origin, callable, inPool); } - private CompletableFuture submitToWorkQueue(@Nullable RunnableFuture origin, @Nullable Callable task) { + private CompletableFuture submitToWorkQueue(@Nullable RunnableFuture origin, @Nullable Callable task, + boolean inPool) { BiFunction action = (result, error) -> { // ignore result & error, they are from the previous task try { @@ -278,22 +301,45 @@ private CompletableFuture submitToWorkQueue(@Nullable RunnableFuture o } catch (Exception ex) { // a small hack to throw the Exception unchecked throw PoolBasedSequentialScheduledExecutorService.unchecked(ex); + } finally { + pending.decrementAndGet(); } }; + RunnableCompletableFuture cf; + boolean runNow; + synchronized (this) { if (tail == null) { throw new RejectedExecutionException("this scheduled executor has been shutdown before"); } - RunnableCompletableFuture cf = tail.future.handleAsync(action, pool); + // set the core pool size even if it does not change, this triggers idle threads to stop + pool.setCorePoolSize(pending.incrementAndGet()); - cf.setCallable(task); + // avoid waiting for one pool thread to finish inside a pool thread + runNow = inPool && tail.future.isDone(); - tail = new WorkQueueEntry(tail, origin, cf); + if (runNow) { + cf = new RunnableCompletableFuture<>(task); + tail = new WorkQueueEntry(null, origin, cf); + } else { + cf = tail.future.handleAsync(action, pool); + cf.setCallable(task); + tail = new WorkQueueEntry(tail, origin, cf); + } + } - return cf; + if (runNow) { + // ensure we do not wait for one pool thread to finish inside another pool thread + try { + cf.run(); + } finally { + pending.decrementAndGet(); + } } + + return cf; } private static E unchecked(Exception ex) throws E { @@ -306,7 +352,7 @@ public Future submit(@Nullable Runnable task, T result) { task.run(); return result; - }); + }, false); } @Override @@ -343,7 +389,7 @@ public List> invokeAll(@Nullable Collection> futures = new ArrayList<>(); for (Callable task : tasks) { - futures.add(submitToWorkQueue(null, task).orTimeout(timeout, unit)); + futures.add(submitToWorkQueue(null, task, false).orTimeout(timeout, unit)); } // wait for all futures to complete @@ -381,7 +427,7 @@ private T invokeAny(@Nullable Collection> ta List> futures = new ArrayList<>(); for (Callable task : tasks) { - futures.add(submitToWorkQueue(null, task)); + futures.add(submitToWorkQueue(null, task, false)); } // wait for any future to complete @@ -452,7 +498,11 @@ static class RunnableCompletableFuture extends CompletableFuture implement private @Nullable Callable callable; public RunnableCompletableFuture() { - callable = null; + this.callable = null; + } + + public RunnableCompletableFuture(@Nullable Callable callable) { + this.callable = callable; } public void setCallable(@Nullable Callable callable) { diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java index d3b90550db6..e1c31abd59c 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java @@ -174,6 +174,38 @@ public void testSchedulingGetsBlockedByRegularTaskInSequentialExecutorService() assertFalse(latch.await(100, TimeUnit.MILLISECONDS)); } + @Test + public void testSchedulingDoesSpawnNewThreads() throws InterruptedException { + ScheduledExecutorService serviceA = ThreadPoolManager + .getPoolBasedSequentialScheduledExecutorService("unit-test", "thread-7"); + ScheduledExecutorService serviceB = ThreadPoolManager + .getPoolBasedSequentialScheduledExecutorService("unit-test", "thread-8"); + + for (int j = 0; j < 3; j++) { + CountDownLatch block = new CountDownLatch(1); + CountDownLatch check = new CountDownLatch(20); + + for (int i = 0; i < 20; i++) { + serviceA.schedule(() -> { + try { + block.await(); + } catch (InterruptedException e) { + + } + check.countDown(); + }, 1, TimeUnit.MILLISECONDS); + } + + Thread.sleep(80); + + serviceB.schedule(() -> { + block.countDown(); + }, 20, TimeUnit.MILLISECONDS); + + assertTrue(check.await(80, TimeUnit.MILLISECONDS)); + } + } + @Test public void testGetScheduledPool() { ThreadPoolExecutor result = ThreadPoolManager.getScheduledPoolUnwrapped("test1"); From 9b39f625e89fbe07478b54a31a00d50115d07188 Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Mon, 24 Jun 2024 02:40:17 +1000 Subject: [PATCH 11/50] RulesDSL: add triggeringGroup and triggeringGroupName to rule context (#4273) Signed-off-by: Jimmy Tanagra --- .../core/model/rule/jvmmodel/RulesJvmModelInferrer.xtend | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/jvmmodel/RulesJvmModelInferrer.xtend b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/jvmmodel/RulesJvmModelInferrer.xtend index 94a847dd0eb..c9e9da56903 100644 --- a/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/jvmmodel/RulesJvmModelInferrer.xtend +++ b/bundles/org.openhab.core.model.rule/src/org/openhab/core/model/rule/jvmmodel/RulesJvmModelInferrer.xtend @@ -131,6 +131,10 @@ class RulesJvmModelInferrer extends ScriptJvmModelInferrer { rule.toMethod("_" + rule.name, ruleModel.newTypeRef(Void.TYPE)) [ static = true if ((containsCommandTrigger(rule)) || (containsStateChangeTrigger(rule)) || (containsStateUpdateTrigger(rule))) { + val groupTypeRef = ruleModel.newTypeRef(Item) + parameters += rule.toParameter(VAR_TRIGGERING_GROUP, groupTypeRef) + val groupNameRef = ruleModel.newTypeRef(String) + parameters += rule.toParameter(VAR_TRIGGERING_GROUP_NAME, groupNameRef) val itemTypeRef = ruleModel.newTypeRef(Item) parameters += rule.toParameter(VAR_TRIGGERING_ITEM, itemTypeRef) val itemNameRef = ruleModel.newTypeRef(String) From 5578de155fe434f1834a0f496fec3c40da6977cb Mon Sep 17 00:00:00 2001 From: GiviMAD Date: Sun, 23 Jun 2024 23:02:32 +0200 Subject: [PATCH 12/50] [voice] Add hlis argument to interpret command (#4281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Álvarez --- .../VoiceConsoleCommandExtension.java | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceConsoleCommandExtension.java b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceConsoleCommandExtension.java index c3e5f473b17..d7a53cae1bf 100644 --- a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceConsoleCommandExtension.java +++ b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/VoiceConsoleCommandExtension.java @@ -101,7 +101,8 @@ public List getUsages() { return List.of(buildCommandUsage(SUBCMD_SAY + " ", "speaks a text"), buildCommandUsage( SUBCMD_TRANSCRIBE + " [--source ]|[--file ] [--stt ] [--locale ]", "transcribe audio from default source, optionally specify a different source/file, speech-to-text service or locale"), - buildCommandUsage(SUBCMD_INTERPRET + " ", "interprets a human language command"), + buildCommandUsage(SUBCMD_INTERPRET + " [--hlis ] ", + "interprets a human language command"), buildCommandUsage(SUBCMD_VOICES, "lists available voices of the TTS services"), buildCommandUsage(SUBCMD_DIALOGS, "lists the running dialog and their audio/voice services"), buildCommandUsage(SUBCMD_DIALOG_REGS, @@ -280,14 +281,31 @@ public void execute(String[] args, Console console) { } private void interpret(String[] args, Console console) { - StringBuilder sb = new StringBuilder(args[0]); - for (int i = 1; i < args.length; i++) { + @Nullable + String hliIdList = null; + String[] arguments; + if (args.length > 0 && "--hlis".equals(args[0])) { + if (args.length == 1) { + console.println("No hli id list provided."); + return; + } + hliIdList = args[1]; + arguments = Arrays.copyOfRange(args, 2, args.length); + } else { + arguments = args; + } + if (arguments.length == 0) { + console.println("No command provided."); + return; + } + StringBuilder sb = new StringBuilder(arguments[0]); + for (int i = 1; i < arguments.length; i++) { sb.append(" "); - sb.append(args[i]); + sb.append(arguments[i]); } String msg = sb.toString(); try { - String result = voiceManager.interpret(msg); + String result = voiceManager.interpret(msg, hliIdList); console.println(result); } catch (InterpretationException ie) { console.println(Objects.requireNonNullElse(ie.getMessage(), From 2e77bbc6f94a2ab937c1ffcba234a57363e35fa6 Mon Sep 17 00:00:00 2001 From: GiviMAD Date: Sun, 23 Jun 2024 23:06:19 +0200 Subject: [PATCH 13/50] [voice] Avoid text concatenation on speech recognition errors (#4278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [voice] Remove recognition error extra text and skip empty Signed-off-by: Miguel Álvarez --- .../org/openhab/core/voice/internal/DialogProcessor.java | 8 +++++--- .../src/main/resources/OH-INF/i18n/voice.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_cs.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_de.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_el.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_fi.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_fr.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_he.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_hu.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_it.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_nl.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_no.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_pl.properties | 1 - .../src/main/resources/OH-INF/i18n/voice_sl.properties | 1 - .../openhab/core/voice/internal/VoiceManagerImplTest.java | 2 +- 15 files changed, 6 insertions(+), 17 deletions(-) diff --git a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java index 38b45bc8e4c..25182e72098 100644 --- a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java +++ b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java @@ -362,12 +362,14 @@ public synchronized void sttEventReceived(STTEvent sttEvent) { logger.debug("RecognitionStopEvent event received"); toggleProcessing(false); } else if (sttEvent instanceof SpeechRecognitionErrorEvent sre) { - logger.debug("SpeechRecognitionErrorEvent event received"); + String message = sre.getMessage(); + logger.debug("SpeechRecognitionErrorEvent event received: {}", message); if (!isSTTServerAborting) { abortSTT(); toggleProcessing(false); - String text = i18nProvider.getText(bundle, "error.stt-error", null, dialogContext.locale()); - say(text == null ? sre.getMessage() : text.replace("{0}", sre.getMessage())); + if (!message.isEmpty()) { + say(message); + } } } } diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice.properties index 396b1a765c3..0be5f6ae7e3 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = TTS Cache Maximum Text Length system.config.voice.maxTextLengthCacheTTS.description = The maximum length of texts handled by the TTS cache (in character). If exceeded, will pass the text to the TTS without storing it. 0 for no limit. error.ks-error = Encountered error while spotting keywords, {0} -error.stt-error = Encountered error while recognizing text, {0} error.stt-exception = Error during recognition, {0} service.system.voice.label = Voice diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_cs.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_cs.properties index 3a1934678a6..68a8ef4e740 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_cs.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_cs.properties @@ -19,6 +19,5 @@ system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E error.ks-error = Chyba při hledání klíčových slov, {0} -error.stt-error = Při rozpoznávání textu došlo k chybě {0} error.stt-exception = Chyba během rozpoznání, {0} service.system.voice.label = Hlas diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_de.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_de.properties index 07f906b5a4d..6d3f99038a3 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_de.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_de.properties @@ -19,6 +19,5 @@ system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E error.ks-error = Ein Fehler ist bei der Erkennung des Keywords aufgetreten\: {0} -error.stt-error = Ein Fehler ist bei der Texterkennung aufgetreten\: {0} error.stt-exception = Ein Fehler ist bei der Spracherkennung aufgetreten\: {0} service.system.voice.label = Sprache diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_el.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_el.properties index 918ece1a1a7..8243a1bf93a 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_el.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_el.properties @@ -19,6 +19,5 @@ system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E error.ks-error = Παρουσιάστηκε σφάλμα κατά τον εντοπισμό λέξεων-κλειδιών, {0} -error.stt-error = Παρουσιάστηκε σφάλμα κατά την αναγνώριση κειμένου, {0} error.stt-exception = Σφάλμα κατά την αναγνώριση, {0} service.system.voice.label = Φωνή diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fi.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fi.properties index b5c95b7f6b7..aaf0453e835 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fi.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fi.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = TTS-puskurin tekstin enimmäis system.config.voice.maxTextLengthCacheTTS.description = TTS-puskurin käsittelemien tekstien enimmäispituus. Jos rajoitus ylitetään, välitetään teksti TTS-palvelulle ilman puskurointia. Arvo 0 poistaa rajoituksen. error.ks-error = Virhe havaittaessa avainsanoja, {0} -error.stt-error = Virhe tunnistettaessa tekstiä, {0} error.stt-exception = Virhe tunnistuksen aikana, {0} service.system.voice.label = Puheääni diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties index 5fde65d0e58..4afa3c08b65 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = Longueur maximale du texte pou system.config.voice.maxTextLengthCacheTTS.description = La longueur limite d'un texte géré par le cache TTS. Au-delà, le texte sera géré par le service TTS sans le stocker. 0 pour aucune limite. error.ks-error = Erreur rencontrée lors du repérage des mots clés, {0} -error.stt-error = Erreur rencontrée lors de la reconnaissance du texte, {0} error.stt-exception = Erreur lors de la reconnaissance, {0} service.system.voice.label = Voix diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_he.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_he.properties index 5dc40f8707e..b35dd030867 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_he.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_he.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = מטמון TTS אורך טקס system.config.voice.maxTextLengthCacheTTS.description = האורך המרבי של טקסטים המטופלים על ידי מטמון ה-TTS (בתווים). אם חורג, יעביר את הטקסט ל-TTS מבלי לאחסן אותו. 0 ללא הגבלה. error.ks-error = נתקל בשגיאה בעת איתור מילות מפתח, {0} -error.stt-error = נתקל בשגיאה בעת זיהוי טקסט, {0} error.stt-exception = שגיאה במהלך זיהוי, {0} service.system.voice.label = קול diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_hu.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_hu.properties index 84649bdfed5..825b447efd6 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_hu.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_hu.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = A TTS gyorsítótár maximáli system.config.voice.maxTextLengthCacheTTS.description = A TTS gyorsítótár maximális szöveghossza (karakterben). Az ennél hosszabb szöveget nem menti el, csak átadja a TTS-nek. 0 megadásával a korlát kikapcsolható. error.ks-error = Hiba történt a kulcsszavak észlelésekor, {0} -error.stt-error = Hiba történt a szöveg felismerésekor, {0} error.stt-exception = Hiba felismerés közben, {0} service.system.voice.label = Beszéd diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_it.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_it.properties index 01f16e46562..8c4b26fac1a 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_it.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_it.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = Lunghezza Massima del Testo De system.config.voice.maxTextLengthCacheTTS.description = La lunghezza limite di un testo gestito dalla cache TTS. Se superato, passerà al TTS senza memorizzarlo. 0 per nessun limite. error.ks-error = Errore rilevato durante l''individuazione delle parole chiave, {0} -error.stt-error = Errore rilevato durante il riconoscimento del testo, {0} error.stt-exception = Errore durante il riconoscimento, {0} service.system.voice.label = Voce diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties index 1d67e62b662..87d4651db31 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties @@ -19,6 +19,5 @@ system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E error.ks-error = Probleem bij het vinden van trefwoorden, {0} -error.stt-error = Probleem bij het herkennen van tekst, {0} error.stt-exception = Probleem tijdens herkenning, {0} service.system.voice.label = Spraak diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_no.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_no.properties index d5aa0e1d479..7941b75b0d4 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_no.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_no.properties @@ -19,6 +19,5 @@ system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E error.ks-error = Det oppstod feil under gjenkjenning av nøkkelord, {0} -error.stt-error = Det oppstod feil under gjenkjennelse av tekst, {0} error.stt-exception = Feil under gjenkjennelse, {0} service.system.voice.label = Stemme diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_pl.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_pl.properties index 839c69bdb9a..7f1f8fce0d4 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_pl.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_pl.properties @@ -25,6 +25,5 @@ system.config.voice.maxTextLengthCacheTTS.label = Maksymalna długość pamięci system.config.voice.maxTextLengthCacheTTS.description = Limit długości tekstu obsługiwanego przez pamięć podręczną TTS. Jeśli zostanie przekroczona, przejdzie do TTS bez zapisywania. 0 oznacza brak limitu. error.ks-error = Wystąpił błąd podczas punktowania słów kluczowych, {0} -error.stt-error = Wystąpił błąd podczas rozpoznawania tekstu, {0} error.stt-exception = Błąd podczas rozpoznawania, {0} service.system.voice.label = Głos diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_sl.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_sl.properties index 48d61f03b6f..91bb3b88500 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_sl.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_sl.properties @@ -19,6 +19,5 @@ system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E error.ks-error = Napaka pri opazovanju ključnih besed, {0} -error.stt-error = Napaka pri prepoznavanju besedila, {0} error.stt-exception = Napaka pri prepoznavanju, {0} service.system.voice.label = Glas diff --git a/itests/org.openhab.core.voice.tests/src/main/java/org/openhab/core/voice/internal/VoiceManagerImplTest.java b/itests/org.openhab.core.voice.tests/src/main/java/org/openhab/core/voice/internal/VoiceManagerImplTest.java index d5234c03f66..960068855ba 100644 --- a/itests/org.openhab.core.voice.tests/src/main/java/org/openhab/core/voice/internal/VoiceManagerImplTest.java +++ b/itests/org.openhab.core.voice.tests/src/main/java/org/openhab/core/voice/internal/VoiceManagerImplTest.java @@ -360,7 +360,7 @@ public void startDialogAndVerifyThatASpeechRecognitionErrorIsProperlyHandled() { assertFalse(sttService.isRecognized()); assertThat(hliStub.getQuestion(), is("")); assertThat(hliStub.getAnswer(), is("")); - assertThat(ttsService.getSynthesized(), is("Encountered error while recognizing text, STT error")); + assertThat(ttsService.getSynthesized(), is("STT error")); assertTrue(sink.getIsStreamProcessed()); voiceManager.stopDialog(source); From f150e8dd50d8cd80d86ac214ae437eb373899ab3 Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Mon, 24 Jun 2024 20:04:47 +0200 Subject: [PATCH 14/50] New Crowdin updates (#4280) * New translations units.properties (French) * New translations chart.properties (French) * New translations voice.properties (French) * New translations defaultsystemchannels.properties (French) * New translations addons.properties (French) * New translations voice.properties (French) * New translations voice.properties (Hebrew) * New translations voice.properties (Hungarian) --- .../OH-INF/i18n/DefaultSystemChannels_fr.properties | 2 ++ .../src/main/resources/OH-INF/i18n/chart_fr.properties | 5 +++++ .../src/main/resources/OH-INF/i18n/voice_fr.properties | 2 +- .../src/main/resources/OH-INF/i18n/addons_fr.properties | 2 ++ .../src/main/resources/OH-INF/i18n/units_fr.properties | 6 ++++++ 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_fr.properties diff --git a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fr.properties b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fr.properties index 31cef7c0f36..87ba6f0ae0f 100644 --- a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fr.properties +++ b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fr.properties @@ -56,3 +56,5 @@ channel-type.system.electric-voltage.label = Tension Électrique channel-type.system.electric-voltage.description = Tension électrique actuelle channel-type.system.electrical-energy.label = Énergie Électrique channel-type.system.electrical-energy.description = Énergie électrique actuelle +channel-type.system.uv-index.label = Indice UV +channel-type.system.uv-index.description = L'indice UV actuel diff --git a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fr.properties b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fr.properties index 750343df3b7..fbe7d10b2ac 100644 --- a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fr.properties +++ b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_fr.properties @@ -6,5 +6,10 @@ system.config.chart.scale.label = Mise à l'échelle system.config.chart.scale.description = Définit la mise à l'échelle à appliquer à la hauteur demandée du graphique (0,5 par exemple pour diviser par 2). system.config.chart.maxWidth.label = Largeur maximale system.config.chart.maxWidth.description = Définit la largeur maximale en pixels du graphique à construire. +system.config.sitemap.groupMembersSorting.label = Tri des membres d'un groupe +system.config.sitemap.groupMembersSorting.description = Définit comment les membres d'un groupe sont triés dans l'interface utilisateur. +system.config.sitemap.groupMembersSorting.option.NONE = Aucun tri +system.config.sitemap.groupMembersSorting.option.LABEL = Tri par libellé +system.config.sitemap.groupMembersSorting.option.NAME = Tri par nom service.system.chart.label = Graphiques diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties index 4afa3c08b65..aa63187589b 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties @@ -22,7 +22,7 @@ system.config.voice.enableCacheTTS.description = À activer pour permettre aux s system.config.voice.cacheSizeTTS.label = Taille du cache TTS system.config.voice.cacheSizeTTS.description = La taille limite du cache TTS (en kB). system.config.voice.maxTextLengthCacheTTS.label = Longueur maximale du texte pour le cache TTS -system.config.voice.maxTextLengthCacheTTS.description = La longueur limite d'un texte géré par le cache TTS. Au-delà, le texte sera géré par le service TTS sans le stocker. 0 pour aucune limite. +system.config.voice.maxTextLengthCacheTTS.description = La longueur maximale des textes gérés par le cache TTS (en nombre de caractères). Au-delà, le texte sera géré par le service TTS sans le stocker. 0 pour aucune limite. error.ks-error = Erreur rencontrée lors du repérage des mots clés, {0} error.stt-exception = Erreur lors de la reconnaissance, {0} diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties index 63e296db57f..671d4d2e309 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = Recherche de suggestions par IP system.config.addons.suggestionFinderIp.description = Utilise des diffusions de découverte de réseau IP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderMdns.label = Recherche de suggestions par mDNS system.config.addons.suggestionFinderMdns.description = Utilise l'analyse réseau mDNS pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. +system.config.addons.suggestionFinderSddp.label = Recherche de suggestions par SDDP +system.config.addons.suggestionFinderSddp.description = Utilise l'analyse réseau SDDP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderUpnp.label = Recherche de suggestions par UPnP system.config.addons.suggestionFinderUpnp.description = Utilise l'analyse réseau UPnP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderUsb.label = Recherche de suggestions par USB diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_fr.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_fr.properties new file mode 100644 index 00000000000..e06f253f38b --- /dev/null +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_fr.properties @@ -0,0 +1,6 @@ +system.config.units.currencyProvider.label = Fournisseur de devises +system.config.units.currencyProvider.description = Le service qui est utilisé pour fournir un ensemble de devises et leurs taux de change. +system.config.units.fixedBaseCurrency.label = Devise de base +system.config.units.fixedBaseCurrency.description = La devise de base de ce système lorsque le fournisseur de devises est utilisé pour retourner une devise fixe. + +service.system.units.label = Paramètres d'unité From 93b53e7847615e1aa533a8cf512a70772be3b9db Mon Sep 17 00:00:00 2001 From: lsiepel Date: Mon, 24 Jun 2024 21:06:15 +0200 Subject: [PATCH 15/50] Extend Stringutils with padRight (#4279) * Add padRight * Fix edge cases Signed-off-by: Leo Siepel --- .../org/openhab/core/util/StringUtils.java | 26 +++++++++++++++++-- .../openhab/core/util/StringUtilsTest.java | 12 +++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/util/StringUtils.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/util/StringUtils.java index 8ce58d788c0..73a9cc170ed 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/util/StringUtils.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/util/StringUtils.java @@ -15,6 +15,7 @@ import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; @@ -207,8 +208,29 @@ public class StringUtils { * @return the padded String */ public static String padLeft(@Nullable String str, int minSize, String padString) { - String paddedString = str == null ? "" : str; - return String.format("%" + minSize + "s", paddedString).replace(" ", padString); + String paddedString = Objects.requireNonNullElse(str, ""); + return paddedString.length() >= minSize ? paddedString + : padString.repeat(minSize - paddedString.length()) + paddedString; + } + + /** + * Pads the string from the right + * + *

    +      * padRight("9", 4, "0")        => "9000"
    +      * padRight("3112", 12, "*")    => "3112********"
    +      * padRight("openHAB", 4, "*")  => "openHAB"
    +     * 
    + * + * @param str the String to pad, may be null + * @param minSize the minimum String size to return + * @param padString the String to add when padding + * @return the padded String + */ + public static String padRight(@Nullable String str, int minSize, String padString) { + String paddedString = Objects.requireNonNullElse(str, ""); + return (paddedString.length() >= minSize) ? paddedString + : paddedString + padString.repeat(minSize - paddedString.length()); } /** diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/util/StringUtilsTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/util/StringUtilsTest.java index 4024604b787..f9bf14abe99 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/util/StringUtilsTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/util/StringUtilsTest.java @@ -102,6 +102,18 @@ public void padLeft() { assertEquals("AAAAAAp3RF@CT", StringUtils.padLeft("p3RF@CT", 13, "A")); assertEquals("nopaddingshouldhappen", StringUtils.padLeft("nopaddingshouldhappen", 21, "x")); assertEquals("LongerStringThenMinSize", StringUtils.padLeft("LongerStringThenMinSize", 10, "x")); + assertEquals("xxxhas space", StringUtils.padLeft("has space", 12, "x")); + } + + @Test + public void padRight() { + assertEquals("000000", StringUtils.padRight("", 6, "0")); + assertEquals("000000", StringUtils.padRight(null, 6, "0")); + assertEquals("teststr000", StringUtils.padRight("teststr", 10, "0")); + assertEquals("p3RF@CTAAAAAA", StringUtils.padRight("p3RF@CT", 13, "A")); + assertEquals("nopaddingshouldhappen", StringUtils.padRight("nopaddingshouldhappen", 21, "x")); + assertEquals("LongerStringThenMinSize", StringUtils.padRight("LongerStringThenMinSize", 10, "x")); + assertEquals("has spacexxx", StringUtils.padRight("has space", 12, "x")); } @Test From cb65e414453fa6d67634e0db4247bbe9d6071fac Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Tue, 25 Jun 2024 13:46:54 +0200 Subject: [PATCH 16/50] Persistence extensions, add lastChange and nextChange (#4259) * add lastChange and nextChange Signed-off-by: Mark Herwege --- .../extensions/PersistenceExtensions.java | 120 ++++++++++++++++-- .../extensions/PersistenceExtensionsTest.java | 22 ++++ 2 files changed, 132 insertions(+), 10 deletions(-) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java index 6fa709b794d..000b1ebbb23 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java @@ -60,6 +60,7 @@ * @author Jan N. Klug - Added interval methods and refactoring * @author Mark Herwege - Changed return types to State for some interval methods to also return unit * @author Mark Herwege - Extended for future dates + * @author Mark Herwege - lastChange and nextChange methods */ @Component(immediate = true) @NonNullByDefault @@ -323,9 +324,9 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable * Query the last historic update time of a given item. The default persistence service is used. * * @param item the item for which the last historic update time is to be returned - * @return point in time of the last historic update to item, or null if there are no - * historic persisted updates or the default persistence service is not available or not a - * {@link QueryablePersistenceService} + * @return point in time of the last historic update to item, null if there are no + * historic persisted updates, the state has changed since the last update or the default persistence + * service is not available or not a {@link QueryablePersistenceService} */ public static @Nullable ZonedDateTime lastUpdate(Item item) { return internalAdjacentUpdate(item, false, null); @@ -336,9 +337,9 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable * * @param item the item for which the last historic update time is to be returned * @param serviceId the name of the {@link PersistenceService} to use - * @return point in time of the last historic update to item, or null if there are no - * historic persisted updates or if persistence service given by serviceId does not refer to an - * available {@link QueryablePersistenceService} + * @return point in time of the last historic update to item, null if there are no + * historic persisted updates, the state has changed since the last update or if persistence service given + * by serviceId does not refer to an available {@link QueryablePersistenceService} */ public static @Nullable ZonedDateTime lastUpdate(Item item, @Nullable String serviceId) { return internalAdjacentUpdate(item, false, serviceId); @@ -371,6 +372,66 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable private static @Nullable ZonedDateTime internalAdjacentUpdate(Item item, boolean forward, @Nullable String serviceId) { + return internalAdjacent(item, forward, false, serviceId); + } + + /** + * Query the last historic change time of a given item. The default persistence service is used. + * + * @param item the item for which the last historic change time is to be returned + * @return point in time of the last historic change to item, null if there are no + * historic persisted changes, the state has changed since the last update or the default persistence + * service is not available or not a {@link QueryablePersistenceService} + */ + public static @Nullable ZonedDateTime lastChange(Item item) { + return internalAdjacentChange(item, false, null); + } + + /** + * Query for the last historic change time of a given item. + * + * @param item the item for which the last historic change time is to be returned + * @param serviceId the name of the {@link PersistenceService} to use + * @return point in time of the last historic change to item null if there are no + * historic persisted changes, the state has changed since the last update or if persistence service given + * by serviceId does not refer to an available {@link QueryablePersistenceService} + */ + public static @Nullable ZonedDateTime lastChange(Item item, @Nullable String serviceId) { + return internalAdjacentChange(item, false, serviceId); + } + + /** + * Query the first future change time of a given item. The default persistence service is used. + * + * @param item the item for which the first future change time is to be returned + * @return point in time of the first future change to item, or null if there are no + * future persisted changes or the default persistence service is not available or not a + * {@link QueryablePersistenceService} + */ + public static @Nullable ZonedDateTime nextChange(Item item) { + return internalAdjacentChange(item, true, null); + } + + /** + * Query for the first future change time of a given item. + * + * @param item the item for which the first future change time is to be returned + * @param serviceId the name of the {@link PersistenceService} to use + * @return point in time of the first future change to item, or null if there are no + * future persisted changes or if persistence service given by serviceId does not refer to an + * available {@link QueryablePersistenceService} + */ + public static @Nullable ZonedDateTime nextChange(Item item, @Nullable String serviceId) { + return internalAdjacentChange(item, true, serviceId); + } + + private static @Nullable ZonedDateTime internalAdjacentChange(Item item, boolean forward, + @Nullable String serviceId) { + return internalAdjacent(item, forward, true, serviceId); + } + + private static @Nullable ZonedDateTime internalAdjacent(Item item, boolean forward, boolean skipEqual, + @Nullable String serviceId) { String effectiveServiceId = serviceId == null ? getDefaultServiceId() : serviceId; if (effectiveServiceId == null) { return null; @@ -385,10 +446,49 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable filter.setEndDate(ZonedDateTime.now()); } filter.setOrdering(forward ? Ordering.ASCENDING : Ordering.DESCENDING); - filter.setPageSize(1); - Iterable result = qService.query(filter); - if (result.iterator().hasNext()) { - return result.iterator().next().getTimestamp(); + + filter.setPageSize(skipEqual ? 1000 : 1); + int startPage = 0; + filter.setPageNumber(startPage); + + Iterable items = qService.query(filter); + Iterator itemIterator = items.iterator(); + State state = item.getState(); + if (itemIterator.hasNext()) { + if (!skipEqual) { + HistoricItem historicItem = itemIterator.next(); + if (!forward && !historicItem.getState().equals(state)) { + // Last persisted state value different from current state value, so it must have updated since + // last persist. We do not know when. + return null; + } + return historicItem.getTimestamp(); + } else { + HistoricItem historicItem = itemIterator.next(); + int itemCount = 1; + if (!historicItem.getState().equals(state)) { + // Persisted state value different from current state value, so it must have changed, but we do + // not know when when looking backward. + return forward ? historicItem.getTimestamp() : null; + } + while (items != null) { + while (historicItem.getState().equals(state) && itemIterator.hasNext()) { + HistoricItem nextHistoricItem = itemIterator.next(); + itemCount++; + if (!nextHistoricItem.getState().equals(state)) { + return forward ? nextHistoricItem.getTimestamp() : historicItem.getTimestamp(); + } + historicItem = nextHistoricItem; + } + if (itemCount == filter.getPageSize()) { + filter.setPageNumber(++startPage); + items = qService.query(filter); + itemCount = 0; + } else { + items = null; + } + } + } } } else { LoggerFactory.getLogger(PersistenceExtensions.class) diff --git a/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java b/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java index 73a68d4c8dd..2e593a86045 100644 --- a/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java +++ b/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java @@ -1532,6 +1532,28 @@ public void testNextUpdate() { assertNull(nextUpdate); } + @Test + public void testLastChange() { + ZonedDateTime lastChange = PersistenceExtensions.lastChange(numberItem, SERVICE_ID); + assertNotNull(lastChange); + assertEquals(ZonedDateTime.of(HISTORIC_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), lastChange); + + // default persistence service + lastChange = PersistenceExtensions.lastChange(numberItem); + assertNull(lastChange); + } + + @Test + public void testNextChange() { + ZonedDateTime nextChange = PersistenceExtensions.nextChange(numberItem, SERVICE_ID); + assertNotNull(nextChange); + assertEquals(ZonedDateTime.of(FUTURE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), nextChange); + + // default persistence service + nextChange = PersistenceExtensions.nextChange(numberItem); + assertNull(nextChange); + } + @Test public void testDeltaSince() { State delta = PersistenceExtensions.deltaSince(numberItem, From d22e14a1e47bba8c1a38345a4da03c8a87e4a172 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Wed, 26 Jun 2024 21:25:13 +0200 Subject: [PATCH 17/50] Make input formatting for transformations consistent everywhere (#4203) Use item state formatter to format input of transformation, meaning using state.format(format) instead of String.format(format, state.toString()) This was already the case in sitemap API but not in other APIs used by Main UI. Make sure to call transformation even for NULL and UNDEF states. It was not the case in one API used by Main UI. When calling transformation and state is NULL or UNDEF, do not apply format to the input value and do not replace by "-". That means the transformation will be called with "NULL" or "UNDEF". Sitemap API was calling the transformation using a pattern containing "-". Fix #4101 Also related to discussion in openhab/openhab-addons#13777 Signed-off-by: Laurent Garnier --- .../rest/core/item/EnrichedItemDTOMapper.java | 57 +++++++----- .../internal/SseItemStatesEventBuilder.java | 58 ++++++++---- .../SseItemStatesEventBuilderTest.java | 88 ++++++++++++++++++- .../ui/internal/items/ItemUIRegistryImpl.java | 72 +++++++++------ .../items/ItemUIRegistryImplTest.java | 39 ++++++++ 5 files changed, 246 insertions(+), 68 deletions(-) diff --git a/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java b/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java index e6696647952..487083e0926 100644 --- a/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java +++ b/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java @@ -18,6 +18,8 @@ import java.util.List; import java.util.Locale; import java.util.function.Predicate; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.ws.rs.core.UriBuilder; @@ -30,9 +32,11 @@ import org.openhab.core.library.items.NumberItem; import org.openhab.core.transform.TransformationException; import org.openhab.core.transform.TransformationHelper; +import org.openhab.core.transform.TransformationService; +import org.openhab.core.types.State; import org.openhab.core.types.StateDescription; import org.openhab.core.types.StateDescriptionFragmentBuilder; -import org.osgi.framework.FrameworkUtil; +import org.openhab.core.types.UnDefType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,6 +49,8 @@ @NonNullByDefault public class EnrichedItemDTOMapper { + private static final Pattern EXTRACT_TRANSFORM_FUNCTION_PATTERN = Pattern.compile("(.*?)\\((.*)\\):(.*)"); + private static final Logger LOGGER = LoggerFactory.getLogger(EnrichedItemDTOMapper.class); /** @@ -79,8 +85,8 @@ private static EnrichedItemDTO map(Item item, ItemDTO itemDTO, boolean drillDown parents.add(item); } String state = item.getState().toFullString(); - String transformedState = considerTransformation(state, item, locale); - if (transformedState != null && transformedState.equals(state)) { + String transformedState = considerTransformation(item, locale); + if (state.equals(transformedState)) { transformedState = null; } StateDescription stateDescription = considerTransformation(item.getStateDescription(locale)); @@ -132,37 +138,48 @@ private static EnrichedItemDTO map(Item item, ItemDTO itemDTO, boolean drillDown if (stateDescription != null) { String pattern = stateDescription.getPattern(); if (pattern != null) { - try { - return TransformationHelper.isTransform(pattern) - ? StateDescriptionFragmentBuilder.create(stateDescription).withPattern(pattern).build() - .toStateDescription() - : stateDescription; - } catch (NoClassDefFoundError ex) { - // TransformationHelper is optional dependency, so ignore if class not found - // return state description as it is without transformation - } + return TransformationHelper.isTransform(pattern) + ? StateDescriptionFragmentBuilder.create(stateDescription).withPattern(pattern).build() + .toStateDescription() + : stateDescription; } } return stateDescription; } - private static @Nullable String considerTransformation(String state, Item item, @Nullable Locale locale) { + private static @Nullable String considerTransformation(Item item, @Nullable Locale locale) { StateDescription stateDescription = item.getStateDescription(locale); if (stateDescription != null) { String pattern = stateDescription.getPattern(); - if (pattern != null) { + Matcher matcher; + if (pattern != null && (matcher = EXTRACT_TRANSFORM_FUNCTION_PATTERN.matcher(pattern)).find()) { + State state = item.getState(); try { - return TransformationHelper.transform( - FrameworkUtil.getBundle(EnrichedItemDTOMapper.class).getBundleContext(), pattern, state); - } catch (NoClassDefFoundError ex) { - // TransformationHelper is optional dependency, so ignore if class not found - // return state as it is without transformation + String type = matcher.group(1); + String function = matcher.group(2); + String value = matcher.group(3); + TransformationService transformation = TransformationHelper.getTransformationService(type); + if (transformation != null) { + String format = state instanceof UnDefType ? "%s" : value; + try { + return transformation.transform(function, state.format(format)); + } catch (IllegalArgumentException e) { + throw new TransformationException( + "Cannot format state '" + state + "' to format '" + format + "'", e); + } catch (RuntimeException e) { + throw new TransformationException("Transformation service of type '" + type + + "' threw an exception: " + e.getMessage(), e); + } + } else { + throw new TransformationException( + "Transformation service of type '" + type + "' is not available."); + } } catch (TransformationException e) { LOGGER.warn("Failed transforming the state '{}' on item '{}' with pattern '{}': {}", state, item.getName(), pattern, e.getMessage()); } } } - return state; + return null; } } diff --git a/bundles/org.openhab.core.io.rest.sse/src/main/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilder.java b/bundles/org.openhab.core.io.rest.sse/src/main/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilder.java index 184eb5b2539..757197bdf2b 100644 --- a/bundles/org.openhab.core.io.rest.sse/src/main/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilder.java +++ b/bundles/org.openhab.core.io.rest.sse/src/main/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilder.java @@ -18,6 +18,8 @@ import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.measure.Unit; import javax.ws.rs.core.MediaType; @@ -37,6 +39,7 @@ import org.openhab.core.service.StartLevelService; import org.openhab.core.transform.TransformationException; import org.openhab.core.transform.TransformationHelper; +import org.openhab.core.transform.TransformationService; import org.openhab.core.types.State; import org.openhab.core.types.StateDescription; import org.openhab.core.types.StateOption; @@ -59,6 +62,8 @@ @NonNullByDefault public class SseItemStatesEventBuilder { + private static final Pattern EXTRACT_TRANSFORM_FUNCTION_PATTERN = Pattern.compile("(.*?)\\((.*)\\):(.*)"); + private final Logger logger = LoggerFactory.getLogger(SseItemStatesEventBuilder.class); private final ItemRegistry itemRegistry; @@ -113,22 +118,43 @@ public SseItemStatesEventBuilder(final @Reference ItemRegistry itemRegistry, State state = item.getState(); String displayState = state.toString(); - // NULL/UNDEF state is returned as "NULL"/"UNDEF" without considering anything else - if (!(state instanceof UnDefType)) { - if (stateDescription != null) { - boolean transformUsed = false; - boolean optionMatched = false; - String pattern = stateDescription.getPattern(); - // If there's a pattern, first check if it's a transformation - if (pattern != null && TransformationHelper.isTransform(pattern)) { - transformUsed = true; - try { - displayState = TransformationHelper.transform(pattern, state.toString()); - } catch (TransformationException e) { - logger.warn("Failed transforming the state '{}' on item '{}' with pattern '{}': {}", state, - item.getName(), pattern, e.getMessage()); + if (stateDescription != null) { + String pattern = stateDescription.getPattern(); + // First check if the pattern is a transformation + Matcher matcher; + if (pattern != null && (matcher = EXTRACT_TRANSFORM_FUNCTION_PATTERN.matcher(pattern)).find()) { + try { + String type = matcher.group(1); + String function = matcher.group(2); + String value = matcher.group(3); + TransformationService transformation = TransformationHelper.getTransformationService(type); + if (transformation != null) { + String format = state instanceof UnDefType ? "%s" : value; + try { + displayState = transformation.transform(function, state.format(format)); + if (displayState == null) { + displayState = state.toString(); + } + } catch (IllegalArgumentException e) { + throw new TransformationException( + "Cannot format state '" + state + "' to format '" + format + "'", e); + } catch (RuntimeException e) { + throw new TransformationException("Transformation service of type '" + type + + "' threw an exception: " + e.getMessage(), e); + } + } else { + throw new TransformationException( + "Transformation service of type '" + type + "' is not available."); } - } else if (!stateDescription.getOptions().isEmpty()) { + } catch (TransformationException e) { + logger.warn("Failed transforming the state '{}' on item '{}' with pattern '{}': {}", state, + item.getName(), pattern, e.getMessage()); + } + } + // If no transformation, NULL/UNDEF state is returned as "NULL"/"UNDEF" without considering anything else + else if (!(state instanceof UnDefType)) { + boolean optionMatched = false; + if (!stateDescription.getOptions().isEmpty()) { // Look for a state option with a value corresponding to the state for (StateOption option : stateDescription.getOptions()) { String label = option.getLabel(); @@ -146,7 +172,7 @@ public SseItemStatesEventBuilder(final @Reference ItemRegistry itemRegistry, } } } - if (pattern != null && !transformUsed && !optionMatched) { + if (pattern != null && !optionMatched) { // if it's not a transformation pattern and there is no matching state option, // then it must be a format string if (state instanceof QuantityType quantityState) { diff --git a/bundles/org.openhab.core.io.rest.sse/src/test/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilderTest.java b/bundles/org.openhab.core.io.rest.sse/src/test/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilderTest.java index fc4ee065b92..0057551fcbc 100644 --- a/bundles/org.openhab.core.io.rest.sse/src/test/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilderTest.java +++ b/bundles/org.openhab.core.io.rest.sse/src/test/java/org/openhab/core/io/rest/sse/internal/SseItemStatesEventBuilderTest.java @@ -30,6 +30,7 @@ import org.openhab.core.io.rest.LocaleService; import org.openhab.core.items.Item; import org.openhab.core.items.ItemRegistry; +import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.StringType; import org.openhab.core.service.StartLevelService; import org.openhab.core.transform.TransformationException; @@ -55,16 +56,23 @@ public class SseItemStatesEventBuilderTest { private static final String ITEM_NAME = "test"; private static final String ITEM_STATE_VALUE = "value"; private static final String ITEM_STATE_VALUE2 = "other"; + private static final int ITEM_STATE_VALUE3 = 16; private static final String ITEM_STATE_OPTION_LABEL = "The value"; private static final String PATTERN = "__ %s __"; - private static final String WRONG_PATTERN = "__ %d __"; + private static final String PATTERN2 = "__ %d __"; private static final String TRANSFORM_NAME = "TRANSFORM"; private static final String TRANSFORM_PATTERN = "Pattern"; private static final String TRANSFORM_FORMAT = "%s-1"; private static final String TRANSFORM_INPUT = String.format(TRANSFORM_FORMAT, ITEM_STATE_VALUE); - private static final String TRANSFORM_RESULT = "Result"; + private static final String TRANSFORM_INPUT2 = String.format(TRANSFORM_FORMAT, ITEM_STATE_VALUE2); + private static final String TRANSFORM_RESULT = "Result with string"; + private static final String TRANSFORM_FORMAT_NUMBER = "_%d_"; + private static final String TRANSFORM_INPUT3 = String.format(TRANSFORM_FORMAT_NUMBER, ITEM_STATE_VALUE3); + private static final String TRANSFORM_RESULT_NUMBER = "Result with number"; + private static final String TRANSFORM_RESULT_NULL = "State is NULL"; + private static final String TRANSFORM_RESULT_UNDEF = "State is UNDEF"; private @Mock @NonNullByDefault({}) ItemRegistry itemRegistryMock; private @Mock @NonNullByDefault({}) LocaleService localeServiceMock; @@ -85,6 +93,14 @@ public class SseItemStatesEventBuilderTest { public void init() throws TransformationException { Mockito.when(transformationServiceMock.transform(eq(TRANSFORM_PATTERN), eq(TRANSFORM_INPUT))) .thenAnswer(answer -> TRANSFORM_RESULT); + Mockito.when(transformationServiceMock.transform(eq(TRANSFORM_PATTERN), eq(TRANSFORM_INPUT2))) + .thenAnswer(answer -> null); + Mockito.when(transformationServiceMock.transform(eq(TRANSFORM_PATTERN), eq(TRANSFORM_INPUT3))) + .thenAnswer(answer -> TRANSFORM_RESULT_NUMBER); + Mockito.when(transformationServiceMock.transform(eq(TRANSFORM_PATTERN), eq("NULL"))) + .thenAnswer(answer -> TRANSFORM_RESULT_NULL); + Mockito.when(transformationServiceMock.transform(eq(TRANSFORM_PATTERN), eq("UNDEF"))) + .thenAnswer(answer -> TRANSFORM_RESULT_UNDEF); Mockito.when(serviceRefMock.getProperty(any())).thenReturn(TRANSFORM_NAME); @@ -139,7 +155,7 @@ public void getDisplayStateWhenMatchingStateOptionAndPattern() { @Test public void getDisplayStateWhenMatchingStateOptionAndWrongPattern() { - StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(WRONG_PATTERN) + StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(PATTERN2) .withOption(new StateOption(ITEM_STATE_VALUE, ITEM_STATE_OPTION_LABEL)).build().toStateDescription(); Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription); @@ -168,6 +184,14 @@ public void getDisplayStateWhenTransformAndNoStateOption() { Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE)); String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); assertEquals(TRANSFORM_RESULT, result); + + StateDescription stateDescription2 = StateDescriptionFragmentBuilder.create() + .withPattern(TRANSFORM_NAME + "(" + TRANSFORM_PATTERN + "):" + TRANSFORM_FORMAT_NUMBER).build() + .toStateDescription(); + Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription2); + Mockito.when(itemMock.getState()).thenReturn(new DecimalType(ITEM_STATE_VALUE3)); + result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(TRANSFORM_RESULT_NUMBER, result); } @Test @@ -179,6 +203,25 @@ public void getDisplayStateWhenTransformAndMatchingStateOption() { Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE)); String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); assertEquals(TRANSFORM_RESULT, result); + + StateDescription stateDescription2 = StateDescriptionFragmentBuilder.create() + .withPattern(TRANSFORM_NAME + "(" + TRANSFORM_PATTERN + "):" + TRANSFORM_FORMAT_NUMBER).build() + .toStateDescription(); + Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription2); + Mockito.when(itemMock.getState()).thenReturn(new DecimalType(ITEM_STATE_VALUE3)); + result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(TRANSFORM_RESULT_NUMBER, result); + } + + @Test + public void getDisplayStateWhenTransformReturningNull() { + StateDescription stateDescription = StateDescriptionFragmentBuilder.create() + .withPattern(TRANSFORM_NAME + "(" + TRANSFORM_PATTERN + "):" + TRANSFORM_FORMAT).build() + .toStateDescription(); + Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription); + Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE2)); + String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(ITEM_STATE_VALUE2, result); } @Test @@ -201,6 +244,28 @@ public void getDisplayStateWhenStateNull() { assertEquals("NULL", result); } + @Test + public void getDisplayStateWhenTransformAndStateUndef() { + StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(PATTERN) + .withPattern(TRANSFORM_NAME + "(" + TRANSFORM_PATTERN + "):" + TRANSFORM_FORMAT_NUMBER).build() + .toStateDescription(); + Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription); + Mockito.when(itemMock.getState()).thenReturn(UnDefType.UNDEF); + String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(TRANSFORM_RESULT_UNDEF, result); + } + + @Test + public void getDisplayStateWhenTransformAndStateNull() { + StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(PATTERN) + .withPattern(TRANSFORM_NAME + "(" + TRANSFORM_PATTERN + "):" + TRANSFORM_FORMAT_NUMBER).build() + .toStateDescription(); + Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription); + Mockito.when(itemMock.getState()).thenReturn(UnDefType.NULL); + String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(TRANSFORM_RESULT_NULL, result); + } + @Test public void getDisplayStateWhenPatternProvided() { StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(PATTERN).build() @@ -209,11 +274,18 @@ public void getDisplayStateWhenPatternProvided() { Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE)); String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); assertEquals(String.format(PATTERN, ITEM_STATE_VALUE), result); + + StateDescription stateDescription2 = StateDescriptionFragmentBuilder.create().withPattern(PATTERN2).build() + .toStateDescription(); + Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription2); + Mockito.when(itemMock.getState()).thenReturn(new DecimalType(ITEM_STATE_VALUE3)); + result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(String.format(PATTERN2, ITEM_STATE_VALUE3), result); } @Test public void getDisplayStateWhenWrongPatternProvided() { - StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(WRONG_PATTERN).build() + StateDescription stateDescription = StateDescriptionFragmentBuilder.create().withPattern(PATTERN2).build() .toStateDescription(); Mockito.when(itemMock.getStateDescription(eq(Locale.ENGLISH))).thenReturn(stateDescription); Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE)); @@ -228,6 +300,10 @@ public void getDisplayStateWhenNoPatternProvided() { Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE)); String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); assertEquals(ITEM_STATE_VALUE, result); + + Mockito.when(itemMock.getState()).thenReturn(new DecimalType(ITEM_STATE_VALUE3)); + result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(String.format("%d", ITEM_STATE_VALUE3), result); } @Test @@ -236,5 +312,9 @@ public void getDisplayStateWhenNoStateDescription() { Mockito.when(itemMock.getState()).thenReturn(new StringType(ITEM_STATE_VALUE)); String result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); assertEquals(ITEM_STATE_VALUE, result); + + Mockito.when(itemMock.getState()).thenReturn(new DecimalType(ITEM_STATE_VALUE3)); + result = sseItemStatesEventBuilder.getDisplayState(itemMock, Locale.ENGLISH); + assertEquals(String.format("%d", ITEM_STATE_VALUE3), result); } } diff --git a/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/items/ItemUIRegistryImpl.java b/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/items/ItemUIRegistryImpl.java index 36f803ead47..f5eccaf2b4d 100644 --- a/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/items/ItemUIRegistryImpl.java +++ b/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/items/ItemUIRegistryImpl.java @@ -86,7 +86,6 @@ import org.openhab.core.types.StateOption; import org.openhab.core.types.UnDefType; import org.openhab.core.types.util.UnitUtils; -import org.openhab.core.ui.internal.UIActivator; import org.openhab.core.ui.items.ItemUIProvider; import org.openhab.core.ui.items.ItemUIRegistry; import org.osgi.framework.Constants; @@ -341,7 +340,7 @@ private Switch createPlayerButtons() { String itemName = w.getItem(); if (itemName == null || itemName.isBlank()) { - return transform(label, true, null); + return transform(label, true, null, null); } String labelMappedOption = null; @@ -373,7 +372,7 @@ private Switch createPlayerButtons() { state = item.getState(); if (formatPattern.contains("%d")) { - if (!(state instanceof Number)) { + if (!(state instanceof UnDefType) && !(state instanceof Number)) { // States which do not provide a Number will be converted to DecimalType. // e.g.: GroupItem can provide a count of items matching the active state // for some group functions. @@ -390,13 +389,25 @@ private Switch createPlayerButtons() { } boolean considerTransform = false; + String transformFailbackValue = null; if (formatPattern != null) { if (formatPattern.isEmpty()) { label = label.substring(0, label.indexOf("[")).trim(); } else { - if (state == null || state instanceof UnDefType) { + if (state == null) { formatPattern = formatUndefined(formatPattern); considerTransform = true; + } else if (state instanceof UnDefType) { + Matcher matcher = EXTRACT_TRANSFORM_FUNCTION_PATTERN.matcher(formatPattern); + if (matcher.find()) { + considerTransform = true; + String type = matcher.group(1); + String function = matcher.group(2); + formatPattern = type + "(" + function + "):" + state.toString(); + transformFailbackValue = "-"; + } else { + formatPattern = formatUndefined(formatPattern); + } } else { // if the channel contains options, we build a label with the mapped option value if (stateDescription != null) { @@ -457,9 +468,10 @@ private Switch createPlayerButtons() { if (matcher.find()) { considerTransform = true; String type = matcher.group(1); - String pattern = matcher.group(2); + String function = matcher.group(2); String value = matcher.group(3); - formatPattern = type + "(" + pattern + "):" + state.format(value); + formatPattern = type + "(" + function + "):" + state.format(value); + transformFailbackValue = state.toString(); } else { formatPattern = state.format(formatPattern); } @@ -478,7 +490,7 @@ private Switch createPlayerButtons() { } } - return transform(label, considerTransform, labelMappedOption); + return transform(label, considerTransform, transformFailbackValue, labelMappedOption); } @Override @@ -619,36 +631,40 @@ private String insertInLabel(String label, Object o) { * If the value does not start with the call to a transformation service, * we return the label with the mapped option value if provided (not null). */ - private String transform(String label, boolean matchTransform, @Nullable String labelMappedOption) { + private String transform(String label, boolean matchTransform, @Nullable String transformFailbackValue, + @Nullable String labelMappedOption) { String ret = label; String formatPattern = getFormatPattern(label); if (formatPattern != null) { Matcher matcher = EXTRACT_TRANSFORM_FUNCTION_PATTERN.matcher(formatPattern); if (matchTransform && matcher.find()) { String type = matcher.group(1); - String pattern = matcher.group(2); + String function = matcher.group(2); String value = matcher.group(3); - TransformationService transformation = TransformationHelper - .getTransformationService(UIActivator.getContext(), type); - if (transformation != null) { - try { - String transformationResult = transformation.transform(pattern, value); - if (transformationResult != null) { - ret = insertInLabel(label, transformationResult); - } else { - logger.warn("transformation of type {} did not return a valid result", type); - ret = insertInLabel(label, UnDefType.NULL); + String failbackValue = transformFailbackValue != null ? transformFailbackValue : value; + try { + TransformationService transformation = TransformationHelper.getTransformationService(type); + if (transformation != null) { + try { + String transformationResult = transformation.transform(function, value); + if (transformationResult != null) { + ret = insertInLabel(label, transformationResult); + } else { + logger.warn("Transformation of type {} did not return a valid result", type); + ret = insertInLabel(label, failbackValue); + } + } catch (RuntimeException e) { + throw new TransformationException("Transformation service of type '" + type + + "' threw an exception: " + e.getMessage(), e); } - } catch (TransformationException e) { - logger.error("transformation throws exception [transformation={}, value={}]", transformation, - value, e); - ret = insertInLabel(label, value); + } else { + throw new TransformationException( + "Transformation service of type '" + type + "' is not available."); } - } else { - logger.warn( - "couldn't transform value in label because transformationService of type '{}' is unavailable", - type); - ret = insertInLabel(label, value); + } catch (TransformationException e) { + logger.warn("Failed transforming the value '{}' with pattern '{}': {}", value, formatPattern, + e.getMessage()); + ret = insertInLabel(label, failbackValue); } } else if (labelMappedOption != null) { ret = labelMappedOption; diff --git a/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java b/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java index 9470c347fc5..5cc7388ce16 100644 --- a/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java +++ b/bundles/org.openhab.core.ui/src/test/java/org/openhab/core/ui/internal/items/ItemUIRegistryImplTest.java @@ -809,6 +809,45 @@ public void getLabelTransformationContainingPercentS() throws ItemNotFoundExcept assertEquals("Memory [State]", label); } + @Test + public void getLabelFailingTransformation() throws ItemNotFoundException { + String testLabel = "Memory [FOO(echo %s):__%d__]"; + Widget w = mock(Widget.class); + Item item = mock(Item.class); + when(w.getLabel()).thenReturn(testLabel); + when(w.getItem()).thenReturn(ITEM_NAME); + when(registryMock.getItem(ITEM_NAME)).thenReturn(item); + when(item.getState()).thenReturn(new DecimalType(11)); + String label = uiRegistry.getLabel(w); + assertEquals("Memory [11]", label); + } + + @Test + public void getLabelFailingTransformationWithNullState() throws ItemNotFoundException { + String testLabel = "Memory [FOO(echo %s):__%d__]"; + Widget w = mock(Widget.class); + Item item = mock(Item.class); + when(w.getLabel()).thenReturn(testLabel); + when(w.getItem()).thenReturn(ITEM_NAME); + when(registryMock.getItem(ITEM_NAME)).thenReturn(item); + when(item.getState()).thenReturn(UnDefType.NULL); + String label = uiRegistry.getLabel(w); + assertEquals("Memory [-]", label); + } + + @Test + public void getLabelFailingTransformationWithUndefState() throws ItemNotFoundException { + String testLabel = "Memory [FOO(echo %s):__%d__]"; + Widget w = mock(Widget.class); + Item item = mock(Item.class); + when(w.getLabel()).thenReturn(testLabel); + when(w.getItem()).thenReturn(ITEM_NAME); + when(registryMock.getItem(ITEM_NAME)).thenReturn(item); + when(item.getState()).thenReturn(UnDefType.UNDEF); + String label = uiRegistry.getLabel(w); + assertEquals("Memory [-]", label); + } + @Test public void getLabelColorLabelWithDecimalValue() { String testLabel = "Label [%.3f]"; From 1a33e23fef9e30a1bcbcab49c6fb3b1012687e39 Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Sun, 30 Jun 2024 10:38:54 +0200 Subject: [PATCH 18/50] New Crowdin updates (#4285) * New translations validation.properties (Dutch) * New translations addons.properties (Dutch) * New translations voice.properties (Dutch) * New translations automation.properties (Dutch) * New translations scriptprofile.properties (Dutch) * New translations units.properties (Dutch) * New translations systemprofiles.properties (Dutch) * New translations defaultsystemchannels.properties (Dutch) * New translations chart.properties (Dutch) * New translations magic.properties (Dutch) * New translations jsr223.properties (Dutch) * New translations languagesupport.properties (Portuguese) * New translations languagesupport.properties (Portuguese, Brazilian) --- .../OH-INF/i18n/jsr223_nl.properties | 21 +++++++ .../OH-INF/i18n/scriptprofile_nl.properties | 8 +++ .../OH-INF/i18n/automation_nl.properties | 56 ++++++++++++------- .../OH-INF/i18n/validation_nl.properties | 4 ++ .../resources/OH-INF/i18n/magic_nl.properties | 16 ++++++ .../i18n/DefaultSystemChannels_nl.properties | 2 + .../OH-INF/i18n/SystemProfiles_nl.properties | 4 +- .../resources/OH-INF/i18n/chart_nl.properties | 5 ++ .../resources/OH-INF/i18n/voice_nl.properties | 6 ++ .../OH-INF/i18n/addons_nl.properties | 10 ++++ .../resources/OH-INF/i18n/units_nl.properties | 6 ++ 11 files changed, 115 insertions(+), 23 deletions(-) create mode 100644 bundles/org.openhab.core.automation.module.script.rulesupport/src/main/resources/OH-INF/i18n/jsr223_nl.properties create mode 100644 bundles/org.openhab.core.automation.module.script/src/main/resources/OH-INF/i18n/scriptprofile_nl.properties create mode 100644 bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_nl.properties diff --git a/bundles/org.openhab.core.automation.module.script.rulesupport/src/main/resources/OH-INF/i18n/jsr223_nl.properties b/bundles/org.openhab.core.automation.module.script.rulesupport/src/main/resources/OH-INF/i18n/jsr223_nl.properties new file mode 100644 index 00000000000..674e6faee13 --- /dev/null +++ b/bundles/org.openhab.core.automation.module.script.rulesupport/src/main/resources/OH-INF/i18n/jsr223_nl.properties @@ -0,0 +1,21 @@ +# jsr223.ScriptedAction + +module-type.jsr223.ScriptedAction.label = Actie script +module-type.jsr223.ScriptedAction.description = maakt het uitvoeren van een method die is gedefinieerd door een script mogelijk +module-type.jsr223.ScriptedAction.config.privId.description = de identifier van de private method +module-type.jsr223.ScriptedAction.output.result.label = resultaat +module-type.jsr223.ScriptedAction.output.result.description = het resultaat van het script. + +# jsr223.ScriptedCondition + +module-type.jsr223.ScriptedCondition.label = Voorwaarde script +module-type.jsr223.ScriptedCondition.description = maakt de definitie van een voorwaarde met een script mogelijk +module-type.jsr223.ScriptedCondition.config.privId.description = de identifier van de private method + +# jsr223.ScriptedTrigger + +module-type.jsr223.ScriptedTrigger.label = Trigger script +module-type.jsr223.ScriptedTrigger.description = maakt het uitvoeren van een method die is gedefinieerd door een script mogelijk +module-type.jsr223.ScriptedTrigger.config.privId.description = de identifier van de private method +module-type.jsr223.ScriptedTrigger.output.triggerOutput.label = TriggerOutput label +module-type.jsr223.ScriptedTrigger.output.triggerOutput.description = Tekst van de trigger diff --git a/bundles/org.openhab.core.automation.module.script/src/main/resources/OH-INF/i18n/scriptprofile_nl.properties b/bundles/org.openhab.core.automation.module.script/src/main/resources/OH-INF/i18n/scriptprofile_nl.properties new file mode 100644 index 00000000000..7b6a19d0f75 --- /dev/null +++ b/bundles/org.openhab.core.automation.module.script/src/main/resources/OH-INF/i18n/scriptprofile_nl.properties @@ -0,0 +1,8 @@ +profile.config.transform.SCRIPT.commandFromItemScript.label = Item Command Naar Thing Transformatie +profile.config.transform.SCRIPT.commandFromItemScript.description = Het Script voor het transformeren van commands van het item naar de Thing handler. Het script kan null retourneren om de commands te verwijderen en ze niet door te geven. +profile.config.transform.SCRIPT.stateFromItemScript.label = Item Waarde Naar Thing Transformatie +profile.config.transform.SCRIPT.stateFromItemScript.description = Het Script voor het transformeren van waarden van het item naar de Thing handler. Het script kan null retourneren om de waarden te verwijderen en ze niet door te geven. +profile.config.transform.SCRIPT.toHandlerScript.label = Item Naar Thing Transformatie (DEPRECATED) +profile.config.transform.SCRIPT.toHandlerScript.description = Het script voor het transformeren van commands van het item naar de Thing handler. Het script kan null terugsturen om de commands te verwijderen en ze niet door te geven. Dit wordt niet meer ondersteund en is vervangen door 'commandFromItemScript'. +profile.config.transform.SCRIPT.toItemScript.label = Thing Naar Item Transformatie +profile.config.transform.SCRIPT.toItemScript.description = Het Script voor het transformeren van waarde updates en commands van de Thing handler naar het item. Het script kan null retourneren om de waarde updates/commands te verwijderen en ze niet door te geven. diff --git a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation_nl.properties b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation_nl.properties index 1eda9757fed..6a057dfae78 100644 --- a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation_nl.properties +++ b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation_nl.properties @@ -26,23 +26,29 @@ module-type.core.GenericCompareCondition.input.input.description = De invoer zal module-type.core.GenericEventCondition.label = Gebeurtenis Voorwaarde module-type.core.GenericEventCondition.description = Voorwaarde voor gebeurtenissen -module-type.core.GenericEventCondition.config.topic.description = onderwerp moet overeenkomen -module-type.core.GenericEventCondition.config.eventType.description = eventType moet overeenkomen -module-type.core.GenericEventCondition.config.source.description = bron moet overeenkomen -module-type.core.GenericEventCondition.config.payload.description = payload moet overeenkomen +module-type.core.GenericEventCondition.config.topic.label = Onderwerp +module-type.core.GenericEventCondition.config.topic.description = het onderwerp, als een bestandssysteem glob (*, ** en {} operators). zal overeenkomen met alle events indien leeg +module-type.core.GenericEventCondition.config.source.label = Bron +module-type.core.GenericEventCondition.config.source.description = de bron van het event (bijv. org.openhab.core.expire, etc.). zal overeenkomen met alle events indien leeg +module-type.core.GenericEventCondition.config.types.label = Event Type +module-type.core.GenericEventCondition.config.types.description = het event type waar de trigger moet naar luisteren. meerdere types kunnen, door een komma gescheiden, worden opgegeven. zal evereenkomen met alle events indien leeg +module-type.core.GenericEventCondition.config.payload.label = Event Inhoud +module-type.core.GenericEventCondition.config.payload.description = Een regex die overeenkomt met de geserialiseerde inhoud van het event. zal overeenkomen met alle events indien leeg module-type.core.GenericEventCondition.input.event.label = Gebeurtenis -module-type.core.GenericEventCondition.input.event.description = De gebeurtenissen die zijn verzonden. +module-type.core.GenericEventCondition.input.event.description = Het verzonden event. # core.GenericEventTrigger module-type.core.GenericEventTrigger.label = Basis GebeurtenisTrigger module-type.core.GenericEventTrigger.description = Triggert regels op gebeurtenissen -module-type.core.GenericEventTrigger.config.eventTopic.label = Onderwerp -module-type.core.GenericEventTrigger.config.eventTopic.description = Dit is het onderwerp, de trigger zal luisteren naar\: >>openhab/*<< -module-type.core.GenericEventTrigger.config.eventSource.label = Bron -module-type.core.GenericEventTrigger.config.eventSource.description = Dit is de bron van de gebeurtenis (bijv. itemnaam) -module-type.core.GenericEventTrigger.config.eventTypes.label = Gebeurtenistype -module-type.core.GenericEventTrigger.config.eventTypes.description = het gebeurtenistype waar de trigger moet naar luisteren. Meerdere types kunnen, door een komma gescheiden, worden opgegeven +module-type.core.GenericEventTrigger.config.topic.label = Onderwerp +module-type.core.GenericEventTrigger.config.topic.description = het onderwerp, als een bestandssysteem glob (*, ** en {} operators). zal overeenkomen met alle events indien leeg +module-type.core.GenericEventTrigger.config.source.label = Bron +module-type.core.GenericEventTrigger.config.source.description = de bron van het event (bijv. org.openhab.core.expire, etc.). zal overeenkomen met alle events indien leeg +module-type.core.GenericEventTrigger.config.types.label = Event Type +module-type.core.GenericEventTrigger.config.types.description = het event type waar de trigger moet naar luisteren. meerdere types kunnen, door een komma gescheiden, worden opgegeven. zal overeenkomen met alle events indien leeg +module-type.core.GenericEventTrigger.config.payload.label = Event Inhoud +module-type.core.GenericEventTrigger.config.payload.description = Een regex die overeenkomt met de geserialiseerde inhoud van het event. zal overeenkomen met alle events indien leeg module-type.core.GenericEventTrigger.output.event.label = Gebeurtenis module-type.core.GenericEventTrigger.output.event.description = De gebeurtenissen die zijn verzonden. @@ -60,6 +66,8 @@ module-type.core.GroupCommandTrigger.config.command.option.OPEN = OPEN module-type.core.GroupCommandTrigger.config.command.option.CLOSED = GESLOTEN module-type.core.GroupCommandTrigger.config.command.option.UP = OMHOOG module-type.core.GroupCommandTrigger.config.command.option.DOWN = OMLAAG +module-type.core.GroupCommandTrigger.output.triggeringGroup.label = Triggering Groep +module-type.core.GroupCommandTrigger.output.triggeringGroup.description = de item groep waartoe het item behoort module-type.core.GroupCommandTrigger.output.triggeringItem.label = Triggering item module-type.core.GroupCommandTrigger.output.triggeringItem.description = het lid van de groep dat het commando heeft ontvangen module-type.core.GroupCommandTrigger.output.command.label = Commando @@ -112,6 +120,8 @@ module-type.core.GroupStateUpdateTrigger.config.state.option.OPEN = OPEN module-type.core.GroupStateUpdateTrigger.config.state.option.CLOSED = GESLOTEN module-type.core.GroupStateUpdateTrigger.config.state.option.UP = OMHOOG module-type.core.GroupStateUpdateTrigger.config.state.option.DOWN = OMLAAG +module-type.core.GroupStateUpdateTrigger.output.triggeringGroup.label = Triggering Groep +module-type.core.GroupStateUpdateTrigger.output.triggeringGroup.description = de item groep waartoe het item behoort module-type.core.GroupStateUpdateTrigger.output.triggeringItem.label = Triggering Item module-type.core.GroupStateUpdateTrigger.output.triggeringItem.description = het lid van de groep dat zijn status deed updaten module-type.core.GroupStateUpdateTrigger.output.state.label = Status @@ -245,21 +255,21 @@ module-type.core.ItemStateUpdateTrigger.output.event.description = De verzonden # core.RuleEnablementAction -module-type.core.RuleEnablementAction.label = schakelt regels in of uit -module-type.core.RuleEnablementAction.description = Schakelt een regel of groep van regels op basis van hun UID's in of uit. -module-type.core.RuleEnablementAction.config.enable.label = Regels inschakelen -module-type.core.RuleEnablementAction.config.enable.description = 'true' activeert alle opgegeven regels, 'false' deactiveert deze. +module-type.core.RuleEnablementAction.label = scènes, scripts en rules in- of uitschakelen +module-type.core.RuleEnablementAction.description = Schakelt één enkele of een groep van de door hun UID's gespecificeerde in of uit. +module-type.core.RuleEnablementAction.config.enable.label = Inschakelen/Uitschakelen +module-type.core.RuleEnablementAction.config.enable.description = 'true' activeert al de opgegeven, 'false' deactiveert deze. module-type.core.RuleEnablementAction.config.enable.option.true = Inschakelen module-type.core.RuleEnablementAction.config.enable.option.false = Uitschakelen -module-type.core.RuleEnablementAction.config.ruleUIDs.label = Regels -module-type.core.RuleEnablementAction.config.ruleUIDs.description = Specificeert de regels die ingeschakeld of uitgeschakeld moeten worden. +module-type.core.RuleEnablementAction.config.ruleUIDs.label = Scènes, scripts & rules +module-type.core.RuleEnablementAction.config.ruleUIDs.description = Specificeert deze die ingeschakeld of uitgeschakeld moeten worden. # core.RunRuleAction -module-type.core.RunRuleAction.label = regels uitvoeren -module-type.core.RunRuleAction.description = uitvoeren van een regel of groep van regels op basis van hun UID's. -module-type.core.RunRuleAction.config.ruleUIDs.label = Regels -module-type.core.RunRuleAction.config.ruleUIDs.description = Specificeert de doelregel(s) die moeten worden uitgevoerd. +module-type.core.RunRuleAction.label = uitvoeren van scènes, scripts & rules +module-type.core.RunRuleAction.description = Voert één enkele of een groep van de door hun UID's gespecificeerde uit. +module-type.core.RunRuleAction.config.ruleUIDs.label = Scènes, scripts & rules +module-type.core.RunRuleAction.config.ruleUIDs.description = Geeft de scène(s), script(s) & rule(s) die moeten worden uitgevoerd. module-type.core.RunRuleAction.config.considerConditions.label = Condities Overwegen module-type.core.RunRuleAction.config.considerConditions.description = Geeft aan of de condities van de uit te voeren doelregel(s) moeten worden overwogen of niet. module-type.core.RunRuleAction.config.considerConditions.option.true = Ja @@ -382,6 +392,10 @@ module-type.timer.DateTimeTrigger.label = het is een datum en tijd opgegeven in module-type.timer.DateTimeTrigger.description = Triggert op een tijdstip opgegeven in een item module-type.timer.DateTimeTrigger.config.itemName.label = Item module-type.timer.DateTimeTrigger.config.itemName.description = de naam van het item +module-type.timer.DateTimeTrigger.config.timeOnly.label = Enkel tijdstip +module-type.timer.DateTimeTrigger.config.timeOnly.description = Geeft aan of alleen de tijd van het item moet worden vergeleken, of de datum en tijd. +module-type.timer.DateTimeTrigger.config.timeOnly.option.true = Ja +module-type.timer.DateTimeTrigger.config.timeOnly.option.false = Nee # timer.DayOfWeekCondition diff --git a/bundles/org.openhab.core.config.core/src/main/resources/OH-INF/i18n/validation_nl.properties b/bundles/org.openhab.core.config.core/src/main/resources/OH-INF/i18n/validation_nl.properties index a9c4afc833d..2f65a12026f 100644 --- a/bundles/org.openhab.core.config.core/src/main/resources/OH-INF/i18n/validation_nl.properties +++ b/bundles/org.openhab.core.config.core/src/main/resources/OH-INF/i18n/validation_nl.properties @@ -11,3 +11,7 @@ min_value_numeric_violated=De waarde mag niet kleiner zijn dan {0}. pattern_violated=De waarde {0} komt niet overeen met het patroon {1}. options_violated=De waarde {0} komt niet overeen met de toegestane parameteropties. Toegestane opties zijn\: {1} multiple_limit_violated=Slechts {0} elementen zijn toegestaan terwijl er {1} worden opgegeven. + +bridge_not_configured=Bridge configureren is verplicht. +type_description_missing=Type beschrijving {0} voor {1} niet gevonden, hoewel we eerder de aanwezigheid hebben gecontroleerd. +config_description_missing=Configuratiebeschrijving {0} voor {1} niet gevonden, hoewel we de aanwezigheid eerder hebben gecontroleerd. diff --git a/bundles/org.openhab.core.test.magic/src/main/resources/OH-INF/i18n/magic_nl.properties b/bundles/org.openhab.core.test.magic/src/main/resources/OH-INF/i18n/magic_nl.properties index ad58d7489e7..7a1966676a1 100644 --- a/bundles/org.openhab.core.test.magic/src/main/resources/OH-INF/i18n/magic_nl.properties +++ b/bundles/org.openhab.core.test.magic/src/main/resources/OH-INF/i18n/magic_nl.properties @@ -49,6 +49,8 @@ thing-type.magic.rollershutter.label = Magic Rolluik Thing thing-type.magic.rollershutter.description = Een rolluik thing-type.magic.thermostat.label = Magic Thermostaat thing-type.magic.thermostat.description = Een thermostaat met een instelbare temperatuur en een huidige temperatuur. +thing-type.magic.timeseries.label = Magic Timeseries Updates Thing +thing-type.magic.timeseries.description = Demonstratie van het gebruik van TimeSeries als prognose. # thing types config @@ -64,6 +66,19 @@ thing-type.config.magic.image.source.label = Afbeelding URL thing-type.config.magic.image.source.description = De URL die gebruikt wordt om de afbeelding te laden thing-type.config.magic.online-offline.toggleTime.label = Schakeltijd thing-type.config.magic.online-offline.toggleTime.description = De tijd in seconden om te schakelen tussen de online en offline status. +thing-type.config.magic.timeseries.count.label = Aantal Waarden +thing-type.config.magic.timeseries.count.description = Het aantal waarden om te genereren. +thing-type.config.magic.timeseries.interval.label = Interval +thing-type.config.magic.timeseries.interval.description = Het interval om de gegenereerde gegevens te versturen. +thing-type.config.magic.timeseries.max.label = Maximum +thing-type.config.magic.timeseries.max.description = De maximale waarde. +thing-type.config.magic.timeseries.min.label = Minimum +thing-type.config.magic.timeseries.min.description = De minimale waarde. +thing-type.config.magic.timeseries.type.label = Type +thing-type.config.magic.timeseries.type.description = Hoe waarden aan te maken. +thing-type.config.magic.timeseries.type.option.RND = Willekeurig +thing-type.config.magic.timeseries.type.option.ASC = Oplopend +thing-type.config.magic.timeseries.type.option.DESC = Aflopend thing-type.config.magic.update-config.updateModel.label = Model ID thing-type.config.magic.update-config.updateModel.description = Het model van het Magic Updatebare Firmware Thing thing-type.config.magic.update-config.updateModel.option.Alohomora = Alohomora @@ -87,6 +102,7 @@ channel-type.magic.choosy.state.option.2 = Twee channel-type.magic.color.label = Kleur channel-type.magic.color.description = Maakt het mogelijk om de kleur van een lamp te bepalen. Het is ook mogelijk om de lamp te dimmen en aan/uit te schakelen. channel-type.magic.contact.label = Contact +channel-type.magic.forecast.label = Prognose channel-type.magic.image.label = Afbeelding channel-type.magic.location.label = Locatie channel-type.magic.number.label = Thing Online(>0)/Offline(<0) Vertraging diff --git a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_nl.properties b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_nl.properties index d5b8fad0696..4ec1a986b00 100644 --- a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_nl.properties +++ b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_nl.properties @@ -56,3 +56,5 @@ channel-type.system.electric-voltage.label = Elektrische Spanning channel-type.system.electric-voltage.description = Huidige elektrische spanning channel-type.system.electrical-energy.label = Elektrische Energie channel-type.system.electrical-energy.description = Huidige elektrische energie +channel-type.system.uv-index.label = UV-Index +channel-type.system.uv-index.description = Huidige UV-index diff --git a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/SystemProfiles_nl.properties b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/SystemProfiles_nl.properties index cbf11d42ea4..62d203da3d0 100644 --- a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/SystemProfiles_nl.properties +++ b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/SystemProfiles_nl.properties @@ -5,9 +5,9 @@ profile.config.system.offset.offset.label = Compensatie profile.config.system.offset.offset.description = Compensatie (gewoon nummer of nummer met eenheid) die wordt toegepast op de status van het item. Een negatieve compensatie zal worden toegepast in de omgekeerde richting. profile-type.system.hysteresis.label = Hysteresis profile.config.system.hysteresis.lower.label = Ondergrens -profile.config.system.hysteresis.lower.description = Wijst UIT toe als de waarde onder de ondergrens is (gewoon nummer of nummer met eenheid). +profile.config.system.hysteresis.lower.description = Wijst OFF toe als de waarde onder de ondergrens is (gewoon nummer of nummer met eenheid). profile.config.system.hysteresis.upper.label = Bovengrens -profile.config.system.hysteresis.upper.description = Wijst AAN toe als de waarde boven de bovengrens is (gewoon nummer of nummer met eenheid). +profile.config.system.hysteresis.upper.description = Wijst ON toe als de waarde gelijk aan of boven de bovengrens is (gewoon nummer of nummer met eenheid). profile.config.system.hysteresis.inverted.label = Omgekeerd profile.config.system.hysteresis.inverted.description = De toewijzing van AAN / UIT omdraaien, indien waar. profile-type.system.range.label = Bereik diff --git a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_nl.properties b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_nl.properties index 3907d346366..f3efe11539e 100644 --- a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_nl.properties +++ b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/chart_nl.properties @@ -6,5 +6,10 @@ system.config.chart.scale.label = Schaal system.config.chart.scale.description = Definieert de toegepaste schaal op de grafiekhoogte (0.5 voor delen door 2 bijvoorbeeld). system.config.chart.maxWidth.label = Maximale Breedte system.config.chart.maxWidth.description = Definieert de maximale breedte in pixels bij het maken van een grafiek. +system.config.sitemap.groupMembersSorting.label = Sortering Groepsleden +system.config.sitemap.groupMembersSorting.description = Definieert hoe de leden van een groep worden gesorteerd in de UI. +system.config.sitemap.groupMembersSorting.option.NONE = Geen sortering +system.config.sitemap.groupMembersSorting.option.LABEL = Sorteren op label +system.config.sitemap.groupMembersSorting.option.NAME = Sorteren op naam service.system.chart.label = Grafieken diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties index 87d4651db31..7d24f3aa803 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_nl.properties @@ -17,6 +17,12 @@ system.config.voice.listeningMelody.description = De melodie die wordt afgespeel system.config.voice.listeningMelody.option.Bb = Bb system.config.voice.listeningMelody.option.F\# = F\# system.config.voice.listeningMelody.option.E = E +system.config.voice.enableCacheTTS.label = TTS caching inschakelen +system.config.voice.enableCacheTTS.description = waar om TTS services toe te staan audiobestanden te cachen op de schijf. +system.config.voice.cacheSizeTTS.label = TTS Cache Grootte +system.config.voice.cacheSizeTTS.description = De maximale grootte van de TTS cache (in kB). +system.config.voice.maxTextLengthCacheTTS.label = TTS Cache Maximale Tekst Lengte +system.config.voice.maxTextLengthCacheTTS.description = De maximale lengte van de teksten afgehandeld door de TTS-cache (in karakters). Indien overschreden, wordt de tekst doorgegeven aan de TTS zonder deze op te slaan. 0 voor geen limiet. error.ks-error = Probleem bij het vinden van trefwoorden, {0} error.stt-exception = Probleem tijdens herkenning, {0} diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_nl.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_nl.properties index f5c322bd1fc..bcffae33722 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_nl.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_nl.properties @@ -2,5 +2,15 @@ system.config.addons.includeIncompatible.label = (Mogelijk) Incompatibele Add-on system.config.addons.includeIncompatible.description = Sommige add-on diensten kunnen add-ons aanbieden die mogelijk niet compatibel zijn met de installatie. Door deze optie in te schakelen worden niet compatibele add-ons alsnog getoond. system.config.addons.remote.label = Externe Repository Toegang system.config.addons.remote.description = Definieert of openHAB toegang heeft tot de externe repository voor installatie van add-ons. +system.config.addons.suggestionFinderIp.label = IP Suggestie Zoeker +system.config.addons.suggestionFinderIp.description = Gebruik discovery broadcasts op het IP-netwerk om add-ons voor te stellen. Inschakelen/uitschakelen kan tot 1 minuut duren. +system.config.addons.suggestionFinderMdns.label = mDNS Suggestie Zoeker +system.config.addons.suggestionFinderMdns.description = Gebruik mDNS netwerk scan om add-ons voor te stellen. Inschakelen/uitschakelen kan tot 1 minuut duren. +system.config.addons.suggestionFinderSddp.label = SDDP Suggestie Zoeker +system.config.addons.suggestionFinderSddp.description = Gebruik SDDP netwerk scan om add-ons voor te stellen. Inschakelen/uitschakelen kan tot 1 minuut duren. +system.config.addons.suggestionFinderUpnp.label = UPnP Suggestie Zoeker +system.config.addons.suggestionFinderUpnp.description = Gebruik UPnP netwerk scan om add-ons voor te stellen. Inschakelen/uitschakelen kan tot 1 minuut duren. +system.config.addons.suggestionFinderUsb.label = USB Suggestie Zoeker +system.config.addons.suggestionFinderUsb.description = Scan aangesloten USB-apparaten om add-ons voor te stellen. Inschakelen/uitschakelen kan tot 1 minuut duren. service.system.addons.label = Add-on Beheer diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_nl.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_nl.properties new file mode 100644 index 00000000000..e630fdd4f2f --- /dev/null +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/units_nl.properties @@ -0,0 +1,6 @@ +system.config.units.currencyProvider.label = Valuta Provider +system.config.units.currencyProvider.description = De service die wordt gebruikt om een reeks valuta's en hun wisselkoersen aan te bieden. +system.config.units.fixedBaseCurrency.label = Vaste basisvaluta +system.config.units.fixedBaseCurrency.description = De basisvaluta van dit systeem wanneer de vaste aanbieder van valuta wordt gebruikt. + +service.system.units.label = Instellingen Eenheden From d2489bb65e041ffd905fe05d1484aa7b38a6297f Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Mon, 1 Jul 2024 17:49:02 +0200 Subject: [PATCH 19/50] New Crowdin updates (#4290) * New translations network.properties (French) * New translations marketplace.properties (French) --- .../src/main/resources/OH-INF/i18n/marketplace_fr.properties | 2 +- .../src/main/resources/OH-INF/i18n/network_fr.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.addon.marketplace/src/main/resources/OH-INF/i18n/marketplace_fr.properties b/bundles/org.openhab.core.addon.marketplace/src/main/resources/OH-INF/i18n/marketplace_fr.properties index 6f119407325..44c8248ad40 100644 --- a/bundles/org.openhab.core.addon.marketplace/src/main/resources/OH-INF/i18n/marketplace_fr.properties +++ b/bundles/org.openhab.core.addon.marketplace/src/main/resources/OH-INF/i18n/marketplace_fr.properties @@ -5,7 +5,7 @@ system.config.jsonaddonservice.urls.description = Liste d'URLs séparées par un system.config.marketplace.apiKey.label = Clé API pour community.openhab.org system.config.marketplace.apiKey.description = Spécifiez la clé API à utiliser sur le forum de la communauté (pour les administrateurs - cela permet par exemple de voir le contenu qui n'a pas encore fait l'objet de revue ou autrement caché au grand public). Laissez vide si vous n'en avez pas. system.config.marketplace.enable.label = Activer le marketplace de la communauté -system.config.marketplace.enable.description = Si désactivé, aucune extension du marketplace de la communautaire ne sera affichée. Les extensions déjà installées seront toujours disponibles. +system.config.marketplace.enable.description = Si désactivé, aucune extension du marketplace de la communauté ne sera affichée. Les extensions déjà installées seront toujours disponibles. system.config.marketplace.showUnpublished.label = Afficher les entrées non publiées system.config.marketplace.showUnpublished.description = Inclure les entrées qui n'ont pas été taguées comme publiées. Attention \: ceci peut inclure des entrées qui ne sont pas prêtes et qui pourraient ne pas fonctionner ou nuire à votre installation. Activez à vos risques et périls, uniquement pour les tests. diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/network_fr.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/network_fr.properties index 636327b3f10..11190e4dfdc 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/network_fr.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/network_fr.properties @@ -5,6 +5,6 @@ system.config.network.primaryAddress.description = Un sous-réseau (ex. 192.168. system.config.network.useIPv6.label = Utiliser IPv6 system.config.network.useIPv6.description = Utiliser les adresses IPv6 si disponible. system.config.network.useOnlyOneAddress.label = Adresse IP unique par interface -system.config.network.useOnlyOneAddress.description = Utilisez une seule adresse IP par interface et famille. +system.config.network.useOnlyOneAddress.description = Utiliser une seule adresse IP par interface et famille. service.system.network.label = Paramètres réseau From 425d0f43f2bf40ddcd77808181c973adaa751633 Mon Sep 17 00:00:00 2001 From: mlobstein Date: Mon, 1 Jul 2024 10:56:08 -0500 Subject: [PATCH 20/50] Fix parsing of mac address in SDDP Discovery (#4284) * Fix SDDP mac address Signed-off-by: Michael Lobstein --- .../org/openhab/core/config/discovery/sddp/SddpDevice.java | 6 +++--- .../discovery/sddp/test/SddpDiscoveryServiceTests.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java index f911261f22c..881901c7b3e 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java +++ b/bundles/org.openhab.core.config.discovery.sddp/src/main/java/org/openhab/core/config/discovery/sddp/SddpDevice.java @@ -35,8 +35,8 @@ public class SddpDevice { /** * The host address of the device. - * For example: JVC_PROJECTOR-E0DADC152802 - * Note: the last 12 characters represent the MAC address of the device. + * For example: JVC_PROJECTOR-E0DADC152802 or JVC_PROJECTOR-E0:DA:DC:15:28:02 + * Note: the last 12 resp. 17 characters represent the MAC address of the device. */ public final String host; @@ -131,7 +131,7 @@ public SddpDevice(Map headers, boolean offline) { String[] hostParts = host.split("-|_"); macAddress = hostParts.length <= 1 ? "" - : hostParts[hostParts.length - 1].replaceAll("(..)(?!$)", "$1-").toLowerCase(); + : hostParts[hostParts.length - 1].replace(":", "").replaceAll("(..)(?!$)", "$1-").toLowerCase(); expireInstant = offline ? Instant.now().minusMillis(1) : Instant.now().plusSeconds(maxAge.isBlank() ? 0 : Integer.parseInt(maxAge)); diff --git a/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java b/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java index 249bb97ad60..8f3fe3b96ec 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java +++ b/bundles/org.openhab.core.config.discovery.sddp/src/test/java/org/openhab/core/config/discovery/sddp/test/SddpDiscoveryServiceTests.java @@ -57,7 +57,7 @@ public class SddpDiscoveryServiceTests { private static final String IDENTIFY_NOTIFICATION = """ NOTIFY IDENTIFY SDDP/1.0 From: "192.168.4.237:1902" - Host: "JVC_PROJECTOR-E0DADC152802" + Host: "JVC_PROJECTOR-E0:DA:DC:15:28:02" Type: "JVCKENWOOD:Projector" Primary-Proxy: "projector" Proxies: "projector" @@ -136,7 +136,7 @@ void testIdentifyNotification() throws Exception { SddpDevice device = deviceOptional.orElse(null); assertNotNull(device); assertEquals("192.168.4.237:1902", device.from); - assertEquals("JVC_PROJECTOR-E0DADC152802", device.host); + assertEquals("JVC_PROJECTOR-E0:DA:DC:15:28:02", device.host); assertTrue(device.maxAge.isBlank()); assertEquals("JVCKENWOOD:Projector", device.type); assertEquals("projector", device.primaryProxy); From cef917fac91ae9d5cd9243a99c9e78c00b5b9bce Mon Sep 17 00:00:00 2001 From: joerg1985 <16140691+joerg1985@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:26:27 +0200 Subject: [PATCH 21/50] Ensure the PoolBasedSequentialScheduledExecutorService does keep a minimum size (#4288) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörg Sautter --- ...sedSequentialScheduledExecutorService.java | 102 +++++++++++++----- .../core/common/ThreadPoolManager.java | 25 ++++- .../core/common/ThreadPoolManagerTest.java | 2 +- 3 files changed, 95 insertions(+), 34 deletions(-) diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java index 4e6f6574d94..afcb5f507f0 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/PoolBasedSequentialScheduledExecutorService.java @@ -18,7 +18,6 @@ import java.util.IdentityHashMap; import java.util.List; import java.util.Set; -import java.util.WeakHashMap; import java.util.concurrent.Callable; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -29,16 +28,18 @@ import java.util.concurrent.RunnableFuture; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; import java.util.function.Function; -import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; +import org.openhab.core.internal.common.WrappedScheduledExecutorService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A ScheduledExecutorService that will sequentially perform the tasks like a @@ -55,20 +56,73 @@ @NonNullByDefault final class PoolBasedSequentialScheduledExecutorService implements ScheduledExecutorService { - private static final WeakHashMap PENDING_BY_POOL = new WeakHashMap<>(); + static class BasePoolExecutor extends WrappedScheduledExecutorService { + + protected final Logger logger = LoggerFactory.getLogger(BasePoolExecutor.class); + + private final String threadPoolName; + private final AtomicInteger pending; + private volatile int minimumPoolSize; + + public BasePoolExecutor(String threadPoolName, int corePoolSize, ThreadFactory threadFactory) { + super(corePoolSize, threadFactory); + + this.threadPoolName = threadPoolName; + // set to one does ensure at least one thread more than tasks running + this.pending = new AtomicInteger(1); + } + + public synchronized void resizePool(int mandatoryPoolSize) { + int corePoolSize = getCorePoolSize(); + + if (minimumPoolSize > mandatoryPoolSize) { + mandatoryPoolSize = minimumPoolSize; + } + + if (mandatoryPoolSize > corePoolSize) { + // two more than needed, they will time out if there is no work for them im time + setMaximumPoolSize(mandatoryPoolSize + 2); + setCorePoolSize(mandatoryPoolSize); + } else if (mandatoryPoolSize < corePoolSize) { + setCorePoolSize(mandatoryPoolSize); + // ensure we drop not needed threads, this is only needed under higher load when none of the + // started threads have a chance to timeout + setMaximumPoolSize(mandatoryPoolSize + 2); + } + } + + public int getMinimumPoolSize() { + return minimumPoolSize; + } + + public void setMinimumPoolSize(int minimumPoolSize) { + this.minimumPoolSize = minimumPoolSize; + + resizePool(getCorePoolSize()); + } + + @Override + public void shutdown() { + logger.warn("shutdown() invoked on a shared thread pool '{}'. This is a bug, please submit a bug report", + threadPoolName, new IllegalStateException()); + } + + @Override + @NonNullByDefault({}) + public List shutdownNow() { + logger.warn("shutdownNow() invoked on a shared thread pool '{}'. This is a bug, please submit a bug report", + threadPoolName, new IllegalStateException()); + return List.of(); + } + } private final WorkQueueEntry empty; - private final ScheduledThreadPoolExecutor pool; - private final AtomicInteger pending; + private final BasePoolExecutor pool; private final List> scheduled; private final ScheduledFuture cleaner; private @Nullable WorkQueueEntry tail; - public PoolBasedSequentialScheduledExecutorService(ScheduledThreadPoolExecutor pool) { - if (pool.getMaximumPoolSize() != Integer.MAX_VALUE) { - throw new IllegalArgumentException("the pool must scale unlimited to avoid potential dead locks!"); - } - + public PoolBasedSequentialScheduledExecutorService(BasePoolExecutor pool) { this.pool = pool; // prepare the WorkQueueEntry we are using when no tasks are pending @@ -81,20 +135,6 @@ public PoolBasedSequentialScheduledExecutorService(ScheduledThreadPoolExecutor p tail = empty; - // we need one pending counter per pool - synchronized (PENDING_BY_POOL) { - AtomicInteger fromCache = PENDING_BY_POOL.get(pool); - - if (fromCache == null) { - // set to one does ensure at least one thread more than tasks running - fromCache = new AtomicInteger(1); - - PENDING_BY_POOL.put(pool, fromCache); - } - - pending = fromCache; - } - // clean up to ensure we do not keep references to old tasks cleaner = this.scheduleWithFixedDelay(() -> { synchronized (this) { @@ -197,6 +237,10 @@ private ScheduledFuture schedule( @Override public void shutdown() { synchronized (this) { + if (tail == null) { + return; + } + cleaner.cancel(false); scheduled.removeIf((sf) -> { sf.cancel(false); @@ -302,7 +346,7 @@ private CompletableFuture submitToWorkQueue(@Nullable RunnableFuture o // a small hack to throw the Exception unchecked throw PoolBasedSequentialScheduledExecutorService.unchecked(ex); } finally { - pending.decrementAndGet(); + pool.pending.decrementAndGet(); } }; @@ -314,8 +358,8 @@ private CompletableFuture submitToWorkQueue(@Nullable RunnableFuture o throw new RejectedExecutionException("this scheduled executor has been shutdown before"); } - // set the core pool size even if it does not change, this triggers idle threads to stop - pool.setCorePoolSize(pending.incrementAndGet()); + var mandatoryPoolSize = pool.pending.incrementAndGet(); + pool.resizePool(mandatoryPoolSize); // avoid waiting for one pool thread to finish inside a pool thread runNow = inPool && tail.future.isDone(); @@ -335,7 +379,7 @@ private CompletableFuture submitToWorkQueue(@Nullable RunnableFuture o try { cf.run(); } finally { - pending.decrementAndGet(); + pool.pending.decrementAndGet(); } } diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java index b23501f54e2..d1812ed8332 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java @@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.openhab.core.common.PoolBasedSequentialScheduledExecutorService.BasePoolExecutor; import org.openhab.core.internal.common.WrappedScheduledExecutorService; import org.osgi.framework.Constants; import org.osgi.service.component.ComponentConstants; @@ -100,7 +101,10 @@ protected void modified(Map properties) { Integer poolSize = Integer.valueOf(string); configs.put(poolName, poolSize); ThreadPoolExecutor pool = (ThreadPoolExecutor) pools.get(poolName); - if (pool instanceof ScheduledThreadPoolExecutor) { + if (pool instanceof BasePoolExecutor basePool) { + basePool.setMinimumPoolSize(poolSize); + LOGGER.debug("Updated scheduled thread pool '{}' to minimum size {}", poolName, poolSize); + } else if (pool instanceof ScheduledThreadPoolExecutor) { pool.setCorePoolSize(poolSize); LOGGER.debug("Updated scheduled thread pool '{}' to size {}", poolName, poolSize); } else if (pool instanceof QueueingThreadPoolExecutor) { @@ -129,9 +133,22 @@ protected void modified(Map properties) { public static ScheduledExecutorService getPoolBasedSequentialScheduledExecutorService(String poolName, String threadName) { if (configs.getOrDefault(poolName, 0) > 0) { - ScheduledThreadPoolExecutor pool = getScheduledPoolUnwrapped(poolName); - - return new PoolBasedSequentialScheduledExecutorService((ScheduledThreadPoolExecutor) pool); + ExecutorService pool = pools.computeIfAbsent(poolName, name -> { + int cfg = getConfig(name); + ScheduledThreadPoolExecutor executor = new BasePoolExecutor(name, cfg, + new NamedThreadFactory(name, true, Thread.NORM_PRIORITY)); + executor.setKeepAliveTime(THREAD_TIMEOUT, TimeUnit.SECONDS); + executor.allowCoreThreadTimeOut(true); + executor.setRemoveOnCancelPolicy(true); + LOGGER.debug("Created scheduled pool based thread pool '{}' of size {}", name, cfg); + return executor; + }); + + if (pool instanceof BasePoolExecutor service) { + return new PoolBasedSequentialScheduledExecutorService(service); + } else { + throw new IllegalArgumentException("Pool " + poolName + " is not a base pool!"); + } } else { return Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory(threadName)); } diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java index e1c31abd59c..bd9c1b4ef6d 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/common/ThreadPoolManagerTest.java @@ -202,7 +202,7 @@ public void testSchedulingDoesSpawnNewThreads() throws InterruptedException { block.countDown(); }, 20, TimeUnit.MILLISECONDS); - assertTrue(check.await(80, TimeUnit.MILLISECONDS)); + assertTrue(check.await(800, TimeUnit.MILLISECONDS)); } } From 37e09f5ab8760d9a3a57348d2bb558efc238f535 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Tue, 2 Jul 2024 08:40:47 +0200 Subject: [PATCH 22/50] Fix description of the location setting (#4286) Signed-off-by: Laurent Garnier --- .../src/main/resources/OH-INF/i18n/i18n.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n.properties index b21cc81efc0..adb60f0dfa9 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = Language system.config.i18n.language.description = The default language that should be used. If not specified, the system default locale is used. system.config.i18n.location.label = Location -system.config.i18n.location.description = The location of this installation.
    Coordinates as <latitude>,<longitude>[<altitude>]
    Example: "52.5200066,13.4049540" (Berlin) +system.config.i18n.location.description = The location of this installation.
    Coordinates as <latitude>,<longitude>[,<altitude>] with the altitude being optional
    Example: "52.5200066,13.4049540" (Berlin) system.config.i18n.measurementSystem.label = Measurement System system.config.i18n.measurementSystem.description = The measurement system is used for unit conversion. system.config.i18n.measurementSystem.option.SI = Metric From 1e53c5235bc732438b6ccf8139bcd1f8e2832a2c Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Tue, 2 Jul 2024 09:27:36 +0200 Subject: [PATCH 23/50] Fix persistence extensions for group items and number dimension items with different units (#4257) * fix persistence extensions for group items Signed-off-by: Mark Herwege --- .../extensions/PersistenceExtensions.java | 142 +++- .../extensions/PersistenceExtensionsTest.java | 767 +++++++++++++++++- .../extensions/TestPersistenceService.java | 7 +- 3 files changed, 864 insertions(+), 52 deletions(-) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java index 000b1ebbb23..e11a7e5c48f 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java @@ -28,6 +28,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.core.i18n.TimeZoneProvider; +import org.openhab.core.items.GroupItem; import org.openhab.core.items.Item; import org.openhab.core.library.items.NumberItem; import org.openhab.core.library.types.DecimalType; @@ -61,6 +62,7 @@ * @author Mark Herwege - Changed return types to State for some interval methods to also return unit * @author Mark Herwege - Extended for future dates * @author Mark Herwege - lastChange and nextChange methods + * @author mark Herwege - handle persisted GroupItem with QuantityType */ @Component(immediate = true) @NonNullByDefault @@ -980,10 +982,16 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable Iterator it = result.iterator(); HistoricItem maximumHistoricItem = null; + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = (baseItem instanceof NumberItem numberItem) ? numberItem.getUnit() : null; + DecimalType maximum = null; while (it.hasNext()) { HistoricItem historicItem = it.next(); - DecimalType value = historicItem.getState().as(DecimalType.class); + DecimalType value = getPersistedValue(historicItem, unit); if (value != null) { if (maximum == null || value.compareTo(maximum) > 0) { maximum = value; @@ -1105,10 +1113,16 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable Iterator it = result.iterator(); HistoricItem minimumHistoricItem = null; + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = (baseItem instanceof NumberItem numberItem) ? numberItem.getUnit() : null; + DecimalType minimum = null; while (it.hasNext()) { HistoricItem historicItem = it.next(); - DecimalType value = historicItem.getState().as(DecimalType.class); + DecimalType value = getPersistedValue(historicItem, unit); if (value != null) { if (minimum == null || value.compareTo(minimum) < 0) { minimum = value; @@ -1231,10 +1245,16 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable BigDecimal average = dt != null ? dt.toBigDecimal() : BigDecimal.ZERO, sum = BigDecimal.ZERO; int count = 0; + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = baseItem instanceof NumberItem numberItem ? numberItem.getUnit() : null; + Iterator it = result.iterator(); while (it.hasNext()) { HistoricItem historicItem = it.next(); - DecimalType value = historicItem.getState().as(DecimalType.class); + DecimalType value = getPersistedValue(historicItem, unit); if (value != null) { count++; sum = sum.add(value.toBigDecimal().subtract(average, MathContext.DECIMAL64).pow(2, @@ -1245,11 +1265,8 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable // avoid division by zero if (count > 0) { BigDecimal variance = sum.divide(BigDecimal.valueOf(count), MathContext.DECIMAL64); - if (item instanceof NumberItem numberItem) { - Unit unit = numberItem.getUnit(); - if (unit != null) { - return new QuantityType<>(variance, unit.multiply(unit)); - } + if (unit != null) { + return new QuantityType<>(variance, unit.multiply(unit)); } return new DecimalType(variance); } @@ -1385,7 +1402,11 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable // avoid ArithmeticException if variance is less than zero if (dt != null && DecimalType.ZERO.compareTo(dt) <= 0) { BigDecimal deviation = dt.toBigDecimal().sqrt(MathContext.DECIMAL64); - if (item instanceof NumberItem numberItem) { + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + if (baseItem instanceof NumberItem numberItem) { Unit unit = numberItem.getUnit(); if (unit != null) { return new QuantityType<>(deviation, unit); @@ -1514,10 +1535,16 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable HistoricItem lastItem = null; ZonedDateTime firstTimestamp = null; + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = baseItem instanceof NumberItem numberItem ? numberItem.getUnit() : null; + while (it.hasNext()) { HistoricItem thisItem = it.next(); if (lastItem != null) { - DecimalType dtState = lastItem.getState().as(DecimalType.class); + DecimalType dtState = getPersistedValue(lastItem, unit); if (dtState != null) { BigDecimal value = dtState.toBigDecimal(); BigDecimal weight = BigDecimal @@ -1538,11 +1565,8 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable return null; } BigDecimal average = sum.divide(totalDuration, MathContext.DECIMAL64); - if (item instanceof NumberItem numberItem) { - Unit unit = numberItem.getUnit(); - if (unit != null) { - return new QuantityType<>(average, unit); - } + if (unit != null) { + return new QuantityType<>(average, unit); } return new DecimalType(average); } @@ -1647,19 +1671,22 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable if (result != null) { Iterator it = result.iterator(); + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = baseItem instanceof NumberItem numberItem ? numberItem.getUnit() : null; + BigDecimal sum = BigDecimal.ZERO; while (it.hasNext()) { HistoricItem historicItem = it.next(); - DecimalType value = historicItem.getState().as(DecimalType.class); + DecimalType value = getPersistedValue(historicItem, unit); if (value != null) { sum = sum.add(value.toBigDecimal()); } } - if (item instanceof NumberItem numberItem) { - Unit unit = numberItem.getUnit(); - if (unit != null) { - return new QuantityType<>(sum, unit); - } + if (unit != null) { + return new QuantityType<>(sum, unit); } return new DecimalType(sum); } @@ -1768,8 +1795,23 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable } HistoricItem itemStart = internalPersistedState(item, begin, effectiveServiceId); HistoricItem itemStop = internalPersistedState(item, end, effectiveServiceId); - DecimalType valueStart = itemStart != null ? itemStart.getState().as(DecimalType.class) : null; - DecimalType valueStop = itemStop != null ? itemStop.getState().as(DecimalType.class) : null; + + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = baseItem instanceof NumberItem numberItem ? numberItem.getUnit() : null; + + DecimalType valueStart = null; + if (itemStart != null) { + valueStart = getPersistedValue(itemStart, unit); + } + DecimalType valueStop = null; + if (itemStop != null) { + valueStop = getPersistedValue(itemStop, unit); + + } + if (begin == null && end != null && end.isAfter(ZonedDateTime.now())) { valueStart = getItemValue(item); } @@ -1779,10 +1821,7 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable if (valueStart != null && valueStop != null) { BigDecimal delta = valueStop.toBigDecimal().subtract(valueStart.toBigDecimal()); - if (item instanceof NumberItem numberItem) { - Unit unit = numberItem.getUnit(); - return (unit != null) ? new QuantityType<>(delta, unit) : new DecimalType(delta); - } + return (unit != null) ? new QuantityType<>(delta, unit) : new DecimalType(delta); } return null; } @@ -1994,10 +2033,26 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable if (effectiveServiceId == null) { return null; } + + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = baseItem instanceof NumberItem numberItem ? numberItem.getUnit() : null; + HistoricItem itemStart = internalPersistedState(item, begin, effectiveServiceId); HistoricItem itemStop = internalPersistedState(item, end, effectiveServiceId); - DecimalType valueStart = itemStart != null ? itemStart.getState().as(DecimalType.class) : null; - DecimalType valueStop = itemStop != null ? itemStop.getState().as(DecimalType.class) : null; + + DecimalType valueStart = null; + if (itemStart != null) { + valueStart = getPersistedValue(itemStart, unit); + } + DecimalType valueStop = null; + if (itemStop != null) { + valueStop = getPersistedValue(itemStop, unit); + + } + if (begin == null && end != null && end.isAfter(ZonedDateTime.now())) { valueStart = getItemValue(item); } @@ -2559,7 +2614,11 @@ private static void internalRemoveAllStatesBetween(Item item, @Nullable ZonedDat } private static @Nullable DecimalType getItemValue(Item item) { - if (item instanceof NumberItem numberItem) { + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + if (baseItem instanceof NumberItem numberItem) { Unit unit = numberItem.getUnit(); if (unit != null) { QuantityType qt = item.getStateAs(QuantityType.class); @@ -2572,6 +2631,29 @@ private static void internalRemoveAllStatesBetween(Item item, @Nullable ZonedDat return item.getStateAs(DecimalType.class); } + private static @Nullable DecimalType getPersistedValue(HistoricItem historicItem, @Nullable Unit unit) { + State state = historicItem.getState(); + if (unit != null) { + if (state instanceof QuantityType qtState) { + qtState = qtState.toUnit(unit); + if (qtState != null) { + state = qtState; + } else { + LoggerFactory.getLogger(PersistenceExtensions.class).warn( + "Unit of state {} at time {} retrieved from persistence not compatible with item unit {} for item {}", + state, historicItem.getTimestamp(), unit, historicItem.getName()); + return null; + } + } else { + LoggerFactory.getLogger(PersistenceExtensions.class).warn( + "Item {} is QuantityType but state {} at time {} retrieved from persistence has no unit", + historicItem.getName(), historicItem.getState(), historicItem.getTimestamp()); + return null; + } + } + return state.as(DecimalType.class); + } + private static @Nullable HistoricItem historicItemOrCurrentState(Item item, @Nullable HistoricItem historicItem) { if (historicItem == null) { // there are no historic states we couldn't determine a value, construct a HistoricItem from the current diff --git a/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java b/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java index 2e593a86045..fd28de805d9 100644 --- a/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java +++ b/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/PersistenceExtensionsTest.java @@ -40,9 +40,11 @@ import org.openhab.core.i18n.TimeZoneProvider; import org.openhab.core.i18n.UnitProvider; import org.openhab.core.items.GenericItem; +import org.openhab.core.items.GroupItem; import org.openhab.core.items.ItemRegistry; import org.openhab.core.items.ItemUtil; import org.openhab.core.library.CoreItemFactory; +import org.openhab.core.library.types.ArithmeticGroupFunction; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.QuantityType; import org.openhab.core.library.unit.SIUnits; @@ -67,13 +69,14 @@ public class PersistenceExtensionsTest { public static final String TEST_NUMBER = "testNumber"; public static final String TEST_QUANTITY_NUMBER = "testQuantityNumber"; + public static final String TEST_GROUP_QUANTITY_NUMBER = "testGroupQuantityNumber"; public static final String TEST_SWITCH = "testSwitch"; private @Mock @NonNullByDefault({}) ItemRegistry itemRegistryMock; private @Mock @NonNullByDefault({}) UnitProvider unitProviderMock; private @Mock @NonNullByDefault({}) TimeZoneProvider timeZoneProviderMock; - private @NonNullByDefault({}) GenericItem numberItem, quantityItem, switchItem; + private @NonNullByDefault({}) GenericItem numberItem, quantityItem, groupQuantityItem, switchItem; @BeforeEach public void setUp() { @@ -85,13 +88,21 @@ public void setUp() { TEST_QUANTITY_NUMBER); switchItem = itemFactory.createItem(CoreItemFactory.SWITCH, TEST_SWITCH); + GenericItem baseItem = itemFactory + .createItem(CoreItemFactory.NUMBER + ItemUtil.EXTENSION_SEPARATOR + "Temperature", "testGroupBaseItem"); + GroupItem groupItem = new GroupItem(TEST_GROUP_QUANTITY_NUMBER, baseItem, new ArithmeticGroupFunction.Sum()); + groupItem.addMember(quantityItem); + groupQuantityItem = groupItem; + numberItem.setState(STATE); quantityItem.setState(new QuantityType(STATE, SIUnits.CELSIUS)); + groupQuantityItem.setState(new QuantityType(STATE, SIUnits.CELSIUS)); switchItem.setState(SWITCH_STATE); when(itemRegistryMock.get(TEST_NUMBER)).thenReturn(numberItem); when(itemRegistryMock.get(TEST_QUANTITY_NUMBER)).thenReturn(quantityItem); when(itemRegistryMock.get(TEST_SWITCH)).thenReturn(switchItem); + when(itemRegistryMock.get(TEST_GROUP_QUANTITY_NUMBER)).thenReturn(groupQuantityItem); when(timeZoneProviderMock.getTimeZone()).thenReturn(ZoneId.systemDefault()); @@ -232,6 +243,62 @@ public void testPersistedStateQuantityType() { assertNull(historicItem); } + @Test + public void testPersistedStateGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(HISTORIC_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 12, 31, 0, 0, 0, 0, ZoneId.systemDefault()), + SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(HISTORIC_INTERMEDIATE_VALUE_1), SIUnits.CELSIUS), + historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(HISTORIC_INTERMEDIATE_VALUE_1), SIUnits.CELSIUS), + historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, ZonedDateTime.now(), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_NOVALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(FUTURE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(FUTURE_START), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(FUTURE_INTERMEDIATE_VALUE_3), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(FUTURE_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(FUTURE_END), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(AFTER_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(FUTURE_END), SIUnits.CELSIUS), historicItem.getState()); + + // default persistence service + historicItem = PersistenceExtensions.persistedState(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + } + @Test public void testPersistedStateOnOffType() { ZonedDateTime now = ZonedDateTime.now().truncatedTo(ChronoUnit.HOURS).minusMinutes(1); @@ -415,6 +482,89 @@ public void testMaximumBetweenQuantityType() { assertNull(historicItem); } + @Test + public void testMaximumSinceGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.maximumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), is(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS))); + + historicItem = PersistenceExtensions.maximumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS))); + assertThat(historicItem.getTimestamp(), + is(ZonedDateTime.of(HISTORIC_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()))); + + // default persistence service + historicItem = PersistenceExtensions.maximumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + + // test with alternative unit + groupQuantityItem.setState(QuantityType.valueOf(5000, Units.KELVIN)); + historicItem = PersistenceExtensions.maximumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), is(new QuantityType<>(4726.85, SIUnits.CELSIUS))); + } + + @Test + public void testMaximumUntilGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.maximumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertEquals(new QuantityType<>(value(FUTURE_START), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.maximumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(FUTURE_INTERMEDIATE_VALUE_3), SIUnits.CELSIUS), historicItem.getState()); + assertEquals(ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + historicItem.getTimestamp()); + + // default persistence service + historicItem = PersistenceExtensions.maximumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + } + + @Test + public void testMaximumBetweenGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.maximumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), + is(new QuantityType<>(value(HISTORIC_INTERMEDIATE_VALUE_2), SIUnits.CELSIUS))); + + historicItem = PersistenceExtensions.maximumBetween(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), + is(new QuantityType<>(value(FUTURE_INTERMEDIATE_VALUE_4), SIUnits.CELSIUS))); + + historicItem = PersistenceExtensions.maximumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), + is(new QuantityType<>(value(FUTURE_INTERMEDIATE_VALUE_4), SIUnits.CELSIUS))); + + // default persistence service + historicItem = PersistenceExtensions.maximumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + } + @Test public void testMaximumSinceOnOffType() { ZonedDateTime now = ZonedDateTime.now(); @@ -616,6 +766,88 @@ public void testMinimumBetweenQuantityType() { assertNull(historicItem); } + @Test + public void testMinimumSinceGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.minimumSince(groupQuantityItem, + ZonedDateTime.of(BEFORE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertEquals(new QuantityType<>(value(HISTORIC_START), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.minimumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(HISTORIC_INTERMEDIATE_VALUE_1), SIUnits.CELSIUS), + historicItem.getState()); + assertEquals(ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + historicItem.getTimestamp()); + + // default persistence service + historicItem = PersistenceExtensions.minimumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + + // test with alternative unit + groupQuantityItem.setState(QuantityType.valueOf(273.15, Units.KELVIN)); + historicItem = PersistenceExtensions.minimumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_END, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), is(new QuantityType<>(0, SIUnits.CELSIUS))); + } + + @Test + public void testMinimumUntilGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.minimumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), historicItem.getState()); + + historicItem = PersistenceExtensions.minimumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), historicItem.getState()); + + // default persistence service + historicItem = PersistenceExtensions.minimumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + } + + @Test + public void testMinimumBetweenGroupQuantityType() { + HistoricItem historicItem = PersistenceExtensions.minimumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), + is(new QuantityType<>(value(HISTORIC_INTERMEDIATE_VALUE_1), SIUnits.CELSIUS))); + + historicItem = PersistenceExtensions.minimumBetween(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), + is(new QuantityType<>(value(FUTURE_INTERMEDIATE_VALUE_3), SIUnits.CELSIUS))); + + historicItem = PersistenceExtensions.minimumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(historicItem); + assertThat(historicItem.getState(), is(instanceOf(QuantityType.class))); + assertThat(historicItem.getState(), + is(new QuantityType<>(value(HISTORIC_INTERMEDIATE_VALUE_1), SIUnits.CELSIUS))); + + // default persistence service + historicItem = PersistenceExtensions.minimumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(historicItem); + } + @Test public void testMinimumSinceOnOffType() { ZonedDateTime now = ZonedDateTime.now(); @@ -844,6 +1076,109 @@ public void testVarianceBetweenQuantityType() { assertNull(variance); } + @Test + public void testVarianceSinceGroupQuantityType() { + ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expectedAverage = average(HISTORIC_INTERMEDIATE_VALUE_1, null); + + double expected = DoubleStream + .concat(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_END) + .mapToDouble(i -> Double.valueOf(i)), DoubleStream.of(STATE.doubleValue())) + .map(d -> Math.pow(d - expectedAverage, 2)).sum() + / (HISTORIC_END + 1 - HISTORIC_INTERMEDIATE_VALUE_1 + 1); + State variance = PersistenceExtensions.varianceSince(groupQuantityItem, startStored, SERVICE_ID); + assertNotNull(variance); + QuantityType qt = variance.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS.multiply(SIUnits.CELSIUS), qt.getUnit()); + + // default persistence service + variance = PersistenceExtensions.varianceSince(groupQuantityItem, startStored); + assertNull(variance); + } + + @Test + public void testVarianceUntilGroupQuantityType() { + ZonedDateTime endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expectedAverage = average(null, FUTURE_INTERMEDIATE_VALUE_3); + + double expected = DoubleStream + .concat(DoubleStream.of(STATE.doubleValue()), + IntStream.rangeClosed(FUTURE_START, FUTURE_INTERMEDIATE_VALUE_3) + .mapToDouble(i -> Double.valueOf(i))) + .map(d -> Math.pow(d - expectedAverage, 2)).sum() + / (1 + FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1); + State variance = PersistenceExtensions.varianceUntil(groupQuantityItem, endStored, SERVICE_ID); + assertNotNull(variance); + QuantityType qt = variance.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS.multiply(SIUnits.CELSIUS), qt.getUnit()); + + // default persistence service + variance = PersistenceExtensions.varianceUntil(groupQuantityItem, endStored); + assertNull(variance); + } + + @Test + public void testVarianceBetweenGroupQuantityType() { + ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + ZonedDateTime endStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expectedAverage1 = average(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2); + + double expected = IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2) + .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage1, 2)).sum() + / (HISTORIC_INTERMEDIATE_VALUE_2 - HISTORIC_INTERMEDIATE_VALUE_1 + 1); + + State variance = PersistenceExtensions.varianceBetween(groupQuantityItem, startStored, endStored, SERVICE_ID); + assertNotNull(variance); + QuantityType qt = variance.as(QuantityType.class); + assertNotNull(qt); + assertThat(qt.doubleValue(), is(closeTo(expected, 0.01))); + assertEquals(SIUnits.CELSIUS.multiply(SIUnits.CELSIUS), qt.getUnit()); + + startStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + double expectedAverage2 = average(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4); + + expected = IntStream.rangeClosed(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4) + .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage2, 2)).sum() + / (FUTURE_INTERMEDIATE_VALUE_4 - FUTURE_INTERMEDIATE_VALUE_3 + 1); + + variance = PersistenceExtensions.varianceBetween(groupQuantityItem, startStored, endStored, SERVICE_ID); + assertNotNull(variance); + qt = variance.as(QuantityType.class); + assertNotNull(qt); + assertThat(qt.doubleValue(), is(closeTo(expected, 0.01))); + assertEquals(SIUnits.CELSIUS.multiply(SIUnits.CELSIUS), qt.getUnit()); + + startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + double expectedAverage3 = average(HISTORIC_INTERMEDIATE_VALUE_1, FUTURE_INTERMEDIATE_VALUE_3); + + expected = IntStream + .concat(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_END), + IntStream.rangeClosed(FUTURE_START, FUTURE_INTERMEDIATE_VALUE_3)) + .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage3, 2)).sum() + / (FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1 + HISTORIC_END - HISTORIC_INTERMEDIATE_VALUE_1 + 1); + + variance = PersistenceExtensions.varianceBetween(groupQuantityItem, startStored, endStored, SERVICE_ID); + assertNotNull(variance); + qt = variance.as(QuantityType.class); + assertNotNull(qt); + assertThat(qt.doubleValue(), is(closeTo(expected, 0.01))); + assertEquals(SIUnits.CELSIUS.multiply(SIUnits.CELSIUS), qt.getUnit()); + + // default persistence service + variance = PersistenceExtensions.varianceBetween(groupQuantityItem, startStored, endStored); + assertNull(variance); + } + @Test public void testDeviationSinceDecimalType() { ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, @@ -930,19 +1265,121 @@ public void testDeviationBetweenDecimalType() { .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage3, 2)).sum() / (FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1 + HISTORIC_END - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); - deviation = PersistenceExtensions.deviationBetween(numberItem, startStored, endStored, SERVICE_ID); + deviation = PersistenceExtensions.deviationBetween(numberItem, startStored, endStored, SERVICE_ID); + assertNotNull(deviation); + dt = deviation.as(DecimalType.class); + assertNotNull(dt); + assertThat(dt.doubleValue(), is(closeTo(expected, 0.01))); + + // default persistence service + deviation = PersistenceExtensions.deviationBetween(numberItem, startStored, endStored); + assertNull(deviation); + } + + @Test + public void testDeviationSinceQuantityType() { + ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expectedAverage = average(HISTORIC_INTERMEDIATE_VALUE_1, null); + + double expected = Math.sqrt(DoubleStream + .concat(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_END) + .mapToDouble(i -> Double.valueOf(i)), DoubleStream.of(STATE.doubleValue())) + .map(d -> Math.pow(d - expectedAverage, 2)).sum() + / (HISTORIC_END + 1 - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); + State deviation = PersistenceExtensions.deviationSince(quantityItem, startStored, SERVICE_ID); + assertNotNull(deviation); + QuantityType qt = deviation.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + deviation = PersistenceExtensions.deviationSince(quantityItem, startStored); + assertNull(deviation); + } + + @Test + public void testDeviationUntilQuantityType() { + ZonedDateTime endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expectedAverage = average(null, FUTURE_INTERMEDIATE_VALUE_3); + + double expected = Math.sqrt(DoubleStream + .concat(DoubleStream.of(STATE.doubleValue()), + IntStream.rangeClosed(FUTURE_START, FUTURE_INTERMEDIATE_VALUE_3) + .mapToDouble(i -> Double.valueOf(i))) + .map(d -> Math.pow(d - expectedAverage, 2)).sum() + / (1 + FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1)); + State deviation = PersistenceExtensions.deviationUntil(quantityItem, endStored, SERVICE_ID); + assertNotNull(deviation); + QuantityType qt = deviation.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + deviation = PersistenceExtensions.deviationUntil(quantityItem, endStored); + assertNull(deviation); + } + + @Test + public void testDeviationBetweenQuantityType() { + ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + ZonedDateTime endStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expectedAverage = average(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2); + + double expected = Math.sqrt(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2) + .mapToDouble(i -> Double.parseDouble(Integer.toString(i))).map(d -> Math.pow(d - expectedAverage, 2)) + .sum() / (HISTORIC_INTERMEDIATE_VALUE_2 - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); + State deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored, SERVICE_ID); + assertNotNull(deviation); + QuantityType qt = deviation.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + startStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + double expectedAverage2 = average(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4); + + expected = Math.sqrt(IntStream.rangeClosed(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4) + .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage2, 2)).sum() + / (FUTURE_INTERMEDIATE_VALUE_4 - FUTURE_INTERMEDIATE_VALUE_3 + 1)); + + deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored, SERVICE_ID); + assertNotNull(deviation); + qt = deviation.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + double expectedAverage3 = average(HISTORIC_INTERMEDIATE_VALUE_1, FUTURE_INTERMEDIATE_VALUE_3); + + expected = Math.sqrt(IntStream + .concat(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_END), + IntStream.rangeClosed(FUTURE_START, FUTURE_INTERMEDIATE_VALUE_3)) + .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage3, 2)).sum() + / (FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1 + HISTORIC_END - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); + + deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored, SERVICE_ID); assertNotNull(deviation); - dt = deviation.as(DecimalType.class); - assertNotNull(dt); - assertThat(dt.doubleValue(), is(closeTo(expected, 0.01))); + qt = deviation.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); // default persistence service - deviation = PersistenceExtensions.deviationBetween(numberItem, startStored, endStored); + deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored); assertNull(deviation); } @Test - public void testDeviationSinceQuantityType() { + public void testDeviationSinceGroupQuantityType() { ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); double expectedAverage = average(HISTORIC_INTERMEDIATE_VALUE_1, null); @@ -952,7 +1389,7 @@ public void testDeviationSinceQuantityType() { .mapToDouble(i -> Double.valueOf(i)), DoubleStream.of(STATE.doubleValue())) .map(d -> Math.pow(d - expectedAverage, 2)).sum() / (HISTORIC_END + 1 - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); - State deviation = PersistenceExtensions.deviationSince(quantityItem, startStored, SERVICE_ID); + State deviation = PersistenceExtensions.deviationSince(groupQuantityItem, startStored, SERVICE_ID); assertNotNull(deviation); QuantityType qt = deviation.as(QuantityType.class); assertNotNull(qt); @@ -960,12 +1397,12 @@ public void testDeviationSinceQuantityType() { assertEquals(SIUnits.CELSIUS, qt.getUnit()); // default persistence service - deviation = PersistenceExtensions.deviationSince(quantityItem, startStored); + deviation = PersistenceExtensions.deviationSince(groupQuantityItem, startStored); assertNull(deviation); } @Test - public void testDeviationUntilQuantityType() { + public void testDeviationUntilGroupQuantityType() { ZonedDateTime endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); double expectedAverage = average(null, FUTURE_INTERMEDIATE_VALUE_3); @@ -976,7 +1413,7 @@ public void testDeviationUntilQuantityType() { .mapToDouble(i -> Double.valueOf(i))) .map(d -> Math.pow(d - expectedAverage, 2)).sum() / (1 + FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1)); - State deviation = PersistenceExtensions.deviationUntil(quantityItem, endStored, SERVICE_ID); + State deviation = PersistenceExtensions.deviationUntil(groupQuantityItem, endStored, SERVICE_ID); assertNotNull(deviation); QuantityType qt = deviation.as(QuantityType.class); assertNotNull(qt); @@ -984,12 +1421,12 @@ public void testDeviationUntilQuantityType() { assertEquals(SIUnits.CELSIUS, qt.getUnit()); // default persistence service - deviation = PersistenceExtensions.deviationUntil(quantityItem, endStored); + deviation = PersistenceExtensions.deviationUntil(groupQuantityItem, endStored); assertNull(deviation); } @Test - public void testDeviationBetweenQuantityType() { + public void testDeviationBetweenGroupQuantityType() { ZonedDateTime startStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); ZonedDateTime endStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, @@ -999,7 +1436,7 @@ public void testDeviationBetweenQuantityType() { double expected = Math.sqrt(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2) .mapToDouble(i -> Double.parseDouble(Integer.toString(i))).map(d -> Math.pow(d - expectedAverage, 2)) .sum() / (HISTORIC_INTERMEDIATE_VALUE_2 - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); - State deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored, SERVICE_ID); + State deviation = PersistenceExtensions.deviationBetween(groupQuantityItem, startStored, endStored, SERVICE_ID); assertNotNull(deviation); QuantityType qt = deviation.as(QuantityType.class); assertNotNull(qt); @@ -1014,7 +1451,7 @@ public void testDeviationBetweenQuantityType() { .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage2, 2)).sum() / (FUTURE_INTERMEDIATE_VALUE_4 - FUTURE_INTERMEDIATE_VALUE_3 + 1)); - deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored, SERVICE_ID); + deviation = PersistenceExtensions.deviationBetween(groupQuantityItem, startStored, endStored, SERVICE_ID); assertNotNull(deviation); qt = deviation.as(QuantityType.class); assertNotNull(qt); @@ -1031,7 +1468,7 @@ public void testDeviationBetweenQuantityType() { .mapToDouble(i -> Double.valueOf(i)).map(d -> Math.pow(d - expectedAverage3, 2)).sum() / (FUTURE_INTERMEDIATE_VALUE_3 - FUTURE_START + 1 + HISTORIC_END - HISTORIC_INTERMEDIATE_VALUE_1 + 1)); - deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored, SERVICE_ID); + deviation = PersistenceExtensions.deviationBetween(groupQuantityItem, startStored, endStored, SERVICE_ID); assertNotNull(deviation); qt = deviation.as(QuantityType.class); assertNotNull(qt); @@ -1039,7 +1476,7 @@ public void testDeviationBetweenQuantityType() { assertEquals(SIUnits.CELSIUS, qt.getUnit()); // default persistence service - deviation = PersistenceExtensions.deviationBetween(quantityItem, startStored, endStored); + deviation = PersistenceExtensions.deviationBetween(groupQuantityItem, startStored, endStored); assertNull(deviation); } @@ -1203,6 +1640,89 @@ public void testAverageBetweenQuantityType() { assertNull(average); } + @Test + public void testAverageSinceGroupQuantityType() { + ZonedDateTime start = ZonedDateTime.of(BEFORE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + double expected = average(BEFORE_START, null); + State average = PersistenceExtensions.averageSince(groupQuantityItem, start, SERVICE_ID); + assertNotNull(average); + QuantityType qt = average.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + start = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + expected = average(HISTORIC_INTERMEDIATE_VALUE_1, null); + average = PersistenceExtensions.averageSince(groupQuantityItem, start, SERVICE_ID); + assertNotNull(average); + qt = average.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + average = PersistenceExtensions.averageSince(groupQuantityItem, start); + assertNull(average); + } + + @Test + public void testAverageUntilGroupQuantityType() { + ZonedDateTime end = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + double expected = average(null, FUTURE_INTERMEDIATE_VALUE_3); + State average = PersistenceExtensions.averageUntil(groupQuantityItem, end, SERVICE_ID); + assertNotNull(average); + QuantityType qt = average.as(QuantityType.class); + assertNotNull(qt); + assertEquals(expected, qt.doubleValue(), 0.01); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + average = PersistenceExtensions.averageUntil(groupQuantityItem, end); + assertNull(average); + } + + @Test + public void testAverageBetweenGroupQuantityType() { + ZonedDateTime beginStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + ZonedDateTime endStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, + ZoneId.systemDefault()); + double expected = average(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2); + State average = PersistenceExtensions.averageBetween(groupQuantityItem, beginStored, endStored, SERVICE_ID); + + assertNotNull(average); + QuantityType qt = average.as(QuantityType.class); + assertNotNull(qt); + assertThat(qt.doubleValue(), is(closeTo(expected, 0.01))); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + beginStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + expected = average(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4); + + average = PersistenceExtensions.averageBetween(groupQuantityItem, beginStored, endStored, SERVICE_ID); + assertNotNull(average); + qt = average.as(QuantityType.class); + assertNotNull(qt); + assertThat(qt.doubleValue(), is(closeTo(expected, 0.01))); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + beginStored = ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + endStored = ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()); + expected = average(HISTORIC_INTERMEDIATE_VALUE_1, FUTURE_INTERMEDIATE_VALUE_3); + + average = PersistenceExtensions.averageBetween(groupQuantityItem, beginStored, endStored, SERVICE_ID); + assertNotNull(average); + qt = average.as(QuantityType.class); + assertNotNull(qt); + assertThat(qt.doubleValue(), is(closeTo(expected, 0.01))); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + average = PersistenceExtensions.averageBetween(groupQuantityItem, beginStored, endStored); + assertNull(average); + } + @Test public void testAverageSinceOnOffType() { // switch is 5h ON, 5h OFF, and 5h ON (until now) @@ -1472,7 +1992,87 @@ public void testSumUntilQuantityType() { @Test public void testSumBetweenQuantityType() { - State sum = PersistenceExtensions.sumBetween(quantityItem, + State sum = PersistenceExtensions.sumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(sum); + QuantityType qt = sum.as(QuantityType.class); + assertNotNull(qt); + assertEquals(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_INTERMEDIATE_VALUE_2).sum(), + qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + sum = PersistenceExtensions.sumBetween(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(sum); + qt = sum.as(QuantityType.class); + assertNotNull(qt); + assertEquals(IntStream.rangeClosed(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4).sum(), + qt.doubleValue(), 0.001); + + sum = PersistenceExtensions.sumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(sum); + qt = sum.as(QuantityType.class); + assertNotNull(qt); + assertEquals( + IntStream.concat(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_END), + IntStream.rangeClosed(FUTURE_START, FUTURE_INTERMEDIATE_VALUE_3)).sum(), + qt.doubleValue(), 0.001); + + // default persistence service + sum = PersistenceExtensions.sumBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + + assertNull(sum); + } + + @Test + public void testSumSinceGroupQuantityType() { + State sum = PersistenceExtensions.sumSince(groupQuantityItem, + ZonedDateTime.of(BEFORE_START, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(sum); + QuantityType qt = sum.as(QuantityType.class); + assertNotNull(qt); + assertEquals(IntStream.rangeClosed(HISTORIC_START, HISTORIC_END).sum(), qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + sum = PersistenceExtensions.sumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(sum); + qt = sum.as(QuantityType.class); + assertNotNull(qt); + assertEquals(IntStream.rangeClosed(HISTORIC_INTERMEDIATE_VALUE_1, HISTORIC_END).sum(), qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + sum = PersistenceExtensions.sumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(sum); + } + + @Test + public void testSumUntilGroupQuantityType() { + State sum = PersistenceExtensions.sumUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(sum); + QuantityType qt = sum.as(QuantityType.class); + assertNotNull(qt); + assertEquals(IntStream.rangeClosed(FUTURE_START, FUTURE_INTERMEDIATE_VALUE_3).sum(), qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + + // default persistence service + sum = PersistenceExtensions.sumSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); + assertNull(sum); + } + + @Test + public void testSumBetweenGroupQuantityType() { + State sum = PersistenceExtensions.sumBetween(groupQuantityItem, ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); assertNotNull(sum); @@ -1482,7 +2082,7 @@ public void testSumBetweenQuantityType() { qt.doubleValue(), 0.001); assertEquals(SIUnits.CELSIUS, qt.getUnit()); - sum = PersistenceExtensions.sumBetween(quantityItem, + sum = PersistenceExtensions.sumBetween(groupQuantityItem, ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); assertNotNull(sum); @@ -1491,7 +2091,7 @@ public void testSumBetweenQuantityType() { assertEquals(IntStream.rangeClosed(FUTURE_INTERMEDIATE_VALUE_3, FUTURE_INTERMEDIATE_VALUE_4).sum(), qt.doubleValue(), 0.001); - sum = PersistenceExtensions.sumBetween(quantityItem, + sum = PersistenceExtensions.sumBetween(groupQuantityItem, ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); assertNotNull(sum); @@ -1503,7 +2103,7 @@ public void testSumBetweenQuantityType() { qt.doubleValue(), 0.001); // default persistence service - sum = PersistenceExtensions.sumBetween(quantityItem, + sum = PersistenceExtensions.sumBetween(groupQuantityItem, ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); @@ -1579,6 +2179,16 @@ public void testDeltaSince() { assertEquals(qtState.doubleValue() - HISTORIC_INTERMEDIATE_VALUE_1, qt.doubleValue(), 0.001); assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaSince(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(delta); + qt = delta.as(QuantityType.class); + assertNotNull(qt); + qtState = groupQuantityItem.getState().as(QuantityType.class); + assertNotNull(qtState); + assertEquals(qtState.doubleValue() - HISTORIC_INTERMEDIATE_VALUE_1, qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + // default persistence service delta = PersistenceExtensions.deltaSince(numberItem, ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); @@ -1606,6 +2216,16 @@ public void testDeltaUntil() { assertEquals(FUTURE_INTERMEDIATE_VALUE_3 - dtState.doubleValue(), qt.doubleValue(), 0.001); assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaUntil(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(delta); + qt = delta.as(QuantityType.class); + assertNotNull(qt); + qtState = groupQuantityItem.getState().as(QuantityType.class); + assertNotNull(qtState); + assertEquals(FUTURE_INTERMEDIATE_VALUE_3 - dtState.doubleValue(), qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + // default persistence service delta = PersistenceExtensions.deltaUntil(numberItem, ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault())); @@ -1631,6 +2251,15 @@ public void testDeltaBetween() { assertEquals(HISTORIC_INTERMEDIATE_VALUE_2 - HISTORIC_INTERMEDIATE_VALUE_1, qt.doubleValue(), 0.001); assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_2, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(delta); + qt = delta.as(QuantityType.class); + assertNotNull(qt); + assertEquals(HISTORIC_INTERMEDIATE_VALUE_2 - HISTORIC_INTERMEDIATE_VALUE_1, qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaBetween(numberItem, ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); @@ -1648,6 +2277,15 @@ public void testDeltaBetween() { assertEquals(FUTURE_INTERMEDIATE_VALUE_4 - FUTURE_INTERMEDIATE_VALUE_3, qt.doubleValue(), 0.001); assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaBetween(groupQuantityItem, + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_4, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(delta); + qt = delta.as(QuantityType.class); + assertNotNull(qt); + assertEquals(FUTURE_INTERMEDIATE_VALUE_4 - FUTURE_INTERMEDIATE_VALUE_3, qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaBetween(numberItem, ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); @@ -1665,6 +2303,15 @@ public void testDeltaBetween() { assertEquals(FUTURE_INTERMEDIATE_VALUE_3 - HISTORIC_INTERMEDIATE_VALUE_1, qt.doubleValue(), 0.001); assertEquals(SIUnits.CELSIUS, qt.getUnit()); + delta = PersistenceExtensions.deltaBetween(groupQuantityItem, + ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), + ZonedDateTime.of(FUTURE_INTERMEDIATE_VALUE_3, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), SERVICE_ID); + assertNotNull(delta); + qt = delta.as(QuantityType.class); + assertNotNull(qt); + assertEquals(FUTURE_INTERMEDIATE_VALUE_3 - HISTORIC_INTERMEDIATE_VALUE_1, qt.doubleValue(), 0.001); + assertEquals(SIUnits.CELSIUS, qt.getUnit()); + // default persistence service delta = PersistenceExtensions.deltaBetween(numberItem, ZonedDateTime.of(HISTORIC_INTERMEDIATE_VALUE_1, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()), @@ -1841,6 +2488,33 @@ public void testPreviousStateQuantityTypeNoSkip() { assertNull(prevStateItem); } + @Test + public void testPreviousStateGroupQuantityTypeNoSkip() { + HistoricItem prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(prevStateItem); + assertThat(prevStateItem.getState(), is(instanceOf(QuantityType.class))); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), prevStateItem.getState()); + + groupQuantityItem.setState(QuantityType.valueOf(4321, SIUnits.CELSIUS)); + prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(prevStateItem); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), prevStateItem.getState()); + + groupQuantityItem.setState(QuantityType.valueOf(HISTORIC_END, SIUnits.CELSIUS)); + prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(prevStateItem); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), prevStateItem.getState()); + + groupQuantityItem.setState(QuantityType.valueOf(3025, SIUnits.CELSIUS)); + prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(prevStateItem); + assertEquals(new QuantityType<>(value(HISTORIC_END), SIUnits.CELSIUS), prevStateItem.getState()); + + // default persistence service + prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, false); + assertNull(prevStateItem); + } + @Test public void testPreviousStateDecimalTypeSkip() { numberItem.setState(new DecimalType(HISTORIC_END)); @@ -1865,6 +2539,18 @@ public void testPreviousStateQuantityTypeSkip() { assertNull(prevStateItem); } + @Test + public void testPreviousStateGroupQuantityTypeSkip() { + groupQuantityItem.setState(QuantityType.valueOf(HISTORIC_END, SIUnits.CELSIUS)); + HistoricItem prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, true, SERVICE_ID); + assertNotNull(prevStateItem); + assertEquals(new QuantityType<>(value(HISTORIC_END - 1), SIUnits.CELSIUS), prevStateItem.getState()); + + // default persistence service + prevStateItem = PersistenceExtensions.previousState(groupQuantityItem, true); + assertNull(prevStateItem); + } + @Test public void testNextStateDecimalTypeNoSkip() { HistoricItem nextStateItem = PersistenceExtensions.nextState(numberItem, false, SERVICE_ID); @@ -1919,6 +2605,33 @@ public void testNextStateQuantityTypeNoSkip() { assertNull(nextStateItem); } + @Test + public void testNextStateGroupQuantityTypeNoSkip() { + HistoricItem nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(nextStateItem); + assertThat(nextStateItem.getState(), is(instanceOf(QuantityType.class))); + assertEquals(new QuantityType<>(value(FUTURE_START), SIUnits.CELSIUS), nextStateItem.getState()); + + groupQuantityItem.setState(QuantityType.valueOf(4321, SIUnits.CELSIUS)); + nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(nextStateItem); + assertEquals(new QuantityType<>(value(FUTURE_START), SIUnits.CELSIUS), nextStateItem.getState()); + + groupQuantityItem.setState(QuantityType.valueOf(FUTURE_START, SIUnits.CELSIUS)); + nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(nextStateItem); + assertEquals(new QuantityType<>(value(FUTURE_START), SIUnits.CELSIUS), nextStateItem.getState()); + + groupQuantityItem.setState(QuantityType.valueOf(3025, SIUnits.CELSIUS)); + nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, false, SERVICE_ID); + assertNotNull(nextStateItem); + assertEquals(new QuantityType<>(value(FUTURE_START), SIUnits.CELSIUS), nextStateItem.getState()); + + // default persistence service + nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, false); + assertNull(nextStateItem); + } + @Test public void testNextStateDecimalTypeSkip() { numberItem.setState(new DecimalType(FUTURE_START)); @@ -1943,6 +2656,18 @@ public void testNextStateQuantityTypeSkip() { assertNull(nextStateItem); } + @Test + public void testNextStateGroupQuantityTypeSkip() { + groupQuantityItem.setState(QuantityType.valueOf(FUTURE_START, SIUnits.CELSIUS)); + HistoricItem nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, true, SERVICE_ID); + assertNotNull(nextStateItem); + assertEquals(new QuantityType<>(value(FUTURE_START + 1), SIUnits.CELSIUS), nextStateItem.getState()); + + // default persistence service + nextStateItem = PersistenceExtensions.nextState(groupQuantityItem, true); + assertNull(nextStateItem); + } + @Test public void testChangedSince() { Boolean changed = PersistenceExtensions.changedSince(numberItem, diff --git a/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/TestPersistenceService.java b/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/TestPersistenceService.java index b42e7df8307..74ee49a33bc 100644 --- a/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/TestPersistenceService.java +++ b/bundles/org.openhab.core.persistence/src/test/java/org/openhab/core/persistence/extensions/TestPersistenceService.java @@ -29,6 +29,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; +import org.openhab.core.items.GroupItem; import org.openhab.core.items.Item; import org.openhab.core.items.ItemRegistry; import org.openhab.core.library.items.NumberItem; @@ -183,7 +184,11 @@ public ZonedDateTime getTimestamp() { @Override public State getState() { Item item = itemRegistry.get(Objects.requireNonNull(filter.getItemName())); - Unit unit = item instanceof NumberItem ni ? ni.getUnit() : null; + Item baseItem = item; + if (baseItem instanceof GroupItem groupItem) { + baseItem = groupItem.getBaseItem(); + } + Unit unit = baseItem instanceof NumberItem ni ? ni.getUnit() : null; return unit == null ? new DecimalType(year) : QuantityType.valueOf(year, unit); } From 5398d14e969fb79962fe269313c1673e720ebed6 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 3 Jul 2024 19:27:34 +0200 Subject: [PATCH 24/50] Upgrade maven-deploy-plugin to 3.1.2 (#4295) This may help with fixing or diagnosing read timouts during deployment. Signed-off-by: Wouter Born --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index af257faea96..9b13123ee20 100644 --- a/pom.xml +++ b/pom.xml @@ -302,6 +302,12 @@ Import-Package: \\ + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.2 + + org.apache.maven.plugins maven-enforcer-plugin From 2be44d1cb2c20d7f9504ef240c01e3c1bb7c28b5 Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Wed, 3 Jul 2024 21:20:39 +0200 Subject: [PATCH 25/50] New Crowdin updates (#4292) * New translations i18n.properties (Hungarian) * New translations voice.properties (French) * New translations addons.properties (French) * New translations restauth.properties (French) * New translations i18n.properties (French) * New translations i18n.properties (Danish) * New translations defaultsystemchannels.properties (Finnish) * New translations addons.properties (Finnish) * New translations languagesupport.properties (Portuguese) * New translations languagesupport.properties (Portuguese, Brazilian) * New translations i18n.properties (Hebrew) * New translations i18n.properties (Dutch) * New translations addons.properties (French) * New translations languagesupport.properties (Portuguese) * New translations languagesupport.properties (Portuguese, Brazilian) --- .../main/resources/OH-INF/i18n/restauth_fr.properties | 4 ++-- .../OH-INF/i18n/DefaultSystemChannels_fi.properties | 2 ++ .../src/main/resources/OH-INF/i18n/voice_fr.properties | 4 ++-- .../main/resources/OH-INF/i18n/addons_fi.properties | 2 ++ .../main/resources/OH-INF/i18n/addons_fr.properties | 10 +++++----- .../src/main/resources/OH-INF/i18n/i18n_da.properties | 2 +- .../src/main/resources/OH-INF/i18n/i18n_fr.properties | 2 +- .../src/main/resources/OH-INF/i18n/i18n_he.properties | 2 +- .../src/main/resources/OH-INF/i18n/i18n_hu.properties | 2 +- .../src/main/resources/OH-INF/i18n/i18n_nl.properties | 2 +- 10 files changed, 18 insertions(+), 14 deletions(-) diff --git a/bundles/org.openhab.core.io.rest.auth/src/main/resources/OH-INF/i18n/restauth_fr.properties b/bundles/org.openhab.core.io.rest.auth/src/main/resources/OH-INF/i18n/restauth_fr.properties index 53766033413..3725280a3cf 100644 --- a/bundles/org.openhab.core.io.rest.auth/src/main/resources/OH-INF/i18n/restauth_fr.properties +++ b/bundles/org.openhab.core.io.rest.auth/src/main/resources/OH-INF/i18n/restauth_fr.properties @@ -1,9 +1,9 @@ system.config.restauth.allowBasicAuth.label = Autoriser l'authentification basique -system.config.restauth.allowBasicAuth.description = Autoriser l'utilisation de l'authentification basique pour accéder aux ressources d'API protégées, ainsi que l'accès aux jetons et jetons d'API. +system.config.restauth.allowBasicAuth.description = Autoriser l'utilisation de l'authentification basique pour accéder aux ressources d'API protégées, en complément des jetons d'accès et jetons d'API. system.config.restauth.cacheExpiration.label = Temps d'expiration du cache system.config.restauth.cacheExpiration.description = Lorsque l'authentification de base est activée, les identifiants sont placés en cache afin d'accélérer les requêtes d'autorisations. Les entrées dans le cache expirent après un certain temps afin de ne pas conserver les informations d'identification en mémoire indéfiniment. Cette valeur définit le temps d'expiration en heures. Définissez-le à 0 pour désactiver le cache. system.config.restauth.implicitUserRole.label = Rôle implicite d'utilisateur -system.config.restauth.implicitUserRole.description = Par défaut, les opérations nécessitant le rôle "user" sont disponibles lorsqu'elles ne sont pas authentifiées. Désactiver cette option imposera l'autorisation pour ces opérations. Avertissement\: Les clients qui ne prennent pas en charge l'authentification peuvent cesser de fonctionner. +system.config.restauth.implicitUserRole.description = Par défaut, les opérations nécessitant le rôle "user" sont disponibles lorsqu'elles ne sont pas authentifiées. Désactiver cette option imposera l'autorisation pour ces opérations. Avertissement \: Les clients qui ne prennent pas en charge l'authentification peuvent cesser de fonctionner. system.config.restauth.trustedNetworks.label = Réseaux de confiance system.config.restauth.trustedNetworks.description = Accorder un rôle d'utilisateur implicite aux requêtes provenant de ces réseaux ; liste séparée par des virgules de CIDR (ignorée si le "rôle implicite d'utilisateur" est activé). diff --git a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fi.properties b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fi.properties index 9e1340ac261..7d615050dc3 100644 --- a/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fi.properties +++ b/bundles/org.openhab.core.thing/src/main/resources/OH-INF/i18n/DefaultSystemChannels_fi.properties @@ -56,3 +56,5 @@ channel-type.system.electric-voltage.label = Sähköjännite channel-type.system.electric-voltage.description = Nykyinen sähköjännite channel-type.system.electrical-energy.label = Sähköenergia channel-type.system.electrical-energy.description = Nykyinen sähköenergia +channel-type.system.uv-index.label = UV-indeksi +channel-type.system.uv-index.description = Nykyinen UV-indeksi diff --git a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties index aa63187589b..2074ccbf3a1 100644 --- a/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties +++ b/bundles/org.openhab.core.voice/src/main/resources/OH-INF/i18n/voice_fr.properties @@ -11,7 +11,7 @@ system.config.voice.defaultVoice.description = La voix par défaut à utiliser s system.config.voice.keyword.label = Mot magique system.config.voice.keyword.description = Le mot magique à repérer pour démarrer un dialogue. system.config.voice.listeningItem.label = Interrupteur d'écoute -system.config.voice.listeningItem.description = Si fourni, l'élément sera activé pendant la période où le processeur de dialogue a repéré le mot clé et est en train d'écouter les commandes. +system.config.voice.listeningItem.description = Si fourni, l'item sera activé pendant la période où le processeur de dialogue a repéré le mot clé et est en train d'écouter les commandes. system.config.voice.listeningMelody.label = Mélodie d'écoute system.config.voice.listeningMelody.description = Une mélodie à jouer pour annoncer à l'utilisateur que le traitement du dialogue va commencer, laissez vide pour la désactiver. (Liste de notes séparée par des espaces. Exemple\: "A O\:100 A'\:50") system.config.voice.listeningMelody.option.Bb = Si bémol @@ -20,7 +20,7 @@ system.config.voice.listeningMelody.option.E = Mi system.config.voice.enableCacheTTS.label = Activer le cache TTS system.config.voice.enableCacheTTS.description = À activer pour permettre aux services TTS de mettre en cache les fichiers audio sur le disque. system.config.voice.cacheSizeTTS.label = Taille du cache TTS -system.config.voice.cacheSizeTTS.description = La taille limite du cache TTS (en kB). +system.config.voice.cacheSizeTTS.description = La taille limite du cache TTS (en kilooctet). system.config.voice.maxTextLengthCacheTTS.label = Longueur maximale du texte pour le cache TTS system.config.voice.maxTextLengthCacheTTS.description = La longueur maximale des textes gérés par le cache TTS (en nombre de caractères). Au-delà, le texte sera géré par le service TTS sans le stocker. 0 pour aucune limite. diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fi.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fi.properties index bdca2964da6..9055e087b47 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fi.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fi.properties @@ -6,6 +6,8 @@ system.config.addons.suggestionFinderIp.label = IP-pohjainen ehdotushaku system.config.addons.suggestionFinderIp.description = Käytä IP-verkkohakua lisäosien ehdottamiseksi. Käyttöönotto/käytöstä poisto saattaa kestää minuutin verran. system.config.addons.suggestionFinderMdns.label = mDNS-ehdotushaku system.config.addons.suggestionFinderMdns.description = Käytä mDNS-verkkohakua lisäosien ehdottamiseksi. Käyttöönotto/käytöstä poisto saattaa kestää minuutin verran. +system.config.addons.suggestionFinderSddp.label = SDDP-ehdotushaku +system.config.addons.suggestionFinderSddp.description = Käytä SDDP-verkkohakua lisäosien ehdottamiseksi. Käyttöönotto/käytöstä poisto saattaa kestää minuutin verran. system.config.addons.suggestionFinderUpnp.label = UPnP-ehdotushaku system.config.addons.suggestionFinderUpnp.description = Käytä UPnP-verkkohakua lisäosien ehdottamiseksi. Käyttöönotto/käytöstä poisto saattaa kestää minuutin verran. system.config.addons.suggestionFinderUsb.label = USB-ehdotushaku diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties index 671d4d2e309..7a938be53ba 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_fr.properties @@ -3,14 +3,14 @@ system.config.addons.includeIncompatible.description = Certains services complé system.config.addons.remote.label = Accès au dépôt distant system.config.addons.remote.description = Définit si openHAB doit accéder au dépôt distant pour l'installation d'une extension. system.config.addons.suggestionFinderIp.label = Recherche de suggestions par IP -system.config.addons.suggestionFinderIp.description = Utilise des diffusions de découverte de réseau IP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. +system.config.addons.suggestionFinderIp.description = Utiliser la recherche réseau par broadcast IP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderMdns.label = Recherche de suggestions par mDNS -system.config.addons.suggestionFinderMdns.description = Utilise l'analyse réseau mDNS pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. +system.config.addons.suggestionFinderMdns.description = Utiliser la recherche réseau mDNS pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderSddp.label = Recherche de suggestions par SDDP -system.config.addons.suggestionFinderSddp.description = Utilise l'analyse réseau SDDP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. +system.config.addons.suggestionFinderSddp.description = Utiliser la recherche réseau SDDP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderUpnp.label = Recherche de suggestions par UPnP -system.config.addons.suggestionFinderUpnp.description = Utilise l'analyse réseau UPnP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. +system.config.addons.suggestionFinderUpnp.description = Utiliser la recherche réseau UPnP pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. system.config.addons.suggestionFinderUsb.label = Recherche de suggestions par USB -system.config.addons.suggestionFinderUsb.description = Scanne les périphériques USB connectés pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. +system.config.addons.suggestionFinderUsb.description = Rechercher les périphériques USB connectés pour suggérer des modules complémentaires. L'activation/désactivation peut prendre jusqu'à 1 minute. service.system.addons.label = Gestion des extensions diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_da.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_da.properties index c82c3bc1506..1c1bb929535 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_da.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_da.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = Sprog system.config.i18n.language.description = Standardsprog der skal bruges. Hvis det ikke er angivet, bruges systemets landestandard. system.config.i18n.location.label = Placering -system.config.i18n.location.description = Placeringen af denne installation.
    Koordinater som <latitude>,<longitude>[<altitude>]
    Eksempel\: "55.6760049,12.5691240" (København) +system.config.i18n.location.description = Placeringen af denne installation.
    Koordinater som <breddegrad>,<længdegrad>[<højde>] hvor højde er valgfri
    Eksempel\: "55.6760049,12.5691240" (København) system.config.i18n.measurementSystem.label = Målesystem system.config.i18n.measurementSystem.description = Målesystemet anvendes til enhedskonvertering. system.config.i18n.measurementSystem.option.SI = Metrisk diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_fr.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_fr.properties index 200a173b5f9..2c8835cd57e 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_fr.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_fr.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = Langue system.config.i18n.language.description = La langue par défaut à utiliser. Si elle n'est pas spécifiée, la langue par défaut du système est utilisée. system.config.i18n.location.label = Emplacement -system.config.i18n.location.description = L'emplacement de cette installation.
    Coordonnées sous la forme <latitude>,<longitude>[<altitude>]
    Exemple \: "52.5200066,13.4049540" (Berlin) +system.config.i18n.location.description = L'emplacement de cette installation.
    Coordonnées sous la forme <latitude>,<longitude>[,<altitude>] avec l'altitude optionnelle
    Exemple \: "52.5200066,13.4049540" (Berlin) system.config.i18n.measurementSystem.label = Système de mesure system.config.i18n.measurementSystem.description = Le système de mesure est utilisé pour la conversion d'unités. system.config.i18n.measurementSystem.option.SI = Métrique diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_he.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_he.properties index ba2f5efcdd4..41cbaae0385 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_he.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_he.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = שפה system.config.i18n.language.description = שפת ברירת המחדל בה יש להשתמש. אם לא מצוין, נעשה שימוש באזור ברירת המחדל של המערכת. system.config.i18n.location.label = מיקום -system.config.i18n.location.description = המיקום של התקנה זו.
    קואורדינטות כ- < קו רוחב >, < קו אורך > [< גובה >]
    דוגמה\: "52.5200066,13.4049540" (ברלין) +system.config.i18n.location.description = המיקום של התקנה זו.
    קואורדינטות כ-<רוחב>,<אורך>[,<גובה>] כאשר הגובה הוא אופציונלי
    דוגמה\: "52.5200066,13.4049540" (ברלין) system.config.i18n.measurementSystem.label = שיטת מדידה system.config.i18n.measurementSystem.description = שיטת המדידה משמשת להמרת יחידות. system.config.i18n.measurementSystem.option.SI = מטרי diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_hu.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_hu.properties index 579588027dd..a0dfe1f3d47 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_hu.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_hu.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = Nyelv system.config.i18n.language.description = Az alapértelmezett nyelvet ajánlott használni. Ha nincs megadva a rendszer alapértelmezett nyelvi beállításai lesznek használva. system.config.i18n.location.label = Helyszín -system.config.i18n.location.description = A jelen telepítés helyzete.
    A koordináták <szélesség>,<hosszúság>[<magasság>]
    Példa\: "47.497913,19.040236" (Budapest) +system.config.i18n.location.description = A jelen telepítés helyzete.
    A koordináták <szélesség>,<hosszúság>[<magasság>] a magasság megadása nem kötelező
    Példa\: "47.497913,19.040236" (Budapest) system.config.i18n.measurementSystem.label = Mérési rendszer system.config.i18n.measurementSystem.description = Egységek meghatározása a Mérési rendszer alapján. system.config.i18n.measurementSystem.option.SI = Metrikus diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_nl.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_nl.properties index 0979e81dd16..52b926148f0 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_nl.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_nl.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = Taal system.config.i18n.language.description = De standaardtaal die moet worden gebruikt. Indien niet opgegeven, dan wordt de standaard systeemtaal gebruikt. system.config.i18n.location.label = Locatie -system.config.i18n.location.description = De locatie van deze installatie.
    Coördinaten als <breedtegraad>,<lengtegraad>[<hoogte>]
    Voorbeeld\: "52.5200066,13.4049540" (Berlijn) +system.config.i18n.location.description = De locatie van deze installatie.
    Coördinaten als <breedtegraad>,<lengtegraad>[,<hoogte>] waarbij de hoogte optioneel is
    Voorbeeld\: "52.5200066,13.4049540" (Berlijn) system.config.i18n.measurementSystem.label = Meetsysteem system.config.i18n.measurementSystem.description = Het meetsysteem dat wordt gebruikt voor het converteren van eenheden. system.config.i18n.measurementSystem.option.SI = Metrisch From b932a4df5e6d4f0706afee20b112b710683d16d7 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Thu, 4 Jul 2024 17:35:45 +0200 Subject: [PATCH 26/50] YAML files: ignore files inside automation sub-folder (#4291) Also ignore unreachable files Signed-off-by: Laurent Garnier --- .../core/model/yaml/internal/YamlModelRepositoryImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java b/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java index 0aecf551e5b..fd2048832b6 100644 --- a/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java +++ b/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java @@ -99,7 +99,8 @@ public YamlModelRepositoryImpl(@Reference(target = WatchService.CONFIG_WATCHER_F // read initial contents try (Stream files = Files.walk(watchPath)) { - files.filter(Files::isRegularFile).map(watchPath::relativize).forEach(f -> processWatchEvent(CREATE, f)); + files.filter(f -> Files.isReadable(f) && Files.isRegularFile(f)).map(watchPath::relativize) + .forEach(f -> processWatchEvent(CREATE, f)); } catch (IOException e) { logger.warn("Could not list YAML files in '{}', models might be missing: {}", watchPath, e.getMessage()); } @@ -116,7 +117,8 @@ public void deactivate() { public synchronized void processWatchEvent(Kind kind, Path path) { Path fullPath = watchPath.resolve(path); String pathString = path.toString(); - if (Files.isDirectory(fullPath) || fullPath.toFile().isHidden() || !pathString.endsWith(".yaml")) { + if (!Files.isReadable(fullPath) || Files.isDirectory(fullPath) || path.startsWith("automation") + || !pathString.endsWith(".yaml") || fullPath.toFile().isHidden()) { logger.trace("Ignored {}", fullPath); return; } From 5710ee4962082342f7e2c6c9f8c8d3b6023f4c4e Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Sat, 6 Jul 2024 16:58:43 +0200 Subject: [PATCH 27/50] New Crowdin updates (#4300) * New translations addons.properties (German) * New translations i18n.properties (German) --- .../main/resources/OH-INF/i18n/addons_de.properties | 10 ++++++++++ .../src/main/resources/OH-INF/i18n/i18n_de.properties | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_de.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_de.properties index 7e4eee67c0f..c057934afd5 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_de.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/addons_de.properties @@ -2,5 +2,15 @@ system.config.addons.includeIncompatible.label = (Potentiell) Inkompatible Add-O system.config.addons.includeIncompatible.description = Einige Drittanbieter stellen möglicherweise Add-Ons zur Verfügung, deren Kompatibilität mit dem aktuell laufenden System nicht gegeben ist. Wenn aktiviert, dann werden inkompatible Add-Ons angezeigt. system.config.addons.remote.label = Zugriff auf Remote-Repository system.config.addons.remote.description = Legt fest, ob openHAB auf das Remote-Repository für die Add-On-Installation zugreifen soll. +system.config.addons.suggestionFinderIp.label = Add-ons automatisch vorschlagen (Netzwerkscan) +system.config.addons.suggestionFinderIp.description = IP-Broadcasts und Multicasts im Netzwerk verwenden, um Add-ons vorzuschlagen. Das (De-)Aktivieren kann bis zu einer Minute dauern. +system.config.addons.suggestionFinderMdns.label = Add-ons automatisch vorschlagen (mDNS) +system.config.addons.suggestionFinderMdns.description = mDNS-Netzwerk-Scan verwenden, um Add-ons vorzuschlagen. Das (De-)Aktivieren kann bis zu einer Minute dauern. +system.config.addons.suggestionFinderSddp.label = SDDP Vorschlagsfinder +system.config.addons.suggestionFinderSddp.description = SDDP-Netzwerk-Scan verwenden, um Add-ons vorzuschlagen. Das (De-)Aktivieren kann bis zu einer Minute dauern. +system.config.addons.suggestionFinderUpnp.label = Add-ons automatisch vorschlagen (UPnP) +system.config.addons.suggestionFinderUpnp.description = UPnP-Netzwerk-Scan verwenden, um Add-ons vorzuschlagen. Das (De-)Aktivieren kann bis zu einer Minute dauern. +system.config.addons.suggestionFinderUsb.label = Add-ons automatisch vorschlagen (USB) +system.config.addons.suggestionFinderUsb.description = Scannt USB-Geräte um Add-ons vorzuschlagen. Das (De-)Aktivieren kann bis zu einer Minute dauern. service.system.addons.label = Add-On-Management diff --git a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_de.properties b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_de.properties index dc322c76540..7164375f09a 100644 --- a/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_de.properties +++ b/bundles/org.openhab.core/src/main/resources/OH-INF/i18n/i18n_de.properties @@ -1,7 +1,7 @@ system.config.i18n.language.label = Sprache system.config.i18n.language.description = Die Sprache, die verwendet werden soll. Falls nicht angegeben, wird die Systemsprache verwendet. system.config.i18n.location.label = Standort -system.config.i18n.location.description = Der Standort dieser Installation.
    Koordinaten als <Latitude>,<Longitude>[<Altitude>]
    Beispiel\: "52.5200066,13.4049540" (Berlin) +system.config.i18n.location.description = Der Standort dieser Installation.
    Koordinaten als <Breitengrad>,<Längengrad>[,<Höhe ü. M.>] (Höhe ü. M. ist optional)
    Beispiel\: "52.5200066,13.4049540" (Berlin) system.config.i18n.measurementSystem.label = Einheitensystem system.config.i18n.measurementSystem.description = Das Einheitensystem, das für die Umrechnung und Anzeige von Daten eingesetzt wird. system.config.i18n.measurementSystem.option.SI = Metrisch From 87ad314c028aa9e5180028935dc4afb58b0d56e4 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Sat, 6 Jul 2024 20:35:06 +0200 Subject: [PATCH 28/50] Fix AccessDeniedException in YamlModelRepository (#4299) Signed-off-by: Jan N. Klug --- .../internal/YamlModelRepositoryImpl.java | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java b/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java index fd2048832b6..1905db61073 100644 --- a/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java +++ b/bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java @@ -15,8 +15,11 @@ import static org.openhab.core.service.WatchService.Kind.CREATE; import java.io.IOException; +import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -26,7 +29,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; -import java.util.stream.Stream; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; @@ -98,9 +100,25 @@ public YamlModelRepositoryImpl(@Reference(target = WatchService.CONFIG_WATCHER_F watchPath = watchService.getWatchPath(); // read initial contents - try (Stream files = Files.walk(watchPath)) { - files.filter(f -> Files.isReadable(f) && Files.isRegularFile(f)).map(watchPath::relativize) - .forEach(f -> processWatchEvent(CREATE, f)); + try { + Files.walkFileTree(watchPath, new SimpleFileVisitor<>() { + @Override + public FileVisitResult visitFile(@NonNullByDefault({}) Path file, + @NonNullByDefault({}) BasicFileAttributes attrs) throws IOException { + if (attrs.isRegularFile()) { + Path relativePath = watchPath.relativize(file); + processWatchEvent(CREATE, relativePath); + } + return FileVisitResult.CONTINUE; + } + + @Override + public FileVisitResult visitFileFailed(@NonNullByDefault({}) Path file, + @NonNullByDefault({}) IOException exc) throws IOException { + logger.warn("Failed to process {}: {}", file.toAbsolutePath(), exc.getClass().getSimpleName()); + return FileVisitResult.CONTINUE; + } + }); } catch (IOException e) { logger.warn("Could not list YAML files in '{}', models might be missing: {}", watchPath, e.getMessage()); } From 340996f971105c9c2cf3df5aa7577e555f0f58c3 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sat, 6 Jul 2024 20:38:20 +0200 Subject: [PATCH 29/50] Fix TimeSeries policy REPLACE not being applied (#4298) Fixes #4297 Signed-off-by: Jacob Laursen --- .../core/persistence/extensions/PersistenceExtensions.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java index e11a7e5c48f..9e54aeac1a7 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java @@ -218,6 +218,10 @@ private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable TimeZoneProvider tzProvider = timeZoneProvider; ZoneId timeZone = tzProvider != null ? tzProvider.getTimeZone() : ZoneId.systemDefault(); if (service instanceof ModifiablePersistenceService modifiableService) { + if (timeSeries.getPolicy() == TimeSeries.Policy.REPLACE) { + internalRemoveAllStatesBetween(item, timeSeries.getBegin().atZone(timeZone), + timeSeries.getEnd().atZone(timeZone), serviceId); + } timeSeries.getStates() .forEach(s -> modifiableService.store(item, s.timestamp().atZone(timeZone), s.state())); return; From 07e23eac3ce8a3f524aeecfb9b9669e77c86e9bb Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Sun, 7 Jul 2024 16:05:56 +0000 Subject: [PATCH 30/50] [unleash-maven-plugin] Preparation for next development cycle. --- bom/compile-model/pom.xml | 6 ++---- bom/compile/pom.xml | 6 ++---- bom/openhab-core-index/pom.xml | 6 ++---- bom/openhab-core/pom.xml | 6 ++---- bom/pom.xml | 6 ++---- bom/runtime-index/pom.xml | 6 ++---- bom/runtime/pom.xml | 6 ++---- bom/test-index/pom.xml | 6 ++---- bom/test/pom.xml | 6 ++---- bundles/org.openhab.core.addon.eclipse/pom.xml | 6 ++---- bundles/org.openhab.core.addon.marketplace.karaf/pom.xml | 6 ++---- bundles/org.openhab.core.addon.marketplace/pom.xml | 6 ++---- bundles/org.openhab.core.addon/pom.xml | 6 ++---- bundles/org.openhab.core.audio/pom.xml | 6 ++---- bundles/org.openhab.core.auth.jaas/pom.xml | 6 ++---- bundles/org.openhab.core.auth.oauth2client/pom.xml | 6 ++---- bundles/org.openhab.core.automation.module.media/pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../org.openhab.core.automation.module.script/pom.xml | 6 ++---- bundles/org.openhab.core.automation.rest/pom.xml | 6 ++---- bundles/org.openhab.core.automation/pom.xml | 6 ++---- bundles/org.openhab.core.config.core/pom.xml | 6 ++---- .../org.openhab.core.config.discovery.addon.ip/pom.xml | 6 ++---- .../org.openhab.core.config.discovery.addon.mdns/pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../org.openhab.core.config.discovery.addon.sddp/pom.xml | 6 ++---- .../org.openhab.core.config.discovery.addon.upnp/pom.xml | 6 ++---- .../org.openhab.core.config.discovery.addon.usb/pom.xml | 6 ++---- bundles/org.openhab.core.config.discovery.addon/pom.xml | 6 ++---- bundles/org.openhab.core.config.discovery.mdns/pom.xml | 6 ++---- bundles/org.openhab.core.config.discovery.sddp/pom.xml | 6 ++---- bundles/org.openhab.core.config.discovery.upnp/pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../org.openhab.core.config.discovery.usbserial/pom.xml | 6 ++---- bundles/org.openhab.core.config.discovery/pom.xml | 6 ++---- bundles/org.openhab.core.config.dispatch/pom.xml | 6 ++---- bundles/org.openhab.core.config.jupnp/pom.xml | 6 ++---- bundles/org.openhab.core.config.serial/pom.xml | 6 ++---- bundles/org.openhab.core.ephemeris/pom.xml | 6 ++---- bundles/org.openhab.core.id/pom.xml | 6 ++---- bundles/org.openhab.core.io.bin2json/pom.xml | 6 ++---- bundles/org.openhab.core.io.console.eclipse/pom.xml | 6 ++---- bundles/org.openhab.core.io.console.karaf/pom.xml | 6 ++---- bundles/org.openhab.core.io.console.rfc147/pom.xml | 6 ++---- bundles/org.openhab.core.io.console/pom.xml | 6 ++---- bundles/org.openhab.core.io.http.auth/pom.xml | 6 ++---- bundles/org.openhab.core.io.http/pom.xml | 6 ++---- bundles/org.openhab.core.io.jetty.certificate/pom.xml | 9 +++------ bundles/org.openhab.core.io.monitor/pom.xml | 6 ++---- bundles/org.openhab.core.io.net/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.audio/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.auth/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.core/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.log/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.mdns/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.sitemap/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.sse/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.swagger/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.transform/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.ui/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest.voice/pom.xml | 6 ++---- bundles/org.openhab.core.io.rest/pom.xml | 6 ++---- bundles/org.openhab.core.io.transport.mdns/pom.xml | 6 ++---- bundles/org.openhab.core.io.transport.modbus/pom.xml | 6 ++---- bundles/org.openhab.core.io.transport.mqtt/pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../org.openhab.core.io.transport.serial.rxtx/pom.xml | 6 ++---- bundles/org.openhab.core.io.transport.serial/pom.xml | 6 ++---- bundles/org.openhab.core.io.transport.upnp/pom.xml | 6 ++---- bundles/org.openhab.core.io.websocket/pom.xml | 6 ++---- bundles/org.openhab.core.karaf/pom.xml | 6 ++---- bundles/org.openhab.core.model.core/pom.xml | 6 ++---- bundles/org.openhab.core.model.item.ide/pom.xml | 6 ++---- bundles/org.openhab.core.model.item.runtime/pom.xml | 6 ++---- bundles/org.openhab.core.model.item/pom.xml | 6 ++---- bundles/org.openhab.core.model.lsp/pom.xml | 6 ++---- bundles/org.openhab.core.model.persistence.ide/pom.xml | 6 ++---- .../org.openhab.core.model.persistence.runtime/pom.xml | 6 ++---- bundles/org.openhab.core.model.persistence/pom.xml | 6 ++---- bundles/org.openhab.core.model.rule.ide/pom.xml | 6 ++---- bundles/org.openhab.core.model.rule.runtime/pom.xml | 6 ++---- bundles/org.openhab.core.model.rule/pom.xml | 6 ++---- bundles/org.openhab.core.model.script.ide/pom.xml | 6 ++---- bundles/org.openhab.core.model.script.runtime/pom.xml | 6 ++---- bundles/org.openhab.core.model.script/pom.xml | 6 ++---- bundles/org.openhab.core.model.sitemap.ide/pom.xml | 6 ++---- bundles/org.openhab.core.model.sitemap.runtime/pom.xml | 6 ++---- bundles/org.openhab.core.model.sitemap/pom.xml | 6 ++---- bundles/org.openhab.core.model.thing.ide/pom.xml | 6 ++---- bundles/org.openhab.core.model.thing.runtime/pom.xml | 6 ++---- bundles/org.openhab.core.model.thing/pom.xml | 6 ++---- bundles/org.openhab.core.model.yaml/pom.xml | 6 ++---- bundles/org.openhab.core.persistence/pom.xml | 6 ++---- bundles/org.openhab.core.semantics/pom.xml | 6 ++---- bundles/org.openhab.core.storage.json/pom.xml | 6 ++---- bundles/org.openhab.core.test.magic/pom.xml | 6 ++---- bundles/org.openhab.core.test/pom.xml | 6 ++---- bundles/org.openhab.core.thing/pom.xml | 6 ++---- bundles/org.openhab.core.transform/pom.xml | 6 ++---- bundles/org.openhab.core.ui.icon/pom.xml | 6 ++---- bundles/org.openhab.core.ui/pom.xml | 6 ++---- bundles/org.openhab.core.voice/pom.xml | 6 ++---- bundles/org.openhab.core/pom.xml | 6 ++---- bundles/pom.xml | 6 ++---- features/karaf/openhab-core/pom.xml | 6 ++---- features/karaf/openhab-tp/pom.xml | 6 ++---- features/karaf/pom.xml | 6 ++---- features/pom.xml | 6 ++---- itests/org.openhab.core.addon.tests/pom.xml | 6 ++---- itests/org.openhab.core.auth.oauth2client.tests/pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- itests/org.openhab.core.automation.tests/pom.xml | 6 ++---- itests/org.openhab.core.config.core.tests/pom.xml | 6 ++---- .../org.openhab.core.config.discovery.mdns.tests/pom.xml | 6 ++---- itests/org.openhab.core.config.discovery.tests/pom.xml | 6 ++---- .../pom.xml | 6 ++---- .../pom.xml | 6 ++---- itests/org.openhab.core.config.dispatch.tests/pom.xml | 6 ++---- itests/org.openhab.core.ephemeris.tests/pom.xml | 6 ++---- itests/org.openhab.core.io.net.tests/pom.xml | 6 ++---- itests/org.openhab.core.io.rest.core.tests/pom.xml | 6 ++---- itests/org.openhab.core.model.item.tests/pom.xml | 6 ++---- itests/org.openhab.core.model.rule.tests/pom.xml | 6 ++---- itests/org.openhab.core.model.script.tests/pom.xml | 6 ++---- itests/org.openhab.core.model.thing.tests/pom.xml | 6 ++---- itests/org.openhab.core.model.thing.testsupport/pom.xml | 6 ++---- itests/org.openhab.core.storage.json.tests/pom.xml | 6 ++---- itests/org.openhab.core.tests/pom.xml | 6 ++---- itests/org.openhab.core.thing.tests/pom.xml | 6 ++---- itests/org.openhab.core.voice.tests/pom.xml | 6 ++---- itests/pom.xml | 6 ++---- pom.xml | 6 ++---- tools/archetype/binding/pom.xml | 6 ++---- tools/archetype/pom.xml | 6 ++---- tools/i18n-plugin/pom.xml | 6 ++---- tools/pom.xml | 6 ++---- tools/upgradetool/pom.xml | 6 ++---- 143 files changed, 287 insertions(+), 574 deletions(-) diff --git a/bom/compile-model/pom.xml b/bom/compile-model/pom.xml index fd690836e48..2e293d3db3b 100644 --- a/bom/compile-model/pom.xml +++ b/bom/compile-model/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.compile-model diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index d4fcbe2b3f8..b1b0918784f 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.compile diff --git a/bom/openhab-core-index/pom.xml b/bom/openhab-core-index/pom.xml index 95effdb3115..19e87ee8bc1 100644 --- a/bom/openhab-core-index/pom.xml +++ b/bom/openhab-core-index/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.openhab-core-index diff --git a/bom/openhab-core/pom.xml b/bom/openhab-core/pom.xml index a32a982de5d..288a96f6511 100644 --- a/bom/openhab-core/pom.xml +++ b/bom/openhab-core/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.openhab-core diff --git a/bom/pom.xml b/bom/pom.xml index c8c08e84cf1..e6f99dcc2d5 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core org.openhab.core.reactor - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom diff --git a/bom/runtime-index/pom.xml b/bom/runtime-index/pom.xml index b2d08cf386c..f4169d66ced 100644 --- a/bom/runtime-index/pom.xml +++ b/bom/runtime-index/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.runtime-index diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 59f25d5baae..3c76d2f89a7 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.runtime diff --git a/bom/test-index/pom.xml b/bom/test-index/pom.xml index fe176069958..969de4c44c9 100644 --- a/bom/test-index/pom.xml +++ b/bom/test-index/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.test-index diff --git a/bom/test/pom.xml b/bom/test/pom.xml index 3f0266a9ee8..d49fdf42e2f 100644 --- a/bom/test/pom.xml +++ b/bom/test/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bom org.openhab.core.reactor.bom - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bom.test diff --git a/bundles/org.openhab.core.addon.eclipse/pom.xml b/bundles/org.openhab.core.addon.eclipse/pom.xml index 1b519d2e27a..aed0217624e 100644 --- a/bundles/org.openhab.core.addon.eclipse/pom.xml +++ b/bundles/org.openhab.core.addon.eclipse/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.addon.eclipse diff --git a/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml b/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml index ee04295b653..4d9935b107b 100644 --- a/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml +++ b/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.addon.marketplace.karaf diff --git a/bundles/org.openhab.core.addon.marketplace/pom.xml b/bundles/org.openhab.core.addon.marketplace/pom.xml index 661a51c1764..5d2cf942a19 100644 --- a/bundles/org.openhab.core.addon.marketplace/pom.xml +++ b/bundles/org.openhab.core.addon.marketplace/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.addon.marketplace diff --git a/bundles/org.openhab.core.addon/pom.xml b/bundles/org.openhab.core.addon/pom.xml index 24d774631cc..13f9abad54e 100644 --- a/bundles/org.openhab.core.addon/pom.xml +++ b/bundles/org.openhab.core.addon/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.addon diff --git a/bundles/org.openhab.core.audio/pom.xml b/bundles/org.openhab.core.audio/pom.xml index 9ca28870bf5..2856d043fb1 100644 --- a/bundles/org.openhab.core.audio/pom.xml +++ b/bundles/org.openhab.core.audio/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.audio diff --git a/bundles/org.openhab.core.auth.jaas/pom.xml b/bundles/org.openhab.core.auth.jaas/pom.xml index 78a75892340..16a45f40264 100644 --- a/bundles/org.openhab.core.auth.jaas/pom.xml +++ b/bundles/org.openhab.core.auth.jaas/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.auth.jaas diff --git a/bundles/org.openhab.core.auth.oauth2client/pom.xml b/bundles/org.openhab.core.auth.oauth2client/pom.xml index 0eb0a93e4ef..6cc016f1186 100644 --- a/bundles/org.openhab.core.auth.oauth2client/pom.xml +++ b/bundles/org.openhab.core.auth.oauth2client/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.auth.oauth2client diff --git a/bundles/org.openhab.core.automation.module.media/pom.xml b/bundles/org.openhab.core.automation.module.media/pom.xml index 4bbad43616f..a36e1d278ea 100644 --- a/bundles/org.openhab.core.automation.module.media/pom.xml +++ b/bundles/org.openhab.core.automation.module.media/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.module.media diff --git a/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml b/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml index 241ad616912..a869fc6d110 100644 --- a/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml +++ b/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.module.script.rulesupport diff --git a/bundles/org.openhab.core.automation.module.script/pom.xml b/bundles/org.openhab.core.automation.module.script/pom.xml index 011647661b2..1028ccb0647 100644 --- a/bundles/org.openhab.core.automation.module.script/pom.xml +++ b/bundles/org.openhab.core.automation.module.script/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.module.script diff --git a/bundles/org.openhab.core.automation.rest/pom.xml b/bundles/org.openhab.core.automation.rest/pom.xml index f74d4ec9a3a..a54729a0c92 100644 --- a/bundles/org.openhab.core.automation.rest/pom.xml +++ b/bundles/org.openhab.core.automation.rest/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.rest diff --git a/bundles/org.openhab.core.automation/pom.xml b/bundles/org.openhab.core.automation/pom.xml index 18c4bcd6242..aa9b6776e03 100644 --- a/bundles/org.openhab.core.automation/pom.xml +++ b/bundles/org.openhab.core.automation/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation diff --git a/bundles/org.openhab.core.config.core/pom.xml b/bundles/org.openhab.core.config.core/pom.xml index 8221b4b6b68..775d08442c2 100644 --- a/bundles/org.openhab.core.config.core/pom.xml +++ b/bundles/org.openhab.core.config.core/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.core diff --git a/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml b/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml index 0c825cd2374..81119fdb96f 100644 --- a/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon.ip diff --git a/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml b/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml index ab46d535b77..8b85e7f07b5 100644 --- a/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon.mdns diff --git a/bundles/org.openhab.core.config.discovery.addon.process/pom.xml b/bundles/org.openhab.core.config.discovery.addon.process/pom.xml index f26a5100232..f8a26b07bd0 100644 --- a/bundles/org.openhab.core.config.discovery.addon.process/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.process/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon.process diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml b/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml index f56d06abf95..9632d4e40a7 100644 --- a/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon.sddp diff --git a/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml b/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml index cffbd119de2..cd212f1eaa8 100644 --- a/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon.upnp diff --git a/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml b/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml index 7ca3bcafc8d..6ddee4785a2 100644 --- a/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon.usb diff --git a/bundles/org.openhab.core.config.discovery.addon/pom.xml b/bundles/org.openhab.core.config.discovery.addon/pom.xml index 2d1c396ad5c..4ef316d1255 100644 --- a/bundles/org.openhab.core.config.discovery.addon/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.addon diff --git a/bundles/org.openhab.core.config.discovery.mdns/pom.xml b/bundles/org.openhab.core.config.discovery.mdns/pom.xml index f0ef9975b58..d17c47bf7aa 100644 --- a/bundles/org.openhab.core.config.discovery.mdns/pom.xml +++ b/bundles/org.openhab.core.config.discovery.mdns/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.mdns diff --git a/bundles/org.openhab.core.config.discovery.sddp/pom.xml b/bundles/org.openhab.core.config.discovery.sddp/pom.xml index 3e0fc524e57..584180e6d51 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.sddp/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.sddp diff --git a/bundles/org.openhab.core.config.discovery.upnp/pom.xml b/bundles/org.openhab.core.config.discovery.upnp/pom.xml index f8a71aad2bb..6d4ca2b14e9 100644 --- a/bundles/org.openhab.core.config.discovery.upnp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.upnp/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.upnp diff --git a/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml index b94212ddd9d..75a9ad353c8 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.usbserial.linuxsysfs diff --git a/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml index 0d7b22e038a..5019b675130 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.usbserial.ser2net diff --git a/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml index 72af12d984d..3118f40ae6f 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.usbserial.windowsregistry diff --git a/bundles/org.openhab.core.config.discovery.usbserial/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial/pom.xml index 44a0f843484..4a102fcfa40 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.usbserial diff --git a/bundles/org.openhab.core.config.discovery/pom.xml b/bundles/org.openhab.core.config.discovery/pom.xml index 17dd511021f..df188cc56bd 100644 --- a/bundles/org.openhab.core.config.discovery/pom.xml +++ b/bundles/org.openhab.core.config.discovery/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery diff --git a/bundles/org.openhab.core.config.dispatch/pom.xml b/bundles/org.openhab.core.config.dispatch/pom.xml index fe0a6858260..ef2c7c6a3e4 100644 --- a/bundles/org.openhab.core.config.dispatch/pom.xml +++ b/bundles/org.openhab.core.config.dispatch/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.dispatch diff --git a/bundles/org.openhab.core.config.jupnp/pom.xml b/bundles/org.openhab.core.config.jupnp/pom.xml index 8205180a3be..47f66ed6e61 100644 --- a/bundles/org.openhab.core.config.jupnp/pom.xml +++ b/bundles/org.openhab.core.config.jupnp/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.jupnp diff --git a/bundles/org.openhab.core.config.serial/pom.xml b/bundles/org.openhab.core.config.serial/pom.xml index e800f84315c..a217f206266 100644 --- a/bundles/org.openhab.core.config.serial/pom.xml +++ b/bundles/org.openhab.core.config.serial/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.serial diff --git a/bundles/org.openhab.core.ephemeris/pom.xml b/bundles/org.openhab.core.ephemeris/pom.xml index 73c992077e8..c1e3ade2c84 100644 --- a/bundles/org.openhab.core.ephemeris/pom.xml +++ b/bundles/org.openhab.core.ephemeris/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.ephemeris diff --git a/bundles/org.openhab.core.id/pom.xml b/bundles/org.openhab.core.id/pom.xml index 71ed95058d5..507bdbdb8a3 100644 --- a/bundles/org.openhab.core.id/pom.xml +++ b/bundles/org.openhab.core.id/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.id diff --git a/bundles/org.openhab.core.io.bin2json/pom.xml b/bundles/org.openhab.core.io.bin2json/pom.xml index e9aa5bed2af..f5a90df34c4 100644 --- a/bundles/org.openhab.core.io.bin2json/pom.xml +++ b/bundles/org.openhab.core.io.bin2json/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.bin2json diff --git a/bundles/org.openhab.core.io.console.eclipse/pom.xml b/bundles/org.openhab.core.io.console.eclipse/pom.xml index 2c63ed25a92..d6dc158e2d0 100644 --- a/bundles/org.openhab.core.io.console.eclipse/pom.xml +++ b/bundles/org.openhab.core.io.console.eclipse/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.console.eclipse diff --git a/bundles/org.openhab.core.io.console.karaf/pom.xml b/bundles/org.openhab.core.io.console.karaf/pom.xml index 7815528ad6f..3514102aaef 100644 --- a/bundles/org.openhab.core.io.console.karaf/pom.xml +++ b/bundles/org.openhab.core.io.console.karaf/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.console.karaf diff --git a/bundles/org.openhab.core.io.console.rfc147/pom.xml b/bundles/org.openhab.core.io.console.rfc147/pom.xml index 40a82490646..b06eddb2147 100644 --- a/bundles/org.openhab.core.io.console.rfc147/pom.xml +++ b/bundles/org.openhab.core.io.console.rfc147/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.console.rfc147 diff --git a/bundles/org.openhab.core.io.console/pom.xml b/bundles/org.openhab.core.io.console/pom.xml index bb92813b12d..a148278b850 100644 --- a/bundles/org.openhab.core.io.console/pom.xml +++ b/bundles/org.openhab.core.io.console/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.console diff --git a/bundles/org.openhab.core.io.http.auth/pom.xml b/bundles/org.openhab.core.io.http.auth/pom.xml index 70a3681c645..d0b371071e8 100644 --- a/bundles/org.openhab.core.io.http.auth/pom.xml +++ b/bundles/org.openhab.core.io.http.auth/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.http.auth diff --git a/bundles/org.openhab.core.io.http/pom.xml b/bundles/org.openhab.core.io.http/pom.xml index 8c81c5de554..af635a5e512 100644 --- a/bundles/org.openhab.core.io.http/pom.xml +++ b/bundles/org.openhab.core.io.http/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.http diff --git a/bundles/org.openhab.core.io.jetty.certificate/pom.xml b/bundles/org.openhab.core.io.jetty.certificate/pom.xml index ed3f87e39a3..b105e29b5fc 100644 --- a/bundles/org.openhab.core.io.jetty.certificate/pom.xml +++ b/bundles/org.openhab.core.io.jetty.certificate/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.jetty.certificate @@ -51,8 +49,7 @@ true - + . diff --git a/bundles/org.openhab.core.io.monitor/pom.xml b/bundles/org.openhab.core.io.monitor/pom.xml index c5e90b5b6ce..e0f2cfe6c81 100644 --- a/bundles/org.openhab.core.io.monitor/pom.xml +++ b/bundles/org.openhab.core.io.monitor/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.monitor diff --git a/bundles/org.openhab.core.io.net/pom.xml b/bundles/org.openhab.core.io.net/pom.xml index f17dea444a4..9148456f249 100644 --- a/bundles/org.openhab.core.io.net/pom.xml +++ b/bundles/org.openhab.core.io.net/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.net diff --git a/bundles/org.openhab.core.io.rest.audio/pom.xml b/bundles/org.openhab.core.io.rest.audio/pom.xml index 09c65bf887e..e7182072b33 100644 --- a/bundles/org.openhab.core.io.rest.audio/pom.xml +++ b/bundles/org.openhab.core.io.rest.audio/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.audio diff --git a/bundles/org.openhab.core.io.rest.auth/pom.xml b/bundles/org.openhab.core.io.rest.auth/pom.xml index 06f7db1c750..1359420309e 100644 --- a/bundles/org.openhab.core.io.rest.auth/pom.xml +++ b/bundles/org.openhab.core.io.rest.auth/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.auth diff --git a/bundles/org.openhab.core.io.rest.core/pom.xml b/bundles/org.openhab.core.io.rest.core/pom.xml index 9fe8a20c134..8d63ded85bc 100644 --- a/bundles/org.openhab.core.io.rest.core/pom.xml +++ b/bundles/org.openhab.core.io.rest.core/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.core diff --git a/bundles/org.openhab.core.io.rest.log/pom.xml b/bundles/org.openhab.core.io.rest.log/pom.xml index 1c5183a9ee4..3908b3ccf83 100644 --- a/bundles/org.openhab.core.io.rest.log/pom.xml +++ b/bundles/org.openhab.core.io.rest.log/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.log diff --git a/bundles/org.openhab.core.io.rest.mdns/pom.xml b/bundles/org.openhab.core.io.rest.mdns/pom.xml index 6f26eab71cf..8064d947487 100644 --- a/bundles/org.openhab.core.io.rest.mdns/pom.xml +++ b/bundles/org.openhab.core.io.rest.mdns/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.mdns diff --git a/bundles/org.openhab.core.io.rest.sitemap/pom.xml b/bundles/org.openhab.core.io.rest.sitemap/pom.xml index 70cfd881a58..cf74af53778 100644 --- a/bundles/org.openhab.core.io.rest.sitemap/pom.xml +++ b/bundles/org.openhab.core.io.rest.sitemap/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.sitemap diff --git a/bundles/org.openhab.core.io.rest.sse/pom.xml b/bundles/org.openhab.core.io.rest.sse/pom.xml index 224868206bd..7a038254740 100644 --- a/bundles/org.openhab.core.io.rest.sse/pom.xml +++ b/bundles/org.openhab.core.io.rest.sse/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.sse diff --git a/bundles/org.openhab.core.io.rest.swagger/pom.xml b/bundles/org.openhab.core.io.rest.swagger/pom.xml index 7f44036b2f0..2ec9b84d075 100644 --- a/bundles/org.openhab.core.io.rest.swagger/pom.xml +++ b/bundles/org.openhab.core.io.rest.swagger/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.swagger diff --git a/bundles/org.openhab.core.io.rest.transform/pom.xml b/bundles/org.openhab.core.io.rest.transform/pom.xml index 0870c63eec1..375d652d904 100644 --- a/bundles/org.openhab.core.io.rest.transform/pom.xml +++ b/bundles/org.openhab.core.io.rest.transform/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.transform diff --git a/bundles/org.openhab.core.io.rest.ui/pom.xml b/bundles/org.openhab.core.io.rest.ui/pom.xml index b34615686d1..9b3ca0dac9b 100644 --- a/bundles/org.openhab.core.io.rest.ui/pom.xml +++ b/bundles/org.openhab.core.io.rest.ui/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.ui diff --git a/bundles/org.openhab.core.io.rest.voice/pom.xml b/bundles/org.openhab.core.io.rest.voice/pom.xml index 136af284263..f43983212f2 100644 --- a/bundles/org.openhab.core.io.rest.voice/pom.xml +++ b/bundles/org.openhab.core.io.rest.voice/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.voice diff --git a/bundles/org.openhab.core.io.rest/pom.xml b/bundles/org.openhab.core.io.rest/pom.xml index 76c16538863..0574ac21f24 100644 --- a/bundles/org.openhab.core.io.rest/pom.xml +++ b/bundles/org.openhab.core.io.rest/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest diff --git a/bundles/org.openhab.core.io.transport.mdns/pom.xml b/bundles/org.openhab.core.io.transport.mdns/pom.xml index 72ab9304639..d2b58e6d8ed 100644 --- a/bundles/org.openhab.core.io.transport.mdns/pom.xml +++ b/bundles/org.openhab.core.io.transport.mdns/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.mdns diff --git a/bundles/org.openhab.core.io.transport.modbus/pom.xml b/bundles/org.openhab.core.io.transport.modbus/pom.xml index 3acf7d3d0ba..8cd4193de79 100644 --- a/bundles/org.openhab.core.io.transport.modbus/pom.xml +++ b/bundles/org.openhab.core.io.transport.modbus/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.modbus diff --git a/bundles/org.openhab.core.io.transport.mqtt/pom.xml b/bundles/org.openhab.core.io.transport.mqtt/pom.xml index 854dfd57c53..c820007554e 100644 --- a/bundles/org.openhab.core.io.transport.mqtt/pom.xml +++ b/bundles/org.openhab.core.io.transport.mqtt/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.mqtt diff --git a/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml b/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml index 979611b33fc..a5d464497ea 100644 --- a/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.serial.javacomm diff --git a/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml b/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml index 7317a44788c..fa7c968945f 100644 --- a/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.serial.rxtx.rfc2217 diff --git a/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml b/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml index e505f69fdef..53b77a86f1b 100644 --- a/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.serial.rxtx diff --git a/bundles/org.openhab.core.io.transport.serial/pom.xml b/bundles/org.openhab.core.io.transport.serial/pom.xml index dc6933efa7f..a21ca1851cd 100644 --- a/bundles/org.openhab.core.io.transport.serial/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.serial diff --git a/bundles/org.openhab.core.io.transport.upnp/pom.xml b/bundles/org.openhab.core.io.transport.upnp/pom.xml index cc348f7c062..a4f20ffb9e7 100644 --- a/bundles/org.openhab.core.io.transport.upnp/pom.xml +++ b/bundles/org.openhab.core.io.transport.upnp/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.transport.upnp diff --git a/bundles/org.openhab.core.io.websocket/pom.xml b/bundles/org.openhab.core.io.websocket/pom.xml index 1dcd49b79aa..52ebb762867 100644 --- a/bundles/org.openhab.core.io.websocket/pom.xml +++ b/bundles/org.openhab.core.io.websocket/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.websocket diff --git a/bundles/org.openhab.core.karaf/pom.xml b/bundles/org.openhab.core.karaf/pom.xml index 0873cdf66ca..84557a23b2c 100644 --- a/bundles/org.openhab.core.karaf/pom.xml +++ b/bundles/org.openhab.core.karaf/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.karaf diff --git a/bundles/org.openhab.core.model.core/pom.xml b/bundles/org.openhab.core.model.core/pom.xml index ce91eb736a5..847539fd30e 100644 --- a/bundles/org.openhab.core.model.core/pom.xml +++ b/bundles/org.openhab.core.model.core/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.core diff --git a/bundles/org.openhab.core.model.item.ide/pom.xml b/bundles/org.openhab.core.model.item.ide/pom.xml index b81113435d6..3b5f1903403 100644 --- a/bundles/org.openhab.core.model.item.ide/pom.xml +++ b/bundles/org.openhab.core.model.item.ide/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.item.ide diff --git a/bundles/org.openhab.core.model.item.runtime/pom.xml b/bundles/org.openhab.core.model.item.runtime/pom.xml index f82f934f82b..6a68bc03942 100644 --- a/bundles/org.openhab.core.model.item.runtime/pom.xml +++ b/bundles/org.openhab.core.model.item.runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.item.runtime diff --git a/bundles/org.openhab.core.model.item/pom.xml b/bundles/org.openhab.core.model.item/pom.xml index 1ef7299e606..db06db6c554 100644 --- a/bundles/org.openhab.core.model.item/pom.xml +++ b/bundles/org.openhab.core.model.item/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.item diff --git a/bundles/org.openhab.core.model.lsp/pom.xml b/bundles/org.openhab.core.model.lsp/pom.xml index 494d16fe2f3..162f43aa90b 100644 --- a/bundles/org.openhab.core.model.lsp/pom.xml +++ b/bundles/org.openhab.core.model.lsp/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.lsp diff --git a/bundles/org.openhab.core.model.persistence.ide/pom.xml b/bundles/org.openhab.core.model.persistence.ide/pom.xml index 6f09055154e..93896e5146c 100644 --- a/bundles/org.openhab.core.model.persistence.ide/pom.xml +++ b/bundles/org.openhab.core.model.persistence.ide/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.persistence.ide diff --git a/bundles/org.openhab.core.model.persistence.runtime/pom.xml b/bundles/org.openhab.core.model.persistence.runtime/pom.xml index 185bd0df985..fefa8ac4a61 100644 --- a/bundles/org.openhab.core.model.persistence.runtime/pom.xml +++ b/bundles/org.openhab.core.model.persistence.runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.persistence.runtime diff --git a/bundles/org.openhab.core.model.persistence/pom.xml b/bundles/org.openhab.core.model.persistence/pom.xml index fed0013020a..e09e824a1ad 100644 --- a/bundles/org.openhab.core.model.persistence/pom.xml +++ b/bundles/org.openhab.core.model.persistence/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.persistence diff --git a/bundles/org.openhab.core.model.rule.ide/pom.xml b/bundles/org.openhab.core.model.rule.ide/pom.xml index c4bc893e5dd..089d66fcfb2 100644 --- a/bundles/org.openhab.core.model.rule.ide/pom.xml +++ b/bundles/org.openhab.core.model.rule.ide/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.rule.ide diff --git a/bundles/org.openhab.core.model.rule.runtime/pom.xml b/bundles/org.openhab.core.model.rule.runtime/pom.xml index ec5fb5bec79..688ae097c3e 100644 --- a/bundles/org.openhab.core.model.rule.runtime/pom.xml +++ b/bundles/org.openhab.core.model.rule.runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.rule.runtime diff --git a/bundles/org.openhab.core.model.rule/pom.xml b/bundles/org.openhab.core.model.rule/pom.xml index 98d324d3d8c..6c9f2a107a7 100644 --- a/bundles/org.openhab.core.model.rule/pom.xml +++ b/bundles/org.openhab.core.model.rule/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.rule diff --git a/bundles/org.openhab.core.model.script.ide/pom.xml b/bundles/org.openhab.core.model.script.ide/pom.xml index e16edbdfd90..65c3219a65b 100644 --- a/bundles/org.openhab.core.model.script.ide/pom.xml +++ b/bundles/org.openhab.core.model.script.ide/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.script.ide diff --git a/bundles/org.openhab.core.model.script.runtime/pom.xml b/bundles/org.openhab.core.model.script.runtime/pom.xml index 76a0ca195ef..e2d128d202d 100644 --- a/bundles/org.openhab.core.model.script.runtime/pom.xml +++ b/bundles/org.openhab.core.model.script.runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.script.runtime diff --git a/bundles/org.openhab.core.model.script/pom.xml b/bundles/org.openhab.core.model.script/pom.xml index aded9d54b4b..60c0dfbfe36 100644 --- a/bundles/org.openhab.core.model.script/pom.xml +++ b/bundles/org.openhab.core.model.script/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.script diff --git a/bundles/org.openhab.core.model.sitemap.ide/pom.xml b/bundles/org.openhab.core.model.sitemap.ide/pom.xml index 2de27b1e232..2d619800e03 100644 --- a/bundles/org.openhab.core.model.sitemap.ide/pom.xml +++ b/bundles/org.openhab.core.model.sitemap.ide/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.sitemap.ide diff --git a/bundles/org.openhab.core.model.sitemap.runtime/pom.xml b/bundles/org.openhab.core.model.sitemap.runtime/pom.xml index d7aa132ba3d..bc4ca1ca26c 100644 --- a/bundles/org.openhab.core.model.sitemap.runtime/pom.xml +++ b/bundles/org.openhab.core.model.sitemap.runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.sitemap.runtime diff --git a/bundles/org.openhab.core.model.sitemap/pom.xml b/bundles/org.openhab.core.model.sitemap/pom.xml index f78a777b6be..27e48cd27ff 100644 --- a/bundles/org.openhab.core.model.sitemap/pom.xml +++ b/bundles/org.openhab.core.model.sitemap/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.sitemap diff --git a/bundles/org.openhab.core.model.thing.ide/pom.xml b/bundles/org.openhab.core.model.thing.ide/pom.xml index eec22690e33..cba666c0db0 100644 --- a/bundles/org.openhab.core.model.thing.ide/pom.xml +++ b/bundles/org.openhab.core.model.thing.ide/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.thing.ide diff --git a/bundles/org.openhab.core.model.thing.runtime/pom.xml b/bundles/org.openhab.core.model.thing.runtime/pom.xml index d002421a761..2fe8ca3a5b8 100644 --- a/bundles/org.openhab.core.model.thing.runtime/pom.xml +++ b/bundles/org.openhab.core.model.thing.runtime/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.thing.runtime diff --git a/bundles/org.openhab.core.model.thing/pom.xml b/bundles/org.openhab.core.model.thing/pom.xml index 050a2cde628..1fcd533dcab 100644 --- a/bundles/org.openhab.core.model.thing/pom.xml +++ b/bundles/org.openhab.core.model.thing/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.thing diff --git a/bundles/org.openhab.core.model.yaml/pom.xml b/bundles/org.openhab.core.model.yaml/pom.xml index d9ee59f9cf3..c83761dbf4d 100644 --- a/bundles/org.openhab.core.model.yaml/pom.xml +++ b/bundles/org.openhab.core.model.yaml/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.yaml diff --git a/bundles/org.openhab.core.persistence/pom.xml b/bundles/org.openhab.core.persistence/pom.xml index 8f57dd5569b..039866195d5 100644 --- a/bundles/org.openhab.core.persistence/pom.xml +++ b/bundles/org.openhab.core.persistence/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.persistence diff --git a/bundles/org.openhab.core.semantics/pom.xml b/bundles/org.openhab.core.semantics/pom.xml index 81dcf1fbc8f..7199ee9b511 100644 --- a/bundles/org.openhab.core.semantics/pom.xml +++ b/bundles/org.openhab.core.semantics/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.semantics diff --git a/bundles/org.openhab.core.storage.json/pom.xml b/bundles/org.openhab.core.storage.json/pom.xml index e2db408df66..69c29790f28 100644 --- a/bundles/org.openhab.core.storage.json/pom.xml +++ b/bundles/org.openhab.core.storage.json/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.storage.json diff --git a/bundles/org.openhab.core.test.magic/pom.xml b/bundles/org.openhab.core.test.magic/pom.xml index d5cc915de27..db334052f51 100644 --- a/bundles/org.openhab.core.test.magic/pom.xml +++ b/bundles/org.openhab.core.test.magic/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.test.magic diff --git a/bundles/org.openhab.core.test/pom.xml b/bundles/org.openhab.core.test/pom.xml index bd23910a93e..4ca06a42e4b 100644 --- a/bundles/org.openhab.core.test/pom.xml +++ b/bundles/org.openhab.core.test/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.test diff --git a/bundles/org.openhab.core.thing/pom.xml b/bundles/org.openhab.core.thing/pom.xml index 12cf68adbed..a7b51c63790 100644 --- a/bundles/org.openhab.core.thing/pom.xml +++ b/bundles/org.openhab.core.thing/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.thing diff --git a/bundles/org.openhab.core.transform/pom.xml b/bundles/org.openhab.core.transform/pom.xml index d48685af628..d4881eb91bf 100644 --- a/bundles/org.openhab.core.transform/pom.xml +++ b/bundles/org.openhab.core.transform/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.transform diff --git a/bundles/org.openhab.core.ui.icon/pom.xml b/bundles/org.openhab.core.ui.icon/pom.xml index 56191058617..39513defbbc 100644 --- a/bundles/org.openhab.core.ui.icon/pom.xml +++ b/bundles/org.openhab.core.ui.icon/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.ui.icon diff --git a/bundles/org.openhab.core.ui/pom.xml b/bundles/org.openhab.core.ui/pom.xml index a560ae2fa1a..4f417951fa2 100644 --- a/bundles/org.openhab.core.ui/pom.xml +++ b/bundles/org.openhab.core.ui/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.ui diff --git a/bundles/org.openhab.core.voice/pom.xml b/bundles/org.openhab.core.voice/pom.xml index 90ecbe717bc..11996bbf7df 100644 --- a/bundles/org.openhab.core.voice/pom.xml +++ b/bundles/org.openhab.core.voice/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.voice diff --git a/bundles/org.openhab.core/pom.xml b/bundles/org.openhab.core/pom.xml index 3a639353d31..01e74811ba7 100644 --- a/bundles/org.openhab.core/pom.xml +++ b/bundles/org.openhab.core/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.bundles org.openhab.core.reactor.bundles - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core diff --git a/bundles/pom.xml b/bundles/pom.xml index 25918c2b2b0..acbe7473602 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core org.openhab.core.reactor - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.bundles diff --git a/features/karaf/openhab-core/pom.xml b/features/karaf/openhab-core/pom.xml index e1cc0a29a03..77ccfb8e896 100644 --- a/features/karaf/openhab-core/pom.xml +++ b/features/karaf/openhab-core/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.features.karaf org.openhab.core.reactor.features.karaf - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.features.karaf.openhab-core diff --git a/features/karaf/openhab-tp/pom.xml b/features/karaf/openhab-tp/pom.xml index eff43f9e4b8..da3b41069f9 100644 --- a/features/karaf/openhab-tp/pom.xml +++ b/features/karaf/openhab-tp/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.features.karaf org.openhab.core.reactor.features.karaf - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.features.karaf.openhab-tp diff --git a/features/karaf/pom.xml b/features/karaf/pom.xml index e377d444960..5f72d65fdf1 100644 --- a/features/karaf/pom.xml +++ b/features/karaf/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.features org.openhab.core.reactor.features - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.features.karaf diff --git a/features/pom.xml b/features/pom.xml index e27d533c988..10d4501bf2c 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core org.openhab.core.reactor - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.features diff --git a/itests/org.openhab.core.addon.tests/pom.xml b/itests/org.openhab.core.addon.tests/pom.xml index c5ab5f4bbc0..a726278b9e7 100644 --- a/itests/org.openhab.core.addon.tests/pom.xml +++ b/itests/org.openhab.core.addon.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.addon.tests diff --git a/itests/org.openhab.core.auth.oauth2client.tests/pom.xml b/itests/org.openhab.core.auth.oauth2client.tests/pom.xml index 08e9c4d1b18..4d713ce5ed8 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/pom.xml +++ b/itests/org.openhab.core.auth.oauth2client.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.auth.oauth2client.tests diff --git a/itests/org.openhab.core.automation.integration.tests/pom.xml b/itests/org.openhab.core.automation.integration.tests/pom.xml index 8077e9f0bd7..a00be5fa0d5 100644 --- a/itests/org.openhab.core.automation.integration.tests/pom.xml +++ b/itests/org.openhab.core.automation.integration.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.integration.tests diff --git a/itests/org.openhab.core.automation.module.core.tests/pom.xml b/itests/org.openhab.core.automation.module.core.tests/pom.xml index 25f068ee828..2c53e75eff5 100644 --- a/itests/org.openhab.core.automation.module.core.tests/pom.xml +++ b/itests/org.openhab.core.automation.module.core.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.module.core.tests diff --git a/itests/org.openhab.core.automation.module.script.tests/pom.xml b/itests/org.openhab.core.automation.module.script.tests/pom.xml index eba3c183fae..e6afb2f4202 100644 --- a/itests/org.openhab.core.automation.module.script.tests/pom.xml +++ b/itests/org.openhab.core.automation.module.script.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.module.script.tests diff --git a/itests/org.openhab.core.automation.module.timer.tests/pom.xml b/itests/org.openhab.core.automation.module.timer.tests/pom.xml index 391f1d29685..b823d853d1b 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/pom.xml +++ b/itests/org.openhab.core.automation.module.timer.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.module.timer.tests diff --git a/itests/org.openhab.core.automation.tests/pom.xml b/itests/org.openhab.core.automation.tests/pom.xml index 3f5ad64f1d7..f150630e4f9 100644 --- a/itests/org.openhab.core.automation.tests/pom.xml +++ b/itests/org.openhab.core.automation.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.automation.tests diff --git a/itests/org.openhab.core.config.core.tests/pom.xml b/itests/org.openhab.core.config.core.tests/pom.xml index 9273e39a853..566a9dd2c66 100644 --- a/itests/org.openhab.core.config.core.tests/pom.xml +++ b/itests/org.openhab.core.config.core.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.core.tests diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml b/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml index a7df92c62a9..06ca6a28249 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.mdns.tests diff --git a/itests/org.openhab.core.config.discovery.tests/pom.xml b/itests/org.openhab.core.config.discovery.tests/pom.xml index 72e759c00cd..85c2a251bca 100644 --- a/itests/org.openhab.core.config.discovery.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.tests/pom.xml @@ -1,11 +1,9 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.tests diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml index 505d30cc64e..06f1923d239 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml @@ -1,11 +1,9 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.usbserial.linuxsysfs.tests diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml b/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml index 702fc1ef13c..66f56e1b4a1 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.discovery.usbserial.tests diff --git a/itests/org.openhab.core.config.dispatch.tests/pom.xml b/itests/org.openhab.core.config.dispatch.tests/pom.xml index 06f49674cf3..0727253bd18 100644 --- a/itests/org.openhab.core.config.dispatch.tests/pom.xml +++ b/itests/org.openhab.core.config.dispatch.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.config.dispatch.tests diff --git a/itests/org.openhab.core.ephemeris.tests/pom.xml b/itests/org.openhab.core.ephemeris.tests/pom.xml index bc77893b150..3c9c281fb0a 100644 --- a/itests/org.openhab.core.ephemeris.tests/pom.xml +++ b/itests/org.openhab.core.ephemeris.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.ephemeris.tests diff --git a/itests/org.openhab.core.io.net.tests/pom.xml b/itests/org.openhab.core.io.net.tests/pom.xml index e017742db2f..8dbaf1d4085 100644 --- a/itests/org.openhab.core.io.net.tests/pom.xml +++ b/itests/org.openhab.core.io.net.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.net.tests diff --git a/itests/org.openhab.core.io.rest.core.tests/pom.xml b/itests/org.openhab.core.io.rest.core.tests/pom.xml index 2236c7c970c..04c26d226a8 100644 --- a/itests/org.openhab.core.io.rest.core.tests/pom.xml +++ b/itests/org.openhab.core.io.rest.core.tests/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.io.rest.core.tests diff --git a/itests/org.openhab.core.model.item.tests/pom.xml b/itests/org.openhab.core.model.item.tests/pom.xml index 6f6c00906ff..2106b5b34bc 100644 --- a/itests/org.openhab.core.model.item.tests/pom.xml +++ b/itests/org.openhab.core.model.item.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.item.tests diff --git a/itests/org.openhab.core.model.rule.tests/pom.xml b/itests/org.openhab.core.model.rule.tests/pom.xml index 810d030a613..de55bd7243b 100644 --- a/itests/org.openhab.core.model.rule.tests/pom.xml +++ b/itests/org.openhab.core.model.rule.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.rule.tests diff --git a/itests/org.openhab.core.model.script.tests/pom.xml b/itests/org.openhab.core.model.script.tests/pom.xml index e2da5604641..725f78ac72c 100644 --- a/itests/org.openhab.core.model.script.tests/pom.xml +++ b/itests/org.openhab.core.model.script.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.script.tests diff --git a/itests/org.openhab.core.model.thing.tests/pom.xml b/itests/org.openhab.core.model.thing.tests/pom.xml index 589f1a1097f..4b19cbb852f 100644 --- a/itests/org.openhab.core.model.thing.tests/pom.xml +++ b/itests/org.openhab.core.model.thing.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.thing.tests diff --git a/itests/org.openhab.core.model.thing.testsupport/pom.xml b/itests/org.openhab.core.model.thing.testsupport/pom.xml index 465eada34bb..e188cd3cb18 100644 --- a/itests/org.openhab.core.model.thing.testsupport/pom.xml +++ b/itests/org.openhab.core.model.thing.testsupport/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.model.thing.testsupport diff --git a/itests/org.openhab.core.storage.json.tests/pom.xml b/itests/org.openhab.core.storage.json.tests/pom.xml index ee508923556..b550951df14 100644 --- a/itests/org.openhab.core.storage.json.tests/pom.xml +++ b/itests/org.openhab.core.storage.json.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.storage.json.tests diff --git a/itests/org.openhab.core.tests/pom.xml b/itests/org.openhab.core.tests/pom.xml index 59161267e64..cc5f3bb9c3d 100644 --- a/itests/org.openhab.core.tests/pom.xml +++ b/itests/org.openhab.core.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.tests diff --git a/itests/org.openhab.core.thing.tests/pom.xml b/itests/org.openhab.core.thing.tests/pom.xml index 52162f6cc8d..b2251d6fb5f 100644 --- a/itests/org.openhab.core.thing.tests/pom.xml +++ b/itests/org.openhab.core.thing.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.thing.tests diff --git a/itests/org.openhab.core.voice.tests/pom.xml b/itests/org.openhab.core.voice.tests/pom.xml index afce3173580..a0d06bf1cd4 100644 --- a/itests/org.openhab.core.voice.tests/pom.xml +++ b/itests/org.openhab.core.voice.tests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.itests org.openhab.core.reactor.itests - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.voice.tests diff --git a/itests/pom.xml b/itests/pom.xml index f7763012c5c..c267382a68e 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core org.openhab.core.reactor - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.itests diff --git a/pom.xml b/pom.xml index 9b13123ee20..7bed9146a0e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,4 @@ - - + 4.0.0 @@ -11,7 +9,7 @@ org.openhab.core org.openhab.core.reactor - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT pom diff --git a/tools/archetype/binding/pom.xml b/tools/archetype/binding/pom.xml index 6000f444754..e7acaabf327 100644 --- a/tools/archetype/binding/pom.xml +++ b/tools/archetype/binding/pom.xml @@ -1,12 +1,10 @@ - - + 4.0.0 org.openhab.core.tools.archetypes org.openhab.core.reactor.tools.archetypes - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.tools.archetypes.binding diff --git a/tools/archetype/pom.xml b/tools/archetype/pom.xml index 0beef5a6fe3..b38ad915c6e 100644 --- a/tools/archetype/pom.xml +++ b/tools/archetype/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.tools org.openhab.core.reactor.tools - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.tools.archetypes diff --git a/tools/i18n-plugin/pom.xml b/tools/i18n-plugin/pom.xml index ac71339d8a9..90d0eb6b8ad 100644 --- a/tools/i18n-plugin/pom.xml +++ b/tools/i18n-plugin/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.tools org.openhab.core.reactor.tools - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT i18n-maven-plugin diff --git a/tools/pom.xml b/tools/pom.xml index be5458b57a4..b2c415bafd5 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core org.openhab.core.reactor - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT org.openhab.core.tools diff --git a/tools/upgradetool/pom.xml b/tools/upgradetool/pom.xml index 32b2f5c5d8b..13889764d0a 100644 --- a/tools/upgradetool/pom.xml +++ b/tools/upgradetool/pom.xml @@ -1,13 +1,11 @@ - - + 4.0.0 org.openhab.core.tools org.openhab.core.reactor.tools - 4.2.0-SNAPSHOT + 4.3.0-SNAPSHOT upgradetool From 21e605d212aa3c2e922a5f0ac69ab3d533dd220a Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Sun, 7 Jul 2024 23:22:27 +0200 Subject: [PATCH 31/50] Apply spotless after release, resolve bundles (#4301) Signed-off-by: Kai Kreuzer --- bom/compile-model/pom.xml | 4 +- bom/compile/pom.xml | 4 +- bom/openhab-core-index/pom.xml | 4 +- bom/openhab-core/pom.xml | 4 +- bom/pom.xml | 4 +- bom/runtime-index/pom.xml | 4 +- bom/runtime/pom.xml | 4 +- bom/test-index/pom.xml | 4 +- bom/test/pom.xml | 4 +- .../org.openhab.core.addon.eclipse/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.addon/pom.xml | 4 +- bundles/org.openhab.core.audio/pom.xml | 4 +- bundles/org.openhab.core.auth.jaas/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../org.openhab.core.automation.rest/pom.xml | 4 +- bundles/org.openhab.core.automation/pom.xml | 4 +- bundles/org.openhab.core.config.core/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../org.openhab.core.config.discovery/pom.xml | 4 +- .../org.openhab.core.config.dispatch/pom.xml | 4 +- bundles/org.openhab.core.config.jupnp/pom.xml | 4 +- .../org.openhab.core.config.serial/pom.xml | 4 +- bundles/org.openhab.core.ephemeris/pom.xml | 4 +- bundles/org.openhab.core.id/pom.xml | 4 +- bundles/org.openhab.core.io.bin2json/pom.xml | 4 +- .../pom.xml | 4 +- .../org.openhab.core.io.console.karaf/pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.io.console/pom.xml | 4 +- bundles/org.openhab.core.io.http.auth/pom.xml | 4 +- bundles/org.openhab.core.io.http/pom.xml | 4 +- .../pom.xml | 7 ++- bundles/org.openhab.core.io.monitor/pom.xml | 4 +- bundles/org.openhab.core.io.net/pom.xml | 4 +- .../org.openhab.core.io.rest.audio/pom.xml | 4 +- bundles/org.openhab.core.io.rest.auth/pom.xml | 4 +- bundles/org.openhab.core.io.rest.core/pom.xml | 4 +- bundles/org.openhab.core.io.rest.log/pom.xml | 4 +- bundles/org.openhab.core.io.rest.mdns/pom.xml | 4 +- .../org.openhab.core.io.rest.sitemap/pom.xml | 4 +- bundles/org.openhab.core.io.rest.sse/pom.xml | 4 +- .../org.openhab.core.io.rest.swagger/pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.io.rest.ui/pom.xml | 4 +- .../org.openhab.core.io.rest.voice/pom.xml | 4 +- bundles/org.openhab.core.io.rest/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.io.websocket/pom.xml | 4 +- bundles/org.openhab.core.karaf/pom.xml | 4 +- bundles/org.openhab.core.model.core/pom.xml | 4 +- .../org.openhab.core.model.item.ide/pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.model.item/pom.xml | 4 +- bundles/org.openhab.core.model.lsp/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../org.openhab.core.model.rule.ide/pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.model.rule/pom.xml | 4 +- .../org.openhab.core.model.script.ide/pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.model.script/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- .../org.openhab.core.model.sitemap/pom.xml | 4 +- .../org.openhab.core.model.thing.ide/pom.xml | 4 +- .../pom.xml | 4 +- bundles/org.openhab.core.model.thing/pom.xml | 4 +- bundles/org.openhab.core.model.yaml/pom.xml | 4 +- bundles/org.openhab.core.persistence/pom.xml | 4 +- bundles/org.openhab.core.semantics/pom.xml | 4 +- bundles/org.openhab.core.storage.json/pom.xml | 4 +- bundles/org.openhab.core.test.magic/pom.xml | 4 +- bundles/org.openhab.core.test/pom.xml | 4 +- bundles/org.openhab.core.thing/pom.xml | 4 +- bundles/org.openhab.core.transform/pom.xml | 4 +- bundles/org.openhab.core.ui.icon/pom.xml | 4 +- bundles/org.openhab.core.ui/pom.xml | 4 +- bundles/org.openhab.core.voice/pom.xml | 4 +- bundles/org.openhab.core/pom.xml | 4 +- bundles/pom.xml | 4 +- features/karaf/openhab-core/pom.xml | 4 +- features/karaf/openhab-tp/pom.xml | 4 +- features/karaf/pom.xml | 4 +- features/pom.xml | 4 +- .../org.openhab.core.addon.tests/itest.bndrun | 12 ++-- itests/org.openhab.core.addon.tests/pom.xml | 4 +- .../itest.bndrun | 18 +++--- .../pom.xml | 4 +- .../itest.bndrun | 24 ++++---- .../pom.xml | 4 +- .../itest.bndrun | 24 ++++---- .../pom.xml | 4 +- .../itest.bndrun | 26 ++++---- .../pom.xml | 4 +- .../itest.bndrun | 24 ++++---- .../pom.xml | 4 +- .../itest.bndrun | 24 ++++---- .../org.openhab.core.automation.tests/pom.xml | 4 +- .../itest.bndrun | 10 +-- .../pom.xml | 4 +- .../itest.bndrun | 24 ++++---- .../pom.xml | 4 +- .../itest.bndrun | 20 +++--- .../pom.xml | 4 +- .../itest.bndrun | 24 ++++---- .../pom.xml | 4 +- .../itest.bndrun | 22 +++---- .../pom.xml | 4 +- .../itest.bndrun | 10 +-- .../pom.xml | 4 +- .../itest.bndrun | 14 ++--- .../org.openhab.core.ephemeris.tests/pom.xml | 4 +- .../itest.bndrun | 10 +-- itests/org.openhab.core.io.net.tests/pom.xml | 4 +- .../itest.bndrun | 34 +++++------ .../pom.xml | 4 +- .../itest.bndrun | 56 ++++++++--------- .../org.openhab.core.model.item.tests/pom.xml | 4 +- .../itest.bndrun | 57 +++++++++-------- .../org.openhab.core.model.rule.tests/pom.xml | 4 +- .../itest.bndrun | 55 ++++++++--------- .../pom.xml | 4 +- .../itest.bndrun | 61 +++++++++---------- .../pom.xml | 4 +- .../pom.xml | 4 +- .../itest.bndrun | 20 +++--- .../pom.xml | 4 +- itests/org.openhab.core.tests/itest.bndrun | 8 +-- itests/org.openhab.core.tests/pom.xml | 4 +- .../org.openhab.core.thing.tests/itest.bndrun | 18 +++--- itests/org.openhab.core.thing.tests/pom.xml | 4 +- .../org.openhab.core.voice.tests/itest.bndrun | 22 +++---- itests/org.openhab.core.voice.tests/pom.xml | 4 +- itests/pom.xml | 4 +- pom.xml | 4 +- tools/archetype/binding/pom.xml | 4 +- tools/archetype/pom.xml | 4 +- tools/i18n-plugin/pom.xml | 4 +- tools/pom.xml | 4 +- tools/upgradetool/pom.xml | 4 +- 167 files changed, 737 insertions(+), 455 deletions(-) diff --git a/bom/compile-model/pom.xml b/bom/compile-model/pom.xml index 2e293d3db3b..d6ae09dd8c7 100644 --- a/bom/compile-model/pom.xml +++ b/bom/compile-model/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/compile/pom.xml b/bom/compile/pom.xml index b1b0918784f..bb4af3a4576 100644 --- a/bom/compile/pom.xml +++ b/bom/compile/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/openhab-core-index/pom.xml b/bom/openhab-core-index/pom.xml index 19e87ee8bc1..3ae7836e326 100644 --- a/bom/openhab-core-index/pom.xml +++ b/bom/openhab-core-index/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/openhab-core/pom.xml b/bom/openhab-core/pom.xml index 288a96f6511..51e2179909f 100644 --- a/bom/openhab-core/pom.xml +++ b/bom/openhab-core/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/pom.xml b/bom/pom.xml index e6f99dcc2d5..22c0f0450aa 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/runtime-index/pom.xml b/bom/runtime-index/pom.xml index f4169d66ced..31b6b2d1b38 100644 --- a/bom/runtime-index/pom.xml +++ b/bom/runtime-index/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 3c76d2f89a7..24af95cdb4a 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/test-index/pom.xml b/bom/test-index/pom.xml index 969de4c44c9..6f921754ce5 100644 --- a/bom/test-index/pom.xml +++ b/bom/test-index/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bom/test/pom.xml b/bom/test/pom.xml index d49fdf42e2f..9985dc6976f 100644 --- a/bom/test/pom.xml +++ b/bom/test/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.addon.eclipse/pom.xml b/bundles/org.openhab.core.addon.eclipse/pom.xml index aed0217624e..3dc2a6ae9be 100644 --- a/bundles/org.openhab.core.addon.eclipse/pom.xml +++ b/bundles/org.openhab.core.addon.eclipse/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml b/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml index 4d9935b107b..fbfa7a3a57f 100644 --- a/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml +++ b/bundles/org.openhab.core.addon.marketplace.karaf/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.addon.marketplace/pom.xml b/bundles/org.openhab.core.addon.marketplace/pom.xml index 5d2cf942a19..c890682cf6f 100644 --- a/bundles/org.openhab.core.addon.marketplace/pom.xml +++ b/bundles/org.openhab.core.addon.marketplace/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.addon/pom.xml b/bundles/org.openhab.core.addon/pom.xml index 13f9abad54e..fe58a720020 100644 --- a/bundles/org.openhab.core.addon/pom.xml +++ b/bundles/org.openhab.core.addon/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.audio/pom.xml b/bundles/org.openhab.core.audio/pom.xml index 2856d043fb1..317cc4c8dfc 100644 --- a/bundles/org.openhab.core.audio/pom.xml +++ b/bundles/org.openhab.core.audio/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.auth.jaas/pom.xml b/bundles/org.openhab.core.auth.jaas/pom.xml index 16a45f40264..8d647051bb1 100644 --- a/bundles/org.openhab.core.auth.jaas/pom.xml +++ b/bundles/org.openhab.core.auth.jaas/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.auth.oauth2client/pom.xml b/bundles/org.openhab.core.auth.oauth2client/pom.xml index 6cc016f1186..8b5454ba1c2 100644 --- a/bundles/org.openhab.core.auth.oauth2client/pom.xml +++ b/bundles/org.openhab.core.auth.oauth2client/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.automation.module.media/pom.xml b/bundles/org.openhab.core.automation.module.media/pom.xml index a36e1d278ea..3beab276aae 100644 --- a/bundles/org.openhab.core.automation.module.media/pom.xml +++ b/bundles/org.openhab.core.automation.module.media/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml b/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml index a869fc6d110..05cc446df67 100644 --- a/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml +++ b/bundles/org.openhab.core.automation.module.script.rulesupport/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.automation.module.script/pom.xml b/bundles/org.openhab.core.automation.module.script/pom.xml index 1028ccb0647..18e300b2688 100644 --- a/bundles/org.openhab.core.automation.module.script/pom.xml +++ b/bundles/org.openhab.core.automation.module.script/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.automation.rest/pom.xml b/bundles/org.openhab.core.automation.rest/pom.xml index a54729a0c92..1d5dd282324 100644 --- a/bundles/org.openhab.core.automation.rest/pom.xml +++ b/bundles/org.openhab.core.automation.rest/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.automation/pom.xml b/bundles/org.openhab.core.automation/pom.xml index aa9b6776e03..d9526ec7d46 100644 --- a/bundles/org.openhab.core.automation/pom.xml +++ b/bundles/org.openhab.core.automation/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.core/pom.xml b/bundles/org.openhab.core.config.core/pom.xml index 775d08442c2..e9ce9275f70 100644 --- a/bundles/org.openhab.core.config.core/pom.xml +++ b/bundles/org.openhab.core.config.core/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml b/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml index 81119fdb96f..2e1e8e69545 100644 --- a/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.ip/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml b/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml index 8b85e7f07b5..79adc852e09 100644 --- a/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.mdns/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon.process/pom.xml b/bundles/org.openhab.core.config.discovery.addon.process/pom.xml index f8a26b07bd0..93869c740b4 100644 --- a/bundles/org.openhab.core.config.discovery.addon.process/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.process/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml b/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml index 9632d4e40a7..e18075232e1 100644 --- a/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.sddp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml b/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml index cd212f1eaa8..a195f43d7dd 100644 --- a/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.upnp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml b/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml index 6ddee4785a2..50dae1cda13 100644 --- a/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon.usb/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.addon/pom.xml b/bundles/org.openhab.core.config.discovery.addon/pom.xml index 4ef316d1255..802424e62d3 100644 --- a/bundles/org.openhab.core.config.discovery.addon/pom.xml +++ b/bundles/org.openhab.core.config.discovery.addon/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.mdns/pom.xml b/bundles/org.openhab.core.config.discovery.mdns/pom.xml index d17c47bf7aa..b83cea9da21 100644 --- a/bundles/org.openhab.core.config.discovery.mdns/pom.xml +++ b/bundles/org.openhab.core.config.discovery.mdns/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.sddp/pom.xml b/bundles/org.openhab.core.config.discovery.sddp/pom.xml index 584180e6d51..78dd7dc5b76 100644 --- a/bundles/org.openhab.core.config.discovery.sddp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.sddp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.upnp/pom.xml b/bundles/org.openhab.core.config.discovery.upnp/pom.xml index 6d4ca2b14e9..3acb24a0162 100644 --- a/bundles/org.openhab.core.config.discovery.upnp/pom.xml +++ b/bundles/org.openhab.core.config.discovery.upnp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml index 75a9ad353c8..b18af32a317 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml index 5019b675130..4949e4d0193 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial.ser2net/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml index 3118f40ae6f..af322fead47 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial.windowsregistry/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery.usbserial/pom.xml b/bundles/org.openhab.core.config.discovery.usbserial/pom.xml index 4a102fcfa40..14641463948 100644 --- a/bundles/org.openhab.core.config.discovery.usbserial/pom.xml +++ b/bundles/org.openhab.core.config.discovery.usbserial/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.discovery/pom.xml b/bundles/org.openhab.core.config.discovery/pom.xml index df188cc56bd..c73a8d6905b 100644 --- a/bundles/org.openhab.core.config.discovery/pom.xml +++ b/bundles/org.openhab.core.config.discovery/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.dispatch/pom.xml b/bundles/org.openhab.core.config.dispatch/pom.xml index ef2c7c6a3e4..0718c11530e 100644 --- a/bundles/org.openhab.core.config.dispatch/pom.xml +++ b/bundles/org.openhab.core.config.dispatch/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.jupnp/pom.xml b/bundles/org.openhab.core.config.jupnp/pom.xml index 47f66ed6e61..6059f7f8e61 100644 --- a/bundles/org.openhab.core.config.jupnp/pom.xml +++ b/bundles/org.openhab.core.config.jupnp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.config.serial/pom.xml b/bundles/org.openhab.core.config.serial/pom.xml index a217f206266..ea2b499ef81 100644 --- a/bundles/org.openhab.core.config.serial/pom.xml +++ b/bundles/org.openhab.core.config.serial/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.ephemeris/pom.xml b/bundles/org.openhab.core.ephemeris/pom.xml index c1e3ade2c84..cb635def7a3 100644 --- a/bundles/org.openhab.core.ephemeris/pom.xml +++ b/bundles/org.openhab.core.ephemeris/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.id/pom.xml b/bundles/org.openhab.core.id/pom.xml index 507bdbdb8a3..10cd07c605d 100644 --- a/bundles/org.openhab.core.id/pom.xml +++ b/bundles/org.openhab.core.id/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.bin2json/pom.xml b/bundles/org.openhab.core.io.bin2json/pom.xml index f5a90df34c4..4d052c572b6 100644 --- a/bundles/org.openhab.core.io.bin2json/pom.xml +++ b/bundles/org.openhab.core.io.bin2json/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.console.eclipse/pom.xml b/bundles/org.openhab.core.io.console.eclipse/pom.xml index d6dc158e2d0..eb75c58b7c5 100644 --- a/bundles/org.openhab.core.io.console.eclipse/pom.xml +++ b/bundles/org.openhab.core.io.console.eclipse/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.console.karaf/pom.xml b/bundles/org.openhab.core.io.console.karaf/pom.xml index 3514102aaef..243d1a41f7c 100644 --- a/bundles/org.openhab.core.io.console.karaf/pom.xml +++ b/bundles/org.openhab.core.io.console.karaf/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.console.rfc147/pom.xml b/bundles/org.openhab.core.io.console.rfc147/pom.xml index b06eddb2147..2d428faf3c2 100644 --- a/bundles/org.openhab.core.io.console.rfc147/pom.xml +++ b/bundles/org.openhab.core.io.console.rfc147/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.console/pom.xml b/bundles/org.openhab.core.io.console/pom.xml index a148278b850..2d8fee35ac5 100644 --- a/bundles/org.openhab.core.io.console/pom.xml +++ b/bundles/org.openhab.core.io.console/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.http.auth/pom.xml b/bundles/org.openhab.core.io.http.auth/pom.xml index d0b371071e8..8eac43d079c 100644 --- a/bundles/org.openhab.core.io.http.auth/pom.xml +++ b/bundles/org.openhab.core.io.http.auth/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.http/pom.xml b/bundles/org.openhab.core.io.http/pom.xml index af635a5e512..47b6698a84c 100644 --- a/bundles/org.openhab.core.io.http/pom.xml +++ b/bundles/org.openhab.core.io.http/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.jetty.certificate/pom.xml b/bundles/org.openhab.core.io.jetty.certificate/pom.xml index b105e29b5fc..c33584c1909 100644 --- a/bundles/org.openhab.core.io.jetty.certificate/pom.xml +++ b/bundles/org.openhab.core.io.jetty.certificate/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 @@ -49,7 +51,8 @@ true - + . diff --git a/bundles/org.openhab.core.io.monitor/pom.xml b/bundles/org.openhab.core.io.monitor/pom.xml index e0f2cfe6c81..2343a559771 100644 --- a/bundles/org.openhab.core.io.monitor/pom.xml +++ b/bundles/org.openhab.core.io.monitor/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.net/pom.xml b/bundles/org.openhab.core.io.net/pom.xml index 9148456f249..1ed0f775f02 100644 --- a/bundles/org.openhab.core.io.net/pom.xml +++ b/bundles/org.openhab.core.io.net/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.audio/pom.xml b/bundles/org.openhab.core.io.rest.audio/pom.xml index e7182072b33..10b5add858c 100644 --- a/bundles/org.openhab.core.io.rest.audio/pom.xml +++ b/bundles/org.openhab.core.io.rest.audio/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.auth/pom.xml b/bundles/org.openhab.core.io.rest.auth/pom.xml index 1359420309e..7af3b1bcd8c 100644 --- a/bundles/org.openhab.core.io.rest.auth/pom.xml +++ b/bundles/org.openhab.core.io.rest.auth/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.core/pom.xml b/bundles/org.openhab.core.io.rest.core/pom.xml index 8d63ded85bc..f7c52c96934 100644 --- a/bundles/org.openhab.core.io.rest.core/pom.xml +++ b/bundles/org.openhab.core.io.rest.core/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.log/pom.xml b/bundles/org.openhab.core.io.rest.log/pom.xml index 3908b3ccf83..ab4b1909658 100644 --- a/bundles/org.openhab.core.io.rest.log/pom.xml +++ b/bundles/org.openhab.core.io.rest.log/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.mdns/pom.xml b/bundles/org.openhab.core.io.rest.mdns/pom.xml index 8064d947487..a03f9467ff0 100644 --- a/bundles/org.openhab.core.io.rest.mdns/pom.xml +++ b/bundles/org.openhab.core.io.rest.mdns/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.sitemap/pom.xml b/bundles/org.openhab.core.io.rest.sitemap/pom.xml index cf74af53778..93b1f80e3ca 100644 --- a/bundles/org.openhab.core.io.rest.sitemap/pom.xml +++ b/bundles/org.openhab.core.io.rest.sitemap/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.sse/pom.xml b/bundles/org.openhab.core.io.rest.sse/pom.xml index 7a038254740..5f6ad285b85 100644 --- a/bundles/org.openhab.core.io.rest.sse/pom.xml +++ b/bundles/org.openhab.core.io.rest.sse/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.swagger/pom.xml b/bundles/org.openhab.core.io.rest.swagger/pom.xml index 2ec9b84d075..dd1451fe321 100644 --- a/bundles/org.openhab.core.io.rest.swagger/pom.xml +++ b/bundles/org.openhab.core.io.rest.swagger/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.transform/pom.xml b/bundles/org.openhab.core.io.rest.transform/pom.xml index 375d652d904..568ecd9055a 100644 --- a/bundles/org.openhab.core.io.rest.transform/pom.xml +++ b/bundles/org.openhab.core.io.rest.transform/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.ui/pom.xml b/bundles/org.openhab.core.io.rest.ui/pom.xml index 9b3ca0dac9b..8f3d21a9473 100644 --- a/bundles/org.openhab.core.io.rest.ui/pom.xml +++ b/bundles/org.openhab.core.io.rest.ui/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest.voice/pom.xml b/bundles/org.openhab.core.io.rest.voice/pom.xml index f43983212f2..bda1d69521f 100644 --- a/bundles/org.openhab.core.io.rest.voice/pom.xml +++ b/bundles/org.openhab.core.io.rest.voice/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.rest/pom.xml b/bundles/org.openhab.core.io.rest/pom.xml index 0574ac21f24..ef504a0f8ef 100644 --- a/bundles/org.openhab.core.io.rest/pom.xml +++ b/bundles/org.openhab.core.io.rest/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.mdns/pom.xml b/bundles/org.openhab.core.io.transport.mdns/pom.xml index d2b58e6d8ed..2888ab05052 100644 --- a/bundles/org.openhab.core.io.transport.mdns/pom.xml +++ b/bundles/org.openhab.core.io.transport.mdns/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.modbus/pom.xml b/bundles/org.openhab.core.io.transport.modbus/pom.xml index 8cd4193de79..05d37841641 100644 --- a/bundles/org.openhab.core.io.transport.modbus/pom.xml +++ b/bundles/org.openhab.core.io.transport.modbus/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.mqtt/pom.xml b/bundles/org.openhab.core.io.transport.mqtt/pom.xml index c820007554e..5fa18fffbe3 100644 --- a/bundles/org.openhab.core.io.transport.mqtt/pom.xml +++ b/bundles/org.openhab.core.io.transport.mqtt/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml b/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml index a5d464497ea..4a885bbfda7 100644 --- a/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial.javacomm/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml b/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml index fa7c968945f..9c1f99b0e88 100644 --- a/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml b/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml index 53b77a86f1b..99a9adc2b3f 100644 --- a/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial.rxtx/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.serial/pom.xml b/bundles/org.openhab.core.io.transport.serial/pom.xml index a21ca1851cd..a9848a12d04 100644 --- a/bundles/org.openhab.core.io.transport.serial/pom.xml +++ b/bundles/org.openhab.core.io.transport.serial/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.transport.upnp/pom.xml b/bundles/org.openhab.core.io.transport.upnp/pom.xml index a4f20ffb9e7..6a5af7c5060 100644 --- a/bundles/org.openhab.core.io.transport.upnp/pom.xml +++ b/bundles/org.openhab.core.io.transport.upnp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.io.websocket/pom.xml b/bundles/org.openhab.core.io.websocket/pom.xml index 52ebb762867..60540c35506 100644 --- a/bundles/org.openhab.core.io.websocket/pom.xml +++ b/bundles/org.openhab.core.io.websocket/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.karaf/pom.xml b/bundles/org.openhab.core.karaf/pom.xml index 84557a23b2c..ca6a12fcdb0 100644 --- a/bundles/org.openhab.core.karaf/pom.xml +++ b/bundles/org.openhab.core.karaf/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.core/pom.xml b/bundles/org.openhab.core.model.core/pom.xml index 847539fd30e..ecc7962af57 100644 --- a/bundles/org.openhab.core.model.core/pom.xml +++ b/bundles/org.openhab.core.model.core/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.item.ide/pom.xml b/bundles/org.openhab.core.model.item.ide/pom.xml index 3b5f1903403..52a366a1cf3 100644 --- a/bundles/org.openhab.core.model.item.ide/pom.xml +++ b/bundles/org.openhab.core.model.item.ide/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.item.runtime/pom.xml b/bundles/org.openhab.core.model.item.runtime/pom.xml index 6a68bc03942..7fbdd210dfa 100644 --- a/bundles/org.openhab.core.model.item.runtime/pom.xml +++ b/bundles/org.openhab.core.model.item.runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.item/pom.xml b/bundles/org.openhab.core.model.item/pom.xml index db06db6c554..8111817e96a 100644 --- a/bundles/org.openhab.core.model.item/pom.xml +++ b/bundles/org.openhab.core.model.item/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.lsp/pom.xml b/bundles/org.openhab.core.model.lsp/pom.xml index 162f43aa90b..64df7f894e1 100644 --- a/bundles/org.openhab.core.model.lsp/pom.xml +++ b/bundles/org.openhab.core.model.lsp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.persistence.ide/pom.xml b/bundles/org.openhab.core.model.persistence.ide/pom.xml index 93896e5146c..caa5069888c 100644 --- a/bundles/org.openhab.core.model.persistence.ide/pom.xml +++ b/bundles/org.openhab.core.model.persistence.ide/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.persistence.runtime/pom.xml b/bundles/org.openhab.core.model.persistence.runtime/pom.xml index fefa8ac4a61..a61d85916a7 100644 --- a/bundles/org.openhab.core.model.persistence.runtime/pom.xml +++ b/bundles/org.openhab.core.model.persistence.runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.persistence/pom.xml b/bundles/org.openhab.core.model.persistence/pom.xml index e09e824a1ad..3c2ebe980ab 100644 --- a/bundles/org.openhab.core.model.persistence/pom.xml +++ b/bundles/org.openhab.core.model.persistence/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.rule.ide/pom.xml b/bundles/org.openhab.core.model.rule.ide/pom.xml index 089d66fcfb2..8e40c14c5c0 100644 --- a/bundles/org.openhab.core.model.rule.ide/pom.xml +++ b/bundles/org.openhab.core.model.rule.ide/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.rule.runtime/pom.xml b/bundles/org.openhab.core.model.rule.runtime/pom.xml index 688ae097c3e..60df488a6bb 100644 --- a/bundles/org.openhab.core.model.rule.runtime/pom.xml +++ b/bundles/org.openhab.core.model.rule.runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.rule/pom.xml b/bundles/org.openhab.core.model.rule/pom.xml index 6c9f2a107a7..d2613fd4eab 100644 --- a/bundles/org.openhab.core.model.rule/pom.xml +++ b/bundles/org.openhab.core.model.rule/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.script.ide/pom.xml b/bundles/org.openhab.core.model.script.ide/pom.xml index 65c3219a65b..b537cead184 100644 --- a/bundles/org.openhab.core.model.script.ide/pom.xml +++ b/bundles/org.openhab.core.model.script.ide/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.script.runtime/pom.xml b/bundles/org.openhab.core.model.script.runtime/pom.xml index e2d128d202d..2b42186a3c9 100644 --- a/bundles/org.openhab.core.model.script.runtime/pom.xml +++ b/bundles/org.openhab.core.model.script.runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.script/pom.xml b/bundles/org.openhab.core.model.script/pom.xml index 60c0dfbfe36..740ae670d39 100644 --- a/bundles/org.openhab.core.model.script/pom.xml +++ b/bundles/org.openhab.core.model.script/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.sitemap.ide/pom.xml b/bundles/org.openhab.core.model.sitemap.ide/pom.xml index 2d619800e03..ef7f86e43b6 100644 --- a/bundles/org.openhab.core.model.sitemap.ide/pom.xml +++ b/bundles/org.openhab.core.model.sitemap.ide/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.sitemap.runtime/pom.xml b/bundles/org.openhab.core.model.sitemap.runtime/pom.xml index bc4ca1ca26c..c95efd1fcff 100644 --- a/bundles/org.openhab.core.model.sitemap.runtime/pom.xml +++ b/bundles/org.openhab.core.model.sitemap.runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.sitemap/pom.xml b/bundles/org.openhab.core.model.sitemap/pom.xml index 27e48cd27ff..b9107e60382 100644 --- a/bundles/org.openhab.core.model.sitemap/pom.xml +++ b/bundles/org.openhab.core.model.sitemap/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.thing.ide/pom.xml b/bundles/org.openhab.core.model.thing.ide/pom.xml index cba666c0db0..6999e354f9a 100644 --- a/bundles/org.openhab.core.model.thing.ide/pom.xml +++ b/bundles/org.openhab.core.model.thing.ide/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.thing.runtime/pom.xml b/bundles/org.openhab.core.model.thing.runtime/pom.xml index 2fe8ca3a5b8..abebd699c76 100644 --- a/bundles/org.openhab.core.model.thing.runtime/pom.xml +++ b/bundles/org.openhab.core.model.thing.runtime/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.thing/pom.xml b/bundles/org.openhab.core.model.thing/pom.xml index 1fcd533dcab..bf43d12fadd 100644 --- a/bundles/org.openhab.core.model.thing/pom.xml +++ b/bundles/org.openhab.core.model.thing/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.model.yaml/pom.xml b/bundles/org.openhab.core.model.yaml/pom.xml index c83761dbf4d..66a70452bf1 100644 --- a/bundles/org.openhab.core.model.yaml/pom.xml +++ b/bundles/org.openhab.core.model.yaml/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.persistence/pom.xml b/bundles/org.openhab.core.persistence/pom.xml index 039866195d5..c3bf2aacfab 100644 --- a/bundles/org.openhab.core.persistence/pom.xml +++ b/bundles/org.openhab.core.persistence/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.semantics/pom.xml b/bundles/org.openhab.core.semantics/pom.xml index 7199ee9b511..c409c792619 100644 --- a/bundles/org.openhab.core.semantics/pom.xml +++ b/bundles/org.openhab.core.semantics/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.storage.json/pom.xml b/bundles/org.openhab.core.storage.json/pom.xml index 69c29790f28..f2331829173 100644 --- a/bundles/org.openhab.core.storage.json/pom.xml +++ b/bundles/org.openhab.core.storage.json/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.test.magic/pom.xml b/bundles/org.openhab.core.test.magic/pom.xml index db334052f51..c82c7ed8e62 100644 --- a/bundles/org.openhab.core.test.magic/pom.xml +++ b/bundles/org.openhab.core.test.magic/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.test/pom.xml b/bundles/org.openhab.core.test/pom.xml index 4ca06a42e4b..4d7ff7266e4 100644 --- a/bundles/org.openhab.core.test/pom.xml +++ b/bundles/org.openhab.core.test/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.thing/pom.xml b/bundles/org.openhab.core.thing/pom.xml index a7b51c63790..b46d77d3c3f 100644 --- a/bundles/org.openhab.core.thing/pom.xml +++ b/bundles/org.openhab.core.thing/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.transform/pom.xml b/bundles/org.openhab.core.transform/pom.xml index d4881eb91bf..0de8ab656bc 100644 --- a/bundles/org.openhab.core.transform/pom.xml +++ b/bundles/org.openhab.core.transform/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.ui.icon/pom.xml b/bundles/org.openhab.core.ui.icon/pom.xml index 39513defbbc..d462278fb34 100644 --- a/bundles/org.openhab.core.ui.icon/pom.xml +++ b/bundles/org.openhab.core.ui.icon/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.ui/pom.xml b/bundles/org.openhab.core.ui/pom.xml index 4f417951fa2..09c2ea2819e 100644 --- a/bundles/org.openhab.core.ui/pom.xml +++ b/bundles/org.openhab.core.ui/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core.voice/pom.xml b/bundles/org.openhab.core.voice/pom.xml index 11996bbf7df..94789bca1c2 100644 --- a/bundles/org.openhab.core.voice/pom.xml +++ b/bundles/org.openhab.core.voice/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/org.openhab.core/pom.xml b/bundles/org.openhab.core/pom.xml index 01e74811ba7..5f43be29d3f 100644 --- a/bundles/org.openhab.core/pom.xml +++ b/bundles/org.openhab.core/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/bundles/pom.xml b/bundles/pom.xml index acbe7473602..923eeaf00d8 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/features/karaf/openhab-core/pom.xml b/features/karaf/openhab-core/pom.xml index 77ccfb8e896..d584378dc93 100644 --- a/features/karaf/openhab-core/pom.xml +++ b/features/karaf/openhab-core/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/features/karaf/openhab-tp/pom.xml b/features/karaf/openhab-tp/pom.xml index da3b41069f9..380c276dfbf 100644 --- a/features/karaf/openhab-tp/pom.xml +++ b/features/karaf/openhab-tp/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/features/karaf/pom.xml b/features/karaf/pom.xml index 5f72d65fdf1..ee7c65c992c 100644 --- a/features/karaf/pom.xml +++ b/features/karaf/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/features/pom.xml b/features/pom.xml index 10d4501bf2c..e12d4f53eb4 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.addon.tests/itest.bndrun b/itests/org.openhab.core.addon.tests/itest.bndrun index 489ecb3d14a..28df86b857f 100644 --- a/itests/org.openhab.core.addon.tests/itest.bndrun +++ b/itests/org.openhab.core.addon.tests/itest.bndrun @@ -48,11 +48,6 @@ Fragment-Host: org.openhab.core.addon org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - org.openhab.core.addon.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -67,4 +62,9 @@ Fragment-Host: org.openhab.core.addon org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ - org.objectweb.asm;version='[9.7.0,9.7.1)' + org.objectweb.asm;version='[9.7.0,9.7.1)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.addon.tests/pom.xml b/itests/org.openhab.core.addon.tests/pom.xml index a726278b9e7..8a3a5e21afd 100644 --- a/itests/org.openhab.core.addon.tests/pom.xml +++ b/itests/org.openhab.core.addon.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun index b30869a0199..8aaf6aad5ca 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun +++ b/itests/org.openhab.core.auth.oauth2client.tests/itest.bndrun @@ -47,14 +47,6 @@ Fragment-Host: org.openhab.core.auth.oauth2client org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.auth.oauth2client;version='[4.2.0,4.2.1)',\ - org.openhab.core.auth.oauth2client.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ xstream;version='[1.4.20,1.4.21)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ @@ -78,4 +70,12 @@ Fragment-Host: org.openhab.core.auth.oauth2client org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.auth.oauth2client;version='[4.3.0,4.3.1)',\ + org.openhab.core.auth.oauth2client.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.auth.oauth2client.tests/pom.xml b/itests/org.openhab.core.auth.oauth2client.tests/pom.xml index 4d713ce5ed8..40f39cbf8d4 100644 --- a/itests/org.openhab.core.auth.oauth2client.tests/pom.xml +++ b/itests/org.openhab.core.auth.oauth2client.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.automation.integration.tests/itest.bndrun b/itests/org.openhab.core.automation.integration.tests/itest.bndrun index ffc38a7cdff..19a88bd6821 100644 --- a/itests/org.openhab.core.automation.integration.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.integration.tests/itest.bndrun @@ -48,23 +48,12 @@ Fragment-Host: org.openhab.core.automation org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.integration.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -81,4 +70,15 @@ Fragment-Host: org.openhab.core.automation org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.integration.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.automation.integration.tests/pom.xml b/itests/org.openhab.core.automation.integration.tests/pom.xml index a00be5fa0d5..36a05e4ba68 100644 --- a/itests/org.openhab.core.automation.integration.tests/pom.xml +++ b/itests/org.openhab.core.automation.integration.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun index ba402c2210e..35201397280 100644 --- a/itests/org.openhab.core.automation.module.core.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.core.tests/itest.bndrun @@ -48,23 +48,12 @@ Fragment-Host: org.openhab.core.automation org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.core.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -81,4 +70,15 @@ Fragment-Host: org.openhab.core.automation org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.core.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.automation.module.core.tests/pom.xml b/itests/org.openhab.core.automation.module.core.tests/pom.xml index 2c53e75eff5..d98c84a2984 100644 --- a/itests/org.openhab.core.automation.module.core.tests/pom.xml +++ b/itests/org.openhab.core.automation.module.core.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun index 2d9b8278e8b..eeb5d4560a9 100644 --- a/itests/org.openhab.core.automation.module.script.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.script.tests/itest.bndrun @@ -44,24 +44,12 @@ Fragment-Host: org.openhab.core.automation.module.script org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -78,4 +66,16 @@ Fragment-Host: org.openhab.core.automation.module.script org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.automation.module.script.tests/pom.xml b/itests/org.openhab.core.automation.module.script.tests/pom.xml index e6afb2f4202..8f0fd1f34c4 100644 --- a/itests/org.openhab.core.automation.module.script.tests/pom.xml +++ b/itests/org.openhab.core.automation.module.script.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun index 5bd26d83e06..3b997c6cfbe 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.module.timer.tests/itest.bndrun @@ -48,23 +48,12 @@ Fragment-Host: org.openhab.core.automation org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.timer.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -81,4 +70,15 @@ Fragment-Host: org.openhab.core.automation org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.timer.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.automation.module.timer.tests/pom.xml b/itests/org.openhab.core.automation.module.timer.tests/pom.xml index b823d853d1b..6e011bda5f8 100644 --- a/itests/org.openhab.core.automation.module.timer.tests/pom.xml +++ b/itests/org.openhab.core.automation.module.timer.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.automation.tests/itest.bndrun b/itests/org.openhab.core.automation.tests/itest.bndrun index 562af47e51f..0815477320e 100644 --- a/itests/org.openhab.core.automation.tests/itest.bndrun +++ b/itests/org.openhab.core.automation.tests/itest.bndrun @@ -48,23 +48,12 @@ Fragment-Host: org.openhab.core.automation org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -81,4 +70,15 @@ Fragment-Host: org.openhab.core.automation org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.automation.tests/pom.xml b/itests/org.openhab.core.automation.tests/pom.xml index f150630e4f9..81dcb791b0a 100644 --- a/itests/org.openhab.core.automation.tests/pom.xml +++ b/itests/org.openhab.core.automation.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.config.core.tests/itest.bndrun b/itests/org.openhab.core.config.core.tests/itest.bndrun index f5b0e64d1c6..e7bbd8efea0 100644 --- a/itests/org.openhab.core.config.core.tests/itest.bndrun +++ b/itests/org.openhab.core.config.core.tests/itest.bndrun @@ -50,10 +50,6 @@ Fragment-Host: org.openhab.core.config.core org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -68,4 +64,8 @@ Fragment-Host: org.openhab.core.config.core org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.config.core.tests/pom.xml b/itests/org.openhab.core.config.core.tests/pom.xml index 566a9dd2c66..eda5ac2e34a 100644 --- a/itests/org.openhab.core.config.core.tests/pom.xml +++ b/itests/org.openhab.core.config.core.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun index 9f27a4b7d58..d49f33e3b0b 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.mdns.tests/itest.bndrun @@ -49,18 +49,7 @@ Fragment-Host: org.openhab.core.config.discovery.mdns org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.mdns;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.mdns.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.transport.mdns;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -75,4 +64,15 @@ Fragment-Host: org.openhab.core.config.discovery.mdns org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.mdns;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.mdns.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.transport.mdns;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml b/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml index 06ca6a28249..bf275abe215 100644 --- a/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.mdns.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.config.discovery.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.tests/itest.bndrun index 0583d1ccbd4..26a44e906f1 100644 --- a/itests/org.openhab.core.config.discovery.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.tests/itest.bndrun @@ -50,16 +50,7 @@ Fragment-Host: org.openhab.core.config.discovery org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -74,4 +65,13 @@ Fragment-Host: org.openhab.core.config.discovery org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.config.discovery.tests/pom.xml b/itests/org.openhab.core.config.discovery.tests/pom.xml index 85c2a251bca..9dd2ad8463c 100644 --- a/itests/org.openhab.core.config.discovery.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 org.openhab.core.itests diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun index c2e925b5309..6ea8644bc35 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/itest.bndrun @@ -49,18 +49,7 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.usbserial;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.usbserial.linuxsysfs;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.usbserial.linuxsysfs.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -75,4 +64,15 @@ Fragment-Host: org.openhab.core.config.discovery.usbserial.linuxsysfs org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.usbserial;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.usbserial.linuxsysfs;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.usbserial.linuxsysfs.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml index 06f1923d239..a5e280c5656 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.usbserial.linuxsysfs.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 org.openhab.core.itests diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun index a13c71a8da6..ea19a0967c5 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/itest.bndrun @@ -58,17 +58,7 @@ Provide-Capability: \ org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.usbserial;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.usbserial.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -83,4 +73,14 @@ Provide-Capability: \ org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.usbserial;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.usbserial.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml b/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml index 66f56e1b4a1..da8500f38af 100644 --- a/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml +++ b/itests/org.openhab.core.config.discovery.usbserial.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun index 4988772c6b3..d0494f5e867 100644 --- a/itests/org.openhab.core.config.dispatch.tests/itest.bndrun +++ b/itests/org.openhab.core.config.dispatch.tests/itest.bndrun @@ -43,10 +43,6 @@ Fragment-Host: org.openhab.core.config.dispatch org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.dispatch;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.dispatch.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -61,4 +57,8 @@ Fragment-Host: org.openhab.core.config.dispatch org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.dispatch;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.dispatch.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.config.dispatch.tests/pom.xml b/itests/org.openhab.core.config.dispatch.tests/pom.xml index 0727253bd18..f7cd08b7669 100644 --- a/itests/org.openhab.core.config.dispatch.tests/pom.xml +++ b/itests/org.openhab.core.config.dispatch.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.ephemeris.tests/itest.bndrun b/itests/org.openhab.core.ephemeris.tests/itest.bndrun index 35a5f0af786..b8aedd5223b 100644 --- a/itests/org.openhab.core.ephemeris.tests/itest.bndrun +++ b/itests/org.openhab.core.ephemeris.tests/itest.bndrun @@ -49,17 +49,11 @@ feature.openhab-config: \ org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ - stax2-api;version='[4.2.1,4.2.2)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -76,4 +70,10 @@ feature.openhab-config: \ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.ephemeris.tests/pom.xml b/itests/org.openhab.core.ephemeris.tests/pom.xml index 3c9c281fb0a..820a5ecd6a7 100644 --- a/itests/org.openhab.core.ephemeris.tests/pom.xml +++ b/itests/org.openhab.core.ephemeris.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.io.net.tests/itest.bndrun b/itests/org.openhab.core.io.net.tests/itest.bndrun index 1dab572817a..db3e896f68c 100644 --- a/itests/org.openhab.core.io.net.tests/itest.bndrun +++ b/itests/org.openhab.core.io.net.tests/itest.bndrun @@ -44,10 +44,6 @@ Fragment-Host: org.openhab.core.io.net org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.alpn.client;version='[9.4.54,9.4.55)',\ @@ -73,4 +69,8 @@ Fragment-Host: org.openhab.core.io.net org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.io.net.tests/pom.xml b/itests/org.openhab.core.io.net.tests/pom.xml index 8dbaf1d4085..a68d3dcc1df 100644 --- a/itests/org.openhab.core.io.net.tests/pom.xml +++ b/itests/org.openhab.core.io.net.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun index b37035e4a84..32a0d66364c 100644 --- a/itests/org.openhab.core.io.rest.core.tests/itest.bndrun +++ b/itests/org.openhab.core.io.rest.core.tests/itest.bndrun @@ -20,7 +20,6 @@ Fragment-Host: org.openhab.core.io.rest.core org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ org.apache.aries.component-dsl.component-dsl;version='[1.2.2,1.2.3)',\ - stax2-api;version='[4.2.1,4.2.2)',\ jakarta.inject.jakarta.inject-api;version='[2.0.0,2.0.1)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ si-units;version='[2.1.0,2.1.1)',\ @@ -41,7 +40,6 @@ Fragment-Host: org.openhab.core.io.rest.core org.apiguardian.api;version='[1.1.2,1.1.3)',\ tech.units.indriya;version='[2.2.0,2.2.1)',\ uom-lib-common;version='[2.2.0,2.2.1)',\ - com.fasterxml.woodstox.woodstox-core;version='[6.5.1,6.5.2)',\ io.methvin.directory-watcher;version='[0.18.0,0.18.1)',\ com.sun.xml.bind.jaxb-osgi;version='[2.3.8,2.3.9)',\ org.apache.aries.javax.jax.rs-api;version='[1.0.4,1.0.5)',\ @@ -67,20 +65,6 @@ Fragment-Host: org.openhab.core.io.rest.core org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.discovery.addon;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.rest;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.rest.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.rest.core.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.semantics;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ json-path;version='[2.9.0,2.9.1)',\ net.minidev.accessors-smart;version='[2.5.0,2.5.1)',\ @@ -106,4 +90,20 @@ Fragment-Host: org.openhab.core.io.rest.core org.ops4j.pax.web.pax-web-jetty;version='[8.0.27,8.0.28)',\ org.ops4j.pax.web.pax-web-runtime;version='[8.0.27,8.0.28)',\ org.ops4j.pax.web.pax-web-spi;version='[8.0.27,8.0.28)',\ - org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)' + org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)',\ + com.fasterxml.woodstox.woodstox-core;version='[6.6.2,6.6.3)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.discovery.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.rest;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.rest.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.rest.core.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.semantics;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.io.rest.core.tests/pom.xml b/itests/org.openhab.core.io.rest.core.tests/pom.xml index 04c26d226a8..7babfac1e43 100644 --- a/itests/org.openhab.core.io.rest.core.tests/pom.xml +++ b/itests/org.openhab.core.io.rest.core.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.model.item.tests/itest.bndrun b/itests/org.openhab.core.model.item.tests/itest.bndrun index 8d949e031b7..15f99e2af9f 100644 --- a/itests/org.openhab.core.model.item.tests/itest.bndrun +++ b/itests/org.openhab.core.model.item.tests/itest.bndrun @@ -52,46 +52,18 @@ Fragment-Host: org.openhab.core.model.item org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.audio;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script.rulesupport;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.rule;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.sitemap;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.semantics;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ - org.openhab.core.voice;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ - org.apache.log4j;version='[1.2.25,1.2.26)',\ org.eclipse.jetty.alpn.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -129,4 +101,30 @@ Fragment-Host: org.openhab.core.model.item org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ - org.openhab.core.model.thing.runtime;version='[4.2.0,4.2.1)' + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.audio;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script.rulesupport;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.rule;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.sitemap;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.semantics;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + org.openhab.core.voice;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.model.item.tests/pom.xml b/itests/org.openhab.core.model.item.tests/pom.xml index 2106b5b34bc..c71149067c7 100644 --- a/itests/org.openhab.core.model.item.tests/pom.xml +++ b/itests/org.openhab.core.model.item.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.model.rule.tests/itest.bndrun b/itests/org.openhab.core.model.rule.tests/itest.bndrun index 0489cdcbf41..11cfdb65bc6 100644 --- a/itests/org.openhab.core.model.rule.tests/itest.bndrun +++ b/itests/org.openhab.core.model.rule.tests/itest.bndrun @@ -56,45 +56,17 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.audio;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script.rulesupport;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.rule;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.rule.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.rule.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.sitemap;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.semantics;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ - org.openhab.core.voice;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ - org.apache.log4j;version='[1.2.25,1.2.26)',\ org.eclipse.jetty.alpn.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -132,4 +104,31 @@ Fragment-Host: org.openhab.core.model.rule.runtime org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ - org.openhab.core.model.thing.runtime;version='[4.2.0,4.2.1)' + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.audio;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script.rulesupport;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.rule;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.rule.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.rule.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.sitemap;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.semantics;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + org.openhab.core.voice;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.model.rule.tests/pom.xml b/itests/org.openhab.core.model.rule.tests/pom.xml index de55bd7243b..1a2d490d823 100644 --- a/itests/org.openhab.core.model.rule.tests/pom.xml +++ b/itests/org.openhab.core.model.rule.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.model.script.tests/itest.bndrun b/itests/org.openhab.core.model.script.tests/itest.bndrun index 7dbfc24ce77..d6dcab30c89 100644 --- a/itests/org.openhab.core.model.script.tests/itest.bndrun +++ b/itests/org.openhab.core.model.script.tests/itest.bndrun @@ -61,44 +61,17 @@ Fragment-Host: org.openhab.core.model.script org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.audio;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script.rulesupport;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.rule;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.sitemap;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.semantics;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ - org.openhab.core.voice;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ - org.apache.log4j;version='[1.2.25,1.2.26)',\ org.eclipse.jetty.alpn.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -136,4 +109,30 @@ Fragment-Host: org.openhab.core.model.script org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ - org.openhab.core.model.thing.runtime;version='[4.2.0,4.2.1)' + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.audio;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script.rulesupport;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.rule;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.sitemap;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.semantics;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + org.openhab.core.voice;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.model.script.tests/pom.xml b/itests/org.openhab.core.model.script.tests/pom.xml index 725f78ac72c..75aecf5f750 100644 --- a/itests/org.openhab.core.model.script.tests/pom.xml +++ b/itests/org.openhab.core.model.script.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.model.thing.tests/itest.bndrun b/itests/org.openhab.core.model.thing.tests/itest.bndrun index ed7fbd52657..47959ac948e 100644 --- a/itests/org.openhab.core.model.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.model.thing.tests/itest.bndrun @@ -59,48 +59,18 @@ Fragment-Host: org.openhab.core.model.thing org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.audio;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.automation.module.script.rulesupport;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.ephemeris;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.net;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.item.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.rule;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.script.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.sitemap;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing.runtime;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.model.thing.testsupport;version='[4.2.0,4.2.1)',\ - org.openhab.core.persistence;version='[4.2.0,4.2.1)',\ - org.openhab.core.semantics;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ - org.openhab.core.voice;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ org.threeten.extra;version='[1.8.0,1.8.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-core;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.17.1,2.17.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-xml;version='[2.17.1,2.17.2)',\ - stax2-api;version='[4.2.1,4.2.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.google.guava;version='[33.2.0,33.2.1)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ io.github.classgraph.classgraph;version='[4.8.172,4.8.173)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ - org.apache.log4j;version='[1.2.25,1.2.26)',\ org.eclipse.jetty.alpn.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.client;version='[9.4.54,9.4.55)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -137,4 +107,33 @@ Fragment-Host: org.openhab.core.model.thing org.ops4j.pax.web.pax-web-spi;version='[8.0.27,8.0.28)',\ org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)',\ de.focus_shift.jollyday-core;version='[0.28.1,0.28.2)',\ - de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)' + de.focus_shift.jollyday-jackson;version='[0.28.1,0.28.2)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.audio;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.automation.module.script.rulesupport;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.ephemeris;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.net;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.item.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.rule;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.script.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.sitemap;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing.runtime;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.model.thing.testsupport;version='[4.3.0,4.3.1)',\ + org.openhab.core.persistence;version='[4.3.0,4.3.1)',\ + org.openhab.core.semantics;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + org.openhab.core.voice;version='[4.3.0,4.3.1)',\ + stax2-api;version='[4.2.2,4.2.3)' diff --git a/itests/org.openhab.core.model.thing.tests/pom.xml b/itests/org.openhab.core.model.thing.tests/pom.xml index 4b19cbb852f..435d91fe03f 100644 --- a/itests/org.openhab.core.model.thing.tests/pom.xml +++ b/itests/org.openhab.core.model.thing.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.model.thing.testsupport/pom.xml b/itests/org.openhab.core.model.thing.testsupport/pom.xml index e188cd3cb18..648d26f99fa 100644 --- a/itests/org.openhab.core.model.thing.testsupport/pom.xml +++ b/itests/org.openhab.core.model.thing.testsupport/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.storage.json.tests/itest.bndrun b/itests/org.openhab.core.storage.json.tests/itest.bndrun index e9d0850cd8f..4762f19f04e 100644 --- a/itests/org.openhab.core.storage.json.tests/itest.bndrun +++ b/itests/org.openhab.core.storage.json.tests/itest.bndrun @@ -44,16 +44,7 @@ Fragment-Host: org.openhab.core.storage.json org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.storage.json;version='[4.2.0,4.2.1)',\ - org.openhab.core.storage.json.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -68,4 +59,13 @@ Fragment-Host: org.openhab.core.storage.json org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.storage.json;version='[4.3.0,4.3.1)',\ + org.openhab.core.storage.json.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.storage.json.tests/pom.xml b/itests/org.openhab.core.storage.json.tests/pom.xml index b550951df14..fa18d74b300 100644 --- a/itests/org.openhab.core.storage.json.tests/pom.xml +++ b/itests/org.openhab.core.storage.json.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.tests/itest.bndrun b/itests/org.openhab.core.tests/itest.bndrun index 3e41096dff9..6a5a2136a2f 100644 --- a/itests/org.openhab.core.tests/itest.bndrun +++ b/itests/org.openhab.core.tests/itest.bndrun @@ -48,9 +48,6 @@ Fragment-Host: org.openhab.core org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.tests;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -65,4 +62,7 @@ Fragment-Host: org.openhab.core org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.tests;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.tests/pom.xml b/itests/org.openhab.core.tests/pom.xml index cc5f3bb9c3d..45a6301b4d2 100644 --- a/itests/org.openhab.core.tests/pom.xml +++ b/itests/org.openhab.core.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.thing.tests/itest.bndrun b/itests/org.openhab.core.thing.tests/itest.bndrun index 3a71673b928..0daf8c15daf 100644 --- a/itests/org.openhab.core.thing.tests/itest.bndrun +++ b/itests/org.openhab.core.thing.tests/itest.bndrun @@ -53,15 +53,7 @@ Fragment-Host: org.openhab.core.thing org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing.tests;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -76,4 +68,12 @@ Fragment-Host: org.openhab.core.thing org.objectweb.asm.tree;version='[9.6.0,9.6.1)',\ org.objectweb.asm.tree.analysis;version='[9.6.0,9.6.1)',\ org.objectweb.asm.util;version='[9.6.0,9.6.1)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)' + org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing.tests;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.thing.tests/pom.xml b/itests/org.openhab.core.thing.tests/pom.xml index b2251d6fb5f..79577623e44 100644 --- a/itests/org.openhab.core.thing.tests/pom.xml +++ b/itests/org.openhab.core.thing.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/org.openhab.core.voice.tests/itest.bndrun b/itests/org.openhab.core.voice.tests/itest.bndrun index 571055a2ead..3dc2c2efd90 100644 --- a/itests/org.openhab.core.voice.tests/itest.bndrun +++ b/itests/org.openhab.core.voice.tests/itest.bndrun @@ -49,17 +49,7 @@ Fragment-Host: org.openhab.core.voice org.opentest4j;version='[1.3.0,1.3.1)',\ ch.qos.logback.classic;version='[1.3.14,1.3.15)',\ ch.qos.logback.core;version='[1.3.14,1.3.15)',\ - org.openhab.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.audio;version='[4.2.0,4.2.1)',\ - org.openhab.core.config.core;version='[4.2.0,4.2.1)',\ - org.openhab.core.io.console;version='[4.2.0,4.2.1)',\ - org.openhab.core.test;version='[4.2.0,4.2.1)',\ - org.openhab.core.thing;version='[4.2.0,4.2.1)',\ - org.openhab.core.transform;version='[4.2.0,4.2.1)',\ - org.openhab.core.voice;version='[4.2.0,4.2.1)',\ - org.openhab.core.voice.tests;version='[4.2.0,4.2.1)',\ org.osgi.service.component.annotations;version='[1.5.1,1.5.2)',\ - org.openhab.core.addon;version='[4.2.0,4.2.1)',\ com.sun.jna;version='[5.14.0,5.14.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.7,1.3.8)',\ org.eclipse.jetty.http;version='[9.4.54,9.4.55)',\ @@ -81,4 +71,14 @@ Fragment-Host: org.openhab.core.voice org.ops4j.pax.web.pax-web-jetty;version='[8.0.27,8.0.28)',\ org.ops4j.pax.web.pax-web-runtime;version='[8.0.27,8.0.28)',\ org.ops4j.pax.web.pax-web-spi;version='[8.0.27,8.0.28)',\ - org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)' + org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.27,8.0.28)',\ + org.openhab.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.addon;version='[4.3.0,4.3.1)',\ + org.openhab.core.audio;version='[4.3.0,4.3.1)',\ + org.openhab.core.config.core;version='[4.3.0,4.3.1)',\ + org.openhab.core.io.console;version='[4.3.0,4.3.1)',\ + org.openhab.core.test;version='[4.3.0,4.3.1)',\ + org.openhab.core.thing;version='[4.3.0,4.3.1)',\ + org.openhab.core.transform;version='[4.3.0,4.3.1)',\ + org.openhab.core.voice;version='[4.3.0,4.3.1)',\ + org.openhab.core.voice.tests;version='[4.3.0,4.3.1)' diff --git a/itests/org.openhab.core.voice.tests/pom.xml b/itests/org.openhab.core.voice.tests/pom.xml index a0d06bf1cd4..6c9686b5948 100644 --- a/itests/org.openhab.core.voice.tests/pom.xml +++ b/itests/org.openhab.core.voice.tests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/itests/pom.xml b/itests/pom.xml index c267382a68e..d21e160c6fc 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/pom.xml b/pom.xml index 7bed9146a0e..8f9555e2b63 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/tools/archetype/binding/pom.xml b/tools/archetype/binding/pom.xml index e7acaabf327..c8b2a648e83 100644 --- a/tools/archetype/binding/pom.xml +++ b/tools/archetype/binding/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/tools/archetype/pom.xml b/tools/archetype/pom.xml index b38ad915c6e..53b89b1b7e6 100644 --- a/tools/archetype/pom.xml +++ b/tools/archetype/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/tools/i18n-plugin/pom.xml b/tools/i18n-plugin/pom.xml index 90d0eb6b8ad..18e944444e4 100644 --- a/tools/i18n-plugin/pom.xml +++ b/tools/i18n-plugin/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/tools/pom.xml b/tools/pom.xml index b2c415bafd5..43794089e83 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 diff --git a/tools/upgradetool/pom.xml b/tools/upgradetool/pom.xml index 13889764d0a..279217b3c46 100644 --- a/tools/upgradetool/pom.xml +++ b/tools/upgradetool/pom.xml @@ -1,4 +1,6 @@ - + + 4.0.0 From ea7d61b1998311ba71ef566759ce79a07b8e996f Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Tue, 9 Jul 2024 03:53:01 +1000 Subject: [PATCH 32/50] PersistenceExtensions: fix DateTimeException when persisting an empty TimeSeries (#4303) Signed-off-by: Jimmy Tanagra --- .../core/persistence/extensions/PersistenceExtensions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java index 9e54aeac1a7..7ed56ea3b0d 100644 --- a/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java +++ b/bundles/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java @@ -211,7 +211,7 @@ public static void persist(Item item, TimeSeries timeSeries, @Nullable String se private static void internalPersist(Item item, TimeSeries timeSeries, @Nullable String serviceId) { String effectiveServiceId = serviceId == null ? getDefaultServiceId() : serviceId; - if (effectiveServiceId == null) { + if (effectiveServiceId == null || timeSeries.size() == 0) { return; } PersistenceService service = getService(effectiveServiceId); From 918b4faa3b3254a993774147f798e8bc59580bf6 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Tue, 9 Jul 2024 19:12:33 +0200 Subject: [PATCH 33/50] [rules] Add support for pre-compilation of conditions and actions (#4289) * ScriptConditionHandler/ScriptActionHandler: Add support for pre-compilation of scripts Signed-off-by: Florian Hotze --- .../handler/AbstractScriptModuleHandler.java | 56 ++++++++ .../internal/handler/ScriptActionHandler.java | 15 ++- .../handler/ScriptConditionHandler.java | 24 ++-- .../automation/handler/ActionHandler.java | 8 ++ .../automation/handler/ConditionHandler.java | 8 ++ .../automation/internal/RuleEngineImpl.java | 127 +++++++++++++++++- 6 files changed, 219 insertions(+), 19 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java index de3661021eb..325d742be58 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java @@ -18,10 +18,14 @@ import java.util.Optional; import java.util.UUID; +import javax.script.Compilable; +import javax.script.CompiledScript; import javax.script.ScriptContext; import javax.script.ScriptEngine; +import javax.script.ScriptException; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; import org.openhab.core.automation.Module; import org.openhab.core.automation.handler.BaseModuleHandler; import org.openhab.core.automation.module.script.ScriptEngineContainer; @@ -35,6 +39,7 @@ * * @author Kai Kreuzer - Initial contribution * @author Simon Merschjohann - Initial contribution + * @author Florian Hotze - Add support for script pre-compilation * * @param the type of module the concrete handler can handle */ @@ -54,6 +59,7 @@ public abstract class AbstractScriptModuleHandler extends Base private final String engineIdentifier; private Optional scriptEngine = Optional.empty(); + private Optional compiledScript = Optional.empty(); private final String type; protected final String script; @@ -80,6 +86,34 @@ private static String getValidConfigParameter(String parameter, Configuration co } } + /** + * Creates the {@link ScriptEngine} and compiles the script if the {@link ScriptEngine} implements + * {@link Compilable}. + */ + protected void compileScript() throws ScriptException { + if (compiledScript.isPresent()) { + return; + } + if (!scriptEngineManager.isSupported(this.type)) { + logger.debug( + "ScriptEngine for language '{}' could not be found, skipping compilation of script for identifier: {}", + type, engineIdentifier); + return; + } + Optional engine = getScriptEngine(); + if (engine.isPresent()) { + ScriptEngine scriptEngine = engine.get(); + if (scriptEngine instanceof Compilable) { + logger.debug("Pre-compiling script of rule with UID '{}'", ruleUID); + compiledScript = Optional.ofNullable(((Compilable) scriptEngine).compile(script)); + } else { + logger.error( + "Script engine of rule with UID '{}' does not implement Compilable but claims to support pre-compilation", + module.getId()); + } + } + } + @Override public void dispose() { scriptEngineManager.removeEngine(engineIdentifier); @@ -169,4 +203,26 @@ protected void resetExecutionContext(ScriptEngine engine, Map context executionContext.removeAttribute(key, ScriptContext.ENGINE_SCOPE); } } + + /** + * Evaluates the passed script with the ScriptEngine. + * + * @param engine the script engine that is used + * @param script the script to evaluate + * @return the value returned from the execution of the script + */ + protected @Nullable Object eval(ScriptEngine engine, String script) { + try { + if (compiledScript.isPresent()) { + logger.debug("Executing pre-compiled script of rule with UID '{}'", ruleUID); + return compiledScript.get().eval(engine.getContext()); + } + logger.debug("Executing script of rule with UID '{}'", ruleUID); + return engine.eval(script); + } catch (ScriptException e) { + logger.error("Script execution of rule with UID '{}' failed: {}", ruleUID, e.getMessage(), + logger.isDebugEnabled() ? e : null); + return null; + } + } } diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptActionHandler.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptActionHandler.java index 772a0ced3f2..a170683b881 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptActionHandler.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptActionHandler.java @@ -31,6 +31,7 @@ * * @author Kai Kreuzer - Initial contribution * @author Simon Merschjohann - Initial contribution + * @author Florian Hotze - Add support for script pre-compilation */ @NonNullByDefault public class ScriptActionHandler extends AbstractScriptModuleHandler implements ActionHandler { @@ -61,6 +62,11 @@ public void dispose() { super.dispose(); } + @Override + public void compile() throws ScriptException { + super.compileScript(); + } + @Override public @Nullable Map execute(final Map context) { Map resultMap = new HashMap<>(); @@ -71,13 +77,8 @@ public void dispose() { getScriptEngine().ifPresent(scriptEngine -> { setExecutionContext(scriptEngine, context); - try { - Object result = scriptEngine.eval(script); - resultMap.put("result", result); - } catch (ScriptException e) { - logger.error("Script execution of rule with UID '{}' failed: {}", ruleUID, e.getMessage(), - logger.isDebugEnabled() ? e : null); - } + Object result = eval(scriptEngine, script); + resultMap.put("result", result); resetExecutionContext(scriptEngine, context); }); diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptConditionHandler.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptConditionHandler.java index d25ff4e1077..a51ad384195 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptConditionHandler.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/ScriptConditionHandler.java @@ -30,6 +30,7 @@ * * @author Kai Kreuzer - Initial contribution * @author Simon Merschjohann - Initial contribution + * @author Florian Hotze - Add support for script pre-compilation */ @NonNullByDefault public class ScriptConditionHandler extends AbstractScriptModuleHandler implements ConditionHandler { @@ -42,6 +43,11 @@ public ScriptConditionHandler(Condition module, String ruleUID, ScriptEngineMana super(module, ruleUID, scriptEngineManager); } + @Override + public void compile() throws ScriptException { + super.compileScript(); + } + @Override public boolean isSatisfied(final Map context) { boolean result = false; @@ -55,18 +61,14 @@ public boolean isSatisfied(final Map context) { if (engine.isPresent()) { ScriptEngine scriptEngine = engine.get(); setExecutionContext(scriptEngine, context); - try { - Object returnVal = scriptEngine.eval(script); - if (returnVal instanceof Boolean boolean1) { - result = boolean1; - } else { - logger.error("Script of rule with UID '{}' did not return a boolean value, but '{}'", ruleUID, - returnVal); - } - } catch (ScriptException e) { - logger.error("Script execution of rule with UID '{}' failed: {}", ruleUID, e.getMessage(), - logger.isDebugEnabled() ? e : null); + Object returnVal = eval(scriptEngine, script); + if (returnVal instanceof Boolean boolean1) { + result = boolean1; + } else { + logger.error("Script of rule with UID '{}' did not return a boolean value, but '{}'", ruleUID, + returnVal); } + resetExecutionContext(scriptEngine, context); } return result; diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ActionHandler.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ActionHandler.java index 355dba470c6..bc3599ee9eb 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ActionHandler.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ActionHandler.java @@ -31,6 +31,14 @@ */ @NonNullByDefault public interface ActionHandler extends ModuleHandler { + /** + * Called to compile an {@link Action} of the {@link Rule} when the rule is initialized. + * + * @throws Exception if the compilation fails + */ + default void compile() throws Exception { + // Do nothing by default + } /** * Called to execute an {@link Action} of the {@link Rule} when it is needed. diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ConditionHandler.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ConditionHandler.java index 7adc0b6ce2d..5bb5cf4bb00 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ConditionHandler.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/handler/ConditionHandler.java @@ -29,6 +29,14 @@ */ @NonNullByDefault public interface ConditionHandler extends ModuleHandler { + /** + * Called to compile the {@link Condition} when the {@link Rule} is initialized. + * + * @throws Exception if the compilation fails + */ + default void compile() throws Exception { + // Do nothing by default + } /** * Checks if the Condition is satisfied in the given {@code context}. diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java index 07b803cca73..69fb534fadc 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java @@ -110,6 +110,7 @@ * @author Benedikt Niehues - change behavior for unregistering ModuleHandler * @author Markus Rathgeb - use a managed rule * @author Ana Dimova - new reference syntax: list[index], map["key"], bean.field + * @author Florian Hotze - add support for script condition/action compilation */ @Component(immediate = true, service = { RuleManager.class }) @NonNullByDefault @@ -819,6 +820,8 @@ public synchronized void setEnabled(String uid, boolean enable) { *
      *
    • Set the module handlers. If there are errors, set the rule status (handler error) and return with error * indication. + *
    • Compile the conditions and actions. If there are errors, set the rule status (handler error) and return with + * indication. *
    • Register the rule. Set the rule status and return with success indication. *
    * @@ -845,6 +848,11 @@ private boolean activateRule(final WrappedRule rule) { return false; } + // Compile the conditions and actions and so check if they are valid. + if (!compileRule(rule)) { + return false; + } + // Register the rule and set idle status. register(rule); setStatus(ruleUID, new RuleStatusInfo(RuleStatus.IDLE)); @@ -862,6 +870,58 @@ private boolean activateRule(final WrappedRule rule) { return true; } + /** + * Compile the conditions and actions of the given rule. + * If there are errors, set the rule status (handler error) and return with indication. + * + * @param rule the rule whose conditions and actions should be compiled + * @return true if compilation succeeded, otherwise false + */ + private boolean compileRule(final WrappedRule rule) { + try { + compileConditions(rule); + compileActions(rule); + return true; + } catch (Throwable t) { + setStatus(rule.getUID(), new RuleStatusInfo(RuleStatus.UNINITIALIZED, + RuleStatusDetail.HANDLER_INITIALIZING_ERROR, t.getMessage())); + unregister(rule); + return false; + } + } + + /** + * Compile the conditions and actions of the given rule. + * If there are errors, set the rule status (handler error). + * + * @param ruleUID the UID of the rule whose conditions and actions should be compiled + */ + private void compileRule(String ruleUID) { + final WrappedRule rule = getManagedRule(ruleUID); + if (rule == null) { + logger.warn("Failed to compile rule '{}': Invalid Rule UID", ruleUID); + return; + } + synchronized (this) { + final RuleStatus ruleStatus = getRuleStatus(ruleUID); + if (ruleStatus != null && ruleStatus != RuleStatus.IDLE) { + logger.error("Failed to compile rule ‘{}' with status '{}'", ruleUID, ruleStatus.name()); + return; + } + // change state to INITIALIZING + setStatus(ruleUID, new RuleStatusInfo(RuleStatus.INITIALIZING)); + } + if (!compileRule(rule)) { + return; + } + // change state to IDLE only if the rule has not been DISABLED. + synchronized (this) { + if (getRuleStatus(ruleUID) == RuleStatus.INITIALIZING) { + setStatus(ruleUID, new RuleStatusInfo(RuleStatus.IDLE)); + } + } + } + @Override public @Nullable RuleStatusInfo getStatusInfo(String ruleUID) { final WrappedRule rule = managedRules.get(ruleUID); @@ -1134,6 +1194,32 @@ private Map getContext(String ruleUID, @Nullable Set return context; } + /** + * This method compiles conditions of the {@link Rule} when they exist. + * It is called when the rule is initialized. + * + * @param rule compiled rule. + */ + private void compileConditions(WrappedRule rule) { + final Collection conditions = rule.getConditions(); + if (conditions.isEmpty()) { + return; + } + for (WrappedCondition wrappedCondition : conditions) { + final Condition condition = wrappedCondition.unwrap(); + ConditionHandler cHandler = wrappedCondition.getModuleHandler(); + if (cHandler != null) { + try { + cHandler.compile(); + } catch (Throwable t) { + String errMessage = "Failed to pre-compile condition: " + condition.getId() + "(" + t.getMessage() + + ")"; + throw new RuntimeException(errMessage, t); + } + } + } + } + /** * This method checks if all rule's condition are satisfied or not. * @@ -1163,6 +1249,31 @@ private boolean calculateConditions(WrappedRule rule) { return true; } + /** + * This method compiles actions of the {@link Rule} when they exist. + * It is called when the rule is initialized. + * + * @param rule compiled rule. + */ + private void compileActions(WrappedRule rule) { + final Collection actions = rule.getActions(); + if (actions.isEmpty()) { + return; + } + for (WrappedAction wrappedAction : actions) { + final Action action = wrappedAction.unwrap(); + ActionHandler aHandler = wrappedAction.getModuleHandler(); + if (aHandler != null) { + try { + aHandler.compile(); + } catch (Throwable t) { + String errMessage = "Failed to pre-compile action: " + action.getId() + "(" + t.getMessage() + ")"; + throw new RuntimeException(errMessage, t); + } + } + } + } + /** * This method evaluates actions of the {@link Rule} and set their {@link Output}s when they exist. * @@ -1435,7 +1546,7 @@ public String getOutputName() { @Override public void onReadyMarkerAdded(ReadyMarker readyMarker) { - executeRulesWithStartLevel(); + compileRules(); } @Override @@ -1443,6 +1554,20 @@ public void onReadyMarkerRemoved(ReadyMarker readyMarker) { started = false; } + /** + * This method compiles the conditions and actions of all rules. It is called when the rule engine is started. + * By compiling when the rule engine is started, we make sure all conditions and actions are compiled, even if their + * handlers weren't available when the rule was added to the rule engine. + */ + private void compileRules() { + getScheduledExecutor().submit(() -> { + ruleRegistry.getAll().forEach(r -> { + compileRule(r.getUID()); + }); + executeRulesWithStartLevel(); + }); + } + private void executeRulesWithStartLevel() { getScheduledExecutor().submit(() -> { ruleRegistry.getAll().stream() // From 8cc267afd840023e47f378ffe91f0da20903fa26 Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Sat, 13 Jul 2024 23:10:31 +1000 Subject: [PATCH 34/50] Fix Timer.isRunning() returning true immediately after rescheduling (#4313) Signed-off-by: Jimmy Tanagra --- .../automation/module/script/internal/action/TimerImpl.java | 4 +--- .../core/automation/module/script/TimerImplTest.java | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/action/TimerImpl.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/action/TimerImpl.java index 159e73887e3..07496611044 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/action/TimerImpl.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/action/TimerImpl.java @@ -30,7 +30,6 @@ public class TimerImpl implements Timer { private final Scheduler scheduler; - private final ZonedDateTime startTime; private final SchedulerRunnable runnable; private final @Nullable String identifier; private ScheduledCompletableFuture future; @@ -42,7 +41,6 @@ public TimerImpl(Scheduler scheduler, ZonedDateTime startTime, SchedulerRunnable public TimerImpl(Scheduler scheduler, ZonedDateTime startTime, SchedulerRunnable runnable, @Nullable String identifier) { this.scheduler = scheduler; - this.startTime = startTime; this.runnable = runnable; this.identifier = identifier; @@ -78,7 +76,7 @@ public boolean isCancelled() { @Override public boolean isRunning() { - return isActive() && ZonedDateTime.now().isAfter(startTime); + return isActive() && ZonedDateTime.now().isAfter(future.getScheduledTime()); } @Override diff --git a/bundles/org.openhab.core.automation.module.script/src/test/java/org/openhab/core/automation/module/script/TimerImplTest.java b/bundles/org.openhab.core.automation.module.script/src/test/java/org/openhab/core/automation/module/script/TimerImplTest.java index 827b3b35373..a96c7a08497 100644 --- a/bundles/org.openhab.core.automation.module.script/src/test/java/org/openhab/core/automation/module/script/TimerImplTest.java +++ b/bundles/org.openhab.core.automation.module.script/src/test/java/org/openhab/core/automation/module/script/TimerImplTest.java @@ -111,6 +111,12 @@ public void testTimerIsRunning() throws InterruptedException { assertThat(subject.isRunning(), is(false)); assertThat(subject.hasTerminated(), is(true)); assertThat(subject.isCancelled(), is(false)); + + subject.reschedule(ZonedDateTime.now().plusSeconds(DEFAULT_TIMEOUT_SECONDS)); + assertThat(subject.isRunning(), is(false)); + + Thread.sleep(TimeUnit.SECONDS.toMillis(DEFAULT_TIMEOUT_SECONDS) + 500); + assertThat(subject.isRunning(), is(true)); } private Timer createTimer(ZonedDateTime instant, SchedulerRunnable runnable) { From 71b50c54621da73eef903d0068828e5f03ec41f1 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 13 Jul 2024 15:11:17 +0200 Subject: [PATCH 35/50] Fix dynamic binding of AddonService to ConsoleCommandExtension service (#4312) Fix #4146 Signed-off-by: Laurent Garnier --- .../internal/extension/AddonConsoleCommandExtension.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.io.console/src/main/java/org/openhab/core/io/console/internal/extension/AddonConsoleCommandExtension.java b/bundles/org.openhab.core.io.console/src/main/java/org/openhab/core/io/console/internal/extension/AddonConsoleCommandExtension.java index 8e04601c2b8..1f9c9b501cb 100644 --- a/bundles/org.openhab.core.io.console/src/main/java/org/openhab/core/io/console/internal/extension/AddonConsoleCommandExtension.java +++ b/bundles/org.openhab.core.io.console/src/main/java/org/openhab/core/io/console/internal/extension/AddonConsoleCommandExtension.java @@ -29,6 +29,7 @@ import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; /** * Console command extension to manage add-ons @@ -63,7 +64,7 @@ public AddonConsoleCommandExtension() { super("addons", "Manage add-ons."); } - @Reference(cardinality = ReferenceCardinality.MULTIPLE) + @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) public void bindAddonService(AddonService addonService) { addonServices.put(addonService.getId(), addonService); } From 24d1ba0b2afea2f950e819baeae41527ee71c5a2 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 13 Jul 2024 15:32:47 +0200 Subject: [PATCH 36/50] Fix merge of AddonInfo (masterAddonInfo field) (#4309) This fix allows having translated label for bindings when showing list of installed bindings in Main UI parameters. Fix openhab/openhab-webui#2639 Signed-off-by: Laurent Garnier --- .../main/java/org/openhab/core/addon/AddonInfoRegistry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.addon/src/main/java/org/openhab/core/addon/AddonInfoRegistry.java b/bundles/org.openhab.core.addon/src/main/java/org/openhab/core/addon/AddonInfoRegistry.java index 2815fe8a0d1..d21b9830411 100644 --- a/bundles/org.openhab.core.addon/src/main/java/org/openhab/core/addon/AddonInfoRegistry.java +++ b/bundles/org.openhab.core.addon/src/main/java/org/openhab/core/addon/AddonInfoRegistry.java @@ -106,8 +106,8 @@ public void removeAddonInfoProvider(AddonInfoProvider addonInfoProvider) { builder.withName(b.getName()); builder.withDescription(b.getDescription()); } - if (!(a.isMasterAddonInfo() || b.isMasterAddonInfo())) { - builder.isMasterAddonInfo(false); + if (!a.isMasterAddonInfo() && b.isMasterAddonInfo()) { + builder.isMasterAddonInfo(true); } if (a.getConnection() == null && b.getConnection() != null) { builder.withConnection(b.getConnection()); From 9d4ec613a283e283498dbbb182261e1fd180fc69 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sun, 14 Jul 2024 10:06:41 +0200 Subject: [PATCH 37/50] Add a warning log to mention the field when configuration parsing is failing (#4311) Fixes #4248 Signed-off-by: Laurent Garnier --- .../main/java/org/openhab/core/config/core/ConfigParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigParser.java b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigParser.java index 9e3797fde5a..df8b60c2871 100644 --- a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigParser.java +++ b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigParser.java @@ -127,6 +127,9 @@ private ConfigParser() { try { value = valueAs(value, type); if (value == null) { + LOGGER.warn( + "Could not set value for field '{}' because conversion failed. Check your configuration value.", + fieldName); continue; } LOGGER.trace("Setting value ({}) {} to field '{}' in configuration class {}", type.getSimpleName(), From 98554af9529614fc04674e1afd2e9e2a29ef8205 Mon Sep 17 00:00:00 2001 From: Anders Alfredsson <30875102+pacive@users.noreply.github.com> Date: Sun, 14 Jul 2024 20:18:03 +0200 Subject: [PATCH 38/50] Add unitHint to AbstractStorageBasedTypeProvider.ChannelTypeEntity (#4317) * Add unitHint to AbstractStorageBasedTypeProvider.ChannelTypeEntity Signed-off-by: Anders Alfredsson --- .../thing/binding/AbstractStorageBasedTypeProvider.java | 5 +++++ .../binding/AbstractStorageBasedTypeProviderTest.java | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProvider.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProvider.java index 3853a21dbb1..35f7083b337 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProvider.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProvider.java @@ -251,6 +251,7 @@ static ChannelTypeEntity mapToEntity(ChannelType channelType) { entity.commandDescription = channelType.getCommandDescription(); entity.event = channelType.getEvent(); entity.autoUpdatePolicy = channelType.getAutoUpdatePolicy(); + entity.unitHint = channelType.getUnitHint(); return entity; } @@ -334,6 +335,9 @@ static ChannelType mapFromEntity(ChannelTypeEntity entity) { if (entity.autoUpdatePolicy != null) { stateBuilder.withAutoUpdatePolicy(Objects.requireNonNull(entity.autoUpdatePolicy)); } + if (entity.unitHint != null) { + stateBuilder.withUnitHint(entity.unitHint); + } } if (builder instanceof TriggerChannelTypeBuilderImpl triggerBuilder) { if (entity.event != null) { @@ -424,6 +428,7 @@ static class ChannelTypeEntity { public @Nullable CommandDescription commandDescription; public @Nullable EventDescription event; public @Nullable AutoUpdatePolicy autoUpdatePolicy; + public @Nullable String unitHint; } static class ChannelGroupTypeEntity { diff --git a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java index 9062ea310e6..856969bdf1a 100644 --- a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java +++ b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java @@ -48,14 +48,15 @@ public class AbstractStorageBasedTypeProviderTest { @Test public void testStateChannelTypeProperlyMappedToEntityAndBack() { - ChannelTypeUID channelTypeUID = new ChannelTypeUID("TestBinding:testChannelType"); + ChannelTypeUID channelTypeUID = new ChannelTypeUID("TestBinding:testQuantityChannelType"); - ChannelType expected = ChannelTypeBuilder.state(channelTypeUID, "testLabel", "Switch") + ChannelType expected = ChannelTypeBuilder.state(channelTypeUID, "testLabel", "Number:Length") .withDescription("testDescription").withCategory("testCategory") .withConfigDescriptionURI(URI.create("testBinding:testConfig")) .withAutoUpdatePolicy(AutoUpdatePolicy.VETO).isAdvanced(true).withTag("testTag") .withCommandDescription(CommandDescriptionBuilder.create().build()) - .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().build()).build(); + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().build()).withUnitHint("km") + .build(); AbstractStorageBasedTypeProvider.ChannelTypeEntity entity = AbstractStorageBasedTypeProvider .mapToEntity(expected); ChannelType actual = AbstractStorageBasedTypeProvider.mapFromEntity(entity); @@ -73,6 +74,7 @@ public void testStateChannelTypeProperlyMappedToEntityAndBack() { assertThat(actual.getState(), is(expected.getState())); assertThat(actual.getItemType(), is(expected.getItemType())); assertThat(actual.getTags(), hasItems(expected.getTags().toArray(String[]::new))); + assertThat(actual.getUnitHint(), is(expected.getUnitHint())); } @Test From 9f80bbf0a7e492eda715aec27fed0e9d8d808a8d Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sun, 14 Jul 2024 20:28:11 +0200 Subject: [PATCH 39/50] Add default scope to profile when loading items file (#4314) * Add default scope to profile when loading items file Fix #4277 Signed-off-by: Laurent Garnier --- .../internal/GenericItemChannelLinkProvider.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java b/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java index 7a386b17aa6..0bdc017af26 100644 --- a/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java +++ b/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java @@ -30,6 +30,7 @@ import org.openhab.core.thing.ChannelUID; import org.openhab.core.thing.link.ItemChannelLink; import org.openhab.core.thing.link.ItemChannelLinkProvider; +import org.openhab.core.thing.profiles.ProfileTypeUID; import org.osgi.service.component.annotations.Component; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -88,6 +89,17 @@ private void createItemChannelLink(String context, String itemName, String chann } catch (IllegalArgumentException e) { throw new BindingConfigParseException(e.getMessage()); } + + // Fix the configuration in case a profile is defined without any scope + if (configuration.containsKey("profile") && configuration.get("profile") instanceof String profile + && profile.indexOf(":") == -1) { + String fullProfile = ProfileTypeUID.SYSTEM_SCOPE + ":" + profile; + configuration.put("profile", fullProfile); + logger.info( + "Profile '{}' for channel '{}' is missing the scope prefix, assuming the correct UID is '{}'. Check your configuration.", + profile, channelUID, fullProfile); + } + ItemChannelLink itemChannelLink = new ItemChannelLink(itemName, channelUIDObject, configuration); Set itemNames = Objects.requireNonNull(contextMap.computeIfAbsent(context, k -> new HashSet<>())); From f631f1bbca3c4d8479705787df16ab7d1f671f15 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Sun, 14 Jul 2024 22:28:38 +0200 Subject: [PATCH 40/50] [rules] Remove leftover from #4289 (#4319) --- .../script/internal/handler/AbstractScriptModuleHandler.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java index 325d742be58..6a695d6e7ba 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java @@ -106,10 +106,6 @@ protected void compileScript() throws ScriptException { if (scriptEngine instanceof Compilable) { logger.debug("Pre-compiling script of rule with UID '{}'", ruleUID); compiledScript = Optional.ofNullable(((Compilable) scriptEngine).compile(script)); - } else { - logger.error( - "Script engine of rule with UID '{}' does not implement Compilable but claims to support pre-compilation", - module.getId()); } } } From 6f0add09baf47b113f980efc6522f3925b6ce1d4 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Tue, 16 Jul 2024 22:52:25 +0200 Subject: [PATCH 41/50] Add missing system profile types and UIDs (#4320) * Add missing system profile types and UIDs Signed-off-by: Jan N. Klug --- .../thing/internal/profiles/SystemProfileFactory.java | 6 ++++-- .../openhab/core/thing/profiles/SystemProfiles.java | 10 ++++++++++ .../profiles/SystemProfileFactoryOSGiTest.java | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactory.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactory.java index 864184dbc7b..5421f5087d3 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactory.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactory.java @@ -70,13 +70,15 @@ public class SystemProfileFactory implements ProfileFactory, ProfileAdvisor, Pro RAWROCKER_NEXT_PREVIOUS_TYPE, RAWROCKER_ON_OFF_TYPE, RAWROCKER_PLAY_PAUSE_TYPE, RAWROCKER_REWIND_FASTFORWARD_TYPE, RAWROCKER_STOP_MOVE_TYPE, RAWROCKER_UP_DOWN_TYPE, TRIGGER_EVENT_STRING_TYPE, TIMESTAMP_CHANGE_TYPE, TIMESTAMP_OFFSET_TYPE, TIMESTAMP_TRIGGER_TYPE, - TIMESTAMP_UPDATE_TYPE); + TIMESTAMP_UPDATE_TYPE, BUTTON_TOGGLE_SWITCH_TYPE, BUTTON_TOGGLE_PLAYER_TYPE, + BUTTON_TOGGLE_ROLLERSHUTTER_TYPE); private static final Set SUPPORTED_PROFILE_TYPE_UIDS = Set.of(DEFAULT, FOLLOW, HYSTERESIS, OFFSET, RANGE, RAWBUTTON_ON_OFF_SWITCH, RAWBUTTON_TOGGLE_PLAYER, RAWBUTTON_TOGGLE_ROLLERSHUTTER, RAWBUTTON_TOGGLE_SWITCH, RAWROCKER_DIMMER, RAWROCKER_NEXT_PREVIOUS, RAWROCKER_ON_OFF, RAWROCKER_PLAY_PAUSE, RAWROCKER_REWIND_FASTFORWARD, RAWROCKER_STOP_MOVE, RAWROCKER_UP_DOWN, TRIGGER_EVENT_STRING, - TIMESTAMP_CHANGE, TIMESTAMP_OFFSET, TIMESTAMP_TRIGGER, TIMESTAMP_UPDATE); + TIMESTAMP_CHANGE, TIMESTAMP_OFFSET, TIMESTAMP_TRIGGER, TIMESTAMP_UPDATE, BUTTON_TOGGLE_SWITCH, + BUTTON_TOGGLE_PLAYER, BUTTON_TOGGLE_ROLLERSHUTTER); private final Map localizedProfileTypeCache = new ConcurrentHashMap<>(); diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/profiles/SystemProfiles.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/profiles/SystemProfiles.java index ba39f21b76c..60fe012e0de 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/profiles/SystemProfiles.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/profiles/SystemProfiles.java @@ -134,4 +134,14 @@ public interface SystemProfiles { ProfileType TIMESTAMP_UPDATE_TYPE = ProfileTypeBuilder.newState(TIMESTAMP_UPDATE, "Timestamp on update") .withSupportedItemTypes(CoreItemFactory.DATETIME).build(); + + ProfileType BUTTON_TOGGLE_SWITCH_TYPE = ProfileTypeBuilder.newTrigger(BUTTON_TOGGLE_SWITCH, "Toggle Switch") + .withSupportedItemTypes(CoreItemFactory.SWITCH).build(); + + ProfileType BUTTON_TOGGLE_PLAYER_TYPE = ProfileTypeBuilder.newTrigger(BUTTON_TOGGLE_PLAYER, "Toggle Player") + .withSupportedItemTypes(CoreItemFactory.PLAYER).build(); + + ProfileType BUTTON_TOGGLE_ROLLERSHUTTER_TYPE = ProfileTypeBuilder + .newTrigger(BUTTON_TOGGLE_ROLLERSHUTTER, "Toggle Rollershutter") + .withSupportedItemTypes(CoreItemFactory.ROLLERSHUTTER).build(); } diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactoryOSGiTest.java b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactoryOSGiTest.java index ad256c4e25e..b39b509dd07 100644 --- a/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactoryOSGiTest.java +++ b/itests/org.openhab.core.thing.tests/src/main/java/org/openhab/core/thing/internal/profiles/SystemProfileFactoryOSGiTest.java @@ -73,7 +73,7 @@ public void beforeEach() { @Test public void systemProfileTypesAndUidsShouldBeAvailable() { Collection systemProfileTypeUIDs = profileFactory.getSupportedProfileTypeUIDs(); - assertThat(systemProfileTypeUIDs, hasSize(21)); + assertThat(systemProfileTypeUIDs, hasSize(24)); Collection systemProfileTypes = profileFactory.getProfileTypes(null); assertThat(systemProfileTypes, hasSize(systemProfileTypeUIDs.size())); From 0a5886c7e75a9dc9cc3f92c761712ace27cba3d7 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Wed, 17 Jul 2024 19:50:51 +0200 Subject: [PATCH 42/50] Fix startup of background discovery (#4323) Apply the same logic in AbstractThingHandlerDiscoveryService as in AbstractDiscoveryService to determine if background discovery should be enabled or disabled. Fix openhab/openhab-addons#17089 Signed-off-by: Laurent Garnier --- .../AbstractThingHandlerDiscoveryService.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bundles/org.openhab.core.config.discovery/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java b/bundles/org.openhab.core.config.discovery/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java index 377c8e62fdf..0dd7aa12594 100644 --- a/bundles/org.openhab.core.config.discovery/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java +++ b/bundles/org.openhab.core.config.discovery/src/main/java/org/openhab/core/config/discovery/AbstractThingHandlerDiscoveryService.java @@ -48,17 +48,16 @@ protected AbstractThingHandlerDiscoveryService(Class thingClazz, @Nullable Se int timeout, boolean backgroundDiscoveryEnabledByDefault) throws IllegalArgumentException { super(supportedThingTypes, timeout, backgroundDiscoveryEnabledByDefault); this.thingClazz = thingClazz; + this.backgroundDiscoveryEnabled = backgroundDiscoveryEnabledByDefault; } protected AbstractThingHandlerDiscoveryService(Class thingClazz, @Nullable Set supportedThingTypes, int timeout) throws IllegalArgumentException { - super(supportedThingTypes, timeout); - this.thingClazz = thingClazz; + this(thingClazz, supportedThingTypes, timeout, true); } protected AbstractThingHandlerDiscoveryService(Class thingClazz, int timeout) throws IllegalArgumentException { - super(timeout); - this.thingClazz = thingClazz; + this(thingClazz, null, timeout); } @Override @@ -86,7 +85,8 @@ public void activate(@Nullable Map config) { // thing handler is set. This is correctly handled in initialize if (config != null) { backgroundDiscoveryEnabled = ConfigParser.valueAsOrElse( - config.get(DiscoveryService.CONFIG_PROPERTY_BACKGROUND_DISCOVERY), Boolean.class, false); + config.get(DiscoveryService.CONFIG_PROPERTY_BACKGROUND_DISCOVERY), Boolean.class, + backgroundDiscoveryEnabled); } } @@ -94,7 +94,8 @@ public void activate(@Nullable Map config) { public void modified(@Nullable Map config) { if (config != null) { boolean enabled = ConfigParser.valueAsOrElse( - config.get(DiscoveryService.CONFIG_PROPERTY_BACKGROUND_DISCOVERY), Boolean.class, false); + config.get(DiscoveryService.CONFIG_PROPERTY_BACKGROUND_DISCOVERY), Boolean.class, + backgroundDiscoveryEnabled); if (backgroundDiscoveryEnabled && !enabled) { stopBackgroundDiscovery(); From 8557666f0a45a47f7a4dd5225c73c7a6e1d90cd3 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Mon, 22 Jul 2024 15:07:28 +0200 Subject: [PATCH 43/50] Add test to ensure full mapping of types in AbstractStorageBasedProvider (#4318) Signed-off-by: Jan N. Klug --- .../AbstractStorageBasedTypeProviderTest.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java index 856969bdf1a..52103af4a82 100644 --- a/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java +++ b/bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/binding/AbstractStorageBasedTypeProviderTest.java @@ -19,9 +19,14 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.stream.Stream; import org.eclipse.jdt.annotation.NonNullByDefault; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.openhab.core.internal.types.StateDescriptionFragmentImpl; import org.openhab.core.thing.ThingTypeUID; import org.openhab.core.thing.type.AutoUpdatePolicy; import org.openhab.core.thing.type.ChannelDefinition; @@ -158,6 +163,37 @@ public void testThingTypeProperlyMappedToEntityAndBack() { } } + @MethodSource + @ParameterizedTest + public void testMapToEntityIsComplete(Class originalType, Class mappedType, int allowedDelta) { + Class clazz = originalType; + int originalTypeFieldCount = 0; + while (clazz != Object.class) { + originalTypeFieldCount += clazz.getDeclaredFields().length; + clazz = clazz.getSuperclass(); + } + + int mappedEntityFieldCount = mappedType.getDeclaredFields().length; + + assertThat(originalType.getName() + " not properly mapped", mappedEntityFieldCount, + is(originalTypeFieldCount + allowedDelta)); + } + + private static Stream testMapToEntityIsComplete() { + return Stream.of( // + // isBridge is an extra field for storage and not present in ThingType + Arguments.of(ThingType.class, AbstractStorageBasedTypeProvider.ThingTypeEntity.class, 1), + Arguments.of(ChannelType.class, AbstractStorageBasedTypeProvider.ChannelTypeEntity.class, 0), + Arguments.of(ChannelDefinition.class, AbstractStorageBasedTypeProvider.ChannelDefinitionEntity.class, + 0), + // configDescriptionURI is not available for ChannelGroupType + Arguments.of(ChannelGroupType.class, AbstractStorageBasedTypeProvider.ChannelGroupTypeEntity.class, -1), + Arguments.of(ChannelGroupDefinition.class, + AbstractStorageBasedTypeProvider.ChannelGroupDefinitionEntity.class, 0), + Arguments.of(StateDescriptionFragmentImpl.class, + AbstractStorageBasedTypeProvider.StateDescriptionFragmentEntity.class, 0)); + } + private void assertChannelDefinition(ChannelDefinition actual, ChannelDefinition expected) { assertThat(actual.getId(), is(expected.getId())); assertThat(actual.getChannelTypeUID(), is(expected.getChannelTypeUID())); From f502e9d4e3ad8f1cc9521de02da097725644f0c5 Mon Sep 17 00:00:00 2001 From: joerg1985 <16140691+joerg1985@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:30:24 +0200 Subject: [PATCH 44/50] Use a precompiled pattern in ChannelUID.validateSegment (#4327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörg Sautter --- .../src/main/java/org/openhab/core/thing/ChannelUID.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/ChannelUID.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/ChannelUID.java index 0b833f30426..14086ad4eec 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/ChannelUID.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/ChannelUID.java @@ -14,6 +14,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.regex.Pattern; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; @@ -30,7 +31,7 @@ @NonNullByDefault public class ChannelUID extends UID { - public static final String CHANNEL_SEGMENT_PATTERN = "[\\w-]*|[\\w-]*#[\\w-]*"; + public static final Pattern CHANNEL_SEGMENT_PATTERN = Pattern.compile("[\\w-]*(?:#[\\w-]*)?"); public static final String CHANNEL_GROUP_SEPARATOR = "#"; /** @@ -132,7 +133,7 @@ protected void validateSegment(String segment, int index, int length) { if (index < length - 1) { super.validateSegment(segment, index, length); } else { - if (!segment.matches(CHANNEL_SEGMENT_PATTERN)) { + if (!CHANNEL_SEGMENT_PATTERN.matcher(segment).matches()) { throw new IllegalArgumentException(String.format( "UID segment '%s' contains invalid characters. The last segment of the channel UID must match the pattern '%s'.", segment, CHANNEL_SEGMENT_PATTERN)); From e1574488b6f8815e55d8f9b0bff62c73b4532564 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Wed, 24 Jul 2024 20:18:49 +0200 Subject: [PATCH 45/50] [rules] Don't attempt to pre-compile disabled rules (#4329) Fixes an issue, where an error that compilation failed for disabled rules. Reported on the community: https://community.openhab.org/t/oh-4-2-snapshot-disabled-rules-failed-to-compile-error-in-opehab-log/157402. Follow-up for #4289. Signed-off-by: Florian Hotze --- .../openhab/core/automation/internal/RuleEngineImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java index 69fb534fadc..15bb3ada645 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/RuleEngineImpl.java @@ -1555,15 +1555,16 @@ public void onReadyMarkerRemoved(ReadyMarker readyMarker) { } /** - * This method compiles the conditions and actions of all rules. It is called when the rule engine is started. + * This method compiles the conditions and actions of all enabled rules. + * It is called when the rule engine is started. * By compiling when the rule engine is started, we make sure all conditions and actions are compiled, even if their * handlers weren't available when the rule was added to the rule engine. */ private void compileRules() { getScheduledExecutor().submit(() -> { - ruleRegistry.getAll().forEach(r -> { - compileRule(r.getUID()); - }); + ruleRegistry.getAll().stream() // + .filter(r -> isEnabled(r.getUID())) // + .forEach(r -> compileRule(r.getUID())); executeRulesWithStartLevel(); }); } From cb19001af0d7fafced4293e7dd7d6d3e090329ae Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Sun, 28 Jul 2024 02:38:06 +1000 Subject: [PATCH 46/50] Clean up removed links in GenericItemChannelLinkProvider (#4326) * Clean up removed links in GenericItemChannelLinkProvider * defer processing until stopConfigurationUpdate is called Signed-off-by: Jimmy Tanagra --- .../internal/GenericItemChannelLinkProvider.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java b/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java index 0bdc017af26..8d3ff49cf36 100644 --- a/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java +++ b/bundles/org.openhab.core.model.thing/src/org/openhab/core/model/thing/internal/GenericItemChannelLinkProvider.java @@ -50,6 +50,8 @@ public class GenericItemChannelLinkProvider extends AbstractProvider> itemChannelLinkMap = new ConcurrentHashMap<>(); + private Map> addedItemChannels = new ConcurrentHashMap<>(); + /** * stores information about the context of items. The map has this content * structure: context -> Set of Item names @@ -120,6 +122,7 @@ private void createItemChannelLink(String context, String itemName, String chann } else { notifyListenersAboutUpdatedElement(oldLink, itemChannelLink); } + addedItemChannels.computeIfAbsent(itemName, k -> new HashSet<>(2)).add(channelUIDObject); } @Override @@ -146,6 +149,17 @@ public void stopConfigurationUpdate(String context) { } } Optional.ofNullable(contextMap.get(context)).ifPresent(ctx -> ctx.removeAll(previousItemNames)); + + addedItemChannels.forEach((itemName, addedChannelUIDs) -> { + Map links = itemChannelLinkMap.getOrDefault(itemName, Map.of()); + Set removedChannelUIDs = new HashSet<>(links.keySet()); + removedChannelUIDs.removeAll(addedChannelUIDs); + removedChannelUIDs.forEach(removedChannelUID -> { + ItemChannelLink link = links.remove(removedChannelUID); + notifyListenersAboutRemovedElement(link); + }); + }); + addedItemChannels.clear(); } @Override From 289f06378d152c5b140ead2f0ca1a49d56800274 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sun, 4 Aug 2024 13:13:15 +0200 Subject: [PATCH 47/50] Config parameter: Change inferred i18n key for add-ons + alternative key (#4305) Fix openhab/openhab-webui#2641 The i18n key for add-on configuration parameter should now start with addon.config.. To maintain compatibility with hundreds of existing translations, an alternative key starting with .config. is still accepted for an add-on parameter Signed-off-by: Laurent Garnier --- .../i18n/ConfigDescriptionI18nUtil.java | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/internal/i18n/ConfigDescriptionI18nUtil.java b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/internal/i18n/ConfigDescriptionI18nUtil.java index ea72276dd42..b40cccaf4bd 100644 --- a/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/internal/i18n/ConfigDescriptionI18nUtil.java +++ b/bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/internal/i18n/ConfigDescriptionI18nUtil.java @@ -14,6 +14,7 @@ import java.net.URI; import java.util.Locale; +import java.util.Set; import java.util.regex.Pattern; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -31,6 +32,7 @@ * @author Dennis Nobel - Initial contribution * @author Alex Tugarev - Extended for pattern and option label * @author Thomas Höfer - Extended for unit label + * @author Laurent Garnier - Changed inferred key for add-ons + alternative key */ @NonNullByDefault public class ConfigDescriptionI18nUtil { @@ -38,6 +40,8 @@ public class ConfigDescriptionI18nUtil { private final TranslationProvider i18nProvider; private static final Pattern DELIMITER = Pattern.compile("[:=\\s]"); + private static final Set ADDON_TYPES = Set.of("automation", "binding", "io", "misc", "persistence", "voice", + "ui"); public ConfigDescriptionI18nUtil(TranslationProvider i18nProvider) { this.i18nProvider = i18nProvider; @@ -45,23 +49,18 @@ public ConfigDescriptionI18nUtil(TranslationProvider i18nProvider) { public @Nullable String getParameterPattern(Bundle bundle, URI configDescriptionURI, String parameterName, @Nullable String defaultPattern, @Nullable Locale locale) { - String key = I18nUtil.stripConstantOr(defaultPattern, - () -> inferKey(configDescriptionURI, parameterName, "pattern")); - return i18nProvider.getText(bundle, key, defaultPattern, locale); + return getParameterValue(bundle, configDescriptionURI, parameterName, "pattern", defaultPattern, locale); } public @Nullable String getParameterDescription(Bundle bundle, URI configDescriptionURI, String parameterName, @Nullable String defaultDescription, @Nullable Locale locale) { - String key = I18nUtil.stripConstantOr(defaultDescription, - () -> inferKey(configDescriptionURI, parameterName, "description")); - return i18nProvider.getText(bundle, key, defaultDescription, locale); + return getParameterValue(bundle, configDescriptionURI, parameterName, "description", defaultDescription, + locale); } public @Nullable String getParameterLabel(Bundle bundle, URI configDescriptionURI, String parameterName, @Nullable String defaultLabel, @Nullable Locale locale) { - String key = I18nUtil.stripConstantOr(defaultLabel, - () -> inferKey(configDescriptionURI, parameterName, "label")); - return i18nProvider.getText(bundle, key, defaultLabel, locale); + return getParameterValue(bundle, configDescriptionURI, parameterName, "label", defaultLabel, locale); } public @Nullable String getParameterOptionLabel(Bundle bundle, URI configDescriptionURI, String parameterName, @@ -70,10 +69,8 @@ public ConfigDescriptionI18nUtil(TranslationProvider i18nProvider) { return defaultOptionLabel; } - String key = I18nUtil.stripConstantOr(defaultOptionLabel, - () -> inferKey(configDescriptionURI, parameterName, "option." + optionValue)); - - return i18nProvider.getText(bundle, key, defaultOptionLabel, locale); + return getParameterValue(bundle, configDescriptionURI, parameterName, "option." + optionValue, + defaultOptionLabel, locale); } public @Nullable String getParameterUnitLabel(Bundle bundle, URI configDescriptionURI, String parameterName, @@ -84,14 +81,28 @@ public ConfigDescriptionI18nUtil(TranslationProvider i18nProvider) { return label; } } - String key = I18nUtil.stripConstantOr(defaultUnitLabel, - () -> inferKey(configDescriptionURI, parameterName, "unitLabel")); - return i18nProvider.getText(bundle, key, defaultUnitLabel, locale); + return getParameterValue(bundle, configDescriptionURI, parameterName, "unitLabel", defaultUnitLabel, locale); + } + + private @Nullable String getParameterValue(Bundle bundle, URI configDescriptionURI, String parameterName, + String parameterAttribute, @Nullable String defaultValue, @Nullable Locale locale) { + String key = I18nUtil.stripConstantOr(defaultValue, + () -> inferKey(true, configDescriptionURI, parameterName, parameterAttribute)); + String value = i18nProvider.getText(bundle, key, null, locale); + if (value == null && ADDON_TYPES.contains(configDescriptionURI.getScheme())) { + key = I18nUtil.stripConstantOr(defaultValue, + () -> inferKey(false, configDescriptionURI, parameterName, parameterAttribute)); + value = i18nProvider.getText(bundle, key, null, locale); + } + return value != null ? value : defaultValue; } - private String inferKey(URI configDescriptionURI, String parameterName, String lastSegment) { + private String inferKey(boolean checkAddonType, URI configDescriptionURI, String parameterName, + String lastSegment) { + String prefix = checkAddonType && ADDON_TYPES.contains(configDescriptionURI.getScheme()) ? "addon" + : configDescriptionURI.getScheme(); String uri = configDescriptionURI.getSchemeSpecificPart().replace(":", "."); - return configDescriptionURI.getScheme() + ".config." + uri + "." + parameterName + "." + lastSegment; + return prefix + ".config." + uri + "." + parameterName + "." + lastSegment; } private boolean isValidPropertyKey(@Nullable String key) { From 1ce5b378d397d5ec8a3cd3124b950d0166c5d599 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Sun, 4 Aug 2024 17:33:06 +0200 Subject: [PATCH 48/50] Icon servlet: Set Cache-Control header to enable icon caching (#4336) I have removed the Modified-Since handling as it did not have an effect due to the missing Cache-Control header, and instead added Cache-Control with a max-age set. This enables "forever" caching of icons, which should be fine since they are static assets. Signed-off-by: Florian Hotze --- .../openhab/core/ui/icon/internal/IconServlet.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bundles/org.openhab.core.ui.icon/src/main/java/org/openhab/core/ui/icon/internal/IconServlet.java b/bundles/org.openhab.core.ui.icon/src/main/java/org/openhab/core/ui/icon/internal/IconServlet.java index 7fbaa2fc0a7..6ac24863670 100644 --- a/bundles/org.openhab.core.ui.icon/src/main/java/org/openhab/core/ui/icon/internal/IconServlet.java +++ b/bundles/org.openhab.core.ui.icon/src/main/java/org/openhab/core/ui/icon/internal/IconServlet.java @@ -14,7 +14,6 @@ import java.io.IOException; import java.io.InputStream; -import java.time.Instant; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -63,8 +62,6 @@ public class IconServlet extends HttpServlet { static final String PARAM_ANY_FORMAT = "anyFormat"; static final String PARAM_STATE = "state"; - private long startupTime; - protected String defaultIconSetId = "classic"; private final List iconProvider = new ArrayList<>(); @@ -80,7 +77,6 @@ public void removeIconProvider(IconProvider iconProvider) { @Activate protected void activate(Map config) { - startupTime = System.currentTimeMillis(); modified(config); } @@ -94,11 +90,6 @@ protected void modified(Map config) { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - if (req.getDateHeader("If-Modified-Since") > startupTime) { - resp.setStatus(304); - return; - } - String category = getCategory(req); if (category.isEmpty()) { logger.debug("URI must start with '{}' but is '{}'", SERVLET_PATH, req.getRequestURI()); @@ -148,7 +139,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se } resp.setContentType(Format.SVG.equals(format) ? "image/svg+xml" : "image/png"); - resp.setDateHeader("Last-Modified", Instant.now().toEpochMilli()); + resp.setHeader("Cache-Control", "max-age=31536000"); is.transferTo(resp.getOutputStream()); resp.flushBuffer(); } catch (IOException e) { From 6d174a91c28b7f5da2981ef13eee6cab2c5e4ab9 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Sun, 4 Aug 2024 18:11:01 +0200 Subject: [PATCH 49/50] Fix favicon for authorize/login page (#4335) Signed-off-by: Florian Hotze --- bundles/org.openhab.core.io.http.auth/pages/authorize.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.io.http.auth/pages/authorize.html b/bundles/org.openhab.core.io.http.auth/pages/authorize.html index 691d50ad038..e4b26dc1386 100644 --- a/bundles/org.openhab.core.io.http.auth/pages/authorize.html +++ b/bundles/org.openhab.core.io.http.auth/pages/authorize.html @@ -10,7 +10,7 @@ - +