Page 10 of 12
Re: Samsung Smart TV Plus
Posted: Sun Mar 31, 2019 12:12 am
by kgschlosser
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.
Re: Samsung Smart TV Plus
Posted: Sun Mar 31, 2019 3:38 pm
by holdestmade
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
Re: Samsung Smart TV Plus
Posted: Sun Mar 31, 2019 4:51 pm
by kgschlosser
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.
Re: Samsung Smart TV Plus
Posted: Sat Aug 24, 2019 12:57 am
by Statikk
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.

Re: Samsung Smart TV Plus
Posted: Sat Aug 24, 2019 1:04 am
by jonib
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.
Looks like I had an old version. All attachments ware lost due to hosting problems.
jonib
Re: Samsung Smart TV Plus
Posted: Sat Aug 24, 2019 1:31 am
by Statikk
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.
Re: Samsung Smart TV Plus
Posted: Thu Aug 29, 2019 7:24 pm
by Statikk
Any ideas?

Re: Samsung Smart TV Plus
Posted: Thu Aug 29, 2019 9:37 pm
by jonib
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
Re: Samsung Smart TV Plus
Posted: Fri Aug 30, 2019 5:17 am
by kgschlosser
@jonib. what TV do you have??
Re: Samsung Smart TV Plus
Posted: Fri Aug 30, 2019 12:07 pm
by jonib
kgschlosser wrote: Fri Aug 30, 2019 5:17 am
@jonib. what TV do you have??
Samsung LE40A766 (2008)
jonib
Re: Samsung Smart TV Plus
Posted: Sat Aug 31, 2019 5:39 am
by kgschlosser
@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)
Re: Samsung Smart TV Plus
Posted: Sat Aug 31, 2019 6:14 am
by jonib
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
Re: Samsung Smart TV Plus
Posted: Sat Aug 31, 2019 3:27 pm
by jonib
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
Re: Samsung Smart TV Plus
Posted: Sat Aug 31, 2019 4:31 pm
by kgschlosser
Re: Samsung Smart TV Plus
Posted: Sat Aug 31, 2019 4:49 pm
by jonib
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.

)
jonib