mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Reduce SAT warnings (#17406)
* Reduce SAT warnings Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
parent
2d61ffc409
commit
54fd13b0c1
@ -26,7 +26,7 @@
|
|||||||
<parameter name="gems" type="text" required="false" groupName="gems">
|
<parameter name="gems" type="text" required="false" groupName="gems">
|
||||||
<label>Ruby Gems</label>
|
<label>Ruby Gems</label>
|
||||||
<description><![CDATA[A comma separated list of Ruby Gems to install. Versions may be constrained by separating with an
|
<description><![CDATA[A comma separated list of Ruby Gems to install. Versions may be constrained by separating with an
|
||||||
<tt>=</tt> and then the standard RubyGems version constraint, such as "<tt>openhab-scripting=~>5.0</tt>".
|
<tt>=</tt> and then the standard RubyGems version constraint, such as "<tt>openhab-scripting=~>5.0</tt>".
|
||||||
]]></description>
|
]]></description>
|
||||||
<default>openhab-scripting=~>5.0.0</default>
|
<default>openhab-scripting=~>5.0.0</default>
|
||||||
</parameter>
|
</parameter>
|
||||||
|
@ -38,7 +38,7 @@ public class DynamicChannelHelper {
|
|||||||
private record ConfigurationChannel(String id, String typeId, String itemType) {
|
private record ConfigurationChannel(String id, String typeId, String itemType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static List<ConfigurationChannel> channels = new ArrayList<ConfigurationChannel>() {
|
private static final List<ConfigurationChannel> CHANNELS = new ArrayList<ConfigurationChannel>() {
|
||||||
{
|
{
|
||||||
add(new ConfigurationChannel(CHANNEL_COUNTRY_CODE, CHANNEL_COUNTRY_CODE, "String"));
|
add(new ConfigurationChannel(CHANNEL_COUNTRY_CODE, CHANNEL_COUNTRY_CODE, "String"));
|
||||||
add(new ConfigurationChannel(CHANNEL_PM_STANDARD, CHANNEL_PM_STANDARD, "String"));
|
add(new ConfigurationChannel(CHANNEL_PM_STANDARD, CHANNEL_PM_STANDARD, "String"));
|
||||||
@ -58,10 +58,10 @@ public class DynamicChannelHelper {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(DynamicChannelHelper.class);
|
private static final Logger logger = LoggerFactory.getLogger(DynamicChannelHelper.class);
|
||||||
|
|
||||||
public static ThingBuilder updateThingWithConfigurationChannels(Thing thing, ThingBuilder builder) {
|
public static ThingBuilder updateThingWithConfigurationChannels(Thing thing, ThingBuilder builder) {
|
||||||
for (ConfigurationChannel channel : channels) {
|
for (ConfigurationChannel channel : CHANNELS) {
|
||||||
addLocalConfigurationChannel(thing, builder, channel);
|
addLocalConfigurationChannel(thing, builder, channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,12 @@ import org.eclipse.jdt.annotation.Nullable;
|
|||||||
import org.openhab.binding.astro.internal.calc.SunCalc;
|
import org.openhab.binding.astro.internal.calc.SunCalc;
|
||||||
import org.openhab.binding.astro.internal.job.DailyJobSun;
|
import org.openhab.binding.astro.internal.job.DailyJobSun;
|
||||||
import org.openhab.binding.astro.internal.job.Job;
|
import org.openhab.binding.astro.internal.job.Job;
|
||||||
import org.openhab.binding.astro.internal.model.*;
|
import org.openhab.binding.astro.internal.model.Planet;
|
||||||
|
import org.openhab.binding.astro.internal.model.Position;
|
||||||
|
import org.openhab.binding.astro.internal.model.Radiation;
|
||||||
|
import org.openhab.binding.astro.internal.model.Range;
|
||||||
|
import org.openhab.binding.astro.internal.model.Sun;
|
||||||
|
import org.openhab.binding.astro.internal.model.SunPhaseName;
|
||||||
import org.openhab.core.i18n.TimeZoneProvider;
|
import org.openhab.core.i18n.TimeZoneProvider;
|
||||||
import org.openhab.core.scheduler.CronScheduler;
|
import org.openhab.core.scheduler.CronScheduler;
|
||||||
import org.openhab.core.thing.Thing;
|
import org.openhab.core.thing.Thing;
|
||||||
|
@ -207,7 +207,6 @@ public class AwattarBridgeHandler extends BaseBridgeHandler {
|
|||||||
|
|
||||||
// refresh then every 3 hours, if the last refresh was more than an hour ago
|
// refresh then every 3 hours, if the last refresh was more than an hour ago
|
||||||
if (now.getHour() % 3 == 0 && lastRefresh.getEpochSecond() < now.minusHours(1).toEpochSecond()) {
|
if (now.getHour() % 3 == 0 && lastRefresh.getEpochSecond() < now.minusHours(1).toEpochSecond()) {
|
||||||
|
|
||||||
// update the last refresh time
|
// update the last refresh time
|
||||||
lastRefresh = Instant.now();
|
lastRefresh = Instant.now();
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ class AwattarBridgeHandlerRefreshTest extends JavaTest {
|
|||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setUp() throws IllegalArgumentException, IllegalAccessException {
|
public void setUp() throws IllegalArgumentException, IllegalAccessException {
|
||||||
|
|
||||||
when(timeZoneProviderMock.getTimeZone()).thenReturn(ZoneId.of("GMT+2"));
|
when(timeZoneProviderMock.getTimeZone()).thenReturn(ZoneId.of("GMT+2"));
|
||||||
|
|
||||||
when(bridgeMock.getUID()).thenReturn(BRIDGE_UID);
|
when(bridgeMock.getUID()).thenReturn(BRIDGE_UID);
|
||||||
|
@ -95,7 +95,6 @@ public class AwattarBridgeHandlerTest extends JavaTest {
|
|||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setUp() throws IOException, IllegalArgumentException, IllegalAccessException, AwattarApiException {
|
public void setUp() throws IOException, IllegalArgumentException, IllegalAccessException, AwattarApiException {
|
||||||
|
|
||||||
// mock the API response
|
// mock the API response
|
||||||
try (InputStream inputStream = AwattarBridgeHandlerTest.class.getResourceAsStream("api_response.json")) {
|
try (InputStream inputStream = AwattarBridgeHandlerTest.class.getResourceAsStream("api_response.json")) {
|
||||||
SortedSet<AwattarPrice> result = new TreeSet<>(Comparator.comparing(AwattarPrice::timerange));
|
SortedSet<AwattarPrice> result = new TreeSet<>(Comparator.comparing(AwattarPrice::timerange));
|
||||||
|
@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* The {@link AirthingsWaveGen1Handler} is responsible for handling commands, which are
|
* The {@link AirthingsWaveGen1Handler} is responsible for handling commands, which are
|
||||||
* sent to one of the channels.
|
* sent to one of the channels.
|
||||||
*
|
*
|
||||||
* @author Davy Wong - Added Airthings Wave Gen 1 support
|
* @author Davy Wong - initial contribution, added Airthings Wave Gen 1 support
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class AirthingsWaveGen1Handler extends AbstractAirthingsHandler {
|
public class AirthingsWaveGen1Handler extends AbstractAirthingsHandler {
|
||||||
|
@ -91,7 +91,6 @@ public class MadokaValue {
|
|||||||
// unsupported
|
// unsupported
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
/**
|
/**
|
||||||
* The {@link BluetoothChannelUtils} contains utility functions used by the GattChannelHandler
|
* The {@link BluetoothChannelUtils} contains utility functions used by the GattChannelHandler
|
||||||
*
|
*
|
||||||
* @author Vlad Kolotov - Original author
|
* @author Vlad Kolotov - Initial contribution
|
||||||
* @author Connor Petty - Modified for openHAB use
|
* @author Connor Petty - Modified for openHAB use
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
@ -75,11 +75,11 @@ public class BluetoothChannelUtils {
|
|||||||
case SINT:
|
case SINT:
|
||||||
case FLOAT_IEE754:
|
case FLOAT_IEE754:
|
||||||
case FLOAT_IEE11073:
|
case FLOAT_IEE11073:
|
||||||
BluetoothUnit unit = BluetoothUnit.findByType(field.getUnit());
|
// BluetoothUnit unit = BluetoothUnit.findByType(field.getUnit());
|
||||||
if (unit != null) {
|
// if (unit != null) {
|
||||||
// TODO
|
// TODO
|
||||||
// return "Number:" + unit.getUnit().getDimension();
|
// return "Number:" + unit.getUnit().getDimension();
|
||||||
}
|
// }
|
||||||
return "Number";
|
return "Number";
|
||||||
case UTF8S:
|
case UTF8S:
|
||||||
case UTF16S:
|
case UTF16S:
|
||||||
@ -208,7 +208,7 @@ public class BluetoothChannelUtils {
|
|||||||
if (decimalType != null) {
|
if (decimalType != null) {
|
||||||
try {
|
try {
|
||||||
return field.getEnumeration(new BigInteger(decimalType.toString()));
|
return field.getEnumeration(new BigInteger(decimalType.toString()));
|
||||||
} catch (NumberFormatException ex) {
|
} catch (NumberFormatException ignored) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
/**
|
/**
|
||||||
* {@link CharacteristicChannelTypeProvider} that provides channel types for dynamically discovered characteristics.
|
* {@link CharacteristicChannelTypeProvider} that provides channel types for dynamically discovered characteristics.
|
||||||
*
|
*
|
||||||
* @author Vlad Kolotov - Original author
|
* @author Vlad Kolotov - Initial contribution
|
||||||
* @author Connor Petty - Modified for openHAB use.
|
* @author Connor Petty - Modified for openHAB use.
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
|
@ -47,7 +47,7 @@ import gnu.io.UnsupportedCommOperationException;
|
|||||||
* Driver for the CM11 X10 interface.
|
* Driver for the CM11 X10 interface.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Anthony Green - Original code
|
* @author Anthony Green - Initial contribution
|
||||||
* @author Bob Raker - updates to setClock code, adapted code for use in openHAB2
|
* @author Bob Raker - updates to setClock code, adapted code for use in openHAB2
|
||||||
* @see <a href="http://www.heyu.org/docs/protocol.txt">CM11 Protocol specification</a>
|
* @see <a href="http://www.heyu.org/docs/protocol.txt">CM11 Protocol specification</a>
|
||||||
* @see <a href="http://www.rxtx.org">RXTX Serial API for Java</a>
|
* @see <a href="http://www.rxtx.org">RXTX Serial API for Java</a>
|
||||||
|
@ -113,7 +113,6 @@ public class SceneDiscoveryService extends AbstractDiscoveryService {
|
|||||||
.withBridge(bridgeUID).withLabel(scene.getSceneName()).build();
|
.withBridge(bridgeUID).withLabel(scene.getSceneName()).build();
|
||||||
|
|
||||||
thingDiscovered(discoveryResult);
|
thingDiscovered(discoveryResult);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.debug("discovered unsupported scene: name '{}' with id {}", scene.getSceneName(),
|
logger.debug("discovered unsupported scene: name '{}' with id {}", scene.getSceneName(),
|
||||||
scene.getID());
|
scene.getID());
|
||||||
|
@ -47,8 +47,8 @@ import org.slf4j.LoggerFactory;
|
|||||||
* For that it uses the {@link BridgeHandler} to register this class as a {@link DeviceStatusListener} to get informed
|
* For that it uses the {@link BridgeHandler} to register this class as a {@link DeviceStatusListener} to get informed
|
||||||
* about changes from the accompanying {@link Circuit}.
|
* about changes from the accompanying {@link Circuit}.
|
||||||
*
|
*
|
||||||
* @author Michael Ochel
|
* @author Michael Ochel - Initial contribution
|
||||||
* @author Matthias Siegele
|
* @author Matthias Siegele - Initial contribution
|
||||||
*/
|
*/
|
||||||
public class CircuitHandler extends BaseThingHandler implements DeviceStatusListener {
|
public class CircuitHandler extends BaseThingHandler implements DeviceStatusListener {
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ package org.openhab.binding.digitalstrom.internal.lib.serverconnection.constants
|
|||||||
* The {@link JSONApiResponseKeysEnum} contains digitalSTROM-JSON response keys.
|
* The {@link JSONApiResponseKeysEnum} contains digitalSTROM-JSON response keys.
|
||||||
*
|
*
|
||||||
* @author Alexander Betker - Initial contribution
|
* @author Alexander Betker - Initial contribution
|
||||||
* @author Michael Ochel completely changed and updated only methods remained
|
* @author Michael Ochel - completely changed and updated only methods remained
|
||||||
* @author Matthias Siegele completely changed and updated only methods remained
|
* @author Matthias Siegele - completely changed and updated only methods remained
|
||||||
*/
|
*/
|
||||||
public enum JSONApiResponseKeysEnum {
|
public enum JSONApiResponseKeysEnum {
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class ControllerHandler extends DraytonWiserThingHandler<ControllerData>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private State getHeatChannel1Demand() {
|
private State getHeatChannel1Demand() {
|
||||||
return getData().heatingChannels.size() >= 1
|
return !getData().heatingChannels.isEmpty()
|
||||||
? new QuantityType<>(getData().heatingChannels.get(0).getPercentageDemand(), Units.PERCENT)
|
? new QuantityType<>(getData().heatingChannels.get(0).getPercentageDemand(), Units.PERCENT)
|
||||||
: UnDefType.UNDEF;
|
: UnDefType.UNDEF;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ public class ControllerHandler extends DraytonWiserThingHandler<ControllerData>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private State getHeatChannel1DemandState() {
|
private State getHeatChannel1DemandState() {
|
||||||
return OnOffType.from(getData().heatingChannels.size() >= 1
|
return OnOffType.from(!getData().heatingChannels.isEmpty()
|
||||||
&& "ON".equalsIgnoreCase(getData().heatingChannels.get(0).getHeatingRelayState()));
|
&& "ON".equalsIgnoreCase(getData().heatingChannels.get(0).getHeatingRelayState()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class HotWaterHandler extends DraytonWiserThingHandler<HotWaterData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private State getBoostedState() {
|
private State getBoostedState() {
|
||||||
if (getData().hotWater.size() >= 1) {
|
if (!getData().hotWater.isEmpty()) {
|
||||||
final HotWaterDTO firstChannel = getData().hotWater.get(0);
|
final HotWaterDTO firstChannel = getData().hotWater.get(0);
|
||||||
|
|
||||||
if (firstChannel.getOverrideTimeoutUnixTime() != null
|
if (firstChannel.getOverrideTimeoutUnixTime() != null
|
||||||
@ -125,7 +125,7 @@ public class HotWaterHandler extends DraytonWiserThingHandler<HotWaterData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private State getBoostRemainingState() {
|
private State getBoostRemainingState() {
|
||||||
if (getData().hotWater.size() >= 1) {
|
if (!getData().hotWater.isEmpty()) {
|
||||||
final HotWaterDTO firstChannel = getData().hotWater.get(0);
|
final HotWaterDTO firstChannel = getData().hotWater.get(0);
|
||||||
final Integer overrideTimeout = firstChannel.getOverrideTimeoutUnixTime();
|
final Integer overrideTimeout = firstChannel.getOverrideTimeoutUnixTime();
|
||||||
|
|
||||||
|
@ -121,7 +121,6 @@ public class GenericResponseTransformer {
|
|||||||
// call the custom handler to handle specific / composite channels which do not map 1:1 to JSON
|
// call the custom handler to handle specific / composite channels which do not map 1:1 to JSON
|
||||||
// fields.
|
// fields.
|
||||||
result.putAll(customResponseTransformer.transform(channel, value, jsonData));
|
result.putAll(customResponseTransformer.transform(channel, value, jsonData));
|
||||||
|
|
||||||
} catch (NumberFormatException | DateTimeParseException ex) {
|
} catch (NumberFormatException | DateTimeParseException ex) {
|
||||||
logger.warn("caught exception while parsing data for channel {} (value '{}'). Exception: {}",
|
logger.warn("caught exception while parsing data for channel {} (value '{}'). Exception: {}",
|
||||||
channel.getUID().getId(), value, ex.getMessage());
|
channel.getUID().getId(), value, ex.getMessage());
|
||||||
|
@ -328,7 +328,6 @@ public class EmotivaProcessorHandler extends BaseThingHandler {
|
|||||||
if (object instanceof EmotivaAckDTO answerDto) {
|
if (object instanceof EmotivaAckDTO answerDto) {
|
||||||
// Currently not supported to revert a failed command update, just used for logging for now.
|
// Currently not supported to revert a failed command update, just used for logging for now.
|
||||||
logger.trace("Processing received '{}' with '{}'", EmotivaAckDTO.class.getSimpleName(), answerDto);
|
logger.trace("Processing received '{}' with '{}'", EmotivaAckDTO.class.getSimpleName(), answerDto);
|
||||||
|
|
||||||
} else if (object instanceof EmotivaBarNotifyWrapper answerDto) {
|
} else if (object instanceof EmotivaBarNotifyWrapper answerDto) {
|
||||||
logger.trace("Processing received '{}' with '{}'", EmotivaBarNotifyWrapper.class.getSimpleName(),
|
logger.trace("Processing received '{}' with '{}'", EmotivaBarNotifyWrapper.class.getSimpleName(),
|
||||||
emotivaUdpResponse.answer());
|
emotivaUdpResponse.answer());
|
||||||
|
@ -438,14 +438,14 @@
|
|||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="autoOFF" advanced="true">
|
<channel-type id="autoOFF" advanced="true">
|
||||||
<item-type>Number:Duration</item-type>
|
<item-type>Number:Time</item-type>
|
||||||
<label>Auto Off</label>
|
<label>Auto Off</label>
|
||||||
<description>Automatically switch to off</description>
|
<description>Automatically switch to off</description>
|
||||||
<state pattern="%d %unit%"/>
|
<state pattern="%d %unit%"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="delayRadioOFF" advanced="true">
|
<channel-type id="delayRadioOFF" advanced="true">
|
||||||
<item-type>Number:Duration</item-type>
|
<item-type>Number:Time</item-type>
|
||||||
<label>Delay Radio Off</label>
|
<label>Delay Radio Off</label>
|
||||||
<description>Delay switch off by radio for given seconds</description>
|
<description>Delay switch off by radio for given seconds</description>
|
||||||
<state pattern="%d %unit%"/>
|
<state pattern="%d %unit%"/>
|
||||||
|
@ -79,7 +79,6 @@ public class EnvoyEntrezConnector extends EnvoyConnector {
|
|||||||
check(configuration.password, "Password parameter is empty"),
|
check(configuration.password, "Password parameter is empty"),
|
||||||
check(configuration.siteName, "siteName parameter is empty"))
|
check(configuration.siteName, "siteName parameter is empty"))
|
||||||
.filter(s -> !s.isEmpty()).collect(Collectors.joining(", "));
|
.filter(s -> !s.isEmpty()).collect(Collectors.joining(", "));
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!message.isEmpty()) {
|
if (!message.isEmpty()) {
|
||||||
return message;
|
return message;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
|
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
|
||||||
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0
|
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0
|
||||||
https://openhab.org/schemas/config-description-1.0.0.xsd">
|
https://openhab.org/schemas/config-description-1.0.0.xsd">
|
||||||
|
|
||||||
<config-description uri="bridge-type:freeboxos:api">
|
<config-description uri="bridge-type:freeboxos:api">
|
||||||
<parameter name="apiDomain" type="text">
|
<parameter name="apiDomain" type="text">
|
||||||
|
@ -22,8 +22,8 @@ import org.eclipse.jetty.client.HttpClient;
|
|||||||
* Class representing an internet radio based on the frontier silicon chipset. Tested with "hama IR110" and Medion
|
* Class representing an internet radio based on the frontier silicon chipset. Tested with "hama IR110" and Medion
|
||||||
* MD87180" internet radios.
|
* MD87180" internet radios.
|
||||||
*
|
*
|
||||||
* @author Rainer Ostendorf
|
* @author Rainer Ostendorf - Initial contribution
|
||||||
* @author Patrick Koenemann
|
* @author Patrick Koenemann - improvements
|
||||||
* @author Mihaela Memova - removed duplicated check for the percent value range
|
* @author Mihaela Memova - removed duplicated check for the percent value range
|
||||||
*/
|
*/
|
||||||
public class FrontierSiliconRadio {
|
public class FrontierSiliconRadio {
|
||||||
|
@ -43,8 +43,8 @@ import org.xml.sax.SAXException;
|
|||||||
*
|
*
|
||||||
* This class parses this XML data and provides functions for reading and casting typical fields.
|
* This class parses this XML data and provides functions for reading and casting typical fields.
|
||||||
*
|
*
|
||||||
* @author Rainer Ostendorf
|
* @author Rainer Ostendorf - Initial contribution
|
||||||
* @author Patrick Koenemann
|
* @author Patrick Koenemann - Improvements
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FrontierSiliconRadioApiResult {
|
public class FrontierSiliconRadioApiResult {
|
||||||
|
@ -26,8 +26,8 @@ import org.slf4j.LoggerFactory;
|
|||||||
/**
|
/**
|
||||||
* This class holds the http-connection and session information for controlling the radio.
|
* This class holds the http-connection and session information for controlling the radio.
|
||||||
*
|
*
|
||||||
* @author Rainer Ostendorf
|
* @author Rainer Ostendorf - Initial contribution
|
||||||
* @author Patrick Koenemann
|
* @author Patrick Koenemann - improvements
|
||||||
* @author Svilen Valkanov - replaced Apache HttpClient with Jetty
|
* @author Svilen Valkanov - replaced Apache HttpClient with Jetty
|
||||||
* @author Mihaela Memova - changed the calling of the stopHttpClient() method, fixed the hardcoded URL path, fixed the
|
* @author Mihaela Memova - changed the calling of the stopHttpClient() method, fixed the hardcoded URL path, fixed the
|
||||||
* for loop condition part
|
* for loop condition part
|
||||||
@ -110,7 +110,6 @@ public class FrontierSiliconRadioConnection {
|
|||||||
isLoggedIn = true;
|
isLoggedIn = true;
|
||||||
return true; // login successful :-)
|
return true; // login successful :-)
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug("Fatal transport error: {}", e.toString());
|
logger.debug("Fatal transport error: {}", e.toString());
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
|
@ -15,7 +15,7 @@ package org.openhab.binding.fsinternetradio.internal.radio;
|
|||||||
/**
|
/**
|
||||||
* Internal constants for the frontier silicon radio.
|
* Internal constants for the frontier silicon radio.
|
||||||
*
|
*
|
||||||
* @author Markus Rathgeb - Moved the constants to separate class
|
* @author Markus Rathgeb - Initial contribution, moved the constants to separate class
|
||||||
*/
|
*/
|
||||||
public class FrontierSiliconRadioConstants {
|
public class FrontierSiliconRadioConstants {
|
||||||
|
|
||||||
|
@ -154,7 +154,6 @@ public class GroupePSAHandler extends BaseThingHandler {
|
|||||||
this.onlineIntervalM = onlineIntervalM != null ? onlineIntervalM : DEFAULT_ONLINE_INTERVAL_M;
|
this.onlineIntervalM = onlineIntervalM != null ? onlineIntervalM : DEFAULT_ONLINE_INTERVAL_M;
|
||||||
startGroupePSAPolling(pollingIntervalM);
|
startGroupePSAPolling(pollingIntervalM);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_UNINITIALIZED);
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_UNINITIALIZED);
|
||||||
}
|
}
|
||||||
@ -359,7 +358,6 @@ public class GroupePSAHandler extends BaseThingHandler {
|
|||||||
Charging::getRemainingTime, x -> new BigDecimal(x.getSeconds()), Units.SECOND);
|
Charging::getRemainingTime, x -> new BigDecimal(x.getSeconds()), Units.SECOND);
|
||||||
updateState(CHANNEL_ELECTRIC_CHARGING_NEXTDELAYEDTIME, energy, Energy::getCharging,
|
updateState(CHANNEL_ELECTRIC_CHARGING_NEXTDELAYEDTIME, energy, Energy::getCharging,
|
||||||
Charging::getNextDelayedTime, x -> new BigDecimal(x.getSeconds()), Units.SECOND);
|
Charging::getNextDelayedTime, x -> new BigDecimal(x.getSeconds()), Units.SECOND);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -508,7 +508,6 @@ public class GrowattCloud implements AutoCloseable {
|
|||||||
|
|
||||||
DeviceType deviceType = getDeviceTypeChecked(deviceId);
|
DeviceType deviceType = getDeviceTypeChecked(deviceId);
|
||||||
switch (deviceType) {
|
switch (deviceType) {
|
||||||
|
|
||||||
case MIX:
|
case MIX:
|
||||||
case SPA:
|
case SPA:
|
||||||
setTimeProgram(deviceId, deviceType,
|
setTimeProgram(deviceId, deviceType,
|
||||||
|
@ -23,7 +23,7 @@ import org.openhab.core.i18n.ConfigurationException;
|
|||||||
/**
|
/**
|
||||||
* Handles the authentication to Homematic server.
|
* Handles the authentication to Homematic server.
|
||||||
*
|
*
|
||||||
* @author Christian Kittel
|
* @author Christian Kittel - Initial contribution
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class AuthenticationHandler {
|
public class AuthenticationHandler {
|
||||||
|
@ -123,7 +123,6 @@ public class HomematicDeviceDiscoveryService
|
|||||||
thingHandler.getGateway().setInstallMode(false, 0);
|
thingHandler.getGateway().setInstallMode(false, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
logger.warn("Failed to disable Homematic controller's install mode", ex);
|
logger.warn("Failed to disable Homematic controller's install mode", ex);
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ public abstract class HomeWizardDeviceHandler extends BaseThingHandler {
|
|||||||
*
|
*
|
||||||
* @param payload The data parsed from the data Json file
|
* @param payload The data parsed from the data Json file
|
||||||
*/
|
*/
|
||||||
abstract protected void handleDataPayload(DataPayload payload);
|
protected abstract void handleDataPayload(DataPayload payload);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -47,7 +47,7 @@ public abstract class HomeWizardStatefulDeviceHandler extends HomeWizardDeviceHa
|
|||||||
*
|
*
|
||||||
* @param payload The data parsed from the state Json file
|
* @param payload The data parsed from the state Json file
|
||||||
*/
|
*/
|
||||||
abstract protected void handleStatePayload(StatePayload payload);
|
protected abstract void handleStatePayload(StatePayload payload);
|
||||||
|
|
||||||
protected void pollState() {
|
protected void pollState() {
|
||||||
final String stateResult;
|
final String stateResult;
|
||||||
|
@ -119,7 +119,7 @@ public class Clip2BridgeHandler extends BaseBridgeHandler {
|
|||||||
private final Bundle bundle;
|
private final Bundle bundle;
|
||||||
private final LocaleProvider localeProvider;
|
private final LocaleProvider localeProvider;
|
||||||
private final TranslationProvider translationProvider;
|
private final TranslationProvider translationProvider;
|
||||||
private final Map<String, Resource> automationsCache = new ConcurrentHashMap<>();;
|
private final Map<String, Resource> automationsCache = new ConcurrentHashMap<>();
|
||||||
private final Set<String> automationScriptIds = ConcurrentHashMap.newKeySet();
|
private final Set<String> automationScriptIds = ConcurrentHashMap.newKeySet();
|
||||||
private final ChannelGroupUID automationChannelGroupUID;
|
private final ChannelGroupUID automationChannelGroupUID;
|
||||||
|
|
||||||
@ -853,7 +853,6 @@ public class Clip2BridgeHandler extends BaseBridgeHandler {
|
|||||||
Resource cachedAutomation = automationsCache.get(automation.getId());
|
Resource cachedAutomation = automationsCache.get(automation.getId());
|
||||||
return Objects.isNull(cachedAutomation) || !automation.getName().equals(cachedAutomation.getName());
|
return Objects.isNull(cachedAutomation) || !automation.getName().equals(cachedAutomation.getName());
|
||||||
})) {
|
})) {
|
||||||
|
|
||||||
synchronized (automationsCache) {
|
synchronized (automationsCache) {
|
||||||
automationsCache.clear();
|
automationsCache.clear();
|
||||||
automationsCache.putAll(automations.stream().collect(Collectors.toMap(a -> a.getId(), a -> a)));
|
automationsCache.putAll(automations.stream().collect(Collectors.toMap(a -> a.getId(), a -> a)));
|
||||||
|
@ -140,7 +140,6 @@ public class ICloudDeviceHandler extends BaseThingHandler implements ICloudDevic
|
|||||||
if (channelId.equals(FIND_MY_PHONE)) {
|
if (channelId.equals(FIND_MY_PHONE)) {
|
||||||
if (command == OnOffType.ON) {
|
if (command == OnOffType.ON) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (deviceInformationRecord == null) {
|
if (deviceInformationRecord == null) {
|
||||||
this.logger
|
this.logger
|
||||||
.debug("Can't send Find My Device request, because deviceInformationRecord is null!");
|
.debug("Can't send Find My Device request, because deviceInformationRecord is null!");
|
||||||
|
@ -117,7 +117,6 @@ public class PushButtonToCommandProfile implements TriggerProfile {
|
|||||||
logger.warn("Parameter '{}' is not a valid command type, using default value '{}'", param, defValue);
|
logger.warn("Parameter '{}' is not a valid command type, using default value '{}'", param, defValue);
|
||||||
retval = defValue;
|
retval = defValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.debug("Parameter '{}' is not of type String, using default value '{}'", param, defValue);
|
logger.debug("Parameter '{}' is not of type String, using default value '{}'", param, defValue);
|
||||||
retval = defValue;
|
retval = defValue;
|
||||||
|
@ -444,7 +444,6 @@ public class Port {
|
|||||||
logger.trace("retransmitting msg: {}", msg);
|
logger.trace("retransmitting msg: {}", msg);
|
||||||
ioStream.write(msg.getData());
|
ioStream.write(msg.getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// if rate limited, need to sleep now.
|
// if rate limited, need to sleep now.
|
||||||
if (msg.getQuietTime() > 0) {
|
if (msg.getQuietTime() > 0) {
|
||||||
|
@ -819,7 +819,7 @@
|
|||||||
<state readOnly="true" pattern="%.0f %unit%"/>
|
<state readOnly="true" pattern="%.0f %unit%"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
<channel-type id="device-local-battery-voltage">
|
<channel-type id="device-local-battery-voltage">
|
||||||
<item-type>Number:ElectricalPotential</item-type>
|
<item-type>Number:ElectricPotential</item-type>
|
||||||
<label>Battery Voltage</label>
|
<label>Battery Voltage</label>
|
||||||
<description>Current battery voltage</description>
|
<description>Current battery voltage</description>
|
||||||
<category>Energy</category>
|
<category>Energy</category>
|
||||||
|
@ -194,7 +194,7 @@ public class CloudConnector {
|
|||||||
try {
|
try {
|
||||||
JsonObject homelistInfo = cl.getHomeList(country.trim().toLowerCase());
|
JsonObject homelistInfo = cl.getHomeList(country.trim().toLowerCase());
|
||||||
final HomeListDTO homelist = GSON.fromJson(homelistInfo, HomeListDTO.class);
|
final HomeListDTO homelist = GSON.fromJson(homelistInfo, HomeListDTO.class);
|
||||||
if (homelist != null && homelist.getHomelist() != null && homelist.getHomelist().size() > 0) {
|
if (homelist != null && homelist.getHomelist() != null && !homelist.getHomelist().isEmpty()) {
|
||||||
homeLists.put(country, homelist);
|
homeLists.put(country, homelist);
|
||||||
}
|
}
|
||||||
} catch (JsonSyntaxException e) {
|
} catch (JsonSyntaxException e) {
|
||||||
|
@ -323,7 +323,6 @@ public class ModbusDataThingHandler extends BaseThingHandler {
|
|||||||
int writeStartRelative = writeStart - pollStart;
|
int writeStartRelative = writeStart - pollStart;
|
||||||
data = new ModbusRegisterArray(allMutatedBytes[writeStartRelative * 2],
|
data = new ModbusRegisterArray(allMutatedBytes[writeStartRelative * 2],
|
||||||
allMutatedBytes[writeStartRelative * 2 + 1]);
|
allMutatedBytes[writeStartRelative * 2 + 1]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
data = ModbusBitUtilities.commandToRegisters(transformedCommand, writeValueType);
|
data = ModbusBitUtilities.commandToRegisters(transformedCommand, writeValueType);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,6 @@ public class ModbusGainOffsetProfile<Q extends Quantity<Q>> implements StateProf
|
|||||||
result = applyGainTowardsItem(offsetted, gain);
|
result = applyGainTowardsItem(offsetted, gain);
|
||||||
} else {
|
} else {
|
||||||
result = applyGainTowardsHandler(quantityState, gain).subtract(pregainOffsetQt);
|
result = applyGainTowardsHandler(quantityState, gain).subtract(pregainOffsetQt);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (UnconvertibleException | UnsupportedOperationException e) {
|
} catch (UnconvertibleException | UnsupportedOperationException e) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<br />Any other value than the above types will be interpreted as static text, in which case the actual content of the polled
|
<br />Any other value than the above types will be interpreted as static text, in which case the actual content of the polled
|
||||||
value is ignored.
|
value is ignored.
|
||||||
<br />Multiple transformations can be chained by listing each transformation on a separate line,
|
<br />Multiple transformations can be chained by listing each transformation on a separate line,
|
||||||
or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
|
or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
|
||||||
<default>default</default>
|
<default>default</default>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="readValueType" type="text">
|
<parameter name="readValueType" type="text">
|
||||||
@ -103,9 +103,9 @@
|
|||||||
<br /><br />Use "default" to communicate that no transformation is done and value should be passed as is.
|
<br /><br />Use "default" to communicate that no transformation is done and value should be passed as is.
|
||||||
<br />Use SERVICENAME(ARG) or SERVICENAME:ARG to use transformation service.
|
<br />Use SERVICENAME(ARG) or SERVICENAME:ARG to use transformation service.
|
||||||
<br />Any other value than the above types will be interpreted as static text, in which case the actual content of the command
|
<br />Any other value than the above types will be interpreted as static text, in which case the actual content of the command
|
||||||
value is ignored.
|
value is ignored.
|
||||||
<br />Multiple transformations can be chained by listing each transformation on a separate line,
|
<br />Multiple transformations can be chained by listing each transformation on a separate line,
|
||||||
or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
|
or by concatenating them with "∩", for example SERVICE1(ARG1)∩SERVICE2(ARG2)]]></description>
|
||||||
<default>default</default>
|
<default>default</default>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="writeValueType" type="text">
|
<parameter name="writeValueType" type="text">
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<parameter name="duvThreshold" type="decimal" required="true" min="0" max="1" step="0.001">
|
<parameter name="duvThreshold" type="decimal" required="true" min="0" max="1" step="0.001">
|
||||||
<label>Duv Threshold</label>
|
<label>Duv Threshold</label>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
Duv values at or below this value on a RGBWW color control will trigger white mode at the appropriate color temperature.
|
Duv values at or below this value on a RGBWW color control will trigger white mode at the appropriate color temperature.
|
||||||
1 will effectively disable this feature.
|
1 will effectively disable this feature.
|
||||||
See <a href="https://www.waveformlighting.com/tech/calculate-duv-from-cie-1931-xy-coordinates/">this link</a> for more information on how this is calculated.
|
See <a href="https://www.waveformlighting.com/tech/calculate-duv-from-cie-1931-xy-coordinates/">this link</a> for more information on how this is calculated.
|
||||||
]]>
|
]]>
|
||||||
|
@ -364,7 +364,6 @@ public class ChannelState implements MqttMessageSubscriber {
|
|||||||
// Only pass numeric value for QuantityType.
|
// Only pass numeric value for QuantityType.
|
||||||
if (mqttCommandValue instanceof QuantityType<?> qtCommandValue) {
|
if (mqttCommandValue instanceof QuantityType<?> qtCommandValue) {
|
||||||
cValue = new DecimalType(qtCommandValue.toBigDecimal());
|
cValue = new DecimalType(qtCommandValue.toBigDecimal());
|
||||||
|
|
||||||
}
|
}
|
||||||
String commandString = mqttFormatter.getMQTTpublishValue(cValue, "%s");
|
String commandString = mqttFormatter.getMQTTpublishValue(cValue, "%s");
|
||||||
Optional<String> transformedValue = outgoingTransformation.apply(commandString);
|
Optional<String> transformedValue = outgoingTransformation.apply(commandString);
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
<label>Publish Online Status</label>
|
<label>Publish Online Status</label>
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
Publish <tt>online</tt> to <tt>homeassistant/status</tt> when discovering Home Assistant
|
Publish <tt>online</tt> to <tt>homeassistant/status</tt> when discovering Home Assistant
|
||||||
things in order to trigger devices to publish up-to-date discovery information.
|
things in order to trigger devices to publish up-to-date discovery information.
|
||||||
If you also run Home Assistant <i>and</i> other services that depend on knowing if Home
|
If you also run Home Assistant <i>and</i> other services that depend on knowing if Home
|
||||||
Assistant is not running, then it's possible for those services to be out-of-sync with
|
Assistant is not running, then it's possible for those services to be out-of-sync with
|
||||||
the actual status of Home Assistant, and you may want to disable this.
|
the actual status of Home Assistant, and you may want to disable this.
|
||||||
]]></description>
|
]]></description>
|
||||||
</parameter>
|
</parameter>
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ public class GatewayPayloadParser {
|
|||||||
// below
|
// below
|
||||||
// The payload length (might depend on format version ) is validated by parser.parse call
|
// The payload length (might depend on format version ) is validated by parser.parse call
|
||||||
throw new IllegalArgumentException("Manufacturerer data is too short");
|
throw new IllegalArgumentException("Manufacturerer data is too short");
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((bytes[4] & 0xff) != 0xff) {
|
if ((bytes[4] & 0xff) != 0xff) {
|
||||||
logger.debug("Data is not representing manufacturer specific bluetooth advertisement: {}",
|
logger.debug("Data is not representing manufacturer specific bluetooth advertisement: {}",
|
||||||
|
@ -291,7 +291,7 @@ public class MyBMWTokenController {
|
|||||||
UrlEncoded.decodeTo(encodedUrl, tokenMap, StandardCharsets.US_ASCII);
|
UrlEncoded.decodeTo(encodedUrl, tokenMap, StandardCharsets.US_ASCII);
|
||||||
final StringBuilder codeFound = new StringBuilder();
|
final StringBuilder codeFound = new StringBuilder();
|
||||||
tokenMap.forEach((key, value) -> {
|
tokenMap.forEach((key, value) -> {
|
||||||
if (value.size() > 0) {
|
if (!value.isEmpty()) {
|
||||||
String val = value.get(0);
|
String val = value.get(0);
|
||||||
if (key.endsWith(CODE) && (val != null)) {
|
if (key.endsWith(CODE) && (val != null)) {
|
||||||
codeFound.append(val.toString());
|
codeFound.append(val.toString());
|
||||||
|
@ -51,7 +51,6 @@ public class Utils {
|
|||||||
int button = (address >> 21) & 0x07;
|
int button = (address >> 21) & 0x07;
|
||||||
|
|
||||||
return leftPadWithZeros(Integer.toHexString(nikobusAddress), 6) + ":" + mapButton(button);
|
return leftPadWithZeros(Integer.toHexString(nikobusAddress), 6) + ":" + mapButton(button);
|
||||||
|
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
return "[" + addressString + "]";
|
return "[" + addressString + "]";
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,6 @@ public class NapierCityCouncil implements WaterWebService {
|
|||||||
switch (region.toLowerCase()) {
|
switch (region.toLowerCase()) {
|
||||||
case "napier":
|
case "napier":
|
||||||
return HOSTNAME + REGION_NAPIER;
|
return HOSTNAME + REGION_NAPIER;
|
||||||
|
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,7 @@ class OpenSprinklerHttpApiV100 implements OpenSprinklerApi {
|
|||||||
ContentResponse response = null;
|
ContentResponse response = null;
|
||||||
int retriesLeft = Math.max(1, config.retry);
|
int retriesLeft = Math.max(1, config.retry);
|
||||||
boolean connectionSuccess = false;
|
boolean connectionSuccess = false;
|
||||||
while (connectionSuccess == false && retriesLeft > 0) {
|
while (!connectionSuccess && retriesLeft > 0) {
|
||||||
retriesLeft--;
|
retriesLeft--;
|
||||||
try {
|
try {
|
||||||
response = withGeneralProperties(httpClient.newRequest(location))
|
response = withGeneralProperties(httpClient.newRequest(location))
|
||||||
@ -393,7 +393,7 @@ class OpenSprinklerHttpApiV100 implements OpenSprinklerApi {
|
|||||||
e.getMessage());
|
e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (connectionSuccess == false) {
|
if (!connectionSuccess) {
|
||||||
throw new CommunicationApiException("Request to OpenSprinkler device failed");
|
throw new CommunicationApiException("Request to OpenSprinkler device failed");
|
||||||
}
|
}
|
||||||
if (response != null && response.getStatus() != HTTP_OK_CODE) {
|
if (response != null && response.getStatus() != HTTP_OK_CODE) {
|
||||||
|
@ -79,7 +79,6 @@ public class PHCHandler extends BaseThingHandler {
|
|||||||
times[1] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_2)).shortValue() * 10);
|
times[1] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_2)).shortValue() * 10);
|
||||||
times[2] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_3)).shortValue() * 10);
|
times[2] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_3)).shortValue() * 10);
|
||||||
times[3] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_4)).shortValue() * 10);
|
times[3] = (short) (((BigDecimal) getConfig().get(UP_DOWN_TIME_4)).shortValue() * 10);
|
||||||
|
|
||||||
} else if (getThing().getThingTypeUID().equals(THING_TYPE_DIM)) {
|
} else if (getThing().getThingTypeUID().equals(THING_TYPE_DIM)) {
|
||||||
times[0] = (((BigDecimal) getConfig().get(DIM_TIME_1)).shortValue());
|
times[0] = (((BigDecimal) getConfig().get(DIM_TIME_1)).shortValue());
|
||||||
times[1] = (((BigDecimal) getConfig().get(DIM_TIME_2)).shortValue());
|
times[1] = (((BigDecimal) getConfig().get(DIM_TIME_2)).shortValue());
|
||||||
|
@ -137,7 +137,6 @@ public class PilightConnector implements Runnable, Closeable {
|
|||||||
connect();
|
connect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.debug("Interrupting thread.");
|
logger.debug("Interrupting thread.");
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
|
@ -59,7 +59,6 @@ public class SerialAvrConnection extends StreamAvrConnection {
|
|||||||
.collect(Collectors.joining(", "));
|
.collect(Collectors.joining(", "));
|
||||||
throw new IOException(
|
throw new IOException(
|
||||||
"Serial port with name " + portName + " does not exist. Available port names: " + availablePorts);
|
"Serial port with name " + portName + " does not exist. Available port names: " + availablePorts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -123,7 +123,6 @@ public class QbusBridgeHandler extends BaseBridgeHandler {
|
|||||||
bridgePending("Waiting for Qbus client to come online");
|
bridgePending("Waiting for Qbus client to come online");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,6 @@ public final class QbusCommunication extends BaseThingHandler {
|
|||||||
try {
|
try {
|
||||||
while (!Thread.currentThread().isInterrupted() && ((qMessage = reader.readLine()) != null)) {
|
while (!Thread.currentThread().isInterrupted() && ((qMessage = reader.readLine()) != null)) {
|
||||||
readMessage(qMessage);
|
readMessage(qMessage);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (!listenerStopped) {
|
if (!listenerStopped) {
|
||||||
@ -301,7 +300,6 @@ public final class QbusCommunication extends BaseThingHandler {
|
|||||||
}
|
}
|
||||||
if ((writer == null) || (writer.checkError())) {
|
if ((writer == null) || (writer.checkError())) {
|
||||||
logger.warn("Error resending message");
|
logger.warn("Error resending message");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,7 +549,6 @@ public final class QbusCommunication extends BaseThingHandler {
|
|||||||
throw new IOException("Cannot read from socket, reader not connected.");
|
throw new IOException("Cannot read from socket, reader not connected.");
|
||||||
}
|
}
|
||||||
readMessage(reader.readLine());
|
readMessage(reader.readLine());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
QbusBridgeHandler handler = bridgeCallBack;
|
QbusBridgeHandler handler = bridgeCallBack;
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
@ -584,7 +581,6 @@ public final class QbusCommunication extends BaseThingHandler {
|
|||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
handler.bridgeOnline();
|
handler.bridgeOnline();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
handler.bridgeOffline(ThingStatusDetail.CONFIGURATION_ERROR, "No serial nr defined");
|
handler.bridgeOffline(ThingStatusDetail.CONFIGURATION_ERROR, "No serial nr defined");
|
||||||
|
@ -29,7 +29,7 @@ import org.openhab.core.types.Type;
|
|||||||
* RFXCOM data class for energy message.
|
* RFXCOM data class for energy message.
|
||||||
*
|
*
|
||||||
* @author Unknown - Initial contribution
|
* @author Unknown - Initial contribution
|
||||||
* @author Pauli Anttila
|
* @author Pauli Anttila - Migrated to OH2
|
||||||
*/
|
*/
|
||||||
public class RFXComEnergyMessage extends RFXComBatteryDeviceMessage<RFXComEnergyMessage.SubType> {
|
public class RFXComEnergyMessage extends RFXComBatteryDeviceMessage<RFXComEnergyMessage.SubType> {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import org.openhab.core.types.Type;
|
|||||||
* RFXCOM data class for control message.
|
* RFXCOM data class for control message.
|
||||||
*
|
*
|
||||||
* @author Pauli Anttila - Initial contribution
|
* @author Pauli Anttila - Initial contribution
|
||||||
* @author Mike Jagdis
|
* @author Mike Jagdis - Improvements
|
||||||
*/
|
*/
|
||||||
public class RFXComInterfaceControlMessage extends RFXComBaseMessage {
|
public class RFXComInterfaceControlMessage extends RFXComBaseMessage {
|
||||||
private byte[] data = new byte[14];
|
private byte[] data = new byte[14];
|
||||||
|
@ -33,7 +33,7 @@ import org.openhab.core.types.UnDefType;
|
|||||||
* RFXCOM data class for lighting1 message. See X10, ARC, etc..
|
* RFXCOM data class for lighting1 message. See X10, ARC, etc..
|
||||||
*
|
*
|
||||||
* @author Evert van Es, Cycling Engineer - Initial contribution
|
* @author Evert van Es, Cycling Engineer - Initial contribution
|
||||||
* @author Pauli Anttila
|
* @author Pauli Anttila - Migrated to OH2
|
||||||
*/
|
*/
|
||||||
public class RFXComLighting1Message extends RFXComDeviceMessageImpl<RFXComLighting1Message.SubType> {
|
public class RFXComLighting1Message extends RFXComDeviceMessageImpl<RFXComLighting1Message.SubType> {
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ import org.openhab.core.types.UnDefType;
|
|||||||
* RFXCOM data class for lighting5 message.
|
* RFXCOM data class for lighting5 message.
|
||||||
*
|
*
|
||||||
* @author Paul Hampson, Neil Renaud - Initial contribution
|
* @author Paul Hampson, Neil Renaud - Initial contribution
|
||||||
* @author Pauli Anttila
|
* @author Pauli Anttila - Migrated to OH2
|
||||||
* @author Martin van Wingerden - added support for IT and some other subtypes
|
* @author Martin van Wingerden - added support for IT and some other subtypes
|
||||||
*/
|
*/
|
||||||
public class RFXComLighting5Message extends RFXComDeviceMessageImpl<RFXComLighting5Message.SubType> {
|
public class RFXComLighting5Message extends RFXComDeviceMessageImpl<RFXComLighting5Message.SubType> {
|
||||||
|
@ -37,7 +37,7 @@ import org.openhab.core.util.HexUtils;
|
|||||||
/**
|
/**
|
||||||
* RFXCOM data class for raw messages.
|
* RFXCOM data class for raw messages.
|
||||||
*
|
*
|
||||||
* @author James Hewitt-Thomas - New addition to the PRO RFXCom firmware
|
* @author James Hewitt-Thomas - Initial contribution, new addition to the PRO RFXCom firmware
|
||||||
*/
|
*/
|
||||||
public class RFXComRawMessage extends RFXComDeviceMessageImpl<RFXComRawMessage.SubType> {
|
public class RFXComRawMessage extends RFXComDeviceMessageImpl<RFXComRawMessage.SubType> {
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ import org.openhab.core.types.Type;
|
|||||||
* (i.e. X10 Security, Visonic PowerCode, Meiantech, etc.)
|
* (i.e. X10 Security, Visonic PowerCode, Meiantech, etc.)
|
||||||
*
|
*
|
||||||
* @author David Kalff - Initial contribution
|
* @author David Kalff - Initial contribution
|
||||||
* @author Pauli Anttila
|
* @author Pauli Anttila - Improvements
|
||||||
*/
|
*/
|
||||||
public class RFXComSecurity1Message extends RFXComBatteryDeviceMessage<RFXComSecurity1Message.SubType> {
|
public class RFXComSecurity1Message extends RFXComBatteryDeviceMessage<RFXComSecurity1Message.SubType> {
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import org.openhab.core.types.UnDefType;
|
|||||||
/**
|
/**
|
||||||
* RFXCOM data class for UV and temperature message.
|
* RFXCOM data class for UV and temperature message.
|
||||||
*
|
*
|
||||||
* @author Damien Servant - OpenHAB1 version
|
* @author Damien Servant - Initial contribution, OpenHAB1 version
|
||||||
* @author Mike Jagdis - Initial contribution, OpenHAB2 version
|
* @author Mike Jagdis - Initial contribution, OpenHAB2 version
|
||||||
*/
|
*/
|
||||||
public class RFXComUVMessage extends RFXComBatteryDeviceMessage<RFXComUVMessage.SubType> {
|
public class RFXComUVMessage extends RFXComBatteryDeviceMessage<RFXComUVMessage.SubType> {
|
||||||
|
@ -30,7 +30,7 @@ import org.openhab.core.util.HexUtils;
|
|||||||
/**
|
/**
|
||||||
* Test for RFXCom-binding
|
* Test for RFXCom-binding
|
||||||
*
|
*
|
||||||
* @author James Hewitt-Thomas - New addition to the PRO RFXCom firmware
|
* @author James Hewitt-Thomas - Initial contribution, new addition to the PRO RFXCom firmware
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class RFXComRawMessageTest {
|
public class RFXComRawMessageTest {
|
||||||
|
@ -173,7 +173,6 @@ public abstract class SerialThingHandler extends BaseThingHandler implements Ser
|
|||||||
availablePorts);
|
availablePorts);
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, description);
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, description);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize serial port
|
// initialize serial port
|
||||||
@ -322,7 +321,6 @@ public abstract class SerialThingHandler extends BaseThingHandler implements Ser
|
|||||||
Thread.sleep(sleep);
|
Thread.sleep(sleep);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (InterruptedIOException e) {
|
} catch (InterruptedIOException e) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<thing:thing-descriptions bindingId="salus"
|
<thing:thing-descriptions bindingId="salus"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
|
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0
|
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||||
org.eclipse.smarthome.thing-description.xsd">
|
|
||||||
|
|
||||||
<bridge-type id="salus-aws-bridge">
|
<bridge-type id="salus-aws-bridge">
|
||||||
<label>AWS Salus Cloud</label>
|
<label>AWS Salus Cloud</label>
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<thing:thing-descriptions bindingId="salus"
|
<thing:thing-descriptions bindingId="salus"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
|
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0
|
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||||
org.eclipse.smarthome.thing-description.xsd">
|
|
||||||
|
|
||||||
<bridge-type id="salus-cloud-bridge">
|
<bridge-type id="salus-cloud-bridge">
|
||||||
<label>Salus Cloud</label>
|
<label>Salus Cloud</label>
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
<state readOnly="true"/>
|
<state readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
<channel-type id="generic-input-number-channel">
|
<channel-type id="generic-input-number-channel">
|
||||||
<item-type>Number:Dimensionsless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Generic Number Input</label>
|
<label>Generic Number Input</label>
|
||||||
<description>
|
<description>
|
||||||
This channel type represents a generic input.
|
This channel type represents a generic input.
|
||||||
|
@ -86,7 +86,7 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
|
|||||||
private static final String HTTP_ENDPOINT_V2 = "/api/v2/";
|
private static final String HTTP_ENDPOINT_V2 = "/api/v2/";
|
||||||
|
|
||||||
// common Samsung TV remote control ports
|
// common Samsung TV remote control ports
|
||||||
private final static List<Integer> PORTS = List.of(55000, 1515, 7001, 15500);
|
private static final List<Integer> PORTS = List.of(55000, 1515, 7001, 15500);
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(SamsungTvHandler.class);
|
private final Logger logger = LoggerFactory.getLogger(SamsungTvHandler.class);
|
||||||
|
|
||||||
@ -120,13 +120,13 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
|
|||||||
@NonNullByDefault({})
|
@NonNullByDefault({})
|
||||||
public class TVProperties {
|
public class TVProperties {
|
||||||
class Device {
|
class Device {
|
||||||
boolean FrameTVSupport;
|
boolean frameTVSupport;
|
||||||
boolean GamePadSupport;
|
boolean gamePadSupport;
|
||||||
boolean ImeSyncedSupport;
|
boolean imeSyncedSupport;
|
||||||
String OS;
|
String oS;
|
||||||
String PowerState;
|
String powerState;
|
||||||
boolean TokenAuthSupport;
|
boolean tokenAuthSupport;
|
||||||
boolean VoiceSupport;
|
boolean voiceSupport;
|
||||||
String countryCode;
|
String countryCode;
|
||||||
String description;
|
String description;
|
||||||
String firmwareVersion;
|
String firmwareVersion;
|
||||||
@ -143,22 +143,22 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
|
|||||||
String isSupport;
|
String isSupport;
|
||||||
|
|
||||||
public boolean getFrameTVSupport() {
|
public boolean getFrameTVSupport() {
|
||||||
return Optional.ofNullable(device).map(a -> a.FrameTVSupport).orElse(false);
|
return Optional.ofNullable(device).map(a -> a.frameTVSupport).orElse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getTokenAuthSupport() {
|
public boolean getTokenAuthSupport() {
|
||||||
return Optional.ofNullable(device).map(a -> a.TokenAuthSupport).orElse(false);
|
return Optional.ofNullable(device).map(a -> a.tokenAuthSupport).orElse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPowerState() {
|
public String getPowerState() {
|
||||||
if (!getOS().isBlank()) {
|
if (!getOS().isBlank()) {
|
||||||
return Optional.ofNullable(device).map(a -> a.PowerState).orElse("on");
|
return Optional.ofNullable(device).map(a -> a.powerState).orElse("on");
|
||||||
}
|
}
|
||||||
return "off";
|
return "off";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOS() {
|
public String getOS() {
|
||||||
return Optional.ofNullable(device).map(a -> a.OS).orElse("");
|
return Optional.ofNullable(device).map(a -> a.oS).orElse("");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getWifiMac() {
|
public String getWifiMac() {
|
||||||
@ -347,10 +347,10 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
|
|||||||
public String fetchPowerState() {
|
public String fetchPowerState() {
|
||||||
logger.trace("{}: fetching TV Power State", host);
|
logger.trace("{}: fetching TV Power State", host);
|
||||||
TVProperties properties = fetchTVProperties(0, 2);
|
TVProperties properties = fetchTVProperties(0, 2);
|
||||||
String PowerState = properties.getPowerState();
|
String powerState = properties.getPowerState();
|
||||||
setPowerState("on".equals(PowerState));
|
setPowerState("on".equals(powerState));
|
||||||
logger.debug("{}: PowerState is: {}", host, PowerState);
|
logger.debug("{}: PowerState is: {}", host, powerState);
|
||||||
return PowerState;
|
return powerState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean handleCommand(String channel, Command command, int ms) {
|
public boolean handleCommand(String channel, Command command, int ms) {
|
||||||
@ -638,7 +638,6 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
|
|||||||
* @return true if service restated or created, false otherwise
|
* @return true if service restated or created, false otherwise
|
||||||
*/
|
*/
|
||||||
private synchronized boolean createService(String type, String udn) {
|
private synchronized boolean createService(String type, String udn) {
|
||||||
|
|
||||||
Optional<SamsungTvService> service = findServiceInstance(type);
|
Optional<SamsungTvService> service = findServiceInstance(type);
|
||||||
|
|
||||||
if (service.isPresent()) {
|
if (service.isPresent()) {
|
||||||
|
@ -32,7 +32,6 @@ public class SensiboModelTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCaseInsensitiveMacAddress() throws IOException {
|
public void testCaseInsensitiveMacAddress() throws IOException {
|
||||||
|
|
||||||
final PodDetailsDTO rsp = wireHelper.deSerializeResponse("/get_pod_details_response.json", PodDetailsDTO.class);
|
final PodDetailsDTO rsp = wireHelper.deSerializeResponse("/get_pod_details_response.json", PodDetailsDTO.class);
|
||||||
SensiboSky sky = new SensiboSky(rsp);
|
SensiboSky sky = new SensiboSky(rsp);
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ public class HTTPHandler {
|
|||||||
}
|
}
|
||||||
callback.onError(Objects.requireNonNullElse(failure, "Unknown error"));
|
callback.onError(Objects.requireNonNullElse(failure, "Unknown error"));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
callback.onResponse(Objects.requireNonNull(getContentAsString()));
|
callback.onResponse(Objects.requireNonNull(getContentAsString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,7 @@ public class TimeOfDayTypeConverter extends AbstractTypeConverter {
|
|||||||
if ("----".equals(value.getAsString())) {
|
if ("----".equals(value.getAsString())) {
|
||||||
return new DateTimeType(ZonedDateTime.now(this.timeZoneProvider.getTimeZone()));
|
return new DateTimeType(ZonedDateTime.now(this.timeZoneProvider.getTimeZone()));
|
||||||
} else {
|
} else {
|
||||||
|
if ("h:m".equals(unit)) {
|
||||||
if (unit.equals("h:m")) {
|
|
||||||
String st = value.getAsString();
|
String st = value.getAsString();
|
||||||
String[] parts = st.split(":");
|
String[] parts = st.split(":");
|
||||||
int h = Integer.parseInt(parts[0]);
|
int h = Integer.parseInt(parts[0]);
|
||||||
@ -83,7 +82,7 @@ public class TimeOfDayTypeConverter extends AbstractTypeConverter {
|
|||||||
Unit<Time> targetUnit = Units.MINUTE;
|
Unit<Time> targetUnit = Units.MINUTE;
|
||||||
return new QuantityType<>(h * 60 + m, targetUnit);
|
return new QuantityType<>(h * 60 + m, targetUnit);
|
||||||
|
|
||||||
} else if (unit.equals("m:s")) {
|
} else if ("m:s".equals(unit)) {
|
||||||
String st = value.getAsString();
|
String st = value.getAsString();
|
||||||
String[] parts = st.split(":");
|
String[] parts = st.split(":");
|
||||||
int m = Integer.parseInt(parts[0]);
|
int m = Integer.parseInt(parts[0]);
|
||||||
@ -92,7 +91,7 @@ public class TimeOfDayTypeConverter extends AbstractTypeConverter {
|
|||||||
Unit<Time> targetUnit = Units.SECOND;
|
Unit<Time> targetUnit = Units.SECOND;
|
||||||
return new QuantityType<>(m * 60 + s, targetUnit);
|
return new QuantityType<>(m * 60 + s, targetUnit);
|
||||||
|
|
||||||
} else if (unit.equals("h")) {
|
} else if ("h".equals(unit)) {
|
||||||
int val = Integer.parseInt(value.getAsString());
|
int val = Integer.parseInt(value.getAsString());
|
||||||
|
|
||||||
Unit<Time> targetUnit = Units.HOUR;
|
Unit<Time> targetUnit = Units.HOUR;
|
||||||
|
@ -129,7 +129,6 @@ public class SiemensHvacBridgeThingHandler extends BaseBridgeHandler {
|
|||||||
return df.format(dt);
|
return df.format(dt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
}
|
}
|
||||||
return "unknown";
|
return "unknown";
|
||||||
|
@ -253,7 +253,6 @@ public class SiemensHvacHandlerImpl extends BaseThingHandler {
|
|||||||
} catch (ConverterException ex) {
|
} catch (ConverterException ex) {
|
||||||
logger.warn("{}, for uid: {}, please check the item type", ex.getMessage(), uid);
|
logger.warn("{}, for uid: {}, please check the item type", ex.getMessage(), uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,7 +335,6 @@ public class SiemensHvacHandlerImpl extends BaseThingHandler {
|
|||||||
|
|
||||||
logger.trace("Write request response: {} ", response);
|
logger.trace("Write request response: {} ", response);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.debug("Failed to get converted state from datapoint '{}'", dp);
|
logger.debug("Failed to get converted state from datapoint '{}'", dp);
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,6 @@ public class SiemensHvacMetadataDataPoint extends SiemensHvacMetadata {
|
|||||||
detailsResolved = true;
|
detailsResolved = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (desc != null) {
|
if (desc != null) {
|
||||||
|
@ -431,9 +431,7 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
for (SiemensHvacMetadata child : childs) {
|
for (SiemensHvacMetadata child : childs) {
|
||||||
generateThingsType(child, groupTypes, menu);
|
generateThingsType(child, groupTypes, menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tt = createThingType(device, groupTypes);
|
tt = createThingType(device, groupTypes);
|
||||||
@ -511,7 +509,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
groupTypes.add(groupType);
|
groupTypes.add(groupType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -819,7 +816,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
}
|
}
|
||||||
|
|
||||||
idx++;
|
idx++;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -839,10 +835,7 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
lcHvacConnector.resetSessionId(null, false);
|
lcHvacConnector.resetSessionId(null, false);
|
||||||
lcHvacConnector.resetSessionId(null, true);
|
lcHvacConnector.resetSessionId(null, true);
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
} catch (
|
|
||||||
|
|
||||||
Exception e) {
|
|
||||||
logger.error("siemensHvac:ResolveDpt:Error during dp reading: {}", e.getLocalizedMessage());
|
logger.error("siemensHvac:ResolveDpt:Error during dp reading: {}", e.getLocalizedMessage());
|
||||||
// Reset sessionId so we redone _auth on error
|
// Reset sessionId so we redone _auth on error
|
||||||
}
|
}
|
||||||
@ -933,7 +926,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
|
|
||||||
lcDevices.add(deviceObj);
|
lcDevices.add(deviceObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("siemensHvac:ResolveDpt:Error during dp reading: {}", e.getLocalizedMessage());
|
logger.error("siemensHvac:ResolveDpt:Error during dp reading: {}", e.getLocalizedMessage());
|
||||||
// Reset sessionId so we redone _auth on error
|
// Reset sessionId so we redone _auth on error
|
||||||
@ -1161,14 +1153,12 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
child.setDptId(dptId);
|
child.setDptId(dptId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1213,7 +1203,6 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
}
|
}
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
logger.warn("Couldn't read Siemens MetaData information from file '{}'.", file.getAbsolutePath());
|
logger.warn("Couldn't read Siemens MetaData information from file '{}'.", file.getAbsolutePath());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1238,10 +1227,8 @@ public class SiemensHvacMetadataRegistryImpl implements SiemensHvacMetadataRegis
|
|||||||
os.flush();
|
os.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
logger.warn("Couldn't write Siemens MetaData information to file '{}'.", file.getAbsolutePath());
|
logger.warn("Couldn't write Siemens MetaData information to file '{}'.", file.getAbsolutePath());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +374,6 @@ public class SiemensHvacConnectorImpl implements SiemensHvacConnector {
|
|||||||
"Session request auth was unsuccessful in _doAuth(), please verify login parameters");
|
"Session request auth was unsuccessful in _doAuth(), please verify login parameters");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -469,7 +468,6 @@ public class SiemensHvacConnectorImpl implements SiemensHvacConnector {
|
|||||||
return resultObj;
|
return resultObj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -541,7 +539,6 @@ public class SiemensHvacConnectorImpl implements SiemensHvacConnector {
|
|||||||
} catch (SiemensHvacException ex) {
|
} catch (SiemensHvacException ex) {
|
||||||
logger.debug("error unregistring handler: {}", handler);
|
logger.debug("error unregistring handler: {}", handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,6 @@ public class SiemensHvacRequestListener extends BufferingResponseListener
|
|||||||
mayRetry);
|
mayRetry);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.debug("error(5): invalid response from gateway, missing Result entry");
|
logger.debug("error(5): invalid response from gateway, missing Result entry");
|
||||||
hvacConnector.onError(result.getRequest(), requestHandler, ErrorSource.ErrorBridge, mayRetry);
|
hvacConnector.onError(result.getRequest(), requestHandler, ErrorSource.ErrorBridge, mayRetry);
|
||||||
|
@ -132,7 +132,6 @@ public class SolarMaxHandler extends BaseThingHandler {
|
|||||||
State state = solarMaxData.getDataDateTime();
|
State state = solarMaxData.getDataDateTime();
|
||||||
logger.debug("Update channel state: {} - {}", channelId, state);
|
logger.debug("Update channel state: {} - {}", channelId, state);
|
||||||
updateState(channel.getUID(), state);
|
updateState(channel.getUID(), state);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// must be somthing to collect from the device, so...
|
// must be somthing to collect from the device, so...
|
||||||
if (solarMaxData.has(SolarMaxCommandKey.valueOf(channelId))) {
|
if (solarMaxData.has(SolarMaxCommandKey.valueOf(channelId))) {
|
||||||
|
@ -45,14 +45,14 @@
|
|||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="co2_concentration">
|
<channel-type id="co2_concentration">
|
||||||
<item-type>Number:DimensionLess</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>CO2 concentration</label>
|
<label>CO2 concentration</label>
|
||||||
<description>A CO2 sensor carbon dioxide concentration in ppm</description>
|
<description>A CO2 sensor carbon dioxide concentration in ppm</description>
|
||||||
<state readOnly="true" pattern="%d %unit%"/>
|
<state readOnly="true" pattern="%d %unit%"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="noise">
|
<channel-type id="noise">
|
||||||
<item-type>Number:DimensionLess</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Noise</label>
|
<label>Noise</label>
|
||||||
<description>A noise sensor noise in decibel</description>
|
<description>A noise sensor noise in decibel</description>
|
||||||
<state readOnly="true" pattern="%d %unit%"/>
|
<state readOnly="true" pattern="%d %unit%"/>
|
||||||
|
@ -73,7 +73,6 @@ public class SonyProjectorDiscoveryParticipant implements SddpDiscoveryParticipa
|
|||||||
if (device.manufacturer.toUpperCase(Locale.ENGLISH).contains(SONY)
|
if (device.manufacturer.toUpperCase(Locale.ENGLISH).contains(SONY)
|
||||||
&& device.type.toUpperCase(Locale.ENGLISH).contains(TYPE_PROJECTOR) && !device.macAddress.isBlank()
|
&& device.type.toUpperCase(Locale.ENGLISH).contains(TYPE_PROJECTOR) && !device.macAddress.isBlank()
|
||||||
&& !device.ipAddress.isBlank()) {
|
&& !device.ipAddress.isBlank()) {
|
||||||
|
|
||||||
logger.debug("Sony projector with mac {} found at {}", device.macAddress, device.ipAddress);
|
logger.debug("Sony projector with mac {} found at {}", device.macAddress, device.ipAddress);
|
||||||
return new ThingUID(THING_TYPE_ETHERNET, device.macAddress);
|
return new ThingUID(THING_TYPE_ETHERNET, device.macAddress);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ public class SynopLand extends Synop {
|
|||||||
}
|
}
|
||||||
} catch (NumberFormatException ignore) {
|
} catch (NumberFormatException ignore) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@ public enum WindDirections {
|
|||||||
* Returns the wind direction based on degree.
|
* Returns the wind direction based on degree.
|
||||||
*/
|
*/
|
||||||
public static WindDirections getWindDirection(int degree) {
|
public static WindDirections getWindDirection(int degree) {
|
||||||
|
|
||||||
double b = Math.floor((degree + (STEP / 2.0)) / STEP);
|
double b = Math.floor((degree + (STEP / 2.0)) / STEP);
|
||||||
return values()[(int) (b % values().length)];
|
return values()[(int) (b % values().length)];
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,6 @@ public class TACmiCoEBridgeHandler extends BaseBridgeHandler {
|
|||||||
}
|
}
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
||||||
"Error processing data: " + e.getMessage());
|
"Error processing data: " + e.getMessage());
|
||||||
|
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
// we catch runtime exceptions here to prevent the receiving thread to stop accidentally if
|
// we catch runtime exceptions here to prevent the receiving thread to stop accidentally if
|
||||||
// something like an IllegalStateException or NumberFormatExceptions are thrown. This indicates a
|
// something like an IllegalStateException or NumberFormatExceptions are thrown. This indicates a
|
||||||
|
@ -19,7 +19,7 @@ import org.openhab.binding.tacmi.internal.TACmiMeasureType;
|
|||||||
* This class handles analog values as used in the analog message.
|
* This class handles analog values as used in the analog message.
|
||||||
*
|
*
|
||||||
* @author Timo Wendt - Initial contribution
|
* @author Timo Wendt - Initial contribution
|
||||||
* @author Wolfgang Klimt
|
* @author Wolfgang Klimt - Improvements
|
||||||
* @author Christian Niessner - Ported to OpenHAB2
|
* @author Christian Niessner - Ported to OpenHAB2
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
|
@ -61,7 +61,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
|
public void deleteZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling deleteZoneOverlay");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling deleteZoneOverlay");
|
||||||
@ -103,7 +102,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public HomeState homeState(Long homeId) throws IOException, ApiException {
|
public HomeState homeState(Long homeId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling homeState");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling homeState");
|
||||||
@ -142,7 +140,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<MobileDevice> listMobileDevices(Long homeId) throws IOException, ApiException {
|
public List<MobileDevice> listMobileDevices(Long homeId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling listMobileDevices");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling listMobileDevices");
|
||||||
@ -181,7 +178,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Zone> listZones(Long homeId) throws IOException, ApiException {
|
public List<Zone> listZones(Long homeId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling listZones");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling listZones");
|
||||||
@ -220,7 +216,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public HomeInfo showHome(Long homeId) throws IOException, ApiException {
|
public HomeInfo showHome(Long homeId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showHome");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showHome");
|
||||||
@ -259,7 +254,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public User showUser() throws IOException, ApiException {
|
public User showUser() throws IOException, ApiException {
|
||||||
|
|
||||||
startHttpClient(CLIENT);
|
startHttpClient(CLIENT);
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -293,7 +287,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GenericZoneCapabilities showZoneCapabilities(Long homeId, Long zoneId) throws IOException, ApiException {
|
public GenericZoneCapabilities showZoneCapabilities(Long homeId, Long zoneId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneCapabilities");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneCapabilities");
|
||||||
@ -339,7 +332,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public OverlayTemplate showZoneDefaultOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
|
public OverlayTemplate showZoneDefaultOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDefaultOverlay");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDefaultOverlay");
|
||||||
@ -385,7 +377,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Zone showZoneDetails(Long homeId, Long zoneId) throws IOException, ApiException {
|
public Zone showZoneDetails(Long homeId, Long zoneId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDetails");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDetails");
|
||||||
@ -431,7 +422,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Overlay showZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
|
public Overlay showZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneOverlay");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneOverlay");
|
||||||
@ -477,7 +467,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ZoneState showZoneState(Long homeId, Long zoneId) throws IOException, ApiException {
|
public ZoneState showZoneState(Long homeId, Long zoneId) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneState");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneState");
|
||||||
@ -522,7 +511,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updatePresenceLock(Long homeId, HomePresence json) throws IOException, ApiException {
|
public void updatePresenceLock(Long homeId, HomePresence json) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling updatePresenceLock");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling updatePresenceLock");
|
||||||
@ -565,7 +553,6 @@ public class HomeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Overlay updateZoneOverlay(Long homeId, Long zoneId, Overlay json) throws IOException, ApiException {
|
public Overlay updateZoneOverlay(Long homeId, Long zoneId, Overlay json) throws IOException, ApiException {
|
||||||
|
|
||||||
// verify the required parameter 'homeId' is set
|
// verify the required parameter 'homeId' is set
|
||||||
if (homeId == null) {
|
if (homeId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'homeId' when calling updateZoneOverlay");
|
throw new ApiException(400, "Missing the required parameter 'homeId' when calling updateZoneOverlay");
|
||||||
|
@ -105,7 +105,7 @@ Channel availability depends on the electricity connection (single or three-phas
|
|||||||
| bbrhpjw | `Number:Energy` | Total consumed energy at high rate pricing on white days | All | Tempo |
|
| bbrhpjw | `Number:Energy` | Total consumed energy at high rate pricing on white days | All | Tempo |
|
||||||
| bbrhcjr | `Number:Energy` | Total consumed energy at low rate pricing on red days | All | Tempo |
|
| bbrhcjr | `Number:Energy` | Total consumed energy at low rate pricing on red days | All | Tempo |
|
||||||
| bbrhpjr | `Number:Energy` | Total consumed energy at high rate pricing on red days | All | Tempo |
|
| bbrhpjr | `Number:Energy` | Total consumed energy at high rate pricing on red days | All | Tempo |
|
||||||
| pejp | `Number:Duration` | Prior notice to EJP start | All | EJP |
|
| pejp | `Number:Time` | Prior notice to EJP start | All | EJP |
|
||||||
| demain | `String` | Following day color | All | Tempo |
|
| demain | `String` | Following day color | All | Tempo |
|
||||||
|
|
||||||
### Standard TIC mode
|
### Standard TIC mode
|
||||||
|
@ -93,7 +93,6 @@ public class VeluxBinding extends VeluxBridgeConfiguration {
|
|||||||
this.isBulkRetrievalEnabled = uncheckedConfiguration.isBulkRetrievalEnabled;
|
this.isBulkRetrievalEnabled = uncheckedConfiguration.isBulkRetrievalEnabled;
|
||||||
this.isSequentialEnforced = uncheckedConfiguration.isSequentialEnforced;
|
this.isSequentialEnforced = uncheckedConfiguration.isSequentialEnforced;
|
||||||
this.isProtocolTraceEnabled = uncheckedConfiguration.isProtocolTraceEnabled;
|
this.isProtocolTraceEnabled = uncheckedConfiguration.isProtocolTraceEnabled;
|
||||||
|
|
||||||
}
|
}
|
||||||
logger.trace("VeluxBinding(constructor) done.");
|
logger.trace("VeluxBinding(constructor) done.");
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ public class VigiCruesHandler extends BaseThingHandler {
|
|||||||
try {
|
try {
|
||||||
HubEauResponse stationDetails = apiHandler.discoverStations(config.id);
|
HubEauResponse stationDetails = apiHandler.discoverStations(config.id);
|
||||||
List<StationData> stations = stationDetails.stations;
|
List<StationData> stations = stationDetails.stations;
|
||||||
if (stations != null && stations.size() > 0) {
|
if (stations != null && !stations.isEmpty()) {
|
||||||
stationDetails.stations.stream().findFirst().ifPresent(station -> {
|
stationDetails.stations.stream().findFirst().ifPresent(station -> {
|
||||||
PointType stationLocation = new PointType(
|
PointType stationLocation = new PointType(
|
||||||
String.format(Locale.US, "%f,%f", station.latitudeStation, station.longitudeStation));
|
String.format(Locale.US, "%f,%f", station.latitudeStation, station.longitudeStation));
|
||||||
|
@ -67,7 +67,7 @@ public class DescriptionLoader {
|
|||||||
}
|
}
|
||||||
var body = response.getContentAsString();
|
var body = response.getContentAsString();
|
||||||
var description = gson.fromJson(body, WebThingDescription.class);
|
var description = gson.fromJson(body, WebThingDescription.class);
|
||||||
if ((description != null) && (description.properties != null) && (description.properties.size() > 0)) {
|
if ((description != null) && (description.properties != null) && !description.properties.isEmpty()) {
|
||||||
if ((description.contextKeyword == null) || description.contextKeyword.trim().length() == 0) {
|
if ((description.contextKeyword == null) || description.contextKeyword.trim().length() == 0) {
|
||||||
description.contextKeyword = "https://webthings.io/schemas";
|
description.contextKeyword = "https://webthings.io/schemas";
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory;
|
|||||||
* Abstract WiFi LED driver.
|
* Abstract WiFi LED driver.
|
||||||
*
|
*
|
||||||
* @author Osman Basha - Initial contribution
|
* @author Osman Basha - Initial contribution
|
||||||
* @author Stefan Endrullis
|
* @author Stefan Endrullis - Improvements
|
||||||
* @author Ries van Twisk
|
* @author Ries van Twisk - Improvements
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractWiFiLEDDriver {
|
public abstract class AbstractWiFiLEDDriver {
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import org.openhab.core.library.types.StringType;
|
|||||||
* It's used for sending color or program settings and also extracting the data out of the received telegrams.
|
* It's used for sending color or program settings and also extracting the data out of the received telegrams.
|
||||||
*
|
*
|
||||||
* @author Osman Basha - Initial contribution
|
* @author Osman Basha - Initial contribution
|
||||||
* @author Stefan Endrullis
|
* @author Stefan Endrullis - Improvements
|
||||||
* @author Ries van Twisk - Prevent flashes during classic driver color + white updates
|
* @author Ries van Twisk - Prevent flashes during classic driver color + white updates
|
||||||
*/
|
*/
|
||||||
public class ClassicWiFiLEDDriver extends AbstractWiFiLEDDriver {
|
public class ClassicWiFiLEDDriver extends AbstractWiFiLEDDriver {
|
||||||
|
@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* It utilizes color fading when changing colors or turning the light on of off.
|
* It utilizes color fading when changing colors or turning the light on of off.
|
||||||
*
|
*
|
||||||
* @author Stefan Endrullis - Initial contribution
|
* @author Stefan Endrullis - Initial contribution
|
||||||
* @author Ries van Twisk
|
* @author Ries van Twisk - Improvements
|
||||||
*/
|
*/
|
||||||
public class FadingWiFiLEDDriver extends AbstractWiFiLEDDriver {
|
public class FadingWiFiLEDDriver extends AbstractWiFiLEDDriver {
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* sent to one of the channels.
|
* sent to one of the channels.
|
||||||
*
|
*
|
||||||
* @author Osman Basha - Initial contribution
|
* @author Osman Basha - Initial contribution
|
||||||
* @author Ries van Twisk
|
* @author Ries van Twisk - Improvements
|
||||||
*/
|
*/
|
||||||
public class WiFiLEDHandler extends BaseThingHandler {
|
public class WiFiLEDHandler extends BaseThingHandler {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
|
|||||||
/**
|
/**
|
||||||
* Test for LEDStateDTO
|
* Test for LEDStateDTO
|
||||||
*
|
*
|
||||||
* @author Ries van Twisk - Prevent flashes during classic driver color + white updates
|
* @author Ries van Twisk - Initial contribution, prevent flashes during classic driver color + white updates
|
||||||
*/
|
*/
|
||||||
public class LEDStateDTOTest {
|
public class LEDStateDTOTest {
|
||||||
|
|
||||||
|
@ -113,7 +113,6 @@ public class DeviceInformationXML implements DeviceInformation {
|
|||||||
|
|
||||||
XMLConstants.FEATURE_BY_YNC_TAG
|
XMLConstants.FEATURE_BY_YNC_TAG
|
||||||
.forEach((name, feature) -> checkFeature(featureNode, name, feature, state.features));
|
.forEach((name, feature) -> checkFeature(featureNode, name, feature, state.features));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// on older models (RX-V3900) the Feature_Existence element does not exist
|
// on older models (RX-V3900) the Feature_Existence element does not exist
|
||||||
|
|
||||||
|
@ -41,7 +41,8 @@ import org.w3c.dom.Node;
|
|||||||
* No state will be saved in here, but in {@link DabBandState}, {@link PresetInfoState} and {@link PlayInfoState}
|
* No state will be saved in here, but in {@link DabBandState}, {@link PresetInfoState} and {@link PlayInfoState}
|
||||||
* instead.
|
* instead.
|
||||||
*
|
*
|
||||||
* @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
|
* @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
|
||||||
|
* (RX-S601D)
|
||||||
*/
|
*/
|
||||||
public class InputWithTunerDABControlXML extends AbstractInputControlXML
|
public class InputWithTunerDABControlXML extends AbstractInputControlXML
|
||||||
implements InputWithTunerBandControl, InputWithPresetControl {
|
implements InputWithTunerBandControl, InputWithPresetControl {
|
||||||
|
@ -93,7 +93,6 @@ public class XMLConnection extends AbstractConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return responseConsumer.apply(connection);
|
return responseConsumer.apply(connection);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
|
@ -39,11 +39,11 @@ import org.w3c.dom.Node;
|
|||||||
* The zone protocol class is used to control one zone of a Yamaha receiver with HTTP/xml.
|
* The zone protocol class is used to control one zone of a Yamaha receiver with HTTP/xml.
|
||||||
* No state will be saved in here, but in {@link ZoneControlState} instead.
|
* No state will be saved in here, but in {@link ZoneControlState} instead.
|
||||||
*
|
*
|
||||||
|
* @author Tomasz Maruszak - Initial contribution, refactoring, input mapping fix, added
|
||||||
|
* Straight surround, volume DB fix and config improvement.
|
||||||
* @author David Gräff - Refactored
|
* @author David Gräff - Refactored
|
||||||
* @author Eric Thill
|
* @author Eric Thill - Unknown
|
||||||
* @author Ben Jones
|
* @author Ben Jones - Unknown
|
||||||
* @author Tomasz Maruszak - Refactoring, input mapping fix, added Straight surround, volume DB fix and config
|
|
||||||
* improvement.
|
|
||||||
*/
|
*/
|
||||||
public class ZoneControlXML implements ZoneControl {
|
public class ZoneControlXML implements ZoneControl {
|
||||||
|
|
||||||
@ -157,7 +157,6 @@ public class ZoneControlXML implements ZoneControl {
|
|||||||
"Surr/Pgm_Sel/Straight");
|
"Surr/Pgm_Sel/Straight");
|
||||||
logger.debug("Zone {} - adjusting command to: {}", getZone(), surroundSelStraight);
|
logger.debug("Zone {} - adjusting command to: {}", getZone(), surroundSelStraight);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ReceivedMessageParseException | IOException e) {
|
} catch (ReceivedMessageParseException | IOException e) {
|
||||||
logger.debug("Could not perform feature detection for RX-V3900");
|
logger.debug("Could not perform feature detection for RX-V3900");
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,8 @@ import static org.openhab.binding.yamahareceiver.internal.YamahaReceiverBindingC
|
|||||||
/**
|
/**
|
||||||
* The band state for DAB tuners.
|
* The band state for DAB tuners.
|
||||||
*
|
*
|
||||||
* @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
|
* @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
|
||||||
|
* (RX-S601D)
|
||||||
*/
|
*/
|
||||||
public class DabBandState implements Invalidateable {
|
public class DabBandState implements Invalidateable {
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ package org.openhab.binding.yamahareceiver.internal.state;
|
|||||||
/**
|
/**
|
||||||
* Listener for changes to {@link DabBandState}
|
* Listener for changes to {@link DabBandState}
|
||||||
*
|
*
|
||||||
* @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
|
* @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
|
||||||
|
* (RX-S601D)
|
||||||
*/
|
*/
|
||||||
public interface DabBandStateListener {
|
public interface DabBandStateListener {
|
||||||
void dabBandUpdated(DabBandState msg);
|
void dabBandUpdated(DabBandState msg);
|
||||||
|
@ -15,7 +15,8 @@ package org.openhab.binding.yamahareceiver.internal.state;
|
|||||||
/**
|
/**
|
||||||
* Represent object whose state can be invalidated.
|
* Represent object whose state can be invalidated.
|
||||||
*
|
*
|
||||||
* @author Tomasz Maruszak - [yamaha] Tuner band selection and preset feature for dual band models (RX-S601D)
|
* @author Tomasz Maruszak - Initial contribution, [yamaha] Tuner band selection and preset feature for dual band models
|
||||||
|
* (RX-S601D)
|
||||||
*/
|
*/
|
||||||
public interface Invalidateable {
|
public interface Invalidateable {
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class StateFilterProfile implements StateProfile {
|
public class StateFilterProfile implements StateProfile {
|
||||||
|
|
||||||
private final static String OPERATOR_NAME_PATTERN = Stream.of(StateCondition.ComparisonType.values())
|
private static final String OPERATOR_NAME_PATTERN = Stream.of(StateCondition.ComparisonType.values())
|
||||||
.map(StateCondition.ComparisonType::name)
|
.map(StateCondition.ComparisonType::name)
|
||||||
// We want to match the longest operator first, e.g. `GTE` before `GT`
|
// We want to match the longest operator first, e.g. `GTE` before `GT`
|
||||||
.sorted(Comparator.comparingInt(String::length).reversed())
|
.sorted(Comparator.comparingInt(String::length).reversed())
|
||||||
@ -63,13 +63,13 @@ public class StateFilterProfile implements StateProfile {
|
|||||||
// so we can have conditions against input data without needing a leading space, e.g. `GTE 0`
|
// so we can have conditions against input data without needing a leading space, e.g. `GTE 0`
|
||||||
.collect(Collectors.joining("|", "(?:(?<=\\S)\\s+|^\\s*)(?:", ")\\s"));
|
.collect(Collectors.joining("|", "(?:(?<=\\S)\\s+|^\\s*)(?:", ")\\s"));
|
||||||
|
|
||||||
private final static String OPERATOR_SYMBOL_PATTERN = Stream.of(StateCondition.ComparisonType.values())
|
private static final String OPERATOR_SYMBOL_PATTERN = Stream.of(StateCondition.ComparisonType.values())
|
||||||
.map(StateCondition.ComparisonType::symbol)
|
.map(StateCondition.ComparisonType::symbol)
|
||||||
// We want to match the longest operator first, e.g. `<=` before `<`
|
// We want to match the longest operator first, e.g. `<=` before `<`
|
||||||
.sorted(Comparator.comparingInt(String::length).reversed()) //
|
.sorted(Comparator.comparingInt(String::length).reversed()) //
|
||||||
.collect(Collectors.joining("|", "(?:", ")"));
|
.collect(Collectors.joining("|", "(?:", ")"));
|
||||||
|
|
||||||
private final static Pattern EXPRESSION_PATTERN = Pattern.compile(
|
private static final Pattern EXPRESSION_PATTERN = Pattern.compile(
|
||||||
// - Without the non-greedy operator in the first capture group,
|
// - Without the non-greedy operator in the first capture group,
|
||||||
// it will match `Item<` when encountering `Item<>X` condition
|
// it will match `Item<` when encountering `Item<>X` condition
|
||||||
// - Symbols may be more prevalently used, so check them first
|
// - Symbols may be more prevalently used, so check them first
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user