Samsung TV control in Domoticz

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

User avatar
perwei
Posts: 16
Joined: Monday 13 February 2017 13:22
Target OS: Linux
Domoticz version: 2020.2
Location: Hønefoss, Norway
Contact:

Re: Samsung TV control in Domoticz

Post by perwei »

stavast wrote: Friday 31 March 2017 18:40
Good luck!
Hi

I've finally got the spare time to try samsunctl. I've installed it on my Raspberry Pi using pip3 as described in the initial post from stavast. No errors during installation but running samsungctl returns an error :

Code: Select all

pi@raspberrypi:~ $ /usr/local/bin/samsungctl -i --host 10.0.0.71 --method websocket
Error: Operation now in progress


I was wondering which port it was using so i looped through the ports that nmap found :

Code: Select all

~$ nmap -p 1-65535 10.0.0.71

Starting Nmap 7.01 ( https://nmap.org ) at 2017-11-17 11:43 CET
Nmap scan report for 10.0.0.71
Host is up (0.010s latency).
Not shown: 65523 closed ports
PORT      STATE SERVICE
7676/tcp  open  imqbrokerd
7678/tcp  open  unknown
8000/tcp  open  http-alt
8001/tcp  open  vcom-tunnel
8002/tcp  open  teradataordbms
8080/tcp  open  http-proxy
8187/tcp  open  unknown
9119/tcp  open  unknown
9197/tcp  open  unknown
9999/tcp  open  abyss
10443/tcp open  unknown
15500/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 2.34 seconds
Then I went through all of these using --port parameter in samsungctl but still the same error.

Regards,
Per W.
Raspberry Pi 3/Raspbian GNU/Linux
Z-Wave.Me Razberry2 Z-Wave controller
3 x Aeotec ZW100 Multisensor 6
1 x Aeotec Smart Dimmer 6
2 x FIBARO System FGWPE Wall Plug
2 x FIBARO Dimmer 2 FGD-212
1 x FIBARO System FGK10x Door Sensor
1 x Popp Wall Controller
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Samsung TV control in Domoticz

Post by EdwinK »

Same error. Not smart enough to figure it out :(
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Calzor Suzay
Posts: 145
Joined: Tuesday 08 July 2014 15:10
Target OS: -
Domoticz version: 4.9700
Location: UK
Contact:

Re: Samsung TV control in Domoticz

Post by Calzor Suzay »

stavast wrote: Friday 31 March 2017 18:40

4. Make sure your TV is on, run the following command from the cli (Change xxx.xxx.xxx.xxx with the IP address of your TV):

Code: Select all

pi@domoticz:~ $ samsungctl --host xxx.xxx.xxx.xxx --method websocket KEY_MUTE  
5. Depending on the setting of your TV, the TV will ask you if you want to allow the external control from the device from which you just send the mute key

6. Allow the external control with your TV Remote and voila! remote control should be working now and the volume of your TV should be muted.
How did you get this working and what is point 5?
Is it mobile device manager notification as I have this off so it shouldn't prompt but on my KS7000 I get

samsungctl -i --host 192.168.1.42 --method websocket
Error: Operation now in progress

Any ideas?
Calzor Suzay
Posts: 145
Joined: Tuesday 08 July 2014 15:10
Target OS: -
Domoticz version: 4.9700
Location: UK
Contact:

Re: Samsung TV control in Domoticz

Post by Calzor Suzay »

Ok managed to get it further...

I have it working via the command line but specify a port, in my case 8001 and have to add a timeout option, even 1 works, so...

samsungctl -i --host 192.168.1.42 --port 8001 --method websocket --timeout 1

Brings me up a menu from a quick test can send commands.

I transferred the options over to Domoticz, it sees the tv 'alive' but now have this problem

2017-12-31 19:35:17.480 (SamsungTV) isAlive status :True
2017-12-31 19:35:17.480 (SamsungTV) Devices are connected - Initialisation
2017-12-31 19:35:17.482 Error: (SamsungTV) 'onStart' failed 'ImportError'.
2017-12-31 19:35:17.482 Error: (SamsungTV) ----> Line 134 in /home/osmc/domoticz/plugins/SamsungTV/plugin.py, function onStart
2017-12-31 19:35:17.482 Error: (SamsungTV) ----> Line 287 in /home/osmc/domoticz/plugins/SamsungTV/plugin.py, function SamsungSend
2017-12-31 19:35:17.482 Error: (SamsungTV) ----> Line 10 in /usr/lib/python3.4/samsungctl/remote.py, function __init__
2017-12-31 19:35:17.482 Error: (SamsungTV) ----> Line 13 in /usr/lib/python3.4/samsungctl/remote_websocket.py, function __init__
2017-12-31 19:35:17.482 (SamsungTV) Heartbeat interval set to: 15.

It obviously creates no devices and fails, any ideas?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest