mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
Signed-off-by: Carlos Primo <tristinero@gmail.com> Signed-off-by: carlospg79 <tristinero@gmail.com>
This commit is contained in:
parent
edec4c7cf5
commit
fcd6ed6e57
@ -170,6 +170,12 @@ public class LgTvSerialHandler extends BaseThingHandler {
|
||||
if (updateJob == null || updateJob.isCancelled()) {
|
||||
updateJob = scheduler.scheduleWithFixedDelay(eventRunnable, 0, EVENT_REFRESH_INTERVAL, TimeUnit.SECONDS);
|
||||
}
|
||||
// trigger REFRESH commands for all linked Channels to start polling
|
||||
getThing().getChannels().forEach(channel -> {
|
||||
if (isLinked(channel.getUID())) {
|
||||
channelLinked(channel.getUID());
|
||||
}
|
||||
});
|
||||
|
||||
updateStatus(ThingStatus.ONLINE);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class LGSerialCommunicator {
|
||||
int data;
|
||||
int len = 0;
|
||||
int offset = 0;
|
||||
while ((data = input.read()) > -1) {
|
||||
while (input.available() > 0 && (data = input.read()) > -1) {
|
||||
if (data == 'x') {
|
||||
String result = new String(buffer, offset, len);
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
Loading…
Reference in New Issue
Block a user