Re: Python Plugin: Samsung TV
Posted: Sunday 29 October 2017 11:49
it's very difficullt for me by this wiki, i'm a newbie....can you help me ?
Code: Select all
Traceback (most recent call last):
File "/usr/local/bin/samsungctl", line 9, in <module>
load_entry_point('samsungctl==0.6.0', 'console_scripts', 'samsungctl')()
File "/usr/local/lib/python2.7/dist-packages/samsungctl/__main__.py", line 93, in main
config = _read_config()
File "/usr/local/lib/python2.7/dist-packages/samsungctl/__main__.py", line 37, in _read_config
except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined
samsungctl require python 3. just try install it using e.g. : sudo pip3 install samsungctl
Hi, new to this forum. Or at least posting something on itgijsje wrote: ↑Tuesday 17 October 2017 0:06 i do have the plugin.py in the folder plugins/samsungctl did try also to change the folder to SamsungTV and Samsung TV without suc6
also checked if /usr/lib/python3.5/samsungctl/remote.py and /usr/lib/python3.5/samsungctl/remote_websocket.py are there and they are
If i restart domoticz i do getif i try button mute i get2017-10-16 23:44:03.107 Error: (Samsung TV) 'onStart' failed 'ImportError'.
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 134 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function onStart
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 287 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 10 in /usr/lib/python3.5/samsungctl/remote.py, function __init__
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 13 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__I do have a K series tv so maybe it does not work ue49ks7000s017-10-16 23:47:51.587 User: Admin initiated a switch command (117/Samsung TV - Volume/Set Level)
2017-10-16 23:47:51.619 (Samsung TV) Calling message handler 'onCommand'.
2017-10-16 23:47:51.619 (Samsung TV) onCommand called for Unit 3: Parameter 'Off', Level: 0, Connected: True
2017-10-16 23:47:51.621 Error: (Samsung TV) 'onCommand' failed 'ImportError'.
2017-10-16 23:47:51.621 Error: (Samsung TV) ----> Line 182 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function onCommand
2017-10-16 23:47:51.621 Error: (Samsung TV) ----> Line 287 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2017-10-16 23:47:51.621 Error: (Samsung TV) ----> Line 10 in /usr/lib/python3.5/samsungctl/remote.py, function __init__
2017-10-16 23:47:51.621 Error: (Samsung TV) ----> Line 13 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__
if i do samsungctl --host 192.168.0.112 --method websocket KEY_VOLUP that is working also samsungctl --host 192.168.0.112 --method websocket KEY_MUTE
Code: Select all
2017-10-16 23:44:03.107 Error: (Samsung TV) 'onStart' failed 'ImportError'.
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 134 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function onStart
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 287 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 10 in /usr/lib/python3.5/samsungctl/remote.py, function __init__
2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 13 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__
I had the same issue when I upgraded to 0.7.0, could not find out why. So I downgraded to 0.6.0 and could connect through command line. But still nothing through Webinterface. Will double check everything tonight, but I think everything is okay.desertdog wrote: ↑Wednesday 22 November 2017 10:32 Ik ben inmiddels weer een paar stappen verder. Het bleek dat in de config file verwezen werd naar de 0.6.0. versie ipv de 0.7.0 versie. Dit heb ik handmatig aangepakt waarna de onderstaande foutmelding is verdwenenEchter, als ik het commando 'samsungctl -i --host 192.168.1.26' geef dan krijg ik 'Error: Connection refused'Code: Select all
2017-10-16 23:44:03.107 Error: (Samsung TV) 'onStart' failed 'ImportError'. 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 134 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function onStart 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 287 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 10 in /usr/lib/python3.5/samsungctl/remote.py, function __init__ 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 13 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__
Bij 'samsungctl -i --host 192.168.1.26 --method websocket' krijg ik: 'Error: Operation now in progress'
Op mijn tv heb ik geen popup gezien of ik toestemming wilde geven en ook in de device lijsten op de tv zie ik niets geblokt. Momenteel is alleen in deze device lijst mijn telefoon verbonden met de televisie.
Model tv wat ik heb is de SAMSUNG UE48J6200
I use python3.4 (quote was from another user). But yes, the directories are copied to /usr/lib/python3.4/
Code: Select all
2017-11-22 20:59:06.099 Error: (TV) 'onCommand' failed 'ImportError'.
2017-11-22 20:59:06.099 Error: (TV) ----> Line 170 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function onCommand
2017-11-22 20:59:06.099 Error: (TV) ----> Line 287 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2017-11-22 20:59:06.099 Error: (TV) ----> Line 10 in /usr/lib/python3.4/samsungctl/remote.py, function __init__
2017-11-22 20:59:06.099 Error: (TV) ----> Line 13 in /usr/lib/python3.4/samsungctl/remote_websocket.py, function __init__
2017-11-22 20:59:06.099 Error: (TV) ----> Line 22 in /usr/lib/python3.4/websocket/__init__.py, function
2017-11-22 20:59:06.099 Error: (TV) ----> Line 26 in /usr/lib/python3.4/websocket/_abnf.py, function
Code: Select all
cp -r /usr/lib/python3/dist-packages/six.py /usr/lib/python3.4
Code: Select all
:-$ samsungctl -version
samsungctl 0.7.0
Code: Select all
sudo cp -r /usr/local/lib/python3.4/dist-packages/samsungctl/ /usr/lib/python3.4/
File or directory not exist
i've xubuntu 16.04 and i ve py 2.7 and py 3.5 path installedzak45 wrote: ↑Monday 27 November 2017 20:07 @dextm80
there is lots os different configuration possible.
all need to be adapted at your env.
in your case, looks like you have python 3.5, so path should be /usr/lib/python3.5/ (need to be verified)
And as you use linux, probably python 2.7 is also installed and you need to use pip3 instead pip.
Check also the folder site-packages in your python3.5 folder, could be it's installed there...dextm80 wrote: ↑Tuesday 28 November 2017 16:41i've xubuntu 16.04 and i ve py 2.7 and py 3.5 path installedzak45 wrote: ↑Monday 27 November 2017 20:07 @dextm80
there is lots os different configuration possible.
all need to be adapted at your env.
in your case, looks like you have python 3.5, so path should be /usr/lib/python3.5/ (need to be verified)
And as you use linux, probably python 2.7 is also installed and you need to use pip3 instead pip.
i use pip3 but nothing change, can you guide me?![]()
I have exactly the same problem.Jostice wrote: ↑Wednesday 22 November 2017 19:03I had the same issue when I upgraded to 0.7.0, could not find out why. So I downgraded to 0.6.0 and could connect through command line. But still nothing through Webinterface. Will double check everything tonight, but I think everything is okay.desertdog wrote: ↑Wednesday 22 November 2017 10:32 Ik ben inmiddels weer een paar stappen verder. Het bleek dat in de config file verwezen werd naar de 0.6.0. versie ipv de 0.7.0 versie. Dit heb ik handmatig aangepakt waarna de onderstaande foutmelding is verdwenenEchter, als ik het commando 'samsungctl -i --host 192.168.1.26' geef dan krijg ik 'Error: Connection refused'Code: Select all
2017-10-16 23:44:03.107 Error: (Samsung TV) 'onStart' failed 'ImportError'. 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 134 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function onStart 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 287 in /home/pi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 10 in /usr/lib/python3.5/samsungctl/remote.py, function __init__ 2017-10-16 23:44:03.107 Error: (Samsung TV) ----> Line 13 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__
Bij 'samsungctl -i --host 192.168.1.26 --method websocket' krijg ik: 'Error: Operation now in progress'
Op mijn tv heb ik geen popup gezien of ik toestemming wilde geven en ook in de device lijsten op de tv zie ik niets geblokt. Momenteel is alleen in deze device lijst mijn telefoon verbonden met de televisie.
Model tv wat ik heb is de SAMSUNG UE48J6200
Where did you find the config file for redirection of the version number?