Samsung Smart TV Plus

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Wed Jun 20, 2018 8:30 pm

i need to see all of the logs. i need to see more then a single command and I also need to see the response when it first connects.


I will look into the add TV thing.

can i also get a copy of the SnasungSmartTVPlus class from the config.py file.
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by holdestmade » Thu Jun 21, 2018 7:53 am

Morning, I've PMd my logs and config to you

All seemed OK but after a while I get this error and only a restart of EG cures it, for a while
I tried different commands to see if one particular triggered it but seems to be different ones.

Cheers

21/6/18 8:50:38 AM Error in Action: "Samsung Smart TV IP Control +: Info: SHCHC5ZTTO2RS"
21/6/18 8:50:38 AM Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
21/6/18 8:50:38 AM File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
21/6/18 8:50:38 AM return self(*args)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 389, in __call__
21/6/18 8:50:38 AM return self.plugin.DoCommand(cmd, device_id)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 377, in DoCommand
21/6/18 8:50:38 AM return self.tvs[device_id].send(cmd)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote.py", line 91, in send
21/6/18 8:50:38 AM return self.__sock.send(key)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 84, in send
21/6/18 8:50:38 AM self.sock.send(payload)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\websocket\_core.py", line 240, in send
21/6/18 8:50:38 AM return self.send_frame(frame)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\websocket\_core.py", line 265, in send_frame
21/6/18 8:50:38 AM l = self._send(data)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\websocket\_core.py", line 430, in _send
21/6/18 8:50:38 AM return send(self.sock, data)
21/6/18 8:50:38 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\websocket\_socket.py", line 117, in send
21/6/18 8:50:38 AM return sock.send(data)
21/6/18 8:50:38 AM error: [Errno 10054] An existing connection was forcibly closed by the remote host

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Jun 22, 2018 12:46 am

I will get rid of the error that's not a problem. It seems as though the TV doesn't respond to any keys being sent over a websocket command. I took a brief look at the SOAP opetions that come up in a document given by the TV from the UPNP SSDP packet. I believe that additional websocket commands might exist other then simply being able to send remote codes. Things like getting the TVs volume level. And the source names. And the current selected source. Apps installed on the TV. The hard part is that anything I find about the soap bits don't explain anything about how to authenticate. I am digging to see if I can possibly find an old Samsung device where the API is explained. Samsung is not all that forth coming with their API so I am able to find bits and pieces but never a whole. I have been collecting these bits and pieces to see if I can possibly come up with a complete AUTH API for the TV. If I can auth with it the rest is easy Json rpc. I am not at my house at the moment. But when I get home I will fix up that error so we can at least make it stable. There might be an activity timeout on the TV side. So it most likely has nothing to do with.the command being sent.


We also need to look into the reason why the plugin is not adding the TV
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Jun 22, 2018 6:07 am

OK so this new update should handle the error. and if it occurs it will close the connection then try and reopen it.
Attachments
SamsungSmartTVPlus-0.1.5b.egplugin
(203.32 KiB) Downloaded 19 times
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by holdestmade » Fri Jun 22, 2018 8:10 am

That works great, cheers.

I've PMd you some more info.

Ta

Medy
Posts: 42
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Samsung Smart TV Plus

Post by Medy » Wed Sep 12, 2018 1:23 am

Dunno if my tv is supported for this plugin

it gets detected as ue55H6200

nothing works though.

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Wed Sep 12, 2018 3:32 am

I just realized I had not updated the plugin on the main page. I will do that in a little bit. The current version is attached to this POST

This is the setup you will need to have

EG 0.5 RC4
Samsung Network Control Plus plugin version 0.1.5b

You CANNOT have the samsungctl library installed into EG. you will need to remove it if it is.

It should have no issues with the H series TV's
If you like the work I have been doing then feel free to Image

Medy
Posts: 42
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Samsung Smart TV Plus

Post by Medy » Wed Sep 12, 2018 1:58 pm

How can i remove the samsungctl library ? What is this ?

is this a serearte plugin ?
- Samsung Network Control Plus plugin version 0.1.5b


Because the one in this thread ( which I isntalled) is called :
- - Samsung Smart TV IP Control+


is eventghostrocks a official side for download plugins ? or where i do I find the latest Samsung Network Control Plus ?

I have installed:
- RC4
- Samsung Smart TV IP Control+ 0.1.5b

Not installed :
- Samsung Network Control Plus 0.1.5b
( in case this is not the same thing)

pralima87
Posts: 11
Joined: Tue Sep 11, 2018 3:36 pm

Re: Samsung Smart TV Plus

Post by pralima87 » Wed Sep 12, 2018 2:27 pm

Thanks for this!
Awesome plugin!

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Thu Sep 13, 2018 1:41 am

@Medy


Those 2 plugins are the same thing.

it is just that the plugin located on the first post of this topic is not the most recent version of it.

the samsungctl library is a library that can be gotten from github. there are users that have added this to EG in order to get control of newer TV's and this needs to be removed in order for this plugin to work properly. If you do not have it installed then there is no need to worry about it.


OK so as far as the H series TV's go. This is the year when Samsung changes things all around. What I want you to do first is to update the firmware on your TV. I believe the H series TV's do not have the websocket control with lower firmware versions. So we need to make sure the TV is running a firmware that will allow the connections to be made. Once you confirm that information we can go from there if it is still not working.
If you like the work I have been doing then feel free to Image

Medy
Posts: 42
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Samsung Smart TV Plus

Post by Medy » Fri Sep 14, 2018 12:51 am

well thx to auto updates im always on the latest software update . Also im pretty sure connections work since I did once used a android app to turn off the tv via wifi. eventghost gives me tv power on events ... but commands dont work .... I dont have anything from github isntalled.

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Sep 14, 2018 5:34 am

ok. I have to check the plugin and see where i set the cutoff point for using the old style connection. i could have that set in the wrong place.
If you like the work I have been doing then feel free to Image

pralima87
Posts: 11
Joined: Tue Sep 11, 2018 3:36 pm

Re: Samsung Smart TV Plus

Post by pralima87 » Fri Sep 14, 2018 2:53 pm

After a while the plugin stops working for me.
I even deleted the controller on the TV to start all from zero but the inputs still stop working after a while.

Sometimes I also get some log errors like this:

Code: Select all

   Error in Action: "Samsung Smart TV IP Control +: Alternate Power: SHCHC5ZTTO2RS"
   Traceback (most recent call last) (0.5.0-rc4):
     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 389, in __call__
       return self.plugin.DoCommand(cmd, device_id)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 377, in DoCommand
       return self.tvs[device_id].send(cmd)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote.py", line 91, in send
       return self.__sock.send(key)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 64, in send
       self.open()
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py", line 42, in open
       from . import websocket
   SystemError: Parent module 'eg.UserPluginModule.SamsungSmartTVPlus' not loaded, cannot perform relative import 
Or this:

Code: Select all

Error starting plugin: Samsung Smart TV IP Control +
Traceback (most recent call last) (0.5.0-rc4):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 223, in Stop
    self.instance.__stop__()
  File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 334, in __stop__
    tv.close()
AttributeError: 'str' object has no attribute 'close'

Medy
Posts: 42
Joined: Sat Nov 15, 2014 8:33 pm
Location: Germany

Re: Samsung Smart TV Plus

Post by Medy » Sat Sep 15, 2018 11:40 pm

kgschlosser wrote:
Fri Sep 14, 2018 5:34 am
ok. I have to check the plugin and see where i set the cutoff point for using the old style connection. i could have that set in the wrong place.
Maybe my model is a special case... if so dont stress ;) .. I appriciate you try though.

Image

Post Reply