Page 9 of 12

Re: Samsung Smart TV Plus

Posted: Wed Dec 19, 2018 1:57 am
by kgschlosser
OK here is the next version. I think I may have the issues with the ip addresses solved. see what happens.

new version is attached.

Re: Samsung Smart TV Plus

Posted: Wed Dec 19, 2018 2:47 pm
by george tirebuyer
After about a minute of so this shows up in the log and no TV is found. A log appears on the desktop with this info.

UN55MU6290
IP Address: 192.168.1.104
==============================================
Services:
Service name: IPControlService
Service class: urn:samsung.com:service:IPControlService:1
Access point: UPNPTV.IPControlService
----------------------------------------------
Methods:
None
Devices: None




6:43:42 AM Exception in thread Thread-29:
6:43:42 AM Traceback (most recent call last):
6:43:42 AM File "threading.pyc", line 801, in __bootstrap_inner
6:43:42 AM File "threading.pyc", line 754, in run
6:43:42 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\__init__.py", line 387, in get_tvs
6:43:42 AM for tv in discover():
6:43:42 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 58, in discover
6:43:42 AM device_id = tv.device_id
6:43:42 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\upnp_class.py", line 90, in __getattr__
6:43:42 AM return self.__class__.__dict__[item].fget(self)
6:43:42 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\__init__.py", line 928, in device_id
6:43:42 AM return self.RemoteControlReceiver.deviceID
6:43:42 AM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\upnp_class.py", line 92, in __getattr__
6:43:42 AM raise AttributeError(item)
6:43:42 AM AttributeError: RemoteControlReceiver
6:43:42 AM

Re: Samsung Smart TV Plus

Posted: Wed Dec 19, 2018 8:42 pm
by kgschlosser
OK can you install the Intel Developer tools for UPNP technology for me. and Run the device sniffer program. in one of the menus is scan for root devices or something along those lines. I need to know what is showing up in there for the TV.

I may have to do a combination of SSDP broadcasts and also direct IP to be able to acquire all of the UPNP classes from the TV.

I have learned from a conversation with a person that developed a UPNP API for Samsung air conditioners that some Samsung devices use a really funcky spinoff of UPNP. so I may need to do some investigating into that end of things if that is the case. But I am thinking that maybe the TV need to be queried both directly and through multicast

Re: Samsung Smart TV Plus

Posted: Thu Dec 20, 2018 9:20 am
by holdestmade
I get the same error as above, I did get a pop up on my 2017 TV asking for permission during the scan.

The log on my desktop only shows my 2018 TV though

Re: Samsung Smart TV Plus

Posted: Thu Dec 20, 2018 12:46 pm
by george tirebuyer
Untitled.png

Re: Samsung Smart TV Plus

Posted: Thu Dec 20, 2018 6:47 pm
by kgschlosser
@ george tirebuyer
ok is that your TV that is listed??.

can you do me a favor and double click each one of those items and tell me what the UPNP class name is. the class name will look something like the following

Code: Select all

urn:schemas.upnp.org:device:MediaRenderer1

Re: Samsung Smart TV Plus

Posted: Thu Dec 20, 2018 7:11 pm
by kgschlosser
here is yet another attempt at getting a full UPNP class listing from the TV.
maybe I will get lucky this time.

Re: Samsung Smart TV Plus

Posted: Thu Dec 20, 2018 9:02 pm
by george tirebuyer
1:00:32 PM Exception in thread Thread-11:
1:00:32 PM Traceback (most recent call last):
1:00:32 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:32 PM File "threading.pyc", line 754, in run
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:32 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:32 PM sock = _send_to(sock, timeout)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:32 PM network = ipaddress.ip_network(destination)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:32 PM address)
1:00:32 PM ValueError: <socket._socketobject object at 0x0A0C10A0> does not appear to be an IPv4 or IPv6 network
1:00:32 PM
1:00:32 PM Exception in thread Thread-12:
1:00:32 PM Traceback (most recent call last):
1:00:32 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:32 PM File "threading.pyc", line 754, in run
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:32 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:32 PM sock = _send_to(sock, timeout)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:32 PM network = ipaddress.ip_network(destination)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:32 PM address)
1:00:32 PM ValueError: <socket._socketobject object at 0x0A0C10A0> does not appear to be an IPv4 or IPv6 network
1:00:32 PM
1:00:32 PM Exception in thread Thread-13:
1:00:32 PM Traceback (most recent call last):
1:00:32 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:32 PM File "threading.pyc", line 754, in run
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:32 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:32 PM sock = _send_to(sock, timeout)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:32 PM network = ipaddress.ip_network(destination)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:32 PM address)
1:00:32 PM ValueError: <socket._socketobject object at 0x0A0C10A0> does not appear to be an IPv4 or IPv6 network
1:00:32 PM
1:00:32 PM Exception in thread Thread-14:
1:00:32 PM Traceback (most recent call last):
1:00:32 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:32 PM File "threading.pyc", line 754, in run
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:32 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:32 PM sock = _send_to(sock, timeout)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:32 PM network = ipaddress.ip_network(destination)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:32 PM Exception in thread Thread-15:
1:00:32 PM address)
1:00:32 PM ValueError: <socket._socketobject object at 0x0A0C10A0> does not appear to be an IPv4 or IPv6 network
1:00:32 PM Traceback (most recent call last):
1:00:32 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:32 PM
1:00:32 PM File "threading.pyc", line 754, in run
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:32 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:32 PM sock = _send_to(sock, timeout)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:32 PM network = ipaddress.ip_network(destination)
1:00:32 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:32 PM address)
1:00:32 PM ValueError: <socket._socketobject object at 0x0A0B0FB8> does not appear to be an IPv4 or IPv6 network
1:00:32 PM
1:00:33 PM Exception in thread Thread-16:
1:00:33 PM Traceback (most recent call last):
1:00:33 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:33 PM File "threading.pyc", line 754, in run
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:33 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:33 PM sock = _send_to(sock, timeout)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:33 PM network = ipaddress.ip_network(destination)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:33 PM address)
1:00:33 PM ValueError: <socket._socketobject object at 0x0A0B0FB8> does not appear to be an IPv4 or IPv6 network
1:00:33 PM
1:00:33 PM Exception in thread Thread-17:
1:00:33 PM Traceback (most recent call last):
1:00:33 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:33 PM File "threading.pyc", line 754, in run
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:33 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:33 PM sock = _send_to(sock, timeout)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:33 PM network = ipaddress.ip_network(destination)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:33 PM address)
1:00:33 PM ValueError: <socket._socketobject object at 0x0A0B0FB8> does not appear to be an IPv4 or IPv6 network
1:00:33 PM
1:00:33 PM Exception in thread Thread-18:
1:00:33 PM Traceback (most recent call last):
1:00:33 PM File "threading.pyc", line 801, in __bootstrap_inner
1:00:33 PM File "threading.pyc", line 754, in run
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\discover.py", line 23, in do
1:00:33 PM locations = get_upnp_classes(addr, 8, log_level)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 155, in get_upnp_classes
1:00:33 PM sock = _send_to(sock, timeout)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\samsungctl\upnp\UPNP_Device\discover.py", line 60, in _send_to
1:00:33 PM network = ipaddress.ip_network(destination)
1:00:33 PM File "C:\ProgramData\EventGhost\plugins\SamsungSmartTVPlus\libs\ipaddress.py", line 204, in ip_network
1:00:33 PM address)
1:00:33 PM ValueError: <socket._socketobject object at 0x0A0B0FB8> does not appear to be an IPv4 or IPv6 network
1:00:33 PM

Re: Samsung Smart TV Plus

Posted: Thu Dec 20, 2018 9:56 pm
by george tirebuyer
Untitled2.png

Re: Samsung Smart TV Plus

Posted: Fri Dec 21, 2018 8:24 am
by kgschlosser
ok when looking at the message in the device sniffer..

if you see NTS: ssdp:alive that is not a response from you sending the broadcast packet. that is an automatic packet that gets sent by the TV every 5 minutes I think. it could be less then 5 minutes.

so when you click on the search dropdown menu and then click on root devices... the response from the TV would be right after the packets that you send. the packets you send will also be displayed in that log..

I guess the easiest thing to do is to clear the log immediately after you see the TV send the alive packets. then send the root query. you should see the TV right after those root query packets are sent. that is what II need to know.

Re: Samsung Smart TV Plus

Posted: Fri Dec 21, 2018 3:26 pm
by george tirebuyer
Untitled2.png

Re: Samsung Smart TV Plus

Posted: Fri Dec 21, 2018 7:30 pm
by kgschlosser
you ok bud??? that's the same image as the one above LOL

Re: Samsung Smart TV Plus

Posted: Sat Dec 22, 2018 3:19 pm
by george tirebuyer
Doh!
Untitled.png

Re: Samsung Smart TV Plus

Posted: Sat Mar 30, 2019 1:24 pm
by holdestmade
Hey,

Been playing with adding the updated samsungctl library but seems EG doesn't have lxml, could you provide a link to it for me (I can't seem to find a compatible one to add to site-packages) to add to EG or add it in the samsungctl library ?

Thanks

Re: Samsung Smart TV Plus

Posted: Sun Mar 31, 2019 12:08 am
by kgschlosser
You have to install python 2.7 and then pip install lxml. This will compile and install it. You will also need to install visual c compiler for python before you build lxml.

If you leave python installed you do not have to move a thing. EG will load any packages you have installed into python automatically.