Open matthieut59 opened 5 years ago
OK so that is supported. not from the command line. what I am going to do is I am going to create a list of what can be done. all of these advanced features can only be done from a python script.
I am going to be making a REST API for this thing. so if other people want to make use of it from software that does not run python they will be able to.
give me some time to put together a list of all of the available features.
I d also take an example of how to use any of this feature via python script :) Getting access to all those upnp feature would make this API what everyone dreamt about...
ok this is going to give you the layout...
if you look at the layout you will see a spit in it called "Access Point" you will replace the UPNPObject at the beginning of the access point with "remote"
example:
UPNPObject.MainTVAgent2.GetCurrentConnectionInfo
will become
remote.MainTVAgent2.GetCurrentConnectionInfo
that is how you will access the UPNP function
all of the information about what needs to be passed to the function is listed..
import samsungctl
# new config style. will make file if it does not exist. if it does it will use it
# you no longer need to have 2 different config code types one for first time use
# and one for every time there after. it is now all done in a single statement.
# it is a lot nicer this way I think.
config = samsungctl.Config.load('path/file.name')('name='samsungtv1', host='192.168.1.1')
with samsungctl.Remote(config) as remote:
print(remote)
the above code is going to dump a massive amount of information to your screen. so you will either want to direct the information to a file or you are going to want to increase the scroll back buffer on your shell or console window to 5000 lines.. and no i am not kidding about the 5000 lines.
I have created wrappers for most of these items. they are pretty easy to locate because the names are almost the same. you do have a choice to use the wrapper i made. or you can access the UPNP functions directly. NOTE: if a function has a parameter called InstanceId you will ALWAYS pass a 0 for this parameter
an example would be
if you have upnp functions named GetVolume SetVolume
you are going to have a simple property called volume
this will call the GetVolume for you
print(remote.volume)
and this will call the SetVolume for you
remote.volume = 50
if you want to get a complete list of all of the convenience methods/properties.
from samsungctl.upnp.UPNP_Device.upnp_class import UPNPObject
# config assumed
with samsungctl.Remote(config) as remote:
for item in dir(remote):
if item in UPNPObject.__dict__:
if isinstance(UPNPObject.__dict__[item], property):
print(item, ': property')
else:
print(item, ': method')
i did want to note.. if you want to only print out information for a specific UPNP function. so you get the "Access Point" from the long printout. do the name swap deal. an print out that function..
# config assumed
with samsungctl.Remote(config) as remote:
print(remote.MainTVAgent2.GetCurrentConnectionInfo)
UPDATE...
The name you need to swap out may not be UPNPObject. it might be RemoteWrapper. basically anything before the first "." you need to replace with "remote"
Just waouh, it works indeed perfectly!
I explorered all methods, and none gives me a hint on whether I m in frame mode or TV mode :/ A lot of method are in fact not really implemented... so waiting for firmware upgrade... looking at https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.samsungtv/src/main/java/org/openhab/binding/samsungtv/internal/service/MainTVServerService.java
Some stuff are not available at all on my device :/
I would imagine that this will return a valid slide show if the frame mode is active
remote.RenderingControl.X_GetTVSlideShow(0)
that link only shows code for 2 or 3 UPNP functions it doesn't handle all of them
unfortunatly in frame moe or tv mode, I got always "[False, 0, 0]" on this method :( Strangelly the smarthing application on my smartphone is able to get that state, so there should be a way
if you run the code below. and post the output to me I will have a better idea of what we can get from your TV
# config assumed
with samsungctl.Remote(config) as remote:
print(remote.as_dict)
also.. if you follow these directions to enable logging on the TV.. then use the smartthings application. whatever is happening is going to show in the logs on the TV
https://developer.samsung.com/tv/develop/extension-libraries/smart-view-sdk/receiver-apps/debugging
Here is the remote.as_dict output (same if in frame mode or not ) :
{'services': [{'name': 'RenderingControl', 'methods': [{'name': 'ListPresets', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'CurrentPresetNameList', 'default_value': 'FactoryDefaults', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'SelectPreset', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'PresetName', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['FactoryDefaults']}], 'ret_vals': []}, {'name': 'GetMute', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Channel', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Master']}], 'ret_vals': [{'name': 'CurrentMute', 'default_value': None, 'data_type': (<class 'bool'>,), 'returned_values': [False, True]}]}, {'name': 'SetMute', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Channel', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Master']}, {'name': 'DesiredMute', 'default_value': None, 'data_type': (<class 'bool'>,), 'allowed_values': [False, True]}], 'ret_vals': []}, {'name': 'GetVolume', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Channel', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Master']}], 'ret_vals': [{'name': 'CurrentVolume', 'default_value': None, 'data_type': (<class 'int'>,), 'min': 0, 'max': 100, 'step': 1}]}, {'name': 'SetVolume', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Channel', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Master']}, {'name': 'DesiredVolume', 'default_value': None, 'data_type': (<class 'int'>,), 'min': 0, 'max': 100, 'step': 1}], 'ret_vals': []}, {'name': 'X_GetAspectRatio', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'AspectRatio', 'default_value': 'Default', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['Default', 'FitScreen']}]}, {'name': 'X_SetAspectRatio', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'AspectRatio', 'default_value': 'Default', 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Default', 'FitScreen']}], 'ret_vals': []}, {'name': 'X_Move360View', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'LatitudeOffset', 'default_value': 0.0, 'data_type': (<class 'float'>,), 'min': None, 'max': None, 'step': None}, {'name': 'LongitudeOffset', 'default_value': 0.0, 'data_type': (<class 'float'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'X_Zoom360View', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'ScaleFactorOffset', 'default_value': 1.0, 'data_type': (<class 'float'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'X_Origin360View', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'X_ControlCaption', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Operation', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Enable', 'Disable']}, {'name': 'Name', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'ResourceURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'CaptionURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'CaptionType', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'Language', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'Encoding', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}, {'name': 'X_GetCaptionState', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'Captions', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'EnabledCaptions', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'X_GetServiceCapabilities', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'ServiceCapabilities', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'X_SetZoom', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'x', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'y', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'w', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'h', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'X_GetTVSlideShow', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'CurrentShowState', 'default_value': None, 'data_type': (<class 'bool'>,), 'returned_values': [False, True]}, {'name': 'CurrentThemeId', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'TotalThemeNumber', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}]}, {'name': 'X_SetTVSlideShow', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'CurrentShowState', 'default_value': None, 'data_type': (<class 'bool'>,), 'allowed_values': [False, True]}, {'name': 'CurrentShowTheme', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}], 'icons': [{'name': 'icon_SML_jpg', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_SML.jpg'}, {'name': 'icon_LRG_jpg', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_LRG.jpg'}, {'name': 'icon_SML_png', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_SML.png'}, {'name': 'icon_LRG_png', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_LRG.png'}], 'deviceType': 'urn:schemas-upnp-org:device:MediaRenderer:1', 'X_compatibleId': 'MS_DigitalMediaDeviceClass_DMR_V001', 'X_deviceCategory': 'Display.TV.LCD Multimedia.DMR', 'X_DLNADOC': 'DMR-1.50', 'friendlyName': '[TV] Samsung Frame Series (43)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung TV DMR', 'modelName': 'UE43LS03N', 'modelNumber': 'AllShare1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '0C2A3SCKB01047A', 'UDN': 'uuid:a276d50f-30a1-4a11-8b0f-953f21b240ef', 'ProductCap': 'Tizen,Y2018,WebURIPlayable,NavigateInPause,ScreenMirroringP2PMAC=66:1c:ae:4a:9c:e2,UHD_SCREEN,SerialNumber=0C2A3SCKB01047A,vdProductType=TV,OCF=1', 'X_hardwareId': 'VEN_0105&DEV_VD0001'}, {'name': 'ConnectionManager', 'methods': [{'name': 'GetCurrentConnectionInfo', 'params': [{'name': 'ConnectionID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'RcsID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'AVTransportID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'ProtocolInfo', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'PeerConnectionManager', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'PeerConnectionID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Direction', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['Input', 'Output']}, {'name': 'Status', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['OK', 'ContentFormatMismatch', 'InsufficientBandwidth', 'UnreliableChannel', 'Unknown']}]}, {'name': 'GetProtocolInfo', 'params': [], 'ret_vals': [{'name': 'Source', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'Sink', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'GetCurrentConnectionIDs', 'params': [], 'ret_vals': [{'name': 'ConnectionIDs', 'default_value': '0', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'PrepareForConnection', 'params': [{'name': 'RemoteProtocolInfo', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'PeerConnectionManager', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'PeerConnectionID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Direction', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['Input', 'Output']}], 'ret_vals': [{'name': 'ConnectionID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'AVTransportID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'RcsID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}]}, {'name': 'ConnectionComplete', 'params': [{'name': 'ConnectionID', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}], 'icons': [{'name': 'icon_SML_jpg', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_SML.jpg'}, {'name': 'icon_LRG_jpg', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_LRG.jpg'}, {'name': 'icon_SML_png', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_SML.png'}, {'name': 'icon_LRG_png', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_LRG.png'}], 'deviceType': 'urn:schemas-upnp-org:device:MediaRenderer:1', 'X_compatibleId': 'MS_DigitalMediaDeviceClass_DMR_V001', 'X_deviceCategory': 'Display.TV.LCD Multimedia.DMR', 'X_DLNADOC': 'DMR-1.50', 'friendlyName': '[TV] Samsung Frame Series (43)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung TV DMR', 'modelName': 'UE43LS03N', 'modelNumber': 'AllShare1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '0C2A3SCKB01047A', 'UDN': 'uuid:a276d50f-30a1-4a11-8b0f-953f21b240ef', 'ProductCap': 'Tizen,Y2018,WebURIPlayable,NavigateInPause,ScreenMirroringP2PMAC=66:1c:ae:4a:9c:e2,UHD_SCREEN,SerialNumber=0C2A3SCKB01047A,vdProductType=TV,OCF=1', 'X_hardwareId': 'VEN_0105&DEV_VD0001'}, {'name': 'AVTransport', 'methods': [{'name': 'Play', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Speed', 'default_value': '1', 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}, {'name': 'Stop', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'Next', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'Previous', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'SetPlayMode', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'NewPlayMode', 'default_value': 'NORMAL', 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['NORMAL']}], 'ret_vals': []}, {'name': 'GetMediaInfo', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'NrTracks', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': 0, 'max': 4294967295, 'step': None}, {'name': 'MediaDuration', 'default_value': '00:00:00', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'CurrentURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'CurrentURIMetaData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'NextURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'NextURIMetaData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'PlayMedium', 'default_value': 'NONE', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['NONE', 'NETWORK']}, {'name': 'RecordMedium', 'default_value': 'NOT_IMPLEMENTED', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['NOT_IMPLEMENTED']}, {'name': 'WriteStatus', 'default_value': 'NOT_IMPLEMENTED', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['NOT_IMPLEMENTED']}]}, {'name': 'GetDeviceCapabilities', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'PlayMedia', 'default_value': 'NETWORK', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'RecMedia', 'default_value': 'NOT_IMPLEMENTED', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'RecQualityModes', 'default_value': 'NOT_IMPLEMENTED', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'SetAVTransportURI', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'CurrentURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'CurrentURIMetaData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}, {'name': 'SetNextAVTransportURI', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'NextURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'NextURIMetaData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}, {'name': 'X_PrefetchURI', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'PrefetchURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'PrefetchURIMetaData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}, {'name': 'GetTransportSettings', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'PlayMode', 'default_value': 'NORMAL', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['NORMAL']}, {'name': 'RecQualityMode', 'default_value': 'NOT_IMPLEMENTED', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['NOT_IMPLEMENTED']}]}, {'name': 'GetTransportInfo', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'CurrentTransportState', 'default_value': 'NO_MEDIA_PRESENT', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['STOPPED', 'PAUSED_PLAYBACK', 'PLAYING', 'TRANSITIONING', 'NO_MEDIA_PRESENT']}, {'name': 'CurrentTransportStatus', 'default_value': 'OK', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': ['OK', 'ERROR_OCCURRED']}, {'name': 'CurrentSpeed', 'default_value': '1', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'Pause', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': []}, {'name': 'Seek', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'Unit', 'default_value': 'REL_TIME', 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['TRACK_NR', 'REL_TIME', 'ABS_TIME', 'ABS_COUNT', 'REL_COUNT', 'X_DLNA_REL_BYTE']}, {'name': 'Target', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}, {'name': 'GetPositionInfo', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'Track', 'default_value': 0, 'data_type': (<class 'int'>,), 'min': 0, 'max': 4294967295, 'step': 1}, {'name': 'TrackDuration', 'default_value': '00:00:00', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'TrackMetaData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'TrackURI', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'RelTime', 'default_value': '00:00:00', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'AbsTime', 'default_value': '00:00:00', 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'RelCount', 'default_value': 2147483647, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'AbsCount', 'default_value': 2147483647, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}]}, {'name': 'GetCurrentTransportActions', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'Actions', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'X_DLNA_GetBytePositionInfo', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'TrackSize', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'RelByte', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'AbsByte', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'X_GetStoppedReason', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}], 'ret_vals': [{'name': 'StoppedReason', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'StoppedReasonData', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'X_PlayerAppHint', 'params': [{'name': 'InstanceID', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'UpnpClass', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['object.item.imageItem', 'object.item.audioItem', 'object.item.videoItem']}, {'name': 'PlayerHint', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': ['load', 'unload']}], 'ret_vals': []}], 'icons': [{'name': 'icon_SML_jpg', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_SML.jpg'}, {'name': 'icon_LRG_jpg', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_LRG.jpg'}, {'name': 'icon_SML_png', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_SML.png'}, {'name': 'icon_LRG_png', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9197/icon_LRG.png'}], 'deviceType': 'urn:schemas-upnp-org:device:MediaRenderer:1', 'X_compatibleId': 'MS_DigitalMediaDeviceClass_DMR_V001', 'X_deviceCategory': 'Display.TV.LCD Multimedia.DMR', 'X_DLNADOC': 'DMR-1.50', 'friendlyName': '[TV] Samsung Frame Series (43)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung TV DMR', 'modelName': 'UE43LS03N', 'modelNumber': 'AllShare1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '0C2A3SCKB01047A', 'UDN': 'uuid:a276d50f-30a1-4a11-8b0f-953f21b240ef', 'ProductCap': 'Tizen,Y2018,WebURIPlayable,NavigateInPause,ScreenMirroringP2PMAC=66:1c:ae:4a:9c:e2,UHD_SCREEN,SerialNumber=0C2A3SCKB01047A,vdProductType=TV,OCF=1', 'X_hardwareId': 'VEN_0105&DEV_VD0001'}, {'name': 'dial', 'methods': [{'name': 'SendKeyCode', 'params': [{'name': 'KeyCode', 'default_value': None, 'data_type': (<class 'int'>,), 'min': None, 'max': None, 'step': None}, {'name': 'KeyDescription', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': []}], 'icons': [], 'deviceType': 'urn:dial-multiscreen-org:device:dialreceiver:1', 'friendlyName': '[TV] Samsung Frame Series (43)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung DTV RCR', 'modelName': 'UE43LS03N', 'modelNumber': '1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '20090804RCR', 'UDN': 'uuid:1220bf65-8e1b-4858-82ab-f15ce650aef6', 'deviceID': 'NSNSC5ZTTO2RS', 'ProductCap': 'Resolution:1920X1080,Tizen,Y2017'}, {'name': 'ScreenSharingService', 'methods': [{'name': 'X_ConnectScreenSharingM2TV', 'params': [{'name': 'mWlanMacAddress', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'mP2pDeviceAddress', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'mBluetoothMacAddress', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'mWFDSourcePort', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': [{'name': 'tBSSID', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'tWlanFreq', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'tListenFreq', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}, {'name': 'X_ConnectScreenSharingTV2M', 'params': [{'name': 'mWlanMacAddress', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'mP2pDeviceAddress', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}, {'name': 'mBluetoothMacAddress', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'allowed_values': None}], 'ret_vals': [{'name': 'tBSSID', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'tWlanFreq', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'tListenFreq', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}, {'name': 'tWFDSourcePort', 'default_value': None, 'data_type': (<class 'str'>, <class 'bytes'>), 'returned_values': None}]}], 'icons': [{'name': 'icon_SML_jpg', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9119/icon_SML.jpg'}, {'name': 'icon_LRG_jpg', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9119/icon_LRG.jpg'}, {'name': 'icon_SML_png', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9119/icon_SML.png'}, {'name': 'icon_LRG_png', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9119/icon_LRG.png'}], 'deviceType': 'urn:samsung.com:device:ScreenSharing:1', 'friendlyName': '[TV] Samsung Frame Series (43)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung TV ScreenSharing', 'modelName': 'UE43LS03N', 'modelNumber': 'AllShare1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '0C2A3SCKB01047A', 'UDN': 'uuid:d0e9838f-d088-4996-b6d3-1ec1693249c8', 'X_ScreenSharing': 'wlanMacAddress:64:1c:ae:4a:9c:e2,eth0MacAddress:fc:03:9f:ae:7c:ed,p2pDeviceAddress:66:1c:ae:4a:9c:e2,BluetoothMacAddress:64:1C:AE:4A:9C:E3,BLEMacAddress:64:1C:AE:4A:9C:E3,supportTDLS:0,supportDMR:1,WFDRole:PrimarySink,supportP2PHandover:1,DMR_UDN:uuid:a276d50f-30a1-4a11-8b0f-953f21b240ef,listenFrequency:2412,wlanFrequency:0,bssid:00:00:00:00:00:00,vdProductType:TV'}, {'name': 'IPControlService', 'methods': [], 'icons': [{'name': 'icon_SML_jpg', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9110/icon_SML.jpg'}, {'name': 'icon_LRG_jpg', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9110/icon_LRG.jpg'}, {'name': 'icon_SML_png', 'mime_type': None, 'width': 48, 'height': 48, 'depth': 24, 'url': 'http://192.168.1.7:9110/icon_SML.png'}, {'name': 'icon_LRG_png', 'mime_type': None, 'width': 120, 'height': 120, 'depth': 24, 'url': 'http://192.168.1.7:9110/icon_LRG.png'}], 'deviceType': 'urn:samsung.com:device:IPControlServer:1', 'friendlyName': '[TV] Samsung Frame Series (43)', 'manufacturer': 'Samsung Electronics', 'manufacturerURL': 'http://www.samsung.com/sec', 'modelDescription': 'Samsung TV IPControl', 'modelName': 'UE43LS03N', 'modelNumber': 'AllShare1.0', 'modelURL': 'http://www.samsung.com/sec', 'serialNumber': '0C2A3SCKB01047A', 'UDN': 'uuid:36bf22be-a6af-4d91-83ad-004e34555d57', 'X_IPControl': 'wlanMacAddress:64:1c:ae:4a:9c:e2,eth0MacAddress:fc:03:9f:ae:7c:ed,supportDMR:1,DMR_UDN:uuid:a276d50f-30a1-4a11-8b0f-953f21b240ef,listenFrequency:2412,wlanFrequency:0,bssid:00:00:00:00:00:00,vdProductType:TV'}], 'devices': []}
By Debugging and using the smarthing APP, I can see this kind of method to activate artmode via the smartphone aPP :
DEBUG | "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\\",\\"event\\":\\"art_mode_changed\\",\\"value\\":\\"on\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"all\"}}\n" | "timestamp: 1549117499092, file: Channel.cpp, func: onSocketMessage : 733" |
---|---|---|
DEBUG | "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"id\\":\\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\\",\\"value\\":\\"on\\",\\"request\\":\\"set_artmode_status\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n |
And more interesting :
DEBUG | "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"259320d8-f368-48a4-bf03-789f24a22c0f\\",\\"event\\":\\"artmode_status\\",\\"value\\":\\"off\\",\\"target_client_id\\":\\"84b12082-5f28-461e-8e81-b98ad1c1ffa\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"84b12082-5f28-461e-8e81-b98ad1c1ffa\"}}\n" |
---|
Do you think you could get something from that ?
Ok I got it !
DEBUG | "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_artmode_status\\",\\"id\\":\\"30852acd-1b7d-4496-8bef-53e1178fa839\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n"
Can you propose something to shoot this request ?
sweet... log more debugging on the TV. the more you log the more command structures will surface for controlling the TV over the websocket.
Now that is the get log. I need the response structure as well. that too will be in that log
it would be netter if you could grab large chunks of the log before and after those lines. I do not want to get them out of context
it does look like you also have the responses. there might be more their logs are funky
ok so here goes...
you will want to clone develop branch. I added the feature to the command line as well as a revised interactive mode i made.
if you want to use it from code
print(remote.artmode)
remote.artmode = True # ON
remote.artmode = False # OFF
here is a more complete log : DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180262359, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "api/v2 : {\"device\":{\"FrameTVSupport\":\"true\",\"GamePadSupport\":\"true\",\"ImeSyncedSupport\":\"true\",\"OS\":\"Tizen\",\"TokenAuthSupport\":\"true\",\"VoiceSupport\":\"true\",\"countryCode\":\"FR\",\"description\":\"Samsung DTV RCR\",\"developerIP\":\"192.168.1.5\",\"developerMode\":\"1\",\"duid\":\"uuid:1220bf65-8e1b-4858-82ab-f15ce650aef6\",\"firmwareVersion\":\"Unknown\",\"id\":\"uuid:1220bf65-8e1b-4858-82ab-f15ce650aef6\",\"ip\":\"192.168.1.7\",\"model\":\"18_KANTM2_FRAME\",\"modelName\":\"UE43LS03N\",\"name\":\"[TV] Samsung Frame Series (43)\",\"networkType\":\"wired\",\"resolution\":\"3840x2160\",\"smartHubAgreement\":\"true\",\"type\":\"Samsung SmartTV\",\"udn\":\"uuid:1220bf65-8e1b-4858-82ab-f15ce650aef6\",\"wifiMac\":\"fc:03:9f:ae:7c:ed\"},\"id\":\"uuid:1220bf65-8e1b-4858-82ab-f15ce650aef6\",\"isSupport\":\"{\\"DMP_DRM_PLAYREADY\\":\\"false\\",\\"DMP_DRM_WIDEVINE\\":\\"false\\",\\"DMP_available\\":\\"true\\",\\"EDEN_available\\":\\"true\\",\\"FrameTVSupport\\":\\"true\\",\\"ImeSyncedSupport\\":\\"true\\",\\"TokenAuthSupport\\":\\"true\\",\\"remote_available\\":\\"true\\",\\"remote_fourDirections\\":\\"true\\",\\"remote_touchPad\\":\\"true\\",\\"remote_voiceControl\\":\\"true\\"}\n\",\"name\":\"[TV] Samsung Frame Series (43)\",\"remote\":\"1.0\",\"type\":\"Samsung SmartTV\",\"uri\":\"http://192.168.1.7:8001/api/v2/\",\"version\":\"2.0.25\"}\n" "timestamp: 1549180262345, file: ApiV2.cpp, func: RestHandler : 132" DEBUG "uri : /api/v2/, method: GET" "timestamp: 1549180262344, file: ApiV2.cpp, func: RestHandler : 115" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"713fe2f1-2848-4161-b04c-18dd6753ecaf\\",\\"event\\":\\"brightness_sensor_setting\\",\\"value\\":\\"off\\",\\"target_client_id\\":\\"de34a6-2b5f-46a0-ad19-f1a3d56167\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180257243, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"68cf908d-c17f-4b6f-b124-373a82393e23\\",\\"event\\":\\"motion_sensitivity\\",\\"value\\":\\"2\\",\\"min\\":\\"1\\",\\"max\\":\\"3\\",\\"target_client_id\\":\\"de34a6-2b5f-46a0-ad19-f1a3d56167\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180257241, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"c4a87013-5add-4a56-a550-10a242a60208\\",\\"event\\":\\"motion_timer\\",\\"value\\":\\"30\\",\\"valid_values\\":\\"[\\\\"off\\\\",\\\\"15\\\\",\\\\"30\\\\",\\\\"60\\\\",\\\\"120\\\\",\\\\"240\\\\"]\\n\\",\\"target_client_id\\":\\"de34a6-2b5f-46a0-ad19-f1a3d56167\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180257239, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"24639a6e-eabf-4c76-810d-6bc3b906ba23\\",\\"event\\":\\"color_temperature\\",\\"value\\":\\"0\\",\\"min\\":\\"-5\\",\\"max\\":\\"5\\",\\"target_client_id\\":\\"de34a6-2b5f-46a0-ad19-f1a3d56167\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180257235, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"a7d2dbb2-9a24-4794-aa11-8c58031b8cbe\\",\\"event\\":\\"brightness\\",\\"value\\":\\"-2\\",\\"min\\":\\"-5\\",\\"max\\":\\"5\\",\\"target_client_id\\":\\"de34a6-2b5f-46a0-ad19-f1a3d56167\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180257231, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_brightness_sensor_setting\\",\\"id\\":\\"713fe2f1-2848-4161-b04c-18dd6753ecaf\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180257227, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_motion_sensitivity\\",\\"id\\":\\"68cf908d-c17f-4b6f-b124-373a82393e23\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180257227, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_motion_timer\\",\\"id\\":\\"c4a87013-5add-4a56-a550-10a242a60208\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180257227, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_color_temperature\\",\\"id\\":\\"24639a6e-eabf-4c76-810d-6bc3b906ba23\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180257227, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_brightness\\",\\"id\\":\\"a7d2dbb2-9a24-4794-aa11-8c58031b8cbe\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180257227, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"127.0.0.1\",\"data\":\"{\\"id\\":\\"bf920741-803a-46cf-a022-d0376ae148ea\\",\\"event\\":\\"artmode_status\\",\\"value\\":\\"on\\",\\"target_client_id\\":\\"de34a6-2b5f-46a0-ad19-f1a3d56167\\"}\",\"deviceName\":\"Smart Device\",\"event\":\"d2d_service_message\",\"to\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}}\n" "timestamp: 1549180257223, file: Channel.cpp, func: onSocketMessage : 733" DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_artmode_status\\",\\"id\\":\\"bf920741-803a-46cf-a022-d0376ae148ea\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180257219, file: Channel.cpp, func: onSocketMessage : 733"
when I tried your code,
I see this received on debug logs :
DEBUG "msg : {\"method\":\"ms.channel.emit\",\"params\":{\"clientIp\":\"192.168.1.20\",\"data\":\"{\\"request\\":\\"get_artmode_status\\",\\"id\\":\\"30852acd-1b7d-4496-8bef-53e1178fa839\\"}\",\"deviceName\":\"W1Bob25lXWlQaG9uZQ==\",\"event\":\"art_app_request\",\"to\":\"host\"}}\n" "timestamp: 1549180404771, file: RemoteChannel.cpp, func: onSocketMessage : 1020"
looks perfect, but i don t get any reply :/
The only difference and may be the root cause is the cpp file handling it on samsung TV : remotechannel.cpp versus channel.cpp
What do you think ?
keep on passing me those logs. you are going to unlock a shit load of functionality over the websocket..
so now I have more websocket commands
get_brightness_sensor_setting get_motion_sensitivity get_motion_timer get_color_temperature get_brightness
on thing tho.. the log from the TV... is that log from when you were using samsungctl? or from the smartthings application??
no it did respond..
DEBUG "msg : {
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"bf920741-803a-46cf-a022-d0376ae148ea\",\"event\":\"artmode_status\",\"value\":\"on\",\"target_client_id\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"de34a6-2b5f-46a0-ad19-f1a3d56167"
}
this is on the line right above the request... this is the data that was returned.. I have something wrong in my code and it is not receiving it.
I am going to go and have a look see.
ok something is outta wack with that log..
this is what I need you to do.
I need you to clear the log on the TV start the smartthings application. check the artmode using the app . then close the smartthings application.. go and copy the log to a file.. save that file
then clear the log. connect with samsungctl and try and get the artmode.
go and get the log. save it to a different file. attach both of the files here.
OK i was right.. all the log entries you posted are from your iphone. and not samsungctl at all.
exactly , I did in fact exactly what you said already :)
There is no asnwer from samsungctrl, I fear it s linked to that channel.cpp used when it s over iphone versus remotechannl.cpp when from the websocket API.
It might be because it s targetting another endpoint, I ll wiresharck it excepte if you have a better idea ?
i need to see the logs..
all of the log entries you last posted from the TV are for entries created by your iphone and not samsungctl
please follow the steps outlined above for getting the log files.
there should be a whole slew of entries for the authorization process of samsungctl.. I do not see those at all in your previous post.
I would also like to see the log entries for the authorization of the smartthings app on your phone. it could point us in a direction.
if you can do a man in the middle and wireshark the communications between your phone and the TV that would be really helpful.
the thing is, it s not in the output :/ (authorization part)
i did make a change to the develop branch. if you want to give it a go and see what happens...
Nothing new, trying to make a MITM via a raspberry as my laptop is a professional one, and would not allow me to do such thing :/
Will let you know asap
creating MITM is a pain. especially with WiFi being used.
You need to have a PC that has 2 network cards and you will have to plug an AP into one and the other gets plugged into the same network as the TV. you then need to set up 2 different networks. and use some routing software to create the "bridge" between the 2. then and only then will wireshark be able to grab the packet data that is going to and from the TV from another device.
It requires some additional hardware and a pretty decent knowledge of networking and setting up routing.
I do not know if this would be possible or not. if you set up a VPN tunnel one that has no security on it. the security part is what i am not sure about. have the PC that is running wireshark handle the tunnel. then tunnel in from the phone. this will case the same effect with no additional hardware. I just do not know if there is a way to set up a VPN tunnel without any encryption.
Actually now that I think about it it shouldn't matter even if there was security. you should still be able to capture all of the packet data from the LAN side of the tunnel. this is not going to be encrypted. the encryption ends at the entry point to your local network.
Hello,
I finally made by using mitmproxy, and proxy setup on my iphone, I ll share with you the full dump, but unfortunatly, at first look, there is almost no call to my local network made by the APP, most the time the IP targetted is : https://dls.di.atlas.samsung.com/dls2/dtransf?tid=xxx
with an encoded content...
ok so now you are going to have to MITM the TV and the router to see what is happening between the TV and the samsung server. This can be easier to accomplish if you have some networking knowledge.
You should be able to log incoming and outgoing connections on your router. from those logs you will be able to determine the host that the TV is trying to connect to.
This can be done easy enough using python. once you have those hosts and posts we can create a dummy server. this dummy server is going to be a pass through logging all of the data in both directions.
then we setup a very simple DNS server. point the TV to that server and when the dns request comes in asking for the IP of the samsung server. w turn around and hand it the ip address of the computer running the pass through program. all the pass through is going to do is accept the connection. get the data. log the data and then make the connection to the real samsung server and pass thee data to it. and when a response is given we log that response. and hand it back to the TV.
Now I have not come across a program that is capable of doing all of this all in one program.. hmmm... maybe I should write one that does.... it would be extremely useful.
I use this type of approach to block specific software from requesting updates. or authenticating. it does require you to have a local DNS server tho.
I think this is going to bee the easiest thing right now.
I have not seen a single log that you have shown m from th TV that contains any information about being connected to the library. it is always logging information from when you connect using the phone
clear the logs on the TV.
connect using samsungcrl.
then paste me the logs from the TV.
turn your phone off during this process to make sure there is no communications from that at all.
Now as far as you saying there is no direct communications between the phone and the TV. there has to be. because of the logs from the TV. It specifically names the IP address of the phone. this address is what is used to pass any information back to the phone. You may have something not set up 100% properly in you MITM..
Here is the raw dump, I started the proxy, opened smarthing app, change one option of the art mode, then close the app dump3.log
i need to also see the logs from using samsungctl. you have already shown me the logs from your phone controlling the TV I am waiting on the logs from you trying samsungctl
and that file is no good for me to look at. I do not know what it is...
been lurking on this thread for a while, but had a bit of a breakthrough here! to get these artmode messages to work, you have to connect to /api/v2/channels/com.samsung.art-app instead!
I can't get developer mode to work reliably... loading :8001 has no CSS, can't see the captcha, and can't seem to enable SILLY logging.
but I've been testing with a small node library (more familiar with it than python) and here are some logs once I got it working. >
are sent messages, <
are received.
< { data:
{ clients:
[ { attributes: { name: null },
connectTime: 1553573209149,
deviceName: 'Smart Device',
id: 'cb91c864-de27-44cd-ab67-2ccb4c0df181',
isHost: true },
{ attributes: { name: 'VGVzdA==', token: '123456' },
connectTime: 1553573968189,
deviceName: 'VGVzdA==',
id: '6e8096bc-880c-4efe-b2fc-7e1531c21b58',
isHost: false } ],
id: '6e8096bc-880c-4efe-b2fc-7e1531c21b58' },
event: 'ms.channel.connect' }
< { data: {}, event: 'ms.channel.ready' }
> { method: 'ms.channel.emit',
params:
{ clientIp: '192.168.1.10',
data:
'{"request":"get_artmode_status","value":"","id":"efe593b4-af97-43a6-beec-231a6708368d"}',
deviceName: 'VGVzdA==',
event: 'art_app_request',
to: 'host' } }
< { data:
'{"id":"efe593b4-af97-43a6-beec-231a6708368d","event":"artmode_status","value":"off","target_client_id":"6e8096bc-880c-4efe-b2fc-7e1531c21b58"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
> { method: 'ms.channel.emit',
params:
{ clientIp: '192.168.1.10',
data:
'{"request":"get_artmode_status","value":"","id":"08a16342-97d7-41b8-94c8-503908cc7179"}',
deviceName: 'VGVzdA==',
event: 'art_app_request',
to: 'host' } }
< { data:
'{"id":"08a16342-97d7-41b8-94c8-503908cc7179","event":"artmode_status","value":"on","target_client_id":"6e8096bc-880c-4efe-b2fc-7e1531c21b58"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
> { method: 'ms.channel.emit',
params:
{ clientIp: '192.168.1.10',
data:
'{"request":"set_artmode_status","value":"off","id":"147bbf4c-81c9-4a8c-a145-b845a3037a9c"}',
deviceName: 'VGVzdA==',
event: 'art_app_request',
to: 'host' } }
< { data:
'{"id":"147bbf4c-81c9-4a8c-a145-b845a3037a9c","event":"art_mode_changed","value":"off"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"off"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
> { method: 'ms.channel.emit',
params:
{ clientIp: '192.168.1.10',
data:
'{"request":"set_artmode_status","value":"on","id":"039b6d2d-ce8d-49ad-86e4-d02e85a71e48"}',
deviceName: 'VGVzdA==',
event: 'art_app_request',
to: 'host' } }
< { data:
'{"id":"039b6d2d-ce8d-49ad-86e4-d02e85a71e48","event":"art_mode_changed","value":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"off"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"off"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"nav"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"auto_rotation_changed","value":"off","category_id":"","sub_category_id":""}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"image_selected","content_id":"SAM-S9943","matte_id":"none","is_shown":"Yes"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"image_selected","content_id":"SAM-S9943","matte_id":"none","is_shown":"Yes"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"nav"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"auto_rotation_changed","value":"off","category_id":"","sub_category_id":""}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"image_selected","content_id":"SAM-S9943","matte_id":"shadowbox_black","is_shown":"Yes"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"image_selected","content_id":"SAM-S9943","matte_id":"shadowbox_black","is_shown":"Yes"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"auto_rotation_changed","value":"off","category_id":"","sub_category_id":""}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"matte_changed","content_id":"SAM-S9943","matte_id":"shadowbox_black"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"nav"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"auto_rotation_changed","value":"off","category_id":"","sub_category_id":""}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"image_selected","content_id":"SAM-S9943","matte_id":"shadowbox_warm","is_shown":"Yes"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"image_selected","content_id":"SAM-S9943","matte_id":"shadowbox_warm","is_shown":"Yes"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"auto_rotation_changed","value":"off","category_id":"","sub_category_id":""}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data:
'{"event":"matte_changed","content_id":"SAM-S9943","matte_id":"shadowbox_warm"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"on"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
< { data: '{"event":"art_mode_changed","status":"off"}',
event: 'd2d_service_message',
from: 'cb91c864-de27-44cd-ab67-2ccb4c0df181' }
you can see the responses to the messages I sent with the matching uuids. the rest of the d2d_service_messages are unsolicited push notifications from doing stuff with the TV remote. it even tells you when you're changing the art and which piece was selected (though I don't know how to do anything useful with "SAM-S9943" is (it's Van Gogh's Path in the Woods).
ok first off this is awesome. thanks for the work on this.
My biggest question is this how did you figure out where to connect to? and is this connection also a websocket connection? if it is on what port??
and the other thing is I already have all of the mechanics and a whole slew of other commands we can perform. I do not know if it is going to work through that artmode url or not.
you also provided me with a possible solution to my application content problem. i am willing to bet there are open websocket ports for applications as well. One of these 2 might be for Netflix. http://TV_IP:8001/api/v2/applications/11101200001 it may even be http://TV_IP:8001/api/v2/channels/11101200001
This is what I already know how to do with the art mode. I just didn't have the connection point.
set_artmode_status
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"id\":\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\",\"value\":\"on\",\"request\":\"set_artmode_status\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_artmode_status
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"request\":\"get_artmode_status\",\"id\":\"30852acd-1b7d-4496-8bef-53e1178fa839\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_artmode_status returned data
{
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"259320d8-f368-48a4-bf03-789f24a22c0f\",\"event\":\"artmode_status\",\"value\":\"off\",\"target_client_id\":\"84b12082-5f28-461e-8e81-b98ad1c1ffa\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"84b12082-5f28-461e-8e81-b98ad1c1ffa"
}
}
set_brightness_sensor_setting
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"id\":\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\",\"value\":\"on\",\"request\":\"set_brightness_sensor_setting\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_brightness_sensor_setting
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"request\":\"get_brightness_sensor_setting\",\"id\":\"713fe2f1-2848-4161-b04c-18dd6753ecaf\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_brightness_sensor_setting returned data
{
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"713fe2f1-2848-4161-b04c-18dd6753ecaf\",\"event\":\"brightness_sensor_setting\",\"value\":\"off\",\"target_client_id\":\"de34a6-2b5f-46a0-ad19-f1a3d56167\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"de34a6-2b5f-46a0-ad19-f1a3d56167"
}
}
set_brightness
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"id\":\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\",\"value\":\"2\",\"request\":\"set_brightness\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_brightness
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"request\":\"get_brightness\",\"id\":\"30852acd-1b7d-4496-8bef-53e1178fa839\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_brightness returned data
{
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"259320d8-f368-48a4-bf03-789f24a22c0f\",\"event\":\"brightness\",\"value\":\"2\",\"min\":\"1\",\"max\":\"3\",\"target_client_id\":\"84b12082-5f28-461e-8e81-b98ad1c1ffa\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"84b12082-5f28-461e-8e81-b98ad1c1ffa"
}
}
set_color_temperature
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"id\":\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\",\"value\":\"2\",\"request\":\"set_color_temperature\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_color_temperature
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"request\":\"get_color_temperature\",\"id\":\"30852acd-1b7d-4496-8bef-53e1178fa839\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_color_temperature returned data
{
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"259320d8-f368-48a4-bf03-789f24a22c0f\",\"event\":\"color_temperature\",\"value\":\"2\",\"min\":\"1\",\"max\":\"3\",\"target_client_id\":\"84b12082-5f28-461e-8e81-b98ad1c1ffa\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"84b12082-5f28-461e-8e81-b98ad1c1ffa"
}
}
set_motion_sensitivity
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"id\":\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\",\"value\":\"2\",\"request\":\"set_motion_sensitivity\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_motion_sensitivity
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"request\":\"get_motion_sensitivity\",\"id\":\"30852acd-1b7d-4496-8bef-53e1178fa839\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_motion_sensitivity return data
{
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"259320d8-f368-48a4-bf03-789f24a22c0f\",\"event\":\"motion_sensitivity\",\"value\":\"2\",\"min\":\"1\",\"max\":\"3\",\"target_client_id\":\"84b12082-5f28-461e-8e81-b98ad1c1ffa\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"84b12082-5f28-461e-8e81-b98ad1c1ffa"
}
}
set_motion_timer
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"id\":\"545fc0c1-bd9b-48f5-8444-02f9c519aaec\",\"value\":\"off\",\"request\":\"set_motion_timer\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_motion_timer
{
"method":"ms.channel.emit",
"params":{
"clientIp":"192.168.1.20",
"data":"{\"request\":\"get_motion_timer\",\"id\":\"30852acd-1b7d-4496-8bef-53e1178fa839\"}",
"deviceName":"W1Bob25lXWlQaG9uZQ==",
"event":"art_app_request",
"to":"host"
}
}
get_motion_timer returned data
{
"method":"ms.channel.emit",
"params":{
"clientIp":"127.0.0.1",
"data":"{\"id\":\"259320d8-f368-48a4-bf03-789f24a22c0f\",\"event\":\"motion_timer\",\"value\":\"30\",\"valid_values\":\"[\\\"off\\\",\\\"15\\\",\\\"30\\\",\\\"60\\\",\\\"120\\\",\\\"240\\\"]\\n\",\"target_client_id\":\"84b12082-5f28-461e-8e81-b98ad1c1ffa\"}",
"deviceName":"Smart Device",
"event":"d2d_service_message",
"to":"84b12082-5f28-461e-8e81-b98ad1c1ffa"
}
}
I have added these features using the new websocket connection location. the new code is in the develop branch. I am going to test this using yet another websocket location i was able to dig up I am hoping this will resolve an issue with some of the 2016-2017 TV's not listing their applications.
My biggest question is this how did you figure out where to connect to?
Found this in the logs when using the Smart Things app in the "Art" mode:
DEBUG | "## Channel::AssignChannel with path: /api/v2/channels/com.samsung.art-app##"
you might also find this useful: http://
any others like that you may have come across???? :smile:
and what does this do?
msftest
I am going to ask a really nutty question.. did you draw that?!?!!?
LOL
anyway. i see for the RPC Method is is a choice selector. can you list off the items in it for me please :smile:
and there is nothing tlse like this that shows up in your log??
DEBUG | "## Channel::AssignChannel with path: /api/v2/channels/com.samsung.art-app##"
I am going to ask a really nutty question.. did you draw that?!?!!?
nope, the TV is hosting it! very bizarre.
for ms.webapplication.get
, start
and stop
, it prefills:
{
"method": "ms.webapplication.get",
"id": 1554925303535,
"params": {
"url": "http://prod-multiscreen-examples.s3-website-us-west-1.amazonaws.com/examples/helloworld/tv/"
}
}
starting that application just loads http://prod-multiscreen-examples.s3-website-us-west-1.amazonaws.com/examples/helloworld/tv/ and says
"Eureka! ... You're connected." -- Your TV
and the JSON response is
{
"id": 1554925479275,
"result": true
}
Hello,
I tried to understand how getting vo;lume via upnp is working on your lib, but.... No cahcne for me to understand it :/
Any chance you implement a way to get media information currently playing ?
Thks,
MAtt
PS: Idea is again to know if my TV Frame is currently in Frame mode or TV mode...