Closed matthieut59 closed 5 years ago
my bad, was just a dumb copy paste, tested on my smart TV frame, and working
I tested it both remote command and retrieve applications are working
well there is still a glitch in that code as well. I was just using that as an example.
this will cover all of the bases properly
@LogIt
def send(self, method, **params):
if self.sock is None:
if method != 'ms.remote.control':
if not self._running:
try:
self.open()
return self.send(method, **params)
except RuntimeError:
pass
logger.info('Is the TV on???')
return
payload = dict(
method=method,
params=params
)
self.sock.send(json.dumps(payload))
self.send_event.wait(0.2)
Just fixing this using copy/paste but you might want to do something else :) But at least I can get list of application installed on my samsung frame now :)