Samsung Smart TV Plus

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Tue Nov 06, 2018 7:41 pm

well at any rate. give this bad larry a go and see what happens.

This all should work right out of the box without you needing to do anything. except for click on the allow button on the TV when it initially connects. You should only have to do this one time.

It is going to try the old way first. and if that fails then it will try the new way. there will be a 3 second wait between the attempts

if there is a problem let me know we will then try manually deleting the plugin and all config data and start fresh. Once I know this is working I will add it to the first post.
Attachments
SamsungSmartTVPlus-0.2.0b.egplugin
(203.51 KiB) Downloaded 8 times
If you like the work I have been doing then feel free to Image

jachin99
Experienced User
Posts: 557
Joined: Sat Feb 13, 2016 8:39 pm

Re: Samsung Smart TV Plus

Post by jachin99 » Wed Nov 07, 2018 3:12 am

While I wholeheartedly agree with your conclusions about Samsung, I'll point out that the fridge with a tablet in it works much better than I expected. The best thing about it so far is the web browser. While I wouldn't like this browser on any other device it is great for pulling up web pages like the emby web app. I even watch TV on it via emby in the kitchen while the kid plays games or watches YouTube videos in the living room. I went pretty much all in on their kitchen appliances but I still have to buy the oven.

Now for the downside. I got these appliances in black stainless steel and I have to basically pray the paint on them doesn't get chipped. I haven't had that problem but a few others have. I was debating a Samsung washer and dryer set a few years back but I knew someone who had Samsung and they said the seals on their front loaders were designed so that they have to mold eventually and they are attached to the hub. I do t know if this is still true but I ended up getting LG for those. I also almost never buy this stuff unless it's scratch and dent and I don't notice whatever little dings they have.

Either way that's just a rant but yeah, I get their appliances and if the automation works that's great but I tend to keep my epectations low. One thing g samsung can say is that at least they aren't carrier.

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

Re: Samsung Smart TV Plus

Post by holdestmade » Wed Nov 07, 2018 9:11 am

Yes sure the API is for smartthings only but works OK -ish if you have their hub

I tried your new plugin and got this on install:

07/11/2018 09:08:26 Compiling C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\remote_websocket.py ...
07/11/2018 09:08:26 File "UserPlugin\remote_websocket.py", line 25
07/11/2018 09:08:26 NEW_URL = "wss://{}:8002/api/v2/channels/samsung.remote.control?name={}&token={}'''
07/11/2018 09:08:26 ^
07/11/2018 09:08:26 SyntaxError: EOL while scanning string literal
07/11/2018 09:08:26

Agree with you about Samsung, just spend 3 grand on a QLED TV to find they no longer support DTS so I'm having to convert all my ripped movies, what a PIA

Cheers

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

Re: Samsung Smart TV Plus

Post by holdestmade » Wed Nov 07, 2018 10:23 am

OK so got it installed OK by replacing the ' ' ' at the end of line 25 with " in remote_websocket.py

Also had to add

Code: Select all

 import base64
No errors in EG but no repsonse from TV.

Cheers

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Wed Nov 07, 2018 8:08 pm

shit. I am going to have to make you guys wait for a bit on this. I am finally doing a HDD upgrade on my workstation. I am really sick of dealing with running out of space. I am going to put in 2 new SSD's one of them being for the system paging file and for the temp directory. seeing as how these are the 2 things that beat the snot out of a hard drive i would much rather beat the hell out of a 30 dollar SSD then a several hundred dollar one. Kingston makes these screaming fast SSD's that are 32 gig in size and they are dirt cheap. I have 4 of them striped together running on my server as the OS HDD. I ran some benchmarks against it a while back.
drive.png
i'll tell you what.. getting 821 MB/s for read from 4 30 dollar SSD's running off the raid controller built onto the main board it a really really big number.

the onboard sata controller is most likley using pciex4 and that tops at at 1000 MB/s so I am pretty much there if you include overhead (typical 20% +- 5%). So I am thinking that the PCIe is actually what is causing the speed to be limited and the drives would go higher then what you are seeing.

Man i need to get more of those LOL
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Nov 09, 2018 12:06 am

give this one shot. I found a bunch of issues in my code.

I also converted from using the serial number that the TV hands out over UPNP to a device ID. This is because all TV's report the same serial number over UPNP.

I fixed the issue with the websockets i believe.

I also did want to mention. I will be working on adding support for the 2015/2016 TV's the H and J series. these use some form of encryption over the websocket. I have located some code that should help to iron out those TVs as well. But I have to brush up on golang some. that is what I found

I am sorry for not being able to test this stuff out fully I have what would be considered an antique Samsung TV. a D series. So mine is not going to have these issues that the newer ones have.

I have a question. If you had to choose between HA control of the TV or having 4K resolution what would you pick?. because it seems that Samsung is trying to lock out the 4K TV's from being controlled from anything other then their Smart(not really)Things controller. This is what they did with my Washing Machine and Dryer. and then a few months after they did that they decided to drop them from the SmartThings.. They did have them added to their partner API for a bit. then they just disappeared without notice. so now there is nothing. what a bunch of assholes. and my machines are only 4 years old. with a typical life of a washing machine a dryer being 15+ years and now the things are handicapped because of it. I am really contemplating starting a class action lawsuit against them for this crap.
Attachments
SamsungSmartTVPlus-0.2.1b.egplugin
(203.94 KiB) Downloaded 3 times
If you like the work I have been doing then feel free to Image

jachin99
Experienced User
Posts: 557
Joined: Sat Feb 13, 2016 8:39 pm

Re: Samsung Smart TV Plus

Post by jachin99 » Fri Nov 09, 2018 12:55 am

Maybe you can take a look at some recent DMCA exemptions for abandonware. Basically if an appliance security measure interferes with the owners ability to operate the equipment in it's original form then it MIGHT be legal to break into it. There was some press recently about how it is now legal to circumvent drm on games that require server authentication. There has also been a big exception for farming tractors for a few years. There shouldn't be any shortage of documentation for Samsung and security problems.

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Nov 09, 2018 8:23 am

bah that last version i posted is not going to work. I forgot to pass an empty SSL certificate

I think I have it this time. Sorry folks
Attachments
SamsungSmartTVPlus-0.2.2b.egplugin
(204.17 KiB) Downloaded 7 times
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by holdestmade » Fri Nov 09, 2018 8:38 am

Hi

Thanks for you time on this, just tried that version and it installs fine but nothing happens after that, non pop up.
Could you maybe add entries in the log when it is scanning so I can see if it is looking and not finding anything ?
I've tried deleting the TV from the config.py and running as admin, also tried on my server and workstation.
Also on my TV, EG has gone from the device list in the external device permissions, it was there before the firmware update

Regarding the preference for 4K vs automation, I need the 4K as it is my CAD workstation monitor.
I can automate it somewhat as I have a smartthings hub, but it is restricted to power, volume etc, no input selection.
I'm thinking I might just get a cheap HDMI switcher with IR remote and have EG send IR commands to select between my two PCs
IR commands from my remote will be no good as there is no discrete HDMI button.

Cheers

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Nov 09, 2018 7:08 pm

let me get some better logging in place and see where we go from there. This should work.
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Fri Nov 09, 2018 7:20 pm

if you download and install this

https://software.intel.com/sites/defaul ... Wizard.zip

which is the intel upnp developer tools there is a program contained in in tools. it is called the device sniffer. in the device sniffer if you click on the search menu then on all devices. the screen should populate. look for entries that have the packet information ending with urn:samsung.com:device:RemoteControlReceiver:1 or something similar. they could have changed the upnp discovery as well and the TV is simply not being detected to be able to even open the connection.

I am going to have to do a far amount of work to move the add dialog so it can be called from the config panel for the plugin. this is so you would be able to manually enter the connection specific bits.

I will start working on moving it this evening. I have a few errands i need to do today.
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by holdestmade » Mon Nov 12, 2018 1:25 pm

SO installed the intel tools, this is what showed up for my 2017 4K TV (used as monitor):

Code: Select all

GET /rcr/ HTTP/1.0
HOST: 192.168.1.215:7676
Content-Length: 0

HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Content-Length: 1482
Connection: close
User-Agent: DLNADOC/1.50 SEC_HHP_[TV] Samsung 4k Monitor
Server: SHP, UPnP/1.0, Samsung UPnP SDK/1.0
Application-URL: http://192.168.1.215:8080/ws/app/

<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:sec="http://www.sec.co.kr/dlna" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>
  <device>
    <deviceType>urn:samsung.com:device:RemoteControlReceiver:1</deviceType>
    <friendlyName>[TV] Samsung 4k Monitor</friendlyName>
    <manufacturer>Samsung Electronics</manufacturer>
    <manufacturerURL>http://www.samsung.com/sec</manufacturerURL>
    <modelDescription>Samsung DTV RCR</modelDescription>
    <modelName>UE40MU6120</modelName>
    <modelNumber>1.0</modelNumber>
    <modelURL>http://www.samsung.com/sec</modelURL>
    <serialNumber>20090804RCR</serialNumber>
    <UDN>uuid:635aff35-032a-4bab-a558-6d32849421eb</UDN>
    <sec:deviceID>SHCHC5ZTTO2RS</sec:deviceID>
    <sec:ProductCap>Resolution:1920X1080,Tizen,Y2017</sec:ProductCap>
    <serviceList>
      <service>
        <serviceType>urn:samsung.com:service:MultiScreenService:1</serviceType>
        <serviceId>urn:samsung.com:serviceId:MultiScreenService</serviceId>
        <controlURL>/RCR/control/MultiScreenService</controlURL>
        <eventSubURL>/RCR/event/MultiScreenService</eventSubURL>
        <SCPDURL>MultiScreenService.xml</SCPDURL>
      </service>
    </serviceList>
    <sec:Capabilities>
        <sec:Capability name="samsung:multiscreen:1" port="8001" location="/ms/1.0/"/>
    </sec:Capabilities>
  </device>
</root>

Not sure why it is showing those resolutions, it is running at 4K

Cheers

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Tue Nov 13, 2018 7:32 am

ok so it is responding to the UPNP still.

<sec:Capability name="samsung:multiscreen:1" port="8001" location="/ms/1.0/"/>

this line is rather amusing. they are so f'ed up over there at samsung they didn't even update the UPNP for the TV to reflect the new websocket port. which is 8002.

and they still didn't update the serial number
<serialNumber>20090804RCR</serialNumber>

that is the same serial number my TV outputs and I have a D series.
If you like the work I have been doing then feel free to Image

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

Re: Samsung Smart TV Plus

Post by holdestmade » Tue Nov 13, 2018 12:13 pm

I had a play with one of the Intel tools and could read the volume and mute status but could not set it.

When I read my 2018 qled, it is showing as a 2015 model and 720p resolution !

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

Re: Samsung Smart TV Plus

Post by kgschlosser » Tue Nov 13, 2018 11:13 pm

OoOoOo you could see the volume and mute???

OoOoO tell me what you did. this is going to be a good thing to be able to get events in EG for these things changing.
If you like the work I have been doing then feel free to Image

Post Reply