kdschlosser / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
148 stars 34 forks source link

Alternative discovery protocol #113

Open mroch opened 5 years ago

mroch commented 5 years ago

Every 2 seconds, my Frame TV (LS03, 2018) is sending out a broadcast that looks like this:

{"data":{"v1":{"uri":"http://192.168.1.40:8001/ms/1.0/"},"v2":{"uri":"http://192.168.1.40:8001/api/v2/"}},"remote":"1.0","sid":"uuid:0f459c5c-c976-4275-ab67-d6bbe34ebf42","ttl":8000,"type":"alive"}

UDP, 224.0.0.7 port 8001

googling "samsung 224.0.0.7" led me to this: https://github.com/MultiScreenSDK/sample-soundscape-ios/blob/master/SoundScape/MSF/common/MSFDiscoveryProvider.swift

not sure it's very useful -- use ssdp instead -- but wanted to document it. maybe should use the wiki instead?

kdschlosser commented 5 years ago

it is useful. I am not sure that all TV's support it. I do not believe the legacy TV's support the MultiScreen protocol. But those are far and few between.

I think I am going to go back to the old mechanism of testing to see if the TV is on or and and that is to just keep on looping trying to make a connection. I think the UPNP is kind of flaky in that respect.

The thing is I will not be able to support dynamic addressing if I go that route. which kind of sucks. But it may be the only way to go about detecting the power reliably. I guess I can do that for the legacy TV's and use this broadcast message on the newer TV's that code is copyrighted as of 2014 so we know it will work for 2014 - 2018

alamo888PL commented 5 years ago

My Home assistant Samsung component discover the UE48H6400 on port 8001 but only show when state goes to on. When I turn off TV state remains on.