SamsungSmartTV

Questions and comments specific to a particular plugin should go here.

SamsungSmartTV

Postby kgschlosser » Mon Mar 14, 2016 7:31 pm

Samsung Smart TV Network Remote Control

I have updated this plugin to allow for communication with more than 1 TV

I am pretty sure it's not backwards compatible with the old plugin tho i didn't test that portion of it.

at the moment i do not have my first Samsung hooked up and my second i do not have a network card for at the moment. so if someone could test this that would be great

it appears as tho all should be working as i didn't change any of the core operation.

i added having all of the actions load into the tree when you install the plugin as well as have a drop down in the sendkey action as well as if you want to add an action you can select it right from there as well

how I have worked this is on the plugin config when you put in the connection data it will copy all of that connection data to all the actions added to the tree
'
if you go into an one of the actions you can change the connection data for a 2nd TV or 3rd for that matter as many as you like in fact.

there is no need to have the plugin multiloaded as this one plugin will handle all TV's

K
Attachments
__init__.py
(33.73 KiB) Downloaded 82 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby Cerebellum » Thu Apr 07, 2016 6:02 pm

Did anyone get this plugin to work with Samsung H series TVs? (models from 2014)
Cerebellum
 
Posts: 4
Joined: Mon Mar 28, 2016 5:18 pm

Re: SamsungSmartTV

Postby kgschlosser » Thu Apr 07, 2016 9:23 pm

don't know. i imagine it should work.

if you have one give it a shot and let me know what the errors are, and i can alter the code to do some agressive logging so we can narrow down the problem.

my 2nd samsung might be an H series, never thought to look, that's why added the ability to sent to more than 1 TV i just don't have that one hooked up yet.

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby thedude » Tue Apr 19, 2016 10:58 pm

Cerebellum wrote:Did anyone get this plugin to work with Samsung H series TVs? (models from 2014)


Yeah, I can confirm it's not working on series H (2014) Tvs. It no longer uses port 55000 either. But changing the port isn't enough, the pairing/auth process is different as well.

Here is some documentation: http://www.samsungdforum.com/Guide/?Fol ... index.html

There is someone on Samygo forums that just created a console application (piggybacking off of decompiled Smart View for windows) you can pass parameters to : https://forum.samygo.tv/viewtopic.php?f ... =10#p89177

I tested it and it works, but it is super unreliable as it sometimes throws exceptions and you have to repair with a pin, which makes automation with EG seem impossible. Maybe as he pushes forward with development, it will be easier to streamline with EG.
thedude
 
Posts: 13
Joined: Sun Apr 17, 2016 6:41 am

Re: SamsungSmartTV

Postby kgschlosser » Wed Apr 20, 2016 2:55 am

well exceptions can be handled, but the pin thing i do not know what that is.

it turns out my tv is a a 2013 and not an H model.

and there is no way of running the attached program without having one. i could program the plugin to deal with the program and handle the exceptions but i have to know what they are and i also have to chat with the dev and see if there is a CLI for the program.

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby kgschlosser » Wed Apr 20, 2016 5:50 am

it has a CLI so that's a good thing, very easy to incorporate into the plugin, i have asked and i would like to know more about the exception errors. and the pin wouldn't be a problem to handle either.

as long as it didn't keep on happening. but to have a way to have it input via an action would be good as a just in case.
so if it did happen the person if they were using say a universal remote could easily press a button that would start a script to save the key presses into a global and then pass the global to the action to enter the pin.

i am going to have to read about how to interact with a command window to read the text off of it and to also be able to send commends into it, but not have it visable

something to do in the near future.

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby thedude » Wed Apr 20, 2016 11:34 pm

Good to see you're willing to implement it.

This is an example of exception being thrown, although it might have to do with old file path the dev on the other forum forgot to remove before publishing the console program:

Image

The pin requires user interaction for pairing (similar to BT pairing). If it were a one time thing it wouldn't be a problem, but sometimes it seems to forgot previously paired devices. That would then require you to repair, which involves reading the pin code off the TV screen and inputting in the console when prompted during the pairing process. You can see how this would be a problem when trying to automate and your EG server is rooms away.

Not only that, sometimes it can't find your TV for pairing at all after erroring out too many times:

Image

When it does work, only some of the commands seem to work. Here is a list of the parameters you can pass to it (haven't tested them all):

Image

Also I'm not really sure how to chain the commands together so you don't have to go through pairing every time you want to send a single command.

This is why I said it's unreliable for EG purposes, but it's a start. Hopefully the dev will continue to push it forward.
thedude
 
Posts: 13
Joined: Sun Apr 17, 2016 6:41 am

Re: SamsungSmartTV

Postby kgschlosser » Thu Apr 21, 2016 4:05 pm

do you mind if i post these images to the dev on the sammygo forums and ask the questions?

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby thedude » Thu Apr 21, 2016 10:21 pm

Not at all, glad you're starting dialogue about it. :D
thedude
 
Posts: 13
Joined: Sun Apr 17, 2016 6:41 am

Re: SamsungSmartTV

Postby kgschlosser » Thu Apr 21, 2016 10:34 pm

well i have multiple samsung tv's and i have one that isn't connected to my network but it is a UN40FH6030 and i think that is a year before they started this nonsense of encrypting the TCP remote


their IR codes are a biatch also, i have a way to transmit them successfully now. using an arduino and a pronto code firmware made by another guy but altered by me it's available on github.

but i also have a version that support different arduino platforms.


just in case someone is interested in that route as well.

i can put together a complete package with all the codes. thing is thay are HUGE and will not fir on the arduino's memory so they have to be send from EG to the arduino for sending. I already have that all done up.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby kgschlosser » Thu Apr 21, 2016 10:53 pm

thedude wrote:Not at all, glad you're starting dialogue about it. :D


oh not a problem, I am not the original author of the Samsung plugin i just modified it to support multiple TV's but i know how it works. and can code up another piece for it easily,

I posted in the sammygo forum and I would like to know if you have the time if you could make a list of all of the buttons that do and do not work.

I will also need the model of the TV as well as the firmware version

firmware information is probably in the setup menu under "system"

and anything that you might feel could be useful in giving the developer the more information the better even if it's not used ya never know.

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby thedude » Fri Apr 22, 2016 12:13 am

kgschlosser wrote:
thedude wrote:Not at all, glad you're starting dialogue about it. :D


oh not a problem, I am not the original author of the Samsung plugin i just modified it to support multiple TV's but i know how it works. and can code up another piece for it easily,

I posted in the sammygo forum and I would like to know if you have the time if you could make a list of all of the buttons that do and do not work.

I will also need the model of the TV as well as the firmware version

firmware information is probably in the setup menu under "system"

and anything that you might feel could be useful in giving the developer the more information the better even if it's not used ya never know.

K


Not sure how useful that'd be, as I could imagine different 2014 model Tvs using different keycodes, but I'll try some more commands. From memory, Power (as in power off), SmartHub, and Menu worked. VolumeUp didn't.
thedude
 
Posts: 13
Joined: Sun Apr 17, 2016 6:41 am

Re: SamsungSmartTV

Postby kgschlosser » Tue Apr 26, 2016 4:28 am

i just wanted to let ya know i haven't skipped out :-D

i am going to check to see if the dev of that program responded to me yet, as of yesterday he/she hadn't

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby kgschlosser » Tue Apr 26, 2016 5:28 am

ok I found something other than that application,

thing is iw want to know if it actually works before i even try to get something working.

it is going to require someone with an H or newer TV to install python 3.5 and install the websockets library for it.


being that there isn't a websockets library installed with EG i would see if i could use the webserver library to achieve this

again i want o know if it works the dev of this stated that it works on his J series.

so i am hopeful. it is the only other solution i have seen.

i do not own an H series or newer so i am not able to test it out.

if someone is willing to do the honors and is familiar with python (just a little) or is willing to learn send me a message and let me know if you are interested.

K
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2702
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: SamsungSmartTV

Postby Boolean263 » Sun Sep 10, 2017 3:41 pm

Okay, so you sent me here, so I figured I'd share my thoughts here.

The plugin configuration dialog only asks for the specifics for one device, which I found a bit odd. I see that when you add an action, you get to specify a different IP address and port and model number and stuff, which technically makes it support multiple devices, but it's not very convenient, because I'll need to re-enter all that information for every action I create which isn't for the first Samsung device.

It'd be better IMHO if the plugin setup had a table where you added the details of all your devices, and then the action would just let me select which device I wanted to use from a dropdown. The multi-load version I hacked from the other thread is the next best thing to this behaviour.

Also, your version sadly seems to have bitrotted. When I try to send a key command, it gives this exception in the log:
Code: Select all
   Error in Action: "Samsung Smart TV Network Remote: Menu"
   Traceback (most recent call last) (0.5.0-rc4):
     File "E:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
       return self(*args)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTV\__init__.py", line 339, in __call__
       return self.plugin.DoCommand(self.value, host, port, remote, tvmodel)
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTV\__init__.py", line 206, in DoCommand
       if self.socketInit(host, port, remote, tvmodel):
     File "C:\ProgramData\EventGhost\plugins\SamsungSmartTV\__init__.py", line 177, in socketInit
       +base64.b64encode(remotename)
   NameError: global name 'remotename' is not defined
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing.
User avatar
Boolean263
Experienced User
 
Posts: 64
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada

Next

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 2 guests