Samsung Smart TV Plus

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 4805
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Samsung Smart TV Plus

Post by kgschlosser » Sun Mar 31, 2019 12:12 am

I have been working on the samsungctl library. I only have 2 things I am having an issue with. And that is powering the TV back on. And getting application content to play.

It supports all Samsung TVs from 2011 to current. Including the H and J TVs and also the newest ssl
Connections.
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 180
Joined: Thu Dec 04, 2014 2:44 pm

Re: Samsung Smart TV Plus

Post by holdestmade » Sun Mar 31, 2019 3:38 pm

Yes, been watching that as I'm now trialling Home Assistant to hopefully get rid of smartthings and saw link to it from HA's forums

Will you make a new plugin for EG once its all working ?

Thanks

User avatar
kgschlosser
Site Admin
Posts: 4805
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Samsung Smart TV Plus

Post by kgschlosser » Sun Mar 31, 2019 4:51 pm

Oh yeah. I am using the people over at Home Assistant as the guinea pigs to get the thing running right. there are a lot more people using the Samsung TV over there. Because of the short comings of Home Assistant it will not support all of the features that can be done with the TV like EG will be able to. But all of the tests check out for those features so we should be fine once i Alter the plugin for EG. Most of the work is already done there also. I really only have to plop the library into place in the EG plugin and make some minor changes to allow the discovery to work and for saving the config information.

I am also going to make the EG plugin work with the CEC+ plugin if it is installed. and if it is not and you have a cec adapter connected I will make it so it can use the CEC adapter. having the CEC adapter will take care of not being able to directly change the sources on the 2016+ TV's. and it will speed up the powering off and on process.
If you like the work I have been doing then feel free to Image

Statikk
Posts: 6
Joined: Tue Dec 13, 2016 9:55 pm

Re: Samsung Smart TV Plus

Post by Statikk » Sat Aug 24, 2019 12:57 am

How is this plugin coming along? Is it capable of powering on/off and switching sources? That's really all I need it for. I was going to try it out but it seems the file is no longer available. :cry:

jonib
Plugin Developer
Posts: 1318
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Samsung Smart TV Plus

Post by jonib » Sat Aug 24, 2019 1:04 am

Statikk wrote:
Sat Aug 24, 2019 12:57 am
How is this plugin coming along? Is it capable of powering on/off and switching sources? That's really all I need it for. I was going to try it out but it seems the file is no longer available. :cry:
Looks like I had the last version. All attachments ware lost due to hosting problems.

jonib
Attachments
SamsungSmartTVPlus-0.1.1b.egplugin
(203.14 KiB) Downloaded 10 times
XBMC2 plugin to control XBMC. If you want to flatter me Image

Statikk
Posts: 6
Joined: Tue Dec 13, 2016 9:55 pm

Re: Samsung Smart TV Plus

Post by Statikk » Sat Aug 24, 2019 1:31 am

Thanks for the quick reply! I have the plugin installed but apparently it has no configuration options? When I add an action the action seems to have a drop down to select a TV but it's empty. When things are functioning properly does this auto-populate?

Edit: Sorry just figured it out. I just did a fresh install on my PC last night and didn't realize my NIC was still set to public.

Edit2: Well it detected the TV and shows all of it's info correctly but when it loads the plugin I get:

Code: Select all

Exception in thread SamsungTVScan:
Traceback (most recent call last):
  File "threading.pyc", line 801, in __bootstrap_inner
  File "threading.pyc", line 754, in run
  File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 102, in _scan_loop
    tv.open()
  File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote.py", line 82, in open
    self.__sock.open()
  File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 55, in open
    _serialize_string(self.remote.name)
  File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 31, in _serialize_string
    return base64.b64encode(data).decode("utf-8")
NameError: global name 'base64' is not defined
And when I try to execute an action:

Code: Select all

   Error in Action: "Samsung Smart TV IP Control +: Power OFF: KEY_POWEROFF"
   Traceback (most recent call last) (0.5.0-rc6):
     File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
       return self(*args)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 349, in __call__
       return self.plugin.DoCommand(cmd, serial_number)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 328, in DoCommand
       return self.tvs[serial_number].send(cmd)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote.py", line 88, in send
       return self.__sock.send(key)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 79, in send
       self.open()
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 55, in open
       _serialize_string(self.remote.name)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 31, in _serialize_string
       return base64.b64encode(data).decode("utf-8")
   NameError: global name 'base64' is not defined
This is unrelated to the thread topic but just trying to open the EventGhost options screen I get:

Code: Select all

Traceback (most recent call last) (0.5.0-rc6):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
    self.Configure(*args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\OptionsDialog.py", line 194, in Configure
    languageChoice.SetSelection(languageList.index(config.language))
ValueError: 'en_US' is not in list


And this is a fresh install.

Statikk
Posts: 6
Joined: Tue Dec 13, 2016 9:55 pm

Re: Samsung Smart TV Plus

Post by Statikk » Thu Aug 29, 2019 7:24 pm

Any ideas? :(

jonib
Plugin Developer
Posts: 1318
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Samsung Smart TV Plus

Post by jonib » Thu Aug 29, 2019 9:37 pm

Statikk wrote:
Thu Aug 29, 2019 7:24 pm
Any ideas? :(
I never got to test the plugin as my TV is probably not supported.
But based on your first two errors, adding this to "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py"

Open the file in a text editor:

Code: Select all

import json
import threading
from .websocket import WebSocketApp
above these lines put this "import base64":

Code: Select all

import base64
import json
import threading
from .websocket import WebSocketApp
It should fix that error at least, no guarantees though.

The last error no idea, sorry.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

User avatar
kgschlosser
Site Admin
Posts: 4805
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Aug 30, 2019 5:17 am

@jonib. what TV do you have??
If you like the work I have been doing then feel free to Image

jonib
Plugin Developer
Posts: 1318
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Samsung Smart TV Plus

Post by jonib » Fri Aug 30, 2019 12:07 pm

kgschlosser wrote:
Fri Aug 30, 2019 5:17 am
@jonib. what TV do you have??
Samsung LE40A766 (2008)

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

User avatar
kgschlosser
Site Admin
Posts: 4805
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Samsung Smart TV Plus

Post by kgschlosser » Sat Aug 31, 2019 5:39 am

@jonib

all you would have to do is to plug the TV into a network. it does have an RJ45 on the back of the thing for it. then either run the plugin or check and see if port 55000 is open or not. I have been working on a new samsung API. it actually has more control and supports TV from 2008 to current (I think) I know it does work on my 2011 (D)
If you like the work I have been doing then feel free to Image

jonib
Plugin Developer
Posts: 1318
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Samsung Smart TV Plus

Post by jonib » Sat Aug 31, 2019 6:14 am

kgschlosser wrote:
Sat Aug 31, 2019 5:39 am
all you would have to do is to plug the TV into a network.
OK, I'll test later today.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jonib
Plugin Developer
Posts: 1318
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Samsung Smart TV Plus

Post by jonib » Sat Aug 31, 2019 3:27 pm

kgschlosser wrote:
Sat Aug 31, 2019 5:39 am
all you would have to do is to plug the TV into a network. then either run the plugin
I got a " Reading Config" in the EventGhost log. No indication it found a TV.
or check and see if port 55000 is open or not.
Hmm where on the TV, computer or Router? How?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

User avatar
kgschlosser
Site Admin
Posts: 4805
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Samsung Smart TV Plus

Post by kgschlosser » Sat Aug 31, 2019 4:31 pm

a port scanner. something like https://www.solarwinds.com/free-tools/port-scanner

on the TV
If you like the work I have been doing then feel free to Image

jonib
Plugin Developer
Posts: 1318
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Samsung Smart TV Plus

Post by jonib » Sat Aug 31, 2019 4:49 pm

kgschlosser wrote:
Sat Aug 31, 2019 4:31 pm
a port scanner. something like https://www.solarwinds.com/free-tools/port-scanner
Fuck I hate the "Free download here" and then you need to provide all kinds of info, that is not "Free". Information is a currency in today's world. But I found another download so alles good, still hate lairs.
on the TV
The scan shows 2 closed ports. (and I can't find any keys. :oops: )

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

Post Reply