kdschlosser / samsungctl

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

Develop branch not working for MU80009 #108

Closed Lyr3x closed 5 years ago

Lyr3x commented 5 years ago

After upgraded my fw to 1262 i checked out you modification because the genuine samsungctl does not work anymore. The only branch which is working for my MU8009 is the new_websocket_client branch When using the develop branch i am getting

python -m samsungctl --version
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "samsungctl/__init__.py", line 26, in <module>
    from .remote import Remote  # NOQA
  File "samsungctl/remote.py", line 5, in <module>
    from .remote_legacy import RemoteLegacy
  File "samsungctl/remote_legacy.py", line 10, in <module>
    from . import upnp
  File "samsungctl/upnp/__init__.py", line 13, in <module>
    from .. import cec_control
  File "samsungctl/cec_control/__init__.py", line 566, in <module>
    MEDIA_FORWARD = cec.CEC_PLAY_MODE_PLAY_FORWARD
AttributeError: 'module' object has no attribute 'CEC_PLAY_MODE_PLAY_FORWARD'

I checked out the master branch and removed all dependencies beforehand but this version is just ending in an infinite loop

kdschlosser commented 5 years ago

what OS are you running on?

It appears as tho you have an old version of libcec installed. If you upgrade it then all should work properly. I will add some exception catching and version testing for the installed libcec version.

Lyr3x commented 5 years ago

I am using a nearly fresh installed Debian stretch and installed libcec yesterday the first time.

kdschlosser commented 5 years ago

are you running on a raspberry Pi???

did you install libcec or did you compile it grabbing the latest source code from libcec's github repo? I am asking this because the CEC side of things is based off the of source code in the github repository

instructions are located here

https://github.com/Pulse-Eight/libcec/blob/master/docs/README.raspberrypi.md You may need to specify the master branch and not the release branch when you follow those instructions.

kdschlosser commented 5 years ago

Also there are a boat load of changes specific to Debian that were made that are not in a release yet. I just checked libcec's repo. and there is also a lot of changes to thee portion of the code that compiles libcec for use with python. So I am going to guess that this is the reason why you are getting the error.

Now I can manually add all of the constants into the library. the problem is I do not know what else is affected by the changes that are made. so it could affect more then the constants.

Lyr3x commented 5 years ago

I did not used the latest source from GitHub. I'll check that tomorrow and get back to you! thanks for the hint. And no I am running it on a x86 system

kdschlosser commented 5 years ago

and you have a Pulse Eight or similar CEC adapter?

Lyr3x commented 5 years ago

I am not using CEC at all. I was wondering if i just configure it without CEC but i didnt figured it out.

kdschlosser commented 5 years ago

if you do not have a CEC adapter then installing liibCEC is not going to do a thing for you. My suggestion would be to uninstall libcec and go from there. CEC is still very experimental. and I know that I do have a few issues that i need to sort out.

Lyr3x commented 5 years ago

Well i couldnt execute the script without libcec installed, even if i dont used cec. But sadly the TV is damaged somehow and i sent it back. So that can be closed.

kdschlosser commented 5 years ago

I am sorry for the TV being damaged. Hopefully you will get a refund for it. I am going to make a suggestion to purchase a different brand like Sony. which has a very open API and does not have the issues that SamsungTV's have,