Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samsung JU6400 #101

Open
ageorgios opened this issue Feb 3, 2019 · 7 comments
Open

Samsung JU6400 #101

ageorgios opened this issue Feb 3, 2019 · 7 comments

Comments

@ageorgios
Copy link

ageorgios commented Feb 3, 2019

python3 -m samsungctl --host 192.168.178.26 --method encrypted --config-file "/tmp/tv.config" KEY_MENU

and the command returns after a long time! what do I do wrong?

Fatal Python error: Cannot recover from stack overflow.

Current thread 0x00007f7eac78f700 (most recent call first):
  File "/usr/lib/python3.5/inspect.py", line 2710 in <genexpr>
  File "/usr/lib/python3.5/inspect.py", line 2710 in __init__
  File "/usr/lib/python3.5/inspect.py", line 2143 in _signature_from_function
  File "/usr/lib/python3.5/inspect.py", line 2226 in _signature_from_callable
  File "/usr/lib/python3.5/inspect.py", line 1089 in getfullargspec
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 54 in func_arg_string
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 42 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 143 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 326 in power
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24 in wrapper
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 148 in open
  ...
Aborted (core dumped)

on ^C it does not end

{
  "id": "uuid:7bd077a6-9852-4de4-a0d6-04422dd8b786",
  "name": "[TV] Samsung",
  "version": "2.0.25",
  "device": {
    "type": "Samsung SmartTV",
    "duid": "uuid:7bd077a6-9852-4de4-a0d6-04422dd8b786",
    "model": "15_HAWKM_UHD_2D",
    "modelName": "UE48JU6400",
    "description": "Samsung DTV RCR",
    "networkType": "wireless",
    "ssid": "23:00:00:00:00:00",
    "ip": "192.168.178.26",
    "firmwareVersion": "Unknown",
    "name": "[TV] Samsung",
    "id": "uuid:7bd077a6-9852-4de4-a0d6-04422dd8b786",
    "udn": "uuid:7bd077a6-9852-4de4-a0d6-04422dd8b786",
    "resolution": "1920x1080",
    "countryCode": "GR",
    "msfVersion": "2.0.25",
    "smartHubAgreement": "true",
    "wifiMac": "24:4B:03:89:3B:3F",
    "developerMode": "0",
    "developerIP": ""
  },
  "type": "Samsung SmartTV",
  "uri": "http://192.168.178.26:8001/api/v2/"
}
@kdschlosser
Copy link
Owner

what OS are you running?? I have not seen an error like that before,

also try running samsungctl without the python -m

functionally it should run the same doing the python -m. but ya never know.

@kdschlosser
Copy link
Owner

Oh never you mind.. I know what it is.. give me a few to fix it..

@kdschlosser
Copy link
Owner

ok I updated the develop branch. so you will want to clone and test that one.

@ageorgios
Copy link
Author

ageorgios commented Feb 3, 2019

Thank you for the quick response!

better now, another error to debug now:

parallels@parallels-vm:~/samsungctl$ samsungctl --method encrypted --host 192.168.178.26 --config-file "/tmp/tv.config" KEY_MENU
Please enter pin from tv: 2945
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/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/__main__.py", line 355, in main
    with Remote(config) as remote:
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote.py", line 73, in __call__
    return RemoteWrapper(conf)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote.py", line 48, in __init__
    remote.__init__(self, config)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 130, in __init__
    websocket_base.WebSocketBase.__init__(self, config)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/websocket_base.py", line 37, in __init__
    self.open()
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44, in wrapper
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 170, in open
    output = self.hello_exchange(tv_pin)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/utils.py", line 44, in wrapper
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/__init__.py", line 244, in hello_exchange
    hello_output = crypto.generateServerHello(self.config.id, pin)
  File "/usr/local/lib/python3.5/dist-packages/samsungctl-0.8.0b0-py3.5.egg/samsungctl/remote_encrypted/crypto.py", line 67, in generateServerHello
    data = struct.pack(">I", len(userId)) + userId.encode('utf-8') + swapped
TypeError: object of type 'NoneType' has no len()

after deleting /tmp/tv.config

python3 -m samsungctl --method encrypted --host 192.168.178.26 --config-file "/tmp/tv.config" KEY_MENU
Please enter pin from tv: 1121
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/parallels/samsungctl/samsungctl/__main__.py", line 451, in <module>
    main()
  File "/home/parallels/samsungctl/samsungctl/__main__.py", line 355, in main
    with Remote(config) as remote:
  File "/home/parallels/samsungctl/samsungctl/remote.py", line 73, in __call__
    return RemoteWrapper(conf)
  File "/home/parallels/samsungctl/samsungctl/remote.py", line 60, in __init__
    config.upnp_locations
  File "/home/parallels/samsungctl/samsungctl/upnp/__init__.py", line 23, in __init__
    self._connect_upnp()
  File "/home/parallels/samsungctl/samsungctl/upnp/__init__.py", line 36, in _connect_upnp
    UPNPObject.__init__(self, self.ip_address, self._locations)
  File "/home/parallels/samsungctl/samsungctl/upnp/UPNP_Device/upnp_class.py", line 66, in __init__
    services = node.find('serviceList')
AttributeError: 'NoneType' object has no attribute 'find'

@kdschlosser
Copy link
Owner

OK i added something that should fix the immediate problem at hand. it is going to print out a bunch of XML data to the screen. I would like to see a copy of that data please. I need to know why there is no device node in thee XML data.

@kdschlosser
Copy link
Owner

develop Branch is what you need to test with

@pavelbinar
Copy link

@kdschlosser please see my debug info for the model JU6400 over here:
#106 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants