Skip to content

Commit

Permalink
Merge pull request #1 from openhab/main
Browse files Browse the repository at this point in the history
update
  • Loading branch information
MikeTheTux authored Mar 27, 2021
2 parents e828bac + 1fa1f54 commit 70da552
Show file tree
Hide file tree
Showing 1,160 changed files with 26,849 additions and 6,359 deletions.
20 changes: 11 additions & 9 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/bundles/org.openhab.binding.boschindego/ @jofleck
/bundles/org.openhab.binding.boschshc/ @stefan-kaestle @coeing @GerdZanker
/bundles/org.openhab.binding.bosesoundtouch/ @marvkis @tratho
/bundles/org.openhab.binding.broadlinkthermostat/ @flo_02_mu
/bundles/org.openhab.binding.broadlinkthermostat/ @flo-02-mu
/bundles/org.openhab.binding.bsblan/ @hypetsch
/bundles/org.openhab.binding.bticinosmarther/ @MrRonfo
/bundles/org.openhab.binding.buienradar/ @gedejong
Expand All @@ -52,12 +52,12 @@
/bundles/org.openhab.binding.daikin/ @caffineehacker
/bundles/org.openhab.binding.danfossairunit/ @pravussum
/bundles/org.openhab.binding.darksky/ @cweitkamp
/bundles/org.openhab.binding.deconz/ @J-N-K
/bundles/org.openhab.binding.deconz/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.denonmarantz/ @jwveldhuis
/bundles/org.openhab.binding.digiplex/ @rmichalak
/bundles/org.openhab.binding.digitalstrom/ @MichaelOchel @msiegele
/bundles/org.openhab.binding.dlinksmarthome/ @MikeJMajor
/bundles/org.openhab.binding.dmx/ @J-N-K
/bundles/org.openhab.binding.dmx/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.doorbird/ @mhilbush
/bundles/org.openhab.binding.draytonwiser/ @andrew-schofield
/bundles/org.openhab.binding.dscalarm/ @RSStephens
Expand Down Expand Up @@ -102,7 +102,7 @@
/bundles/org.openhab.binding.heos/ @Wire82
/bundles/org.openhab.binding.homematic/ @FStolte @gerrieg @mdicke2s
/bundles/org.openhab.binding.hpprinter/ @cossey
/bundles/org.openhab.binding.http/ @J-N-K
/bundles/org.openhab.binding.http/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.hue/ @cweitkamp
/bundles/org.openhab.binding.hydrawise/ @digitaldan
/bundles/org.openhab.binding.hyperion/ @tavalin
Expand Down Expand Up @@ -144,7 +144,7 @@
/bundles/org.openhab.binding.luftdateninfo/ @weymann
/bundles/org.openhab.binding.lutron/ @actong @bobadair
/bundles/org.openhab.binding.magentatv/ @markus7017
/bundles/org.openhab.binding.mail/ @J-N-K
/bundles/org.openhab.binding.mail/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.max/ @marcelrv
/bundles/org.openhab.binding.mcp23017/ @aogorek
/bundles/org.openhab.binding.melcloud/ @lucacalcaterra @paulianttila @thewiep
Expand All @@ -171,6 +171,7 @@
/bundles/org.openhab.binding.mqtt.generic/ @davidgraeff
/bundles/org.openhab.binding.mqtt.homeassistant/ @davidgraeff
/bundles/org.openhab.binding.mqtt.homie/ @davidgraeff
/bundles/org.openhab.binding.myq/ @digitaldan
/bundles/org.openhab.binding.mystrom/ @pail23
/bundles/org.openhab.binding.nanoleaf/ @raepple @stefan-hoehn
/bundles/org.openhab.binding.neato/ @jjlauterbach
Expand All @@ -194,7 +195,7 @@
/bundles/org.openhab.binding.omnikinverter/ @hansbogert
/bundles/org.openhab.binding.omnilink/ @ecdye
/bundles/org.openhab.binding.onebusaway/ @sdwilsh
/bundles/org.openhab.binding.onewire/ @J-N-K
/bundles/org.openhab.binding.onewire/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.onewiregpio/ @aogorek
/bundles/org.openhab.binding.onkyo/ @pail23 @paulianttila
/bundles/org.openhab.binding.opengarage/ @psmedley
Expand All @@ -208,6 +209,7 @@
/bundles/org.openhab.binding.paradoxalarm/ @theater
/bundles/org.openhab.binding.pentair/ @jsjames
/bundles/org.openhab.binding.phc/ @gnlpfjh
/bundles/org.openhab.binding.pilight/ @stefanroellin @niklasdoerfler
/bundles/org.openhab.binding.pioneeravr/ @Stratehm
/bundles/org.openhab.binding.pixometer/ @Confectrician
/bundles/org.openhab.binding.pjlinkdevice/ @nils
Expand Down Expand Up @@ -246,7 +248,7 @@
/bundles/org.openhab.binding.smartmeter/ @msteigenberger
/bundles/org.openhab.binding.smartthings/ @BobRak
/bundles/org.openhab.binding.smhi/ @pacive
/bundles/org.openhab.binding.snmp/ @J-N-K
/bundles/org.openhab.binding.snmp/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.solaredge/ @alexf2015
/bundles/org.openhab.binding.solarlog/ @johannrichard
/bundles/org.openhab.binding.somfymylink/ @loungeflyz
Expand All @@ -256,6 +258,7 @@
/bundles/org.openhab.binding.sonyprojector/ @lolodomo
/bundles/org.openhab.binding.spotify/ @Hilbrand
/bundles/org.openhab.binding.squeezebox/ @digitaldan @mhilbush
/bundles/org.openhab.binding.surepetcare/ @renescherer @HerzScheisse
/bundles/org.openhab.binding.synopanalyzer/ @clinique
/bundles/org.openhab.binding.systeminfo/ @svilenvul
/bundles/org.openhab.binding.tacmi/ @twendt @Wolfgang1966 @marvkis
Expand All @@ -269,7 +272,7 @@
/bundles/org.openhab.binding.tivo/ @mlobstein
/bundles/org.openhab.binding.touchwand/ @roieg
/bundles/org.openhab.binding.tplinksmarthome/ @Hilbrand
/bundles/org.openhab.binding.tr064/ @J-N-K
/bundles/org.openhab.binding.tr064/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.tradfri/ @cweitkamp @kaikreuzer
/bundles/org.openhab.binding.unifi/ @mgbowman
/bundles/org.openhab.binding.unifiedremote/ @GiviMAD
Expand Down Expand Up @@ -304,7 +307,6 @@
/bundles/org.openhab.io.imperihome/ @pdegeus
/bundles/org.openhab.io.neeo/ @tmrobert8
/bundles/org.openhab.io.openhabcloud/ @kaikreuzer
/bundles/org.openhab.io.transport.modbus/ @ssalonen
/bundles/org.openhab.persistence.dynamodb/ @ssalonen
/bundles/org.openhab.persistence.influxdb/ @lujop
/bundles/org.openhab.persistence.jdbc/ @openhab/add-ons-maintainers
Expand Down
10 changes: 10 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,11 @@
<artifactId>org.openhab.binding.phc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.pilight</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.pioneeravr</artifactId>
Expand Down Expand Up @@ -1266,6 +1271,11 @@
<artifactId>org.openhab.binding.squeezebox</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.surepetcare</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.synopanalyzer</artifactId>
Expand Down
Empty file.
8 changes: 7 additions & 1 deletion bundles/org.openhab.binding.airvisualnode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@

<name>openHAB Add-ons :: Bundles :: AirVisual Node Air Quality Monitor Binding</name>

<properties>
<bnd.importpackage>
!jcifs
</bnd.importpackage>
</properties>

<dependencies>
<dependency>
<groupId>org.samba.jcifs</groupId>
<groupId>jcifs</groupId>
<artifactId>jcifs</artifactId>
<version>1.3.17</version>
<scope>compile</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<feature name="openhab-binding-airvisualnode" description="AirVisual Node Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle dependency="true" start-level="80">mvn:org.samba.jcifs/jcifs/1.3.17</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.airvisualnode/${project.version}</bundle>
</feature>
</features>
6 changes: 4 additions & 2 deletions bundles/org.openhab.binding.alarmdecoder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ There are several versions of the adapter available:
This binding allows openHAB to access the state of wired or wireless contacts and motion detectors connected to supported alarm panels, as well as the state of attached keypads and the messages send to attached LRR devices.
Support is also available for sending keypad commands, including special/programmable keys supported by your panel.

For those upgrading from the OH1 version of the binding, the [original OH1 README](https://www.openhab.org/v2.5/addons/bindings/alarmdecoder1/) file is available for reference.

## Supported Things

The binding supports the following thing types:
Expand Down Expand Up @@ -311,3 +309,7 @@ The alarmdecoder device cannot query the panel for the state of individual zones
For this reason, the binding puts contacts into the "unknown" state (UNDEF), *until the panel goes into the READY state*.
At that point, all contacts for which no update messages have arrived are presumed to be in the CLOSED state.
In other words: to get to a clean slate after an openHAB restart, close all doors/windows such that the panel is READY.

## Reference Information

The protocol used to communicate with the Alarm Decoder is described [here](https://www.alarmdecoder.com/wiki/index.php/Protocol).
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.amazonechocontrol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ sitemap flashbriefings label="Flash Briefings"

## Smart Home Devices

Note: the cannels of smartHomeDevices and smartHomeDeviceGroup will be created dynamically based on the capabilities reported by the amazon server. This can take a little bit of time.
Note: the channels of smartHomeDevices and smartHomeDeviceGroup will be created dynamically based on the capabilities reported by the amazon server. This can take a little bit of time.
The polling interval configured in the Account Thing to get the state is specified in minutes and has a minimum of 10. This means it takes up to 10 minutes to see the state of a channel. The reason for this low interval is, that the polling causes a big server load for the Smart Home Skills.

#### Supported Things
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;

import org.apache.commons.lang.StringUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.ambientweather.internal.config.BridgeConfig;
Expand Down Expand Up @@ -128,7 +127,7 @@ public void initialize() {
*/
private boolean hasApplicationKey() {
String configApplicationKey = getConfigAs(BridgeConfig.class).applicationKey;
if (StringUtils.isEmpty(configApplicationKey)) {
if (configApplicationKey == null || configApplicationKey.isEmpty()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Missing application key");
return false;
}
Expand All @@ -141,7 +140,7 @@ private boolean hasApplicationKey() {
*/
private boolean hasApiKey() {
String configApiKey = getConfigAs(BridgeConfig.class).apiKey;
if (StringUtils.isEmpty(configApiKey)) {
if (configApiKey == null || configApiKey.isEmpty()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Missing API key");
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.commons.lang.StringUtils;
import org.json.JSONObject;
import org.openhab.binding.ambientweather.internal.model.DeviceJson;
import org.openhab.binding.ambientweather.internal.model.EventDataGenericJson;
Expand Down Expand Up @@ -318,8 +317,9 @@ private synchronized void handleData(String jsonData) {
logger.debug("Listener: Data: {}", jsonData);
try {
EventDataGenericJson data = gson.fromJson(jsonData, EventDataGenericJson.class);
if (StringUtils.isNotEmpty(data.macAddress)) {
sendWeatherDataToHandler(data.macAddress, jsonData);
String macAddress = data == null ? null : data.macAddress;
if (macAddress != null && !macAddress.isEmpty()) {
sendWeatherDataToHandler(macAddress, jsonData);
}
} catch (JsonSyntaxException e) {
logger.info("Listener: Exception parsing subscribed event: {}", e.getMessage());
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.androiddebugbridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you are not familiar with adb I suggest you to search "How to enable adb over

## Supported Things

This binding was tested on the Fire TV Stick (android version 7.1.2, volume control not working) and Nexus5x (android version 8.1.0, everything works nice), please update this document if you tested it with other android versions to reflect the compatibility of the biding.
This binding was tested on the Fire TV Stick (android version 7.1.2, volume control not working) and Nexus5x (android version 8.1.0, everything works nice), please update this document if you tested it with other android versions to reflect the compatibility of the binding.

## Discovery

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public String getCurrentPackage() throws AndroidDebugBridgeDeviceException, Inte
if (packageActivityName.contains("/"))
return packageActivityName.split("/")[0];
}
throw new AndroidDebugBridgeDeviceReadException("can read package name");
throw new AndroidDebugBridgeDeviceReadException("Unable to read package name");
}

public boolean isAwake()
Expand All @@ -137,7 +137,7 @@ public boolean isScreenOn() throws InterruptedException, AndroidDebugBridgeDevic
logger.debug("Unable to parse device wake lock: {}", e.getMessage());
}
}
throw new AndroidDebugBridgeDeviceReadException("can read screen state");
throw new AndroidDebugBridgeDeviceReadException("Unable to read screen state");
}

public boolean isPlayingMedia(String currentApp)
Expand Down Expand Up @@ -175,12 +175,12 @@ public int getPowerWakeLock() throws InterruptedException, AndroidDebugBridgeDev
String lockResp = runAdbShell("dumpsys", "power", "|", "grep", "Locks", "|", "grep", "'size='");
if (lockResp.contains("=")) {
try {
return Integer.parseInt(lockResp.replace("\n", "").split("=")[1]);
return Integer.parseInt(lockResp.replace("\n", "").split("=")[1].trim());
} catch (NumberFormatException e) {
logger.debug("Unable to parse device wake lock: {}", e.getMessage());
}
}
throw new AndroidDebugBridgeDeviceReadException("can read wake lock");
throw new AndroidDebugBridgeDeviceReadException("Unable to read wake lock");
}

private void setVolume(int stream, int volume)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

import javax.measure.quantity.Angle;

import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.astro.internal.action.AstroActions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import static java.util.Calendar.SECOND;
import static java.util.Collections.singletonList;
import static java.util.stream.Collectors.toList;
import static org.apache.commons.lang.time.DateUtils.truncatedEquals;
import static org.apache.commons.lang3.time.DateUtils.truncatedEquals;
import static org.openhab.binding.astro.internal.AstroBindingConstants.*;
import static org.openhab.binding.astro.internal.util.DateTimeUtils.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Date;
import java.util.regex.Pattern;

import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.openhab.binding.astro.internal.config.AstroChannelConfig;
import org.openhab.binding.astro.internal.model.Range;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ public void responseReceived(String response) {
}

m = versionHdPattern.matcher(response);
if (m.matches()) {
if (!capabilities.isUHDModel() && m.matches()) {
handleVersionResponse(m, response);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Set<ThingTypeUID> getSupportedThingTypeUIDs() {
properties.put("host", url.getHost());
properties.put("user", "admin");
properties.put("password", "admin");
properties.put("port", new Integer(port));
properties.put("port", Integer.valueOf(port));

DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties).withLabel(label)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
package org.openhab.binding.autelis.internal.handler;

import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -25,14 +27,11 @@
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;

import org.apache.commons.lang.StringUtils;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.util.B64Code;
import org.eclipse.jetty.util.StringUtil;
import org.openhab.binding.autelis.internal.AutelisBindingConstants;
import org.openhab.binding.autelis.internal.config.AutelisConfiguration;
import org.openhab.core.library.types.DecimalType;
Expand Down Expand Up @@ -288,17 +287,17 @@ private void configure() {
String username = configuration.user;
String password = configuration.password;

if (StringUtils.isBlank(username)) {
if (username == null || username.isBlank()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "username must not be empty");
return;
}

if (StringUtils.isBlank(password)) {
if (password == null || password.isBlank()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "password must not be empty");
return;
}

if (StringUtils.isBlank(host)) {
if (host == null || host.isBlank()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "hostname must not be empty");
return;
}
Expand All @@ -314,7 +313,8 @@ private void configure() {
}

baseURL = "http://" + host + ":" + port;
basicAuthentication = "Basic " + B64Code.encode(username + ":" + password, StringUtil.__ISO_8859_1);
basicAuthentication = "Basic "
+ Base64.getEncoder().encodeToString((username + ":" + password).getBytes(StandardCharsets.ISO_8859_1));
logger.debug("Autelius binding configured with base url {} and refresh period of {}", baseURL, refresh);

initPolling(0);
Expand Down Expand Up @@ -443,7 +443,7 @@ private void pollAutelisController() {
}
}

if (StringUtils.isEmpty((value))) {
if (value == null || value.isEmpty()) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*/
package org.openhab.binding.bigassfan.internal;

import org.apache.commons.lang.StringUtils;

/**
* The {@link BigAssFanConfig} is responsible for storing the BigAssFan thing configuration.
*
Expand Down Expand Up @@ -60,13 +58,13 @@ public void setMacAddress(String macAddress) {
}

public boolean isValid() {
if (StringUtils.isBlank(label)) {
if (label == null || label.isBlank()) {
return false;
}
if (StringUtils.isBlank(ipAddress)) {
if (ipAddress == null || ipAddress.isBlank()) {
return false;
}
if (StringUtils.isBlank(macAddress)) {
if (macAddress == null || macAddress.isBlank()) {
return false;
}
return true;
Expand Down
Loading

0 comments on commit 70da552

Please sign in to comment.