Python Plugin: Samsung TV

Python and python framework
Calzor Suzay
Posts: 130
Joined: Tuesday 08 July 2014 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: UK
Contact:

Re: Python Plugin: Samsung TV

Post by Calzor Suzay » Friday 05 January 2018 1:51

I've for now got rid of plugin.py as it seems to crash Domoticz.
Would like to get it working though :?

dextm80
Posts: 61
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Samsung TV

Post by dextm80 » Thursday 18 January 2018 20:29

News about a simple guide?
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
2x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge

dextm80
Posts: 61
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Samsung TV

Post by dextm80 » Sunday 21 January 2018 0:42

when i try this command: samsungctl -i --host xxx.xxx.x.xx --method websocket

Traceback (most recent call last):
File "/usr/local/bin/samsungctl", line 11, in <module>
load_entry_point('samsungctl==0.7.1', 'console_scripts', 'samsungctl')()
File "/usr/lib/python3.5/samsungctl/__main__.py", line 110, in main
with Remote(config) as remote:
File "/usr/lib/python3.5/samsungctl/remote.py", line 11, in __init__
self.remote = RemoteWebsocket(config)
File "/usr/lib/python3.5/samsungctl/remote_websocket.py", line 30, in __init__
self._read_response()
File "/usr/lib/python3.5/samsungctl/remote_websocket.py", line 72, in _read_response
raise exceptions.UnhandledResponse(response)
samsungctl.exceptions.UnhandledResponse: {'event': 'ms.channel.timeOut'}

any ideas?
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
2x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge

zak45
Posts: 401
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8872
Contact:

Re: Python Plugin: Samsung TV

Post by zak45 » Sunday 21 January 2018 13:22

@dextm80

do you have tried in this way :

samsungctl -i --host x.x.x.x --port 8001 --method websocket --timeout 1

Samsungctl do not work on all model ... here is the link to the supported models:

https://github.com/Ape/samsungctl/wiki/Supported-Models

dextm80
Posts: 61
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Samsung TV

Post by dextm80 » Sunday 21 January 2018 13:28

Hi zak45 thanks. I ve 65ks7000
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
2x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge

HM31
Posts: 14
Joined: Friday 04 August 2017 16:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Samsung TV

Post by HM31 » Sunday 21 January 2018 17:16

EdwinK wrote:
Sunday 14 May 2017 17:28
Thanks. Going to try this.

Code: Select all

[email protected]:/volume3/@appstore/domoticz/var/scripts/python# pip3 intall samsungctl
-ash: pip3: command not found
Before that I already did a 'sudo -i' (something that Synology wants instead of just plain sudo'.
It seems that on Synology access to pip3 must be done from inside python3. I follow a combination of this http://blog.vincentpau.com/2015/08/17/where-is-pip3/ and, of course, this https://www.domoticz.com/wiki/Plugins/SamsungTV.html to install samsungctl on my two Synology. But on the one with DSM 5.2 the Python Plugins seems not to be implemented on evansport architecture (ds214play), thus i can't have Samsung TV hardware . And on the other one, with DSM 6.1, I got the Samsung TV in hardware list but this is at another place where I don't have the TV ...

Does anyone have built a version of Domoticz on ds214play with DSM 5.2 and python extension installed because jahdal don't have (http://www.jadahl.com/domoticz_beta_5.2 ... 20Version/)

dextm80
Posts: 61
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Samsung TV

Post by dextm80 » Wednesday 24 January 2018 19:50

zak45 wrote:
Sunday 21 January 2018 13:22
@dextm80

do you have tried in this way :

samsungctl -i --host x.x.x.x --port 8001 --method websocket --timeout 1

Samsungctl do not work on all model ... here is the link to the supported models:

https://github.com/Ape/samsungctl/wiki/Supported-Models
ok with your command i'm able to connetct my samsung tv, but if i go to domoticz, install plugin, this is log:

Code: Select all

 2018-01-24 18:38:40.521 Error: (Samsung) 'onCommand' failed 'ImportError'.
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 179 in /home/luigi/domoticz/plugins/SamsungTV/plugin.py, function onCommand
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 287 in /home/luigi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 11 in /usr/lib/python3.5/samsungctl/remote.py, function __init__
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 17 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__ 
can you help me?
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
2x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge

User avatar
jumbotroll
Posts: 576
Joined: Tuesday 13 January 2015 15:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: Python Plugin: Samsung TV

Post by jumbotroll » Wednesday 24 January 2018 20:14

HM31 wrote:
Sunday 21 January 2018 17:16
EdwinK wrote:
Sunday 14 May 2017 17:28
Thanks. Going to try this.

Code: Select all

[email protected]:/volume3/@appstore/domoticz/var/scripts/python# pip3 intall samsungctl
-ash: pip3: command not found
Before that I already did a 'sudo -i' (something that Synology wants instead of just plain sudo'.
It seems that on Synology access to pip3 must be done from inside python3. I follow a combination of this http://blog.vincentpau.com/2015/08/17/where-is-pip3/ and, of course, this https://www.domoticz.com/wiki/Plugins/SamsungTV.html to install samsungctl on my two Synology. But on the one with DSM 5.2 the Python Plugins seems not to be implemented on evansport architecture (ds214play), thus i can't have Samsung TV hardware . And on the other one, with DSM 6.1, I got the Samsung TV in hardware list but this is at another place where I don't have the TV ...

Does anyone have built a version of Domoticz on ds214play with DSM 5.2 and python extension installed because jahdal don't have (http://www.jadahl.com/domoticz_beta_5.2 ... 20Version/)
I can compile a test version for you with Python plugin, but you have to take backup of your database and scripts and uninstall the old domoticz version before you install the new version with Python plugin.
I have limited time to do support on this test build, so use it at own risk.
BTW DS214play use arch-evansport, check on my server for it in 20 min.
http://www.jadahl.com/domoticz_beta_5.2 ... 20Version/
You also have to install Python spk package for DSM5.2 from here: http://ukdl.synology.com/download/Packa ... .4.1-0101/
Regards
Jumbotroll
http://www.jadahl.com

zak45
Posts: 401
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8872
Contact:

Re: Python Plugin: Samsung TV

Post by zak45 » Wednesday 24 January 2018 21:30

dextm80 wrote:
Wednesday 24 January 2018 19:50

Code: Select all

 2018-01-24 18:38:40.521 Error: (Samsung) 'onCommand' failed 'ImportError'.
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 179 in /home/luigi/domoticz/plugins/SamsungTV/plugin.py, function onCommand
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 287 in /home/luigi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 11 in /usr/lib/python3.5/samsungctl/remote.py, function __init__
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 17 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__ 
can you help me?
New version uploaded, 2.0.1, give it a try and let me know.

dextm80
Posts: 61
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Samsung TV

Post by dextm80 » Wednesday 24 January 2018 21:38

zak45 wrote:
Wednesday 24 January 2018 21:30
dextm80 wrote:
Wednesday 24 January 2018 19:50

Code: Select all

 2018-01-24 18:38:40.521 Error: (Samsung) 'onCommand' failed 'ImportError'.
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 179 in /home/luigi/domoticz/plugins/SamsungTV/plugin.py, function onCommand
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 287 in /home/luigi/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 11 in /usr/lib/python3.5/samsungctl/remote.py, function __init__
2018-01-24 18:38:40.521 Error: (Samsung) ----> Line 17 in /usr/lib/python3.5/samsungctl/remote_websocket.py, function __init__ 
can you help me?
New version uploaded, 2.0.1, give it a try and let me know.
Sorry, i'm a newbie, how and what can i update (samsungctl is 0.7 verision)?

Thanks
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
2x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge

HM31
Posts: 14
Joined: Friday 04 August 2017 16:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Samsung TV

Post by HM31 » Wednesday 24 January 2018 21:50

jumbotroll wrote:
Wednesday 24 January 2018 20:14

You also have to install Python spk package for DSM5.2 from here: http://ukdl.synology.com/download/Packa ... .4.1-0101/
Many thanks.

Hope it will work because on another post you mentionned that Python3 must be v3.5.1 to work (with DSM 6.1 by the way) and it seems that on DSM 5.2 the last version Python V3 version is V3.4.1-0032 for DS214Play DSM 5.2. I can't install the version of Python you gave because it needs DSM 6.0

zak45
Posts: 401
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8872
Contact:

Re: Python Plugin: Samsung TV

Post by zak45 » Wednesday 24 January 2018 23:43

dextm80 wrote:
Wednesday 24 January 2018 21:38

Sorry, i'm a newbie, how and what can i update (samsungctl is 0.7 verision)?

Thanks
Download plugin.py from dropbox.

HM31
Posts: 14
Joined: Friday 04 August 2017 16:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Samsung TV

Post by HM31 » Saturday 17 February 2018 23:45

zak45 wrote:
Tuesday 06 June 2017 12:27
@Drikus
thanks for this TIP.

if someone else using Synology can confirm.. then will add that to the wiki.
Doesn't change anything for me on DSM 6.1.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests