Skip to content

Commit

Permalink
Log cleanup: demote some warnings to debugs
Browse files Browse the repository at this point in the history
It's expected behavior to not receive a response to the power query when
the device is off; suppress missing-ack warning in that scenario.

It's reported that newer TVs are hitting the "junk" warning log on
status query despite everything otherwise working as expected. Demote
that to a debug log too since there seems to be no ill effect.
  • Loading branch information
eklundjon committed Apr 25, 2018
1 parent fbdba14 commit 5a9834d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Samsung Ex-Link.indigoPlugin/Contents/Server Plugin/plugin.py
Expand Up @@ -724,7 +724,7 @@ def checkSerial(self, dev):
junk += self.serialConns[dev.id].read(1)
if len(junk) > 0:
length = str(len(junk))
self.logger.warn(dev.name+": Received "+length+" unexpected bytes: "+binascii.hexlify(bytearray(junk)))
self.logger.debug(dev.name+": Received "+length+" unexpected bytes: "+binascii.hexlify(bytearray(junk)))
return True

#we need to figure out the serial type to find the port path
Expand Down Expand Up @@ -754,7 +754,11 @@ def waitForAck(self, dev):
if bytearray(reply) == bytearray(self.responses["ACK"]):
self.logger.debug(dev.name+": Command ack received: "+binascii.hexlify(bytearray(reply)))
return True
self.logger.warn(dev.name+": Command not acknowledged")
if self.serialConns[dev.id].timeout != self.powerSerialTimeout:
self.logger.warn(dev.name+": Command not acknowledged")
else:
self.logger.debug(dev.name+": Power query not acknowleged; device must be off.")

return False

########################################
Expand Down Expand Up @@ -859,7 +863,6 @@ def isPowerOn(self, dev):
self.logger.info(dev.name+": unexpected response, but it must be on")
return True;
else:
self.logger.debug(dev.name+": Power query not acknowleged; device must be off.")
return False

########################################
Expand Down

0 comments on commit 5a9834d

Please sign in to comment.