samsungctl icon indicating copy to clipboard operation
samsungctl copied to clipboard

KEY_POWER not powering on or off TV

Open mikelitka opened this issue 6 years ago • 11 comments

The KEY_POWER is no longer powering on or off my TV. This was working prior to #61. KEY_VOLUP does work. I do see a difference in debug output as the KEY_VOLUP does show the control command being sent whereas the KEY_POWER does not.

[root@localhost samsungctl]# samsungctl -vvvv --config-file ~/tv-living-room.conf KEY_VOLUP using saved token: 15929070 incoming message: {"data":{"clients":[{"attributes":{"name":"c2Ftc3VuZ2N0bA==","token":"15929070"},"connectTime":1548608282440,"deviceName":"c2Ftc3VuZ2N0bA==","id":"997b2a3c-3f41-4c42-b594-3231601dade2","isHost":false}],"id":"997b2a3c-3f41-4c42-b594-3231601dade2"},"event":"ms.channel.connect"}

Access granted. Access granted. Sending control command: {'Cmd': 'Click', 'DataOfCmd': 'KEY_VOLUP', 'Option': 'false', 'TypeOfRemote': 'SendRemoteKey'} Websocket closed

mikelitka avatar Jan 27 '19 17:01 mikelitka

are you trying to power on or off??

kdschlosser avatar Jan 27 '19 19:01 kdschlosser

I tried both, neither worked

On Sun, Jan 27, 2019 at 2:12 PM Kevin Schlosser [email protected] wrote:

are you trying to power on or off??

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kdschlosser/samsungctl/issues/69#issuecomment-457945249, or mute the thread https://github.com/notifications/unsubscribe-auth/AOPEKLL280P3tbIMyRtE8CmQ2FiRttlpks5vHfoOgaJpZM4aU0sD .

mikelitka avatar Jan 27 '19 23:01 mikelitka

ok I will take a look at it..

kdschlosser avatar Jan 28 '19 00:01 kdschlosser

Not working for me either:

pi@raspberrypi:~/samsungctl $ samsungctl -v --host 192.168.2.252 --method websocket --port 8002 --name remoteCmd KEY_VOLDOWN
Sending control command: {'TypeOfRemote': 'SendRemoteKey', 'Cmd': 'Click', 'DataOfCmd': 'KEY_VOLDOWN', 'Option': 'false'}
Websocket closed
pi@raspberrypi:~/samsungctl $ samsungctl -v --host 192.168.2.252 --method websocket --port 8002 --name remoteCmd KEY_POWEROFF
Websocket closed
Traceback (most recent call last):
  File "/usr/local/bin/samsungctl", line 11, in <module>
    load_entry_point('samsungctl==0.8.0b0', 'console_scripts', 'samsungctl')()
  File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b0-py2.7.egg/samsungctl/__main__.py", line 341, in main
    with Remote(config) as remote:
  File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b0-py2.7.egg/samsungctl/remote.py", line 73, in __enter__
    self.open()
  File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b0-py2.7.egg/samsungctl/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b0-py2.7.egg/samsungctl/remote_websocket.py", line 201, in open
    raise RuntimeError('Auth Failure')
RuntimeError: Auth Failure

POWERON worked, but I still got the RuntimeError: Auth Failure error.

arsaboo avatar Jan 29 '19 22:01 arsaboo

Tried this again tonight with the new changes. KEY_POWEROFF does power off the TV but reports an error.

/common/apps/homeassistant/bin/samsungctl -vvv --config-file /common/conf/samsungctl/tv-living-room.conf KEY_POWEROFF using saved token: 44424700 incoming message: {"data":{"clients":[{"attributes":{"name":"c2Ftc3VuZ2N0bA==","token":"44424700"},"connectTime":1551837107563,"deviceName":"c2Ftc3VuZ2N0bA==","id":"2d8c403d-9748-4927-a280-cad7c66c678","isHost":false},{"attributes":{"name":"c2Ftc3VuZ2N0bA==","token":"44424700"},"connectTime":1551837125300,"deviceName":"c2Ftc3VuZ2N0bA==","id":"acce146-75af-4645-8413-523d7539112b","isHost":false}],"id":"acce146-75af-4645-8413-523d7539112b"},"event":"ms.channel.connect"}

Access granted. Access granted. Sending control command: {'Cmd': 'Click', 'DataOfCmd': 'KEY_POWER', 'Option': 'false', 'TypeOfRemote': 'SendRemoteKey'} Sending control command: {'Cmd': 'Click', 'DataOfCmd': 'KEY_POWEROFF', 'Option': 'false', 'TypeOfRemote': 'SendRemoteKey'}

Unable to power off the TV

--

KEY_POWERON works but took over 2 minutes to turn the TV on:

/common/apps/homeassistant/bin/samsungctl -vvv --config-file /common/conf/samsungctl/tv-living-room.conf KEY_POWERON using saved token: 44424700 Is the TV on?!? using saved token: 44424700 incoming message: {"data":{"clients":[{"attributes":{"name":"c2Ftc3VuZ2N0bA==","token":"44424700"},"connectTime":1551837366515,"deviceName":"c2Ftc3VuZ2N0bA==","id":"5285d842-2e6a-4531-a355-3b3b5ca2c2c0","isHost":false}],"id":"5285d842-2e6a-4531-a355-3b3b5ca2c2c0"},"event":"ms.channel.connect"}

Access granted. Access granted.

mikelitka avatar Mar 06 '19 01:03 mikelitka

do me a favor. use the develop branch. and run the RUN_ME.py file. the script will probably get stuck at the end (power tests) if it does end the process. there is going to be a folder that gets created \tests in the root of your HDD. zip up that folder and attach it here. This is going to provide me with more detailed information as to what is happening

kdschlosser avatar Mar 06 '19 09:03 kdschlosser

I just tired that. Getting this: Traceback (most recent call last): File "RUN_ME.py", line 161, in import samsungctl # NOQA File "/root/samsungctl/samsungctl/init.py", line 26, in from .remote import Remote # NOQA File "/root/samsungctl/samsungctl/remote.py", line 5, in from .remote_legacy import RemoteLegacy File "/root/samsungctl/samsungctl/remote_legacy.py", line 10, in from . import upnp File "/root/samsungctl/samsungctl/upnp/init.py", line 13, in from .. import cec_control File "/root/samsungctl/samsungctl/cec_control/init.py", line 2657 print lib.tv.power ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(lib.tv.power)?

mikelitka avatar Mar 18 '19 22:03 mikelitka

ok i have a debugging print statement in here I need to remove.

kdschlosser avatar Mar 19 '19 04:03 kdschlosser

OK I updated the develop branch. it should now be fixed.

kdschlosser avatar Mar 19 '19 06:03 kdschlosser

Finally got around to running the updated diagnostics. tests.zip

mikelitka avatar Mar 31 '19 00:03 mikelitka

@kdschlosser Any update on this one?

mikelitka avatar May 06 '19 23:05 mikelitka