kdschlosser / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
148 stars 34 forks source link

Samsung UE48JU7000 #109

Open WimBre opened 5 years ago

WimBre commented 5 years ago

Hi,

When I run the command "samsungctl --host 192.168.xxx.xxx --name myremote KEY_POWEROFF" I am getting:

Traceback (most recent call last): File "/usr/local/bin/samsungctl", line 11, in 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 355, 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 67, 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_legacy.py", line 79, in open raise RuntimeError('Unable to pair with TV.. Is the TV on?!?') RuntimeError: Unable to pair with TV.. Is the TV on?!?

  1. The response on the command "http://IP:8001/api/v2" shows: { "status": 404, "message": "Not Found", "code": 404 }

  2. ping 192.168.xxx.xxx PING 192.168.xxx.xxx (192.168.xxx.xxx) 56(84) bytes of data. 64 bytes from 192.168.xxx.xxx: icmp_seq=1 ttl=64 time=0.422 ms 64 bytes from 192.168.xxx.xxx: icmp_seq=2 ttl=64 time=0.337 ms 64 bytes from 192.168.xxx.xxx: icmp_seq=3 ttl=64 time=0.322 ms 64 bytes from 192.168.xxx.xxx: icmp_seq=4 ttl=64 time=0.306 ms 64 bytes from 192.168.xxx.xxx: icmp_seq=5 ttl=64 time=0.307 ms 64 bytes from 192.168.xxx.xxx: icmp_seq=6 ttl=64 time=0.297 ms

Questions:

  1. Does anyone have an idea how to solve this?
  2. Is there an roadmap/tutorial how to implement this kind of packages (how to/software/etc.)?
WimBre commented 5 years ago

I forgot the "/" at the end and the response on the command is now: "http://IP:8001/api/v2/" shows: { "id": "uuid:3acaca0d-18d3-xxxx-a708-431e0cxxxxxxx", "name": "[TV] ", "version": "2.0.25", "device": { "type": "Samsung SmartTV", "duid": "uuid:3acaca0d-18d3-xxxx-a708-431e0cxxxxxxx", "model": "15_HAWKM_UHD", "modelName": "UE48JU7000", "description": "Samsung DTV RCR", "networkType": "wired", "ssid": "", "ip": "192.168.xxx.xxx", "firmwareVersion": "Unknown", "name": "[TV] ", "id": "uuid:3acaca0d-18d3-xxxx-a708-431e0cxxxxxxx", "udn": "uuid:3acaca0d-18d3-xxxx-a708-431e0cxxxxxxx", "resolution": "1920x1080", "countryCode": "NL", "msfVersion": "2.0.25", "smartHubAgreement": "true", "wifiMac": "xx:xx:xx:xx:xx:xx", "developerMode": "0", "developerIP": "" }, "type": "Samsung SmartTV", "uri": "http://192.168.xxx.xxx:8001/api/v2/" }

So the remaining questions are:

  1. Does anyone have an idea how to solve the pairing issue?
  2. Is there an roadmap/tutorial how to implement this kind of packages (how to/software/etc.)?
kdschlosser commented 5 years ago

are you using the develop branch? I would recommend trying that. If you clone the branch and run the RUN_ME.py file it will run a series of tests on your TV. You will be instructed on what is taking place and if the script requires any user interaction you will be prompted. The logging information is going to go flying by. so if the script pauses scroll back and see if your input is needed.

This library is still very much in development. I am in the process of ironing out the kinks in it. There are not to many left to sort out. It's close to being at a point in which i can release it.

Please zip up the logging output folder and attach iit to a message here. This way I can read over it and make sure everything is working as it should. and if not I can make any changed necessary.

WimBre commented 5 years ago

I have cloned the branch and ran the RUN_ME.py file but got an error:

Features are Power on for legacy TV's, Source list for 2016+ TV's, volume and mute direct input will use CEC instead of UPNP.

press any key to continue...

Traceback (most recent call last): File "RUN_ME.py", line 72, in with open(os.path.join(DATA_PATH, 'system.log'), 'w') as f: IOError: [Errno 2] No such file or directory: '/tests/system.log'.

I am running this from a Raspberry Pi (ssh/MAC Terminal)

kdschlosser commented 5 years ago

you should have been asked if you wanted to make the tests directory. maybe iit encountered an error

try running the script as sudo

kdschlosser commented 5 years ago

never mind..

I made an error in the code. let me correct that

kdschlosser commented 5 years ago

fixed

WimBre commented 5 years ago

Thnx for your quick response! See the zip.file. @ test.zip

kdschlosser commented 5 years ago

the tests folder is created in the root of your drive. not in the libraries folder.

for Windows: C:\tests

all others /tests

samsungctl-develop/samsungctl/tests is not the right folder.

WimBre commented 5 years ago

Sorry! test.zip

WimBre commented 5 years ago

any update?

kdschlosser commented 5 years ago

It is mush easier for me if i only have to post a single time about any changes and updates. if you wouldn't mind joining the conversation over at #106 it would be most helpful

WimBre commented 5 years ago

No problem.