Compare commits

..

12 Commits

Author SHA1 Message Date
Gaël L'hopital
4dbb37726e
Merge 8e19f2c19b into adacdebb9f 2025-01-08 23:11:41 +01:00
clinique
8e19f2c19b Apply spotless
Signed-off-by: clinique <gael@lhopital.org>
2025-01-04 09:44:18 +01:00
gael@lhopital.org
4b32f8e605 Rebased
Some more code refactoring

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
2025-01-02 18:11:39 +01:00
gael@lhopital.org
828e372644 Upgrading to 2025
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
2025-01-02 18:10:54 +01:00
gael@lhopital.org
7d46776956 Reviewing connector logic
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
2025-01-02 18:10:53 +01:00
clinique
a2befde47b Trying again to clean everything
Signed-off-by: clinique <gael@lhopital.org>
2025-01-02 18:10:52 +01:00
clinique
b51b0e2a0e Solving log errors
Signed-off-by: clinique <gael@lhopital.org>
2025-01-02 18:10:51 +01:00
clinique
f69d5214ab Apply spotless
Signed-off-by: clinique <gael@lhopital.org>
2025-01-02 18:10:50 +01:00
clinique
5d578d1e56 Review the whole binding
Signed-off-by: clinique <gael@lhopital.org>
2025-01-02 18:10:49 +01:00
clinique
0989eb7d3c Debugging
Signed-off-by: clinique <gael@lhopital.org>
2025-01-02 18:10:49 +01:00
Gaël L'hopital
365b84192a Some more code refactoring
Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2025-01-02 18:10:48 +01:00
clinique
7a1daae083 Ensure ressources are freed.
A bit of code revamp

Signed-off-by: clinique <gael@lhopital.org>
2025-01-02 18:10:26 +01:00
16 changed files with 56 additions and 151 deletions

View File

@ -1,4 +1,4 @@
/*
/**
* Copyright (c) 2010-2025 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/*
/**
* Copyright (c) 2010-2025 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional

View File

@ -75,11 +75,8 @@ public class Ipx800DeviceConnector extends Thread {
}
/**
*
* Stop the
* device thread
* Stop the device thread
*/
public void dispose() {
interrupted = true;
}
@ -90,20 +87,9 @@ public class Ipx800DeviceConnector extends Thread {
}
/**
*
* Send a
* random keepalive
* command which
* cause the
* IPX to
* send an update.*
* If we don't
* receive the
* update maxKeepAliveFailure time,
* the connection
* is closed
* Send a random keepalive command which cause the IPX to send an update.
* If we don't receive the update maxKeepAliveFailure time, the connection is closed
*/
private void sendKeepalive() {
PortDefinition pd = PortDefinition.values()[randomizer.nextInt(PortDefinition.AS_SET.size())];
String command = "%s%d".formatted(pd.m2mCommand, randomizer.nextInt(pd.quantity) + 1);
@ -167,11 +153,7 @@ public class Ipx800DeviceConnector extends Thread {
}
/**
*
* Set output
* of the
* device sending
* the corresponding command**
* Set output of the device sending the corresponding command
*
* @param targetPort
* @param targetValue
@ -183,9 +165,7 @@ public class Ipx800DeviceConnector extends Thread {
}
/**
*
* Resets the
* counter value to 0**
* Resets the counter value to 0
*
* @param targetCounter
*/

View File

@ -1,4 +1,4 @@
/*
/**
* Copyright (c) 2010-2025 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional

View File

@ -1,4 +1,4 @@
/*
/**
* Copyright (c) 2010-2025 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional

View File

@ -46,8 +46,6 @@ The following channels are available:
| playMode | String | The current playback mode ie: stop, play, pause (ReadOnly). |
| timeElapsed | Number:Time | The total number of seconds of playback time elapsed for the current playing title (ReadOnly). |
| timeTotal | Number:Time | The total length of the current playing title in seconds (ReadOnly). This data is not provided by all streaming apps. |
| endTime | DateTime | The date/time when the currently playing media will end (ReadOnly). N/A if timeTotal is not provided by the current streaming app. |
| progress | Dimmer | The current progress [0-100%] of playing media (ReadOnly). N/A if timeTotal is not provided by the current streaming app. |
| activeChannel | String | A dropdown containing a list of available TV channels on the Roku TV. The channel currently tuned is automatically selected. The list updates every 10 minutes. |
| signalMode | String | The signal type of the current TV channel, ie: 1080i (ReadOnly). |
| signalQuality | Number:Dimensionless | The signal quality of the current TV channel, 0-100% (ReadOnly). |
@ -61,7 +59,6 @@ The following channels are available:
Some Notes:
- The values for `activeApp`, `activeAppName`, `playMode`, `timeElapsed`, `timeTotal`, `activeChannel`, `signalMode`, `signalQuality`, `channelName`, `programTitle`, `programDescription`, `programRating`, `power` & `powerState` refresh automatically per the configured `refresh` interval.
- The `endTime` and `progress` channels may not be accurate for some streaming apps especially 'live' streams where the `timeTotal` value constantly increases.
**List of available button commands for Roku streaming devices:**
@ -116,36 +113,32 @@ roku:roku_tv:mytv1 "My Roku TV" [ hostName="192.168.10.1", refresh=10 ]
```java
// Roku streaming media player items:
String Player_ActiveApp "Current App: [%s]" { channel="roku:roku_player:myplayer1:activeApp" }
String Player_ActiveAppName "Current App Name: [%s]" { channel="roku:roku_player:myplayer1:activeAppName" }
String Player_Button "Send Command to Roku" { channel="roku:roku_player:myplayer1:button" }
Player Player_Control "Control" { channel="roku:roku_player:myplayer1:control" }
String Player_PlayMode "Status: [%s]" { channel="roku:roku_player:myplayer1:playMode" }
Number:Time Player_TimeElapsed "Elapsed Time: [%d %unit%]" { channel="roku:roku_player:myplayer1:timeElapsed" }
Number:Time Player_TimeTotal "Total Time: [%d %unit%]" { channel="roku:roku_player:myplayer1:timeTotal" }
DateTime Player_EndTime "End Time: [%1$tl:%1$tM %1$tp]" { channel="roku:roku_player:myplayer1:endTime" }
Dimmer Player_Progress "Progress [%.0f%%]" { channel="roku:roku_player:myplayer1:progress" }
String Player_ActiveApp "Current App: [%s]" { channel="roku:roku_player:myplayer1:activeApp" }
String Player_ActiveAppName "Current App Name: [%s]" { channel="roku:roku_player:myplayer1:activeAppName" }
String Player_Button "Send Command to Roku" { channel="roku:roku_player:myplayer1:button" }
Player Player_Control "Control" { channel="roku:roku_player:myplayer1:control" }
String Player_PlayMode "Status: [%s]" { channel="roku:roku_player:myplayer1:playMode" }
Number:Time Player_TimeElapsed "Elapsed Time: [%d %unit%]" { channel="roku:roku_player:myplayer1:timeElapsed" }
Number:Time Player_TimeTotal "Total Time: [%d %unit%]" { channel="roku:roku_player:myplayer1:timeTotal" }
// Roku TV items:
Switch Player_Power "Power: [%s]" { channel="roku:roku_tv:mytv1:power" }
String Player_PowerState "Power State: [%s] { channel="roku:roku_tv:mytv1:powerState" }
String Player_ActiveApp "Current App: [%s]" { channel="roku:roku_tv:mytv1:activeApp" }
String Player_ActiveAppName "Current App Name: [%s]" { channel="roku:roku_tv:mytv1:activeAppName" }
String Player_Button "Send Command to Roku" { channel="roku:roku_tv:mytv1:button" }
Player Player_Control "Control" { channel="roku:roku_tv:mytv1:control" }
String Player_PlayMode "Status: [%s]" { channel="roku:roku_tv:mytv1:playMode" }
Number:Time Player_TimeElapsed "Elapsed Time: [%d %unit%]" { channel="roku:roku_tv:mytv1:timeElapsed" }
Number:Time Player_TimeTotal "Total Time: [%d %unit%]" { channel="roku:roku_tv:mytv1:timeTotal" }
DateTime Player_EndTime "End Time: [%1$tl:%1$tM %1$tp]" { channel="roku:roku_tv:mytv1:endTime" }
Dimmer Player_Progress "Progress [%.0f%%]" { channel="roku:roku_tv:mytv1:progress" }
String Player_ActiveChannel "Current Channel: [%s]" { channel="roku:roku_tv:mytv1:activeChannel" }
String Player_SignalMode "Signal Mode: [%s]" { channel="roku:roku_tv:mytv1:signalMode" }
Number Player_SignalQuality "Signal Quality: [%d %%]" { channel="roku:roku_tv:mytv1:signalQuality" }
String Player_ChannelName "Channel Name: [%s]" { channel="roku:roku_tv:mytv1:channelName" }
String Player_ProgramTitle "Program Title: [%s]" { channel="roku:roku_tv:mytv1:programTitle" }
String Player_ProgramDescription "Program Description: [%s]" { channel="roku:roku_tv:mytv1:programDescription" }
String Player_ProgramRating "Program Rating: [%s]" { channel="roku:roku_tv:mytv1:programRating" }
Switch Player_Power "Power: [%s]" { channel="roku:roku_tv:mytv1:power" }
String Player_PowerState "Power State: [%s] { channel="roku:roku_tv:mytv1:powerState" }
String Player_ActiveApp "Current App: [%s]" { channel="roku:roku_tv:mytv1:activeApp" }
String Player_ActiveAppName "Current App Name: [%s]" { channel="roku:roku_tv:mytv1:activeAppName" }
String Player_Button "Send Command to Roku" { channel="roku:roku_tv:mytv1:button" }
Player Player_Control "Control" { channel="roku:roku_tv:mytv1:control" }
String Player_PlayMode "Status: [%s]" { channel="roku:roku_tv:mytv1:playMode" }
Number:Time Player_TimeElapsed "Elapsed Time: [%d %unit%]" { channel="roku:roku_tv:mytv1:timeElapsed" }
Number:Time Player_TimeTotal "Total Time: [%d %unit%]" { channel="roku:roku_tv:mytv1:timeTotal" }
String Player_ActiveChannel "Current Channel: [%s]" { channel="roku:roku_tv:mytv1:activeChannel" }
String Player_SignalMode "Signal Mode: [%s]" { channel="roku:roku_tv:mytv1:signalMode" }
Number Player_SignalQuality "Signal Quality: [%d %%]" { channel="roku:roku_tv:mytv1:signalQuality" }
String Player_ChannelName "Channel Name: [%s]" { channel="roku:roku_tv:mytv1:channelName" }
String Player_ProgramTitle "Program Title: [%s]" { channel="roku:roku_tv:mytv1:programTitle" }
String Player_ProgramDescription "Program Description: [%s]" { channel="roku:roku_tv:mytv1:programDescription" }
String Player_ProgramRating "Program Rating: [%s]" { channel="roku:roku_tv:mytv1:programRating" }
```
### `roku.sitemap` Example
@ -161,8 +154,6 @@ sitemap roku label="Roku" {
Text item=Player_PlayMode
Text item=Player_TimeElapsed icon="time"
Text item=Player_TimeTotal icon="time"
Text item=Player_EndTime icon="time"
Slider item=Player_Progress icon="time"
// The following items apply to Roku TVs only
Switch item=Player_Power
Text item=Player_PowerState

View File

@ -55,8 +55,6 @@ public class RokuBindingConstants {
public static final String PLAY_MODE = "playMode";
public static final String TIME_ELAPSED = "timeElapsed";
public static final String TIME_TOTAL = "timeTotal";
public static final String END_TIME = "endTime";
public static final String PROGRESS = "progress";
public static final String ACTIVE_CHANNEL = "activeChannel";
public static final String SIGNAL_MODE = "signalMode";
public static final String SIGNAL_QUALITY = "signalQuality";

View File

@ -14,8 +14,6 @@ package org.openhab.binding.roku.internal.handler;
import static org.openhab.binding.roku.internal.RokuBindingConstants.*;
import java.math.BigDecimal;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -36,10 +34,8 @@ import org.openhab.binding.roku.internal.dto.DeviceInfo;
import org.openhab.binding.roku.internal.dto.Player;
import org.openhab.binding.roku.internal.dto.TvChannel;
import org.openhab.binding.roku.internal.dto.TvChannels.Channel;
import org.openhab.core.library.types.DateTimeType;
import org.openhab.core.library.types.NextPreviousType;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.library.types.PlayPauseType;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.library.types.StringType;
@ -199,32 +195,21 @@ public class RokuHandler extends BaseThingHandler {
PLAY.equalsIgnoreCase(playerInfo.getState()) ? PlayPauseType.PLAY : PlayPauseType.PAUSE);
// Remove non-numeric from string, ie: ' ms'
final String positionStr = playerInfo.getPosition().replaceAll(NON_DIGIT_PATTERN, EMPTY);
int position = -1;
if (!EMPTY.equals(positionStr)) {
position = Integer.parseInt(positionStr) / 1000;
updateState(TIME_ELAPSED, new QuantityType<>(position, API_SECONDS_UNIT));
String position = playerInfo.getPosition().replaceAll(NON_DIGIT_PATTERN, EMPTY);
if (!EMPTY.equals(position)) {
updateState(TIME_ELAPSED,
new QuantityType<>(Integer.parseInt(position) / 1000, API_SECONDS_UNIT));
} else {
updateState(TIME_ELAPSED, UnDefType.UNDEF);
}
final String durationStr = playerInfo.getDuration().replaceAll(NON_DIGIT_PATTERN, EMPTY);
int duration = -1;
if (!EMPTY.equals(durationStr)) {
duration = Integer.parseInt(durationStr) / 1000;
updateState(TIME_TOTAL, new QuantityType<>(duration, API_SECONDS_UNIT));
String duration = playerInfo.getDuration().replaceAll(NON_DIGIT_PATTERN, EMPTY);
if (!EMPTY.equals(duration)) {
updateState(TIME_TOTAL,
new QuantityType<>(Integer.parseInt(duration) / 1000, API_SECONDS_UNIT));
} else {
updateState(TIME_TOTAL, UnDefType.UNDEF);
}
if (position >= 0 && duration > 0) {
updateState(END_TIME, new DateTimeType(Instant.now().plusSeconds(duration - position)));
updateState(PROGRESS,
new PercentType(BigDecimal.valueOf(Math.round(position / (double) duration * 100.0))));
} else {
updateState(END_TIME, UnDefType.UNDEF);
updateState(PROGRESS, UnDefType.UNDEF);
}
} catch (NumberFormatException e) {
logger.debug("Unable to parse playerInfo integer value. Exception: {}", e.getMessage());
} catch (RokuLimitedModeException e) {
@ -239,8 +224,6 @@ public class RokuHandler extends BaseThingHandler {
updateState(PLAY_MODE, UnDefType.UNDEF);
updateState(TIME_ELAPSED, UnDefType.UNDEF);
updateState(TIME_TOTAL, UnDefType.UNDEF);
updateState(END_TIME, UnDefType.UNDEF);
updateState(PROGRESS, UnDefType.UNDEF);
}
if (thingTypeUID.equals(THING_TYPE_ROKU_TV) && tvActive) {

View File

@ -80,8 +80,6 @@ channel-type.roku.channelName.label = Channel Name
channel-type.roku.channelName.description = The Name of the Channel Currently Selected
channel-type.roku.control.label = Control
channel-type.roku.control.description = Control playback e.g. Play/Pause/Next/Previous
channel-type.roku.endTime.label = End Time
channel-type.roku.endTime.description = The date/time when the currently playing media will end
channel-type.roku.playMode.label = Play Mode
channel-type.roku.playMode.description = The Current Playback Mode
channel-type.roku.powerState.label = Power State
@ -95,8 +93,6 @@ channel-type.roku.programRating.label = Program Rating
channel-type.roku.programRating.description = The TV Parental Guideline Rating of the Current TV Program
channel-type.roku.programTitle.label = Program Title
channel-type.roku.programTitle.description = The Name of the Current TV Program
channel-type.roku.progress.label = Media Progress
channel-type.roku.progress.description = The current progress of playing media
channel-type.roku.signalMode.label = Signal Mode
channel-type.roku.signalMode.description = The Signal Type of the Current TV Channel, ie: 1080i
channel-type.roku.signalQuality.label = Signal Quality

View File

@ -19,8 +19,6 @@
<channel id="playMode" typeId="playMode"/>
<channel id="timeElapsed" typeId="timeElapsed"/>
<channel id="timeTotal" typeId="timeTotal"/>
<channel id="endTime" typeId="endTime"/>
<channel id="progress" typeId="progress"/>
</channels>
<properties>
@ -30,7 +28,7 @@
<property name="Serial Number">unknown</property>
<property name="Device Id">unknown</property>
<property name="Software Version">unknown</property>
<property name="thingTypeVersion">2</property>
<property name="thingTypeVersion">1</property>
</properties>
<representation-property>uuid</representation-property>
@ -54,8 +52,6 @@
<channel id="playMode" typeId="playMode"/>
<channel id="timeElapsed" typeId="timeElapsed"/>
<channel id="timeTotal" typeId="timeTotal"/>
<channel id="endTime" typeId="endTime"/>
<channel id="progress" typeId="progress"/>
<channel id="activeChannel" typeId="activeChannel"/>
<channel id="signalMode" typeId="signalMode"/>
<channel id="signalQuality" typeId="signalQuality"/>
@ -73,7 +69,7 @@
<property name="Serial Number">unknown</property>
<property name="Device Id">unknown</property>
<property name="Software Version">unknown</property>
<property name="thingTypeVersion">2</property>
<property name="thingTypeVersion">1</property>
</properties>
<representation-property>uuid</representation-property>
@ -189,24 +185,6 @@
<state readOnly="true" pattern="%d %unit%"/>
</channel-type>
<channel-type id="endTime">
<item-type>DateTime</item-type>
<label>End Time</label>
<description>The date/time when the currently playing media will end</description>
<category>Time</category>
<tags>
<tag>Status</tag>
<tag>Timestamp</tag>
</tags>
<state readOnly="true"/>
</channel-type>
<channel-type id="progress">
<item-type>Dimmer</item-type>
<label>Media Progress</label>
<description>The current progress of playing media</description>
</channel-type>
<channel-type id="activeChannel">
<item-type>String</item-type>
<label>Active Channel</label>

View File

@ -12,15 +12,6 @@
<type>roku:control</type>
</add-channel>
</instruction-set>
<instruction-set targetVersion="2">
<add-channel id="endTime">
<type>roku:endTime</type>
</add-channel>
<add-channel id="progress">
<type>roku:progress</type>
</add-channel>
</instruction-set>
</thing-type>
<thing-type uid="roku:roku_tv">
@ -38,15 +29,6 @@
<type>roku:control</type>
</add-channel>
</instruction-set>
<instruction-set targetVersion="2">
<add-channel id="endTime">
<type>roku:endTime</type>
</add-channel>
<add-channel id="progress">
<type>roku:progress</type>
</add-channel>
</instruction-set>
</thing-type>
</update:update-descriptions>

View File

@ -185,7 +185,6 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
} else if ("durchsichtig".equals(classFlag)) { // link
this.fieldType = FieldType.IGNORE;
} else if ("bord".equals(classFlag)) { // special button style - not of our interest...
continue;
} else {
logger.debug("Unhanndled class in {}:{}:{}: '{}' ", id, line, col, classFlag);
}
@ -193,7 +192,7 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
}
} else if (this.parserState == ParserState.DATA_ENTRY && this.fieldType == FieldType.BUTTON
&& "span".equals(elementName)) {
return; // ignored...
// ignored...
} else {
logger.debug("Unexpected OpenElement in {}:{}: {} [{}]", line, col, elementName, attributes);
}
@ -246,14 +245,14 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
getApiPageEntry(id, line, col, shortName, description, this.buttonValue);
}
} else if (this.fieldType == FieldType.IGNORE) {
return; // ignore
// ignore
} else {
logger.debug("Unhandled setting {}:{}:{} [{}] : {}", id, line, col, this.fieldType, sb);
}
}
} else if (this.parserState == ParserState.DATA_ENTRY && this.fieldType == FieldType.BUTTON
&& "span".equals(elementName)) {
return;// ignored...
// ignored...
} else {
logger.debug("Unexpected CloseElement in {}:{}: {}", line, col, elementName);
}
@ -308,7 +307,7 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
}
} else if (this.parserState == ParserState.INIT && ((len == 1 && buffer[offset] == '\n')
|| (len == 2 && buffer[offset] == '\r' && buffer[offset + 1] == '\n'))) {
return; // single newline - ignore/drop it...
// single newline - ignore/drop it...
} else {
String msg = new String(buffer, offset, len).replace("\n", "\\n").replace("\r", "\\r");
logger.debug("Unexpected Text {}:{}: ParserState: {} ({}) `{}`", line, col, parserState, len, msg);
@ -401,9 +400,9 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
// failed to get unit...
if ("Imp".equals(unitStr) || "€$".contains(unitStr)) {
// special case
unitData = TACmiSchemaHandler.SPECIAL_MARKER;
unitData = taCmiSchemaHandler.SPECIAL_MARKER;
} else {
unitData = TACmiSchemaHandler.NULL_MARKER;
unitData = taCmiSchemaHandler.NULL_MARKER;
logger.warn(
"Unhandled UoM '{}' - seen on channel {} '{}'; Message from QuantityType: {}",
valParts[1], shortName, description, iae.getMessage());
@ -411,12 +410,12 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
}
taCmiSchemaHandler.unitsCache.put(unitStr, unitData);
}
if (unitData == TACmiSchemaHandler.NULL_MARKER) {
if (unitData == taCmiSchemaHandler.NULL_MARKER) {
// no UoM mappable - just send value
channelType = "Number";
unit = null;
state = new DecimalType(bd);
} else if (unitData == TACmiSchemaHandler.SPECIAL_MARKER) {
} else if (unitData == taCmiSchemaHandler.SPECIAL_MARKER) {
// special handling for unknown UoM
if ("Imp".equals(unitStr)) { // Number of Pulses
// impulses - no idea how to map this to something useful here?

View File

@ -102,7 +102,7 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
this.optionFieldName = attributes == null ? null : attributes.get("name");
} else if ((this.parserState == ParserState.INIT || this.parserState == ParserState.INPUT)
&& "br".equals(elementName)) {
return; // ignored
// ignored
} else if ((this.parserState == ParserState.INIT || this.parserState == ParserState.INPUT)
&& "input".equals(elementName) && "changeto".equals(id)) {
this.parserState = ParserState.INPUT_DATA;
@ -171,6 +171,7 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
}
this.options.put(ChangerX2Entry.TIME_PERIOD_PARTS, timeParts);
} else {
logger.warn("Error parsing options for {}: Unhandled input field in {}:{}: {}", channelName, line,
col, attributes);
}
@ -217,7 +218,7 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
}
}
} else if (this.parserState == ParserState.INPUT && "span".equals(elementName)) {
return; // span's are ignored...
// span's are ignored...
} else {
logger.debug("Error parsing options for {}: Unexpected CloseElement in {}:{}: {}", channelName, line, col,
elementName);
@ -274,11 +275,10 @@ public class ChangerX2Parser extends AbstractSimpleMarkupHandler {
sb.append(buffer, offset, len);
}
} else if (this.parserState == ParserState.INIT && len == 1 && buffer[offset] == '\n') {
return; // single newline - ignore/drop it...
// single newline - ignore/drop it...
} else if (this.parserState == ParserState.INPUT) {
// this is a label next to the value input field - we currently have no use for it so
// it's dropped...
return;
} else {
logger.debug("Error parsing options for {}: Unexpected Text {}:{}: (ctx: {} len: {}) '{}' ",
this.channelName, line, col, this.parserState, len, new String(buffer, offset, len));

View File

@ -90,9 +90,9 @@ public class TACmiSchemaHandler extends BaseThingHandler {
// this is the units lookup cache.
protected final Map<String, UnitAndType> unitsCache = new ConcurrentHashMap<>();
// marks an entry with known un-resolveable unit
protected static final UnitAndType NULL_MARKER = new UnitAndType(Units.ONE, "");
protected final UnitAndType NULL_MARKER = new UnitAndType(Units.ONE, "");
// marks an entry with special handling - i.e. 'Imp'
protected static final UnitAndType SPECIAL_MARKER = new UnitAndType(Units.ONE, "s");
protected final UnitAndType SPECIAL_MARKER = new UnitAndType(Units.ONE, "s");
public TACmiSchemaHandler(final Thing thing, final HttpClient httpClient,
final TACmiChannelTypeProvider channelTypeProvider) {

View File

@ -165,7 +165,6 @@ public class HomieImplementationTest extends MqttOSGiTest {
"Connection " + homieConnection.getClientId() + " not retrieving all topics ");
}
@Disabled("https://github.com/openhab/openhab-addons/issues/12667")
@Test
public void retrieveOneAttribute() throws Exception {
WaitForTopicValue watcher = new WaitForTopicValue(homieConnection, DEVICE_TOPIC + "/$homie");

View File

@ -107,7 +107,6 @@ public class WemoMakerHandlerOSGiTest extends GenericWemoOSGiTest {
}
@Test
@Disabled("https://github.com/openhab/openhab-addons/issues/12474")
public void assertThatThingHandlesREFRESHCommand()
throws MalformedURLException, URISyntaxException, ValidationException, IOException {
Command command = RefreshType.REFRESH;