Fixed SAT findings for new SAT 0.11.1 release (#10518)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
Christoph Weitkamp 2021-04-14 15:11:31 +02:00 committed by GitHub
parent 9e4b67ee09
commit a04cfd3389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 88 additions and 43 deletions

View File

@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
/**
* The {@link ChromecastActions} class defines rule actions for playing URLs
*
* @author Scott Hanson - Added Actions
* @author Scott Hanson - Initial contribution
*/
@ThingActionsScope(name = "chromecast")
@NonNullByDefault

View File

@ -86,11 +86,12 @@ public class ChromecastDiscoveryParticipant implements MDNSDiscoveryParticipant
if (model == null) {
return null;
}
if (model.equals("Chromecast Audio")) {
switch (model) {
case "Chromecast Audio":
return THING_TYPE_AUDIO;
} else if (model.equals("Google Cast Group")) {
case "Google Cast Group":
return THING_TYPE_AUDIOGROUP;
} else {
default:
return THING_TYPE_CHROMECAST;
}
}

View File

@ -53,6 +53,7 @@ The channel will then be identified by `<air unit id>:<channel group>#<channel>`
You can also manually configure your air unit in case you don't want to use autodiscovery
(e. g. if you want to have a portable configuration):
Create a new file, e. g. `danfoss.things`, in your _things_ configuration folder:
```
Thing danfossairunit:airunit:myairunit [host="192.168.0.7",
refreshInterval=5,

View File

@ -21,7 +21,11 @@ import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.net.SocketTimeoutException;
import java.util.*;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.config.discovery.AbstractDiscoveryService;

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.haywardomnilogic-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-haywardomnilogic" description="Hayward OmniLogic Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.haywardomnilogic/${project.version}</bundle>
</feature>
</features>

View File

@ -130,6 +130,7 @@ Please note:
The binding tries to detect and maintain the correct state, but due to device limitations this is not always possible.
Make sure the receiver's and binding's state are in sync when OH is restarted (binding assumes state is OFF).
- Channels receiving event information get updated when changing the channel or playing a video.
There is no way to read the current status, therefore they don't get initialized on startup nor being updated in real-time.
The player channel supports the following actions:

View File

@ -139,7 +139,7 @@ public class MagentaTVDeviceManager {
MagentaTVDevice dev = deviceList.get(udn.toUpperCase());
return dev.properties;
}
if (deviceList.size() > 0) {
if (!deviceList.isEmpty()) {
logger.debug("getDiscoveredProperties(): Unknown UDN: {}", udn);
}
return null;

View File

@ -222,7 +222,7 @@ public class MagentaTVOAuth {
if (method.equals(HttpMethod.POST)) {
fillPostData(request, data);
}
if (cookies.size() > 0) {
if (!cookies.isEmpty()) {
// Add cookies
String cookieValue = "";
for (HttpCookie c : cookies) {

View File

@ -104,4 +104,3 @@ channel-type.magentatv.key.command.option.SWITCH = IPTV/DVB
channel-type.magentatv.key.command.option.IPTV = IPTV
channel-type.magentatv.key.command.option.PIP = PIP
channel-type.magentatv.key.command.option.MULTIVIEW = Multi View

View File

@ -22,7 +22,7 @@
<representation-property>macAddress</representation-property>
<config-description uri="thing-type:magentatv:receiver">
<config-description>
<parameter name="ipAddress" type="text" required="true">
<label>Device IP Address</label>
<description>IP address of the receiver</description>

View File

@ -47,6 +47,7 @@ Currently binding supports the following panels: EVO192, EVO48(not tested), EVO9
|communicationState | Shows the communication status to Paradox. Different from Bridge status. Bridge may be online and able to receive commands but communication may be offline due to various reasons. Possible values [Offline, Online] |
#### Communication command channel allowed values
| Value | Description |
|--------|------------------------------------------------------------------------------------|
| LOGOUT | Logs out and disconnects from Paradox alarm system |
@ -61,6 +62,7 @@ Currently binding supports the following panels: EVO192, EVO48(not tested), EVO9
| disarmEnabled | Optional boolean flag. Valid for partitions. When set to true the command DISARM will be allowed for the partition where the flag is enabled. CAUTION: Enabling DISARM command can be dangerous. If attacker can gain access to your openHAB (via API or UI), this command can be used to disarm your armed partition (area) |
### Panel channels:
| Channel | Type | Description |
|--------------------------|----------------------------|-------------------------------------------------------------------------------------------|
| state | String | Overall panel state |
@ -174,7 +176,9 @@ Currently binding supports the following panels: EVO192, EVO48(not tested), EVO9
}
}
```
## Acknowledgements
This binding would not be possible without the reverse engineering of the byte level protocol and the development by other authors in python, C# and other languages. Many thanks to the following authors and their respective GitHub repositories for their development that helped in creating this binding:
João Paulo Barraca - https://github.com/ParadoxAlarmInterface/pai

View File

@ -12,7 +12,7 @@
*/
package org.openhab.binding.somfymylink.internal.handler;
import static org.openhab.binding.somfymylink.internal.SomfyMyLinkBindingConstants.*;
import static org.openhab.binding.somfymylink.internal.SomfyMyLinkBindingConstants.CHANNEL_SCENES;
import java.io.BufferedReader;
import java.io.IOException;
@ -23,7 +23,11 @@ import java.io.Writer;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@ -179,7 +183,6 @@ public class SomfyMyLinkBridgeHandler extends BaseBridgeHandler {
SomfyMyLinkCommandShadePing command = new SomfyMyLinkCommandShadePing(config.systemId);
sendCommandWithResponse(command, SomfyMyLinkPingResponse.class).get();
updateStatus(ThingStatus.ONLINE);
} catch (SomfyMyLinkException | InterruptedException | ExecutionException e) {
logger.warn("Problem with mylink during heartbeat: {}", e.getMessage());
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage());
@ -298,7 +301,6 @@ public class SomfyMyLinkBridgeHandler extends BaseBridgeHandler {
Writer out = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.US_ASCII);
BufferedReader in = new BufferedReader(
new InputStreamReader(socket.getInputStream(), StandardCharsets.US_ASCII))) {
// send the command
logger.debug("Sending: {}", json);
out.write(json);

View File

@ -20,7 +20,11 @@ import org.openhab.binding.wifiled.internal.WiFiLEDBindingConstants;
import org.openhab.binding.wifiled.internal.configuration.WiFiLEDConfig;
import org.openhab.binding.wifiled.internal.handler.AbstractWiFiLEDDriver.Driver;
import org.openhab.binding.wifiled.internal.handler.AbstractWiFiLEDDriver.Protocol;
import org.openhab.core.library.types.*;
import org.openhab.core.library.types.HSBType;
import org.openhab.core.library.types.IncreaseDecreaseType;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.library.types.StringType;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;

View File

@ -718,6 +718,7 @@ String cooler_target_mode "Cooler Target Mode" (gCooler)
Number cooler_cool_thrs "Cooler Cool Threshold Temp [%.1f C]" (gCooler) {homekit="CoolingThresholdTemperature" [minValue=10.5, maxValue=50]}
Number cooler_heat_thrs "Cooler Heat Threshold Temp [%.1f C]" (gCooler) {homekit="HeatingThresholdTemperature" [minValue=0.5, maxValue=20]}
```
## Additional Notes
HomeKit allows only a single pairing to be established with the bridge.
@ -753,6 +754,7 @@ openhab> log:tail io.github.hapjava
## Troubleshooting
### openHAB is not listed in home app
if you don't see openHAB in the home app, probably multicast DNS (mDNS) traffic is not routed correctly from openHAB to home app device or openHAB is already in paired state.
You can verify this with [Discovery DNS iOS app](https://apps.apple.com/us/app/discovery-dns-sd-browser/id305441017) as follow:

View File

@ -16,9 +16,16 @@ import static org.openhab.io.homekit.internal.HomekitAccessoryType.*;
import static org.openhab.io.homekit.internal.HomekitCharacteristicType.*;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;

View File

@ -69,7 +69,17 @@ import io.github.hapjava.characteristics.impl.common.StatusFaultCharacteristic;
import io.github.hapjava.characteristics.impl.common.StatusFaultEnum;
import io.github.hapjava.characteristics.impl.common.StatusTamperedCharacteristic;
import io.github.hapjava.characteristics.impl.common.StatusTamperedEnum;
import io.github.hapjava.characteristics.impl.fan.*;
import io.github.hapjava.characteristics.impl.fan.CurrentFanStateCharacteristic;
import io.github.hapjava.characteristics.impl.fan.CurrentFanStateEnum;
import io.github.hapjava.characteristics.impl.fan.LockPhysicalControlsCharacteristic;
import io.github.hapjava.characteristics.impl.fan.LockPhysicalControlsEnum;
import io.github.hapjava.characteristics.impl.fan.RotationDirectionCharacteristic;
import io.github.hapjava.characteristics.impl.fan.RotationDirectionEnum;
import io.github.hapjava.characteristics.impl.fan.RotationSpeedCharacteristic;
import io.github.hapjava.characteristics.impl.fan.SwingModeCharacteristic;
import io.github.hapjava.characteristics.impl.fan.SwingModeEnum;
import io.github.hapjava.characteristics.impl.fan.TargetFanStateCharacteristic;
import io.github.hapjava.characteristics.impl.fan.TargetFanStateEnum;
import io.github.hapjava.characteristics.impl.lightbulb.BrightnessCharacteristic;
import io.github.hapjava.characteristics.impl.lightbulb.ColorTemperatureCharacteristic;
import io.github.hapjava.characteristics.impl.lightbulb.HueCharacteristic;

View File

@ -18,6 +18,7 @@ This service is provided "AS IS", and the user takes full responsibility of any
{::options toc_levels="2..4"/}
- TOC
{:toc}
## Prerequisites