Open vogler opened 4 years ago
Ok, seems like the develop branch crashes without -v
(and it no longer accepts --method
).
Still, no luck:
$ pipenv run python -m samsungctl -v --host 192.168.178.24 --name myremote KEY_VOLDOWN
get_logger_name: samsungctl
get_logger_name: samsungctl.upnp.UPNP_Device
get_logger_name: samsungctl.upnp.UPNP_Device.adapter_addresses
get_logger_name: samsungctl.upnp.UPNP_Device.discover
get_logger_name: samsungctl.upnp.UPNP_Device.action
get_logger_name: samsungctl.upnp.UPNP_Device.icon
get_logger_name: samsungctl.upnp.UPNP_Device.service
get_logger_name: samsungctl.upnp.UPNP_Device.embedded_device
get_logger_name: samsungctl.upnp.UPNP_Device.upnp_class
get_logger_name: samsungctl.upnp.discover
get_logger_name: samsungctl.upnp
get_logger_name: samsungctl.wake_on_lan
get_logger_name: samsungctl.remote_legacy
get_logger_name: samsungctl.websocket_base
get_logger_name: samsungctl.art_mode
get_logger_name: samsungctl.application
get_logger_name: samsungctl.remote_websocket
get_logger_name: samsungctl.remote_encrypted.crypto
get_logger_name: samsungctl.remote_encrypted
Unable to discover any TV's
$ # returned without blocking
Seems like my TV does not accept KEY_HDMI1
. I'm now back to using Ape:master with this workaround (cf. https://github.com/Ape/samsungctl/pull/95#issuecomment-539257769):
pipenv run python -m samsungctl -vv --host 192.168.178.24 --method websocket KEY_SOURCE KEY_DOWN KEY_RIGHT KEY_RIGHT KEY_ENTER
The original problem seems to be a deadlock:
$ pipenv run python -m samsungctl --host 192.168.178.24 --method websocket KEY_HDMI
Starting new HTTP connection (1): 192.168.178.24:8001
http://192.168.178.24:8001 "GET /api/v2/ HTTP/1.1" 200 1238
RemoteWrapper.__init__(config=<samsungctl.config.Config object at 0x104f68850>)
RemoteWrapper.__init__(config=<samsungctl.config.Config object at 0x104f68850>)
Starting new HTTP connection (1): 192.168.178.24:8001
http://192.168.178.24:8001 "GET /api/v2/ HTTP/1.1" 200 1238
RemoteWrapper.open()
RemoteWrapper.power()
RemoteWrapper.power => False
RemoteWrapper.power(value=True)
RemoteWrapper.power()
RemoteWrapper.power => False
RemoteWrapper.mac_address()
RemoteWrapper.mac_address => 'C0:97:27:19:F8:7E'
RemoteWrapper.mac_address()
RemoteWrapper.mac_address => 'C0:97:27:19:F8:7E'
RemoteWrapper.power()
RemoteWrapper.power => False
RemoteWrapper.open()
^CRemoteWrapper.mac_address()
RemoteWrapper.mac_address => 'C0:97:27:19:F8:7E'
RemoteWrapper.power()
RemoteWrapper.power => False
RemoteWrapper.open()
^CRemoteWrapper.mac_address()
RemoteWrapper.mac_address => 'C0:97:27:19:F8:7E'
RemoteWrapper.power()
RemoteWrapper.power => False
RemoteWrapper.open()
I'm currently using Ape/samsungctl but it only has KEY_HDMI which toggles HDMI inputs if one is already active. So I was happy to see this repo has KEY_HDMI1 as well. Sadly I can't get it to work.
Installed deps via pipenv (maybe add a Pipfile and Pipfile.lock (or poetry - IDK, not into Python)), and ran
but it just waits, doesn't output anything and the TV also shows no notification. (Aside: it needed
^C^C^C^C
to kill (threading issue I guess), of course^\
works.)Then I tried the develop branch, but got a TypeError: