Sony TV Network Remote Control Plugin

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Sat Aug 26, 2017 6:53 am

You are only hitting one protocol


try this one. this is going to have the list of all of the protocols i know about. maybe i will find the method that will list the available protocols by using this

Code: Select all

import json
import requests
import traceback

IP_ADDRESS = '192.168.1.1'

getVersions = json.dumps({"id":1,"method":"getVersions","version":"1.0","params":[]})


try:
    print 'Protocol:', '/sony/guide'
    response = requests.post('http://%s/sony/guide' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/guide' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()
    
try:
    print 'Protocol:', '/sony/system'
    response = requests.post('http://%s/sony/system' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/system' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()

try:
    print 'Protocol:', '/sony/videoScreen'
    response = requests.post('http://%s/sony/videoScreen' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/videoScreen' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()


try:
    print 'Protocol:', '/sony/audio'
    response = requests.post('http://%s/sony/audio' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/audio' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()


try:
    print 'Protocol:', '/sony/avContent'
    response = requests.post('http://%s/sony/avContent' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/avContent' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()


try:
    print 'Protocol:', '/sony/recording'
    response = requests.post('http://%s/sony/recording' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/recording' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()

try:
    print 'Protocol:', '/sony/appControl'
    response = requests.post('http://%s/sony/appControl' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/appControl' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()
    
try:    
    print 'Protocol:', '/sony/browser'
    response = requests.post('http://%s/sony/browser' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/browser' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()

try:
    print 'Protocol:', '/sony/notification'
    response = requests.post('http://%s/sony/notification' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/notification' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()

try:
    print 'Protocol:', '/sony/accessControl'
    response = requests.post('http://%s/sony/accessControl' % IP_ADDRESS, data=getVersions.encode('UTF-8'))
    versions = json.loads(response.content.decode('utf-8'))['result'][0]
    for version in versions:
        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})
        response = requests.post('http://%s/sony/accessControl' % IP_ADDRESS, data=version.encode('UTF-8'))
        print json.dumps(json.loads(response.content.decode('utf-8')), indent=4)
        print
except:
    traceback.print_exc()
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Sun Aug 27, 2017 4:42 am

Code: Select all

14:38:06   ---> Welcome to EventGhost <---
14:38:11   Keyboard.F5
14:38:11   Python Script
14:38:11      Protocol: /sony/guide
14:38:11      {
14:38:11          "results": [
14:38:11              [
14:38:11                  "getServiceProtocols", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "string", 
14:38:11                      "string*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getSupportedApiInfo", 
14:38:11                  [
14:38:11                      "{\"services\":\"string*\"}"
14:38:11                  ], 
14:38:11                  [
14:38:11                      "{\"service\":\"string\", \"protocols\":\"string*\", \"apis\":\"ApiInfo[]\"}*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getMethodTypes", 
14:38:11                  [
14:38:11                      "string"
14:38:11                  ], 
14:38:11                  [
14:38:11                      "string", 
14:38:11                      "string*", 
14:38:11                      "string*", 
14:38:11                      "string"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getVersions", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "string*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ]
14:38:11          ], 
14:38:11          "id": 1
14:38:11      }
14:38:11      
14:38:11      Protocol: /sony/system
14:38:11      {
14:38:11          "results": [
14:38:11              [
14:38:11                  "getCurrentTime", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "string"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getDeviceMode", 
14:38:11                  [
14:38:11                      "{\"value\":\"string\"}"
14:38:11                  ], 
14:38:11                  [
14:38:11                      "{\"isOn\":\"bool\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getInterfaceInformation", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"productCategory\":\"string\", \"productName\":\"string\", \"modelName\":\"string\", \"serverName\":\"string\", \"interfaceVersion\":\"string\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getLEDIndicatorStatus", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"mode\":\"string\", \"status\":\"string\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getNetworkSettings", 
14:38:11                  [
14:38:11                      "{\"netif\":\"string\"}"
14:38:11                  ], 
14:38:11                  [
14:38:11                      "{\"netif\":\"string\", \"hwAddr\":\"string\", \"ipAddrV4\":\"string\", \"ipAddrV6\":\"string\", \"netmask\":\"string\", \"gateway\":\"string\", \"dns\":\"string*\"}*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getPowerSavingMode", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"mode\":\"string\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getPowerStatus", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"status\":\"string\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getRemoteControllerInfo", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"bundled\":\"bool\", \"type\":\"string\"}", 
14:38:11                      "{\"name\":\"string\", \"value\":\"string\"}*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getRemoteDeviceSettings", 
14:38:11                  [
14:38:11                      "{\"target\":\"string\"}"
14:38:11                  ], 
14:38:11                  [
14:38:11                      "{\"target\":\"string\", \"currentValue\":\"string\", \"deviceUIInfo\":\"string\", \"title\":\"string\", \"titleTextID\":\"string\", \"type\":\"string\", \"isAvailable\":\"Boolean\", \"candidate\":\"GeneralSettingsCandidate[]\"}*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getSystemInformation", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"product\":\"string\", \"region\":\"string\", \"language\":\"string\", \"model\":\"string\", \"serial\":\"string\", \"macAddr\":\"string\", \"name\":\"string\", \"generation\":\"string\", \"area\":\"string\", \"cid\":\"string\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getSystemSupportedFunction", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"option\":\"string\", \"value\":\"string\"}*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getWolMode", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "{\"enabled\":\"bool\"}"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "requestReboot", 
14:38:11                  [], 
14:38:11                  [], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "setDeviceMode", 
14:38:11                  [
14:38:11                      "{\"value\":\"string\", \"isOn\":\"bool\"}"
14:38:11                  ], 
14:38:11                  [], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "setLanguage", 
14:38:11                  [
14:38:11                      "{\"language\":\"string\"}"
14:38:11                  ], 
14:38:11                  [], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "setPowerSavingMode", 
14:38:11                  [
14:38:11                      "{\"mode\":\"string\"}"
14:38:11                  ], 
14:38:11                  [], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "setPowerStatus", 
14:38:11                  [
14:38:11                      "{\"status\":\"bool\"}"
14:38:11                  ], 
14:38:11                  [], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "setWolMode", 
14:38:11                  [
14:38:11                      "{\"enabled\":\"bool\"}"
14:38:11                  ], 
14:38:11                  [], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getMethodTypes", 
14:38:11                  [
14:38:11                      "string"
14:38:11                  ], 
14:38:11                  [
14:38:11                      "string", 
14:38:11                      "string*", 
14:38:11                      "string*", 
14:38:11                      "string"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ], 
14:38:11              [
14:38:11                  "getVersions", 
14:38:11                  [], 
14:38:11                  [
14:38:11                      "string*"
14:38:11                  ], 
14:38:11                  "1.0"
14:38:11              ]
14:38:11          ], 
14:38:11          "id": 1
14:38:11      }
14:38:11      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getCurrentTime", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"dateTime\":\"string\", \"timeZoneOffsetMinute\":\"int\", \"dstOffsetMinute\":\"int\"}"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "setLEDIndicatorStatus", 
14:38:12                  [
14:38:12                      "{\"mode\":\"string\", \"status\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.1"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/videoScreen
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getAudioSourceScreen", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"screen\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getBannerMode", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"currentValue\":\"string\", \"candidate\":\"BannerModeCandidate[]\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getPipSubScreenPosition", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"position\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getSceneSetting", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"currentValue\":\"string\", \"candidate\":\"SceneSettingCandidate[]\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setAudioSourceScreen", 
14:38:12                  [
14:38:12                      "{\"screen\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setBannerMode", 
14:38:12                  [
14:38:12                      "{\"value\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setMultiScreenMode", 
14:38:12                  [
14:38:12                      "{\"mode\":\"string\", \"option\":\"MultiScreenModeOption\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setPapScreenSize", 
14:38:12                  [
14:38:12                      "{\"screen\":\"string\", \"size\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setPipSubScreenPosition", 
14:38:12                  [
14:38:12                      "{\"position\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setSceneSetting", 
14:38:12                  [
14:38:12                      "{\"value\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getMultiScreenMode", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"mode\":\"string\", \"option\":\"MultiScreenModeOption\"}"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "requestToNotifyScreenState", 
14:38:12                  [
14:38:12                      "{\"multiScreenMode\":\"string\", \"pipSubScreenPosition\":\"string\", \"audioSourceScreen\":\"string\", \"option\":\"MultiScreenModeOption\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"multiScreenMode\":\"string\", \"pipSubScreenPosition\":\"string\", \"audioSourceScreen\":\"string\", \"option\":\"MultiScreenModeOption\"}"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/audio
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getSpeakerSettings", 
14:38:12                  [
14:38:12                      "{\"target\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"target\":\"string\", \"currentValue\":\"string\", \"deviceUIInfo\":\"string\", \"title\":\"string\", \"titleTextID\":\"string\", \"type\":\"string\", \"isAvailable\":\"Boolean\", \"candidate\":\"GeneralSettingsCandidate[]\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVolumeInformation", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"target\":\"string\", \"volume\":\"int\", \"mute\":\"bool\", \"maxVolume\":\"int\", \"minVolume\":\"int\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setAudioMute", 
14:38:12                  [
14:38:12                      "{\"status\":\"bool\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "int"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setAudioVolume", 
14:38:12                  [
14:38:12                      "{\"target\":\"string\", \"volume\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "int"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setSpeakerSettings", 
14:38:12                  [
14:38:12                      "{\"settings\":\"GeneralSettings[]\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getSoundSettings", 
14:38:12                  [
14:38:12                      "{\"target\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"target\":\"string\", \"currentValue\":\"string\", \"deviceUIInfo\":\"string\", \"title\":\"string\", \"titleTextID\":\"string\", \"type\":\"string\", \"isAvailable\":\"Boolean\", \"candidate\":\"GeneralSettingsCandidate[]\"}*"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "setSoundSettings", 
14:38:12                  [
14:38:12                      "{\"settings\":\"GeneralSettings[]\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.1"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "setAudioVolume", 
14:38:12                  [
14:38:12                      "{\"target\":\"string\", \"volume\":\"string\", \"ui\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.2"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/avContent
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "deleteContent", 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getContentCount", 
14:38:12                  [
14:38:12                      "{\"source\":\"string\", \"type\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"count\":\"int\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getContentList", 
14:38:12                  [
14:38:12                      "{\"source\":\"string\", \"stIdx\":\"int\", \"cnt\":\"int\", \"type\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"title\":\"string\", \"index\":\"int\", \"dispNum\":\"string\", \"originalDispNum\":\"string\", \"tripletStr\":\"string\", \"programNum\":\"int\", \"programMediaType\":\"string\", \"directRemoteNum\":\"int\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"channelName\":\"string\", \"fileSizeByte\":\"int\", \"isProtected\":\"bool\", \"isAlreadyPlayed\":\"bool\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getCurrentExternalInputsStatus", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"title\":\"string\", \"connection\":\"bool\", \"label\":\"string\", \"icon\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getParentalRatingSettings", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"ratingTypeAge\":\"int\", \"ratingTypeSony\":\"string\", \"ratingCountry\":\"string\", \"ratingCustomTypeTV\":\"string*\", \"ratingCustomTypeMpaa\":\"string\", \"ratingCustomTypeCaEnglish\":\"string\", \"ratingCustomTypeCaFrench\":\"string\", \"unratedLock\":\"bool\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getPlayingContentInfo", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"source\":\"string\", \"title\":\"string\", \"dispNum\":\"string\", \"originalDispNum\":\"string\", \"tripletStr\":\"string\", \"programNum\":\"int\", \"programTitle\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"mediaType\":\"string\", \"playSpeed\":\"string\", \"bivl_serviceId\":\"string\", \"bivl_assetId\":\"string\", \"bivl_provider\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getSchemeList", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"scheme\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getSourceList", 
14:38:12                  [
14:38:12                      "{\"scheme\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"source\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setDeleteProtection", 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"isProtected\":\"bool\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setFavoriteContentList", 
14:38:12                  [
14:38:12                      "{\"favSource\":\"string\", \"contents\":\"string*\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setPlayContent", 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setPlayTvContent", 
14:38:12                  [
14:38:12                      "{\"channel\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setTvContentVisibility", 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"epgVisibility\":\"string\", \"channelSurfingVisibility\":\"string\", \"visibility\":\"string\"}*"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getContentCount", 
14:38:12                  [
14:38:12                      "{\"source\":\"string\", \"type\":\"string\", \"target\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"count\":\"int\"}"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "getCurrentExternalInputsStatus", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"title\":\"string\", \"connection\":\"bool\", \"label\":\"string\", \"icon\":\"string\", \"status\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "setPlayTvContent", 
14:38:12                  [
14:38:12                      "{\"channel\":\"PlayTvChannel\", \"source\":\"string\", \"sourceType\":\"string\", \"broadcastFreqName\":\"string\", \"ignoreVisibilitySettings\":\"bool\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.1"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getContentList", 
14:38:12                  [
14:38:12                      "{\"source\":\"string\", \"stIdx\":\"int\", \"cnt\":\"int\", \"type\":\"string\", \"target\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"title\":\"string\", \"index\":\"int\", \"dispNum\":\"string\", \"originalDispNum\":\"string\", \"tripletStr\":\"string\", \"programNum\":\"int\", \"programMediaType\":\"string\", \"directRemoteNum\":\"int\", \"epgVisibility\":\"string\", \"channelSurfingVisibility\":\"string\", \"visibility\":\"string\", \"startDateTime\":\"string\", \"channelName\":\"string\", \"fileSizeByte\":\"int\", \"isProtected\":\"bool\", \"isAlreadyPlayed\":\"bool\", \"productID\":\"string\", \"contentType\":\"string\", \"storageUri\":\"string\", \"videoCodec\":\"string\", \"chapterCount\":\"int\", \"durationSec\":\"double\", \"audioCodec\":\"string*\", \"audioFrequency\":\"string*\", \"audioChannel\":\"string*\", \"subtitleLanguage\":\"string*\", \"subtitleTitle\":\"string*\", \"parentalRating\":\"string*\", \"parentalSystem\":\"string*\", \"parentalCountry\":\"string*\", \"sizeMB\":\"int\", \"createdTime\":\"string\", \"userContentFlag\":\"bool\"}*"
14:38:12                  ], 
14:38:12                  "1.2"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/recording
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "addSchedule", 
14:38:12                  [
14:38:12                      "{\"type\":\"string\", \"uri\":\"string\", \"title\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\", \"quality\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"annotation\":\"int\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "deleteSchedule", 
14:38:12                  [
14:38:12                      "{\"id\":\"string\", \"type\":\"string\", \"uri\":\"string\", \"title\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getConflictScheduleList", 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"title\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"id\":\"string\", \"title\":\"string\", \"type\":\"string\", \"uri\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getHistoryList", 
14:38:12                  [
14:38:12                      "{\"stIdx\":\"int\", \"cnt\":\"int\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"id\":\"string\", \"title\":\"string\", \"channelName\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"reasonId\":\"int\", \"reasonMsg\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getRecordingStatus", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"status\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getScheduleList", 
14:38:12                  [
14:38:12                      "{\"stIdx\":\"int\", \"cnt\":\"int\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"id\":\"string\", \"type\":\"string\", \"uri\":\"string\", \"title\":\"string\", \"channelName\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\", \"overlapStatus\":\"string\", \"recordingStatus\":\"string\", \"quality\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getSupportedRepeatType", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "addSchedule", 
14:38:12                  [
14:38:12                      "{\"type\":\"string\", \"uri\":\"string\", \"title\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\", \"quality\":\"string\", \"eventId\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"annotation\":\"int\"}"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "getScheduleList", 
14:38:12                  [
14:38:12                      "{\"stIdx\":\"int\", \"cnt\":\"int\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"id\":\"string\", \"type\":\"string\", \"uri\":\"string\", \"title\":\"string\", \"channelName\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\", \"overlapStatus\":\"string\", \"recordingStatus\":\"string\", \"quality\":\"string\", \"eventId\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "addSchedule", 
14:38:12                  [
14:38:12                      "{\"type\":\"string\", \"uri\":\"string\", \"title\":\"string\", \"startDateTime\":\"string\", \"durationSec\":\"int\", \"repeatType\":\"string\", \"quality\":\"string\", \"eventId\":\"string\", \"id\":\"string\", \"avoidDoubleRecording\":\"string\", \"mode\":\"string\", \"priority\":\"string\", \"storageUri\":\"string\", \"override\":\"string\", \"autoTransfer\":\"string\", \"trackedTitle\":\"string\", \"videoIndex\":\"int\", \"audioIndex\":\"int\", \"subtitleIndex\":\"int\", \"groupId\":\"string\", \"recordItemWithParentalLock\":\"string\", \"ignoreError\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"annotation\":\"int\", \"conflict\":\"ConflictSchedule[]\"}"
14:38:12                  ], 
14:38:12                  "1.2"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/appControl
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getApplicationList", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"title\":\"string\", \"uri\":\"string\", \"icon\":\"string\", \"data\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getApplicationStatusList", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"name\":\"string\", \"status\":\"string\"}*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getWebAppStatus", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"active\":\"bool\", \"url\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setActiveApp", 
14:38:12                  [
14:38:12                      "{\"uri\":\"string\", \"data\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setTextForm", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "int"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "terminateApps", 
14:38:12                  [], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "getTextForm", 
14:38:12                  [
14:38:12                      "{\"encKey\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "{\"text\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.1"
14:38:12              ], 
14:38:12              [
14:38:12                  "setTextForm", 
14:38:12                  [
14:38:12                      "{\"encKey\":\"string\", \"text\":\"string\"}"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.1"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/browser
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "actBrowserControl", 
14:38:12                  [
14:38:12                      "{\"control\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "int"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getTextUrl", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "{\"url\":\"string\", \"title\":\"string\", \"type\":\"string\", \"favicon\":\"string\"}"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "setTextUrl", 
14:38:12                  [
14:38:12                      "{\"url\":\"string\", \"title\":\"string\", \"type\":\"string\", \"favicon\":\"string\"}"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "int"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      
14:38:12      Protocol: /sony/notification
14:38:12      Traceback (most recent call last):
14:38:12        File "9", line 112, in <module>
14:38:12      KeyError: 'result'
14:38:12      Protocol: /sony/accessControl
14:38:12      {
14:38:12          "results": [
14:38:12              [
14:38:12                  "actRegister", 
14:38:12                  [
14:38:12                      "{\"clientid\":\"string\", \"nickname\":\"string\", \"level\":\"string\"}", 
14:38:12                      "{\"function\":\"string\", \"value\":\"string\"}*"
14:38:12                  ], 
14:38:12                  [], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getMethodTypes", 
14:38:12                  [
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  [
14:38:12                      "string", 
14:38:12                      "string*", 
14:38:12                      "string*", 
14:38:12                      "string"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ], 
14:38:12              [
14:38:12                  "getVersions", 
14:38:12                  [], 
14:38:12                  [
14:38:12                      "string*"
14:38:12                  ], 
14:38:12                  "1.0"
14:38:12              ]
14:38:12          ], 
14:38:12          "id": 1
14:38:12      }
14:38:12      

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Sun Aug 27, 2017 4:44 am

Code: Select all

14:37:58: 2 MainThread: ConfigDialog.GetEvent => (5100, (u'import json\nimport requests\nimport traceback\n\nIP_ADDRESS = \'192.168.168.198\'\n\ngetVersions = json.dumps({"id":1,"method":"getVersions","version":"1.0","params":[]})\n\n\ntry:\n    print \'Protocol:\', \'/sony/guide\'\n    response = requests.post(\'http://%s/sony/guide\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/guide\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n   \ntry:\n    print \'Protocol:\', \'/sony/system\'\n    response = requests.post(\'http://%s/sony/system\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/system\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\ntry:\n    print \'Protocol:\', \'/sony/videoScreen\'\n    response = requests.post(\'http://%s/sony/videoScreen\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/videoScreen\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\n\ntry:\n    print \'Protocol:\', \'/sony/audio\'\n    response = requests.post(\'http://%s/sony/audio\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/audio\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\n\ntry:\n    print \'Protocol:\', \'/sony/avContent\'\n    response = requests.post(\'http://%s/sony/avContent\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/avContent\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\n\ntry:\n    print \'Protocol:\', \'/sony/recording\'\n    response = requests.post(\'http://%s/sony/recording\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/recording\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\ntry:\n    print \'Protocol:\', \'/sony/appControl\'\n    response = requests.post(\'http://%s/sony/appControl\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/appControl\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n   \ntry:   \n    print \'Protocol:\', \'/sony/browser\'\n    response = requests.post(\'http://%s/sony/browser\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/browser\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\ntry:\n    print \'Protocol:\', \'/sony/notification\'\n    response = requests.post(\'http://%s/sony/notification\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/notification\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()\n\ntry:\n    print \'Protocol:\', \'/sony/accessControl\'\n    response = requests.post(\'http://%s/sony/accessControl\' % IP_ADDRESS, data=getVersions.encode(\'UTF-8\'))\n    versions = json.loads(response.content.decode(\'utf-8\'))[\'result\'][0]\n    for version in versions:\n        version = json.dumps({"id":1,"method":"getMethodTypes","version":"1.0","params":[version]})\n        response = requests.post(\'http://%s/sony/accessControl\' % IP_ADDRESS, data=version.encode(\'UTF-8\'))\n        print json.dumps(json.loads(response.content.decode(\'utf-8\')), indent=4)\n        print\nexcept:\n    traceback.print_exc()',))
The .log, if that's easier to read.

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Sun Aug 27, 2017 9:29 am

I'm all set. Thanks for the log tho.. I have about 95% of the back end running. and it is working well too. @topix has a Sony TV and was kind enough to lend it to me (in the virtual sense) he port forwarded to the TV for me so I could test things.

But I have gotten almost all of it done right down to getting the icons for the applications 8) :D. This has been a tricky bugger because I wanted to keep it all instance orientated. I plan on using an object based list control for displaying the various components. I have also made the back end so it can run without EG. I am thinking of using the Windows notification system, named pipes and a call back HTTP system to transmit events and also be able to control it externally. but have it be a complete standalone program.

From my searching there is no complete API for controlling these Bravia TV's but there is soon going to be one.
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Thu Aug 31, 2017 5:30 am

Sounds great. :) Looking forward to a test drive. :D

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Sun Dec 24, 2017 6:57 pm

OK so I have been working on this plugin some more these past few days. I have managed to get my paws on the full API documentation for the Bravia TV's. I have to say I was very impressed with the amount of stuff I had right. there were some changes but for the most part The stuff i had was correct. I am adding a whole heap of things to it. like the ability to send text into the TV for the text entry dialogs. and loading web pages on the thing. starting applications. scheduling recordings. accessing USB drives. running photoshare and changing what photo to display with the ability to display the thumbnails/photos locally, and of course all of the usual stuff. changing channels, volume, sources/inputs.
If you like the work I have been doing then feel free to Image

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Tue Dec 26, 2017 1:07 pm

if i can bother someone for a bit of their time.
the code below will scan your network for all sony devices that happen to be plugged in. If it finds one it will read any data that is associated with the device and write that data to a file. called sony_scan.txt that file gets saved to your desktop. if someone is willing to run this and send me a copy of that file in a PM that would be very helpful.


Code: Select all

import socket
import time
from xml.etree import cElementTree
import requests


SSDP_ADDR = "239.255.255.250"
SSDP_PORT = 1900
SSDP_MX = 10
SSDP_ST = "urn:schemas-sony-com:service:ScalarWebAPI:1"#"upnp:rootdevice"#

SSDP_REQUEST = (
    'M-SEARCH * HTTP/1.1\r\n'
    'ST: %s\r\n'
    'MAN: "ssdp:discover"\r\n'
    'HOST: %s:%d\r\n'
    'MX: %d\r\n'
    'Content-Length: 0\r\n'
    '\r\n' % (SSDP_ST, SSDP_ADDR, SSDP_PORT, SSDP_MX)
)

SSDP_IPV6 = (
    'M-SEARCH * HTTP/1.1\r\n'
    'ST: %s\r\n'
    'MAN: "ssdp:discover"\r\n'
    'HOST: [ff02::c]:1900\r\n'
    'MX: %d\r\n'
    'Content-Length: 0\r\n'
    '\r\n' % (SSDP_ST, SSDP_MX)
)

import os

outfile = open(os.path.join(os.path.expanduser('~'), 'desktop', 'sony_scan.txt'), 'w')
def discover(timeout=30.0):
    ssdp_request = SSDP_REQUEST.format(SSDP_MX, SSDP_ST, SSDP_ADDR, SSDP_PORT)
    dest = socket.gethostbyname(SSDP_ADDR)

    def connect_sock():
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.bind((socket.gethostbyname(socket.gethostname()), 0))
        sock.sendto(ssdp_request, (dest, SSDP_PORT))
        sock.settimeout(timeout)

        while True:
            try:
                data, address = sock.recvfrom(1024)
            except socket.timeout:
                return

            outfile.write('=' * 80)
            outfile.write('\n')
            outfile.write('\n')
            response = data

            for line in response.split('\n'):
                line = line.strip()
                if not line:
                    continue
                location = line.lower().find('location:')
                if location > -1:
                    url = line[location + 9:].strip()
                    root_url = '/'.join(url.split('/')[:-1])


                    def get_xml(xml_url):
                        x_d = requests.get(xml_url).content
                        from io import StringIO
                        x = StringIO(unicode(x_d))

                        namespaces = dict([
                            node for _, node in
                            cElementTree.iterparse(x, events=('start-ns',))
                        ])

                        x.close()
                        x = cElementTree.fromstring(x_d.decode('utf-8'))
                        return x, namespaces


                    def iter_node(parent, ns, tab=''):
                        outfile.write(tab + parent.tag + ' -- ' + str(parent.text) + '\n')
                        if parent.text is not None and '.xml' in parent.text:
                            outfile.write('\n')
                            outfile.write('\n')
                            outfile.write('*' * 80)
                            outfile.write('\n')
                            outfile.write('\n')
                            if parent.text.startswith('/'):
                                text = parent.text
                            else:
                                text = '/' + parent.text

                            text = text.split('/')
                            for item in text[:]:
                                if item in root_url:
                                    text.remove(item)
                            text = '/' + '/'.join(text)
                            outfile.write(root_url + text + '\n')
                            xml, xmlns = get_xml(root_url + text)
                            iter_node(xml, xmlns, tab + '    ')

                            outfile.write('\n')
                            outfile.write('\n')
                            outfile.write('*' * 80)
                            outfile.write('\n')
                            outfile.write('\n')

                        outfile.flush()

                        for child in parent:
                            iter_node(child, ns, tab + '    ')

                    iter_node(*get_xml(url))
            outfile.write('=' * 80)
            outfile.write('\n\n\n')

    connect_sock()

discover()

outfile.close()
If you like the work I have been doing then feel free to Image

User avatar
topix
Experienced User
Posts: 410
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Sony TV Network Remote Control Plugin

Post by topix » Tue Dec 26, 2017 4:52 pm

I've run the script. It results in an empty file. So my Sony TV isn't found.

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Wed Dec 27, 2017 1:44 am

topix wrote:
Tue Dec 26, 2017 4:52 pm
I've run the script. It results in an empty file. So my Sony TV isn't found.
Same here. File is created, but empty.

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Wed Dec 27, 2017 1:07 pm

I hammered out what I needed to with that script. It was for the UPNP discovery.

@blaher

What is the model number of your TV? More specifically if you know the FY code (I believe it's FY)
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Thu Dec 28, 2017 2:49 am

It's a Sony Bravia 2015 model: KDL65W850C

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Thu Dec 28, 2017 6:44 am

ok so you either have an FY14 or an FY15. but that's cool. I am going to give you a script to run. this is going to do a simple poll of your TV and ask it what it's abilities are. don't change anything it will prompt you to enter the TV's ip address. There is no pin or auth process for this. it it accessing the public portion of the API.


Code: Select all

IP_ADDRESS = input('ENTER IP ADDRESS')
import requests 
import json

url = 'http://{0}/sony/guide'.format(IP_ADDRESS)
json_data = json.dumps({
   "id": 1,
   "method": "getSupportedApiInfo",
   "version": "1.0",
   "params": [{"services": []}]
}).encode('UTF-8')

response = requests.post(url, data=json_data).content.decode('utf-8')

print json.dumps(json.loads(response), indent=4)

url = 'http://{0}/sony/system'.format(IP_ADDRESS)
json_data = json.dumps({
   "id": 1,
   "method": "getInterfaceInformation",
   "version": "1.0",
   "params": []
}).encode('UTF-8')

response = requests.post(url, data=json_data).content.decode('utf-8')

print json.dumps(json.loads(response), indent=4)

If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Sat Dec 30, 2017 4:21 am

14:18:14 Traceback (most recent call last):
14:18:14 Python script "13", line 1, in <module>
14:18:14 IP_ADDRESS = input('ENTER IP ADDRESS')
14:18:14 File "C:\Program Files (x86)\EventGhost\eg\Init.py", line 197, in Input
14:18:14 return eval(eg.SimpleInputDialog.RawInput(prompt))
14:18:14 SyntaxError: invalid syntax (<string>, line 1)

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: Sony TV Network Remote Control Plugin

Post by blaher » Sat Dec 30, 2017 5:03 am

I used the rest client as per this page:
https://openremote.github.io/archive-do ... ntrol.html

getInterfaceInformation gives me:
{"result":[{"productCategory":"tv","productName":"BRAVIA","modelName":"KDL-65W850C","serverName":"","interfaceVersion":"3.9.0"}],"id":1}

{"method":"getSupportedApiInfo","params":[{"services": []}],"id":1, "version":"1.0"}
Gives me:
{"result":[[]],"id":1}

getMethodTypes:

Code: Select all

{"results":[["getCurrentTime",[],["string"],"1.0"],["getDeviceMode",["{\"value\":\"string\"}"],["{\"isOn\":\"bool\"}"],"1.0"],["getInterfaceInformation",[],["{\"productCategory\":\"string\", \"productName\":\"string\", \"modelName\":\"string\", \"serverName\":\"string\", \"interfaceVersion\":\"string\"}"],"1.0"],["getLEDIndicatorStatus",[],["{\"mode\":\"string\", \"status\":\"string\"}"],"1.0"],["getNetworkSettings",["{\"netif\":\"string\"}"],["{\"netif\":\"string\", \"hwAddr\":\"string\", \"ipAddrV4\":\"string\", \"ipAddrV6\":\"string\", \"netmask\":\"string\", \"gateway\":\"string\", \"dns\":\"string*\"}*"],"1.0"],["getPowerSavingMode",[],["{\"mode\":\"string\"}"],"1.0"],["getPowerStatus",[],["{\"status\":\"string\"}"],"1.0"],["getRemoteControllerInfo",[],["{\"bundled\":\"bool\", \"type\":\"string\"}","{\"name\":\"string\", \"value\":\"string\"}*"],"1.0"],["getRemoteDeviceSettings",["{\"target\":\"string\"}"],["{\"target\":\"string\", \"currentValue\":\"string\", \"deviceUIInfo\":\"string\", \"title\":\"string\", \"titleTextID\":\"string\", \"type\":\"string\", \"isAvailable\":\"Boolean\", \"candidate\":\"GeneralSettingsCandidate[]\"}*"],"1.0"],["getSystemInformation",[],["{\"product\":\"string\", \"region\":\"string\", \"language\":\"string\", \"model\":\"string\", \"serial\":\"string\", \"macAddr\":\"string\", \"name\":\"string\", \"generation\":\"string\", \"area\":\"string\", \"cid\":\"string\"}"],"1.0"],["getSystemSupportedFunction",[],["{\"option\":\"string\", \"value\":\"string\"}*"],"1.0"],["getWolMode",[],["{\"enabled\":\"bool\"}"],"1.0"],["requestReboot",[],[],"1.0"],["setDeviceMode",["{\"value\":\"string\", \"isOn\":\"bool\"}"],[],"1.0"],["setLanguage",["{\"language\":\"string\"}"],[],"1.0"],["setPowerSavingMode",["{\"mode\":\"string\"}"],[],"1.0"],["setPowerStatus",["{\"status\":\"bool\"}"],[],"1.0"],["setWolMode",["{\"enabled\":\"bool\"}"],[],"1.0"],["getMethodTypes",["string"],["string","string*","string*","string"],"1.0"],["getVersions",[],["string*"],"1.0"]],"id":1}
getApplicationList, useful for launching applications such as Kodi directly:

Code: Select all

{"result":[[{"title":"Album","uri":"com.sony.dtv.com.sony.dtv.osat.album.com.sonyericsson.album.MainActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.osat.album.com.sonyericsson.album.MainActivity.png"},{"title":"Music","uri":"com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity.png"},{"title":"Programme Guide","uri":"com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity.png"},{"title":"Recorded Title List","uri":"com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.rec.ui.screen.recorded.TitleListLauncherActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.rec.ui.screen.recorded.TitleListLauncherActivity.png"},{"title":"YouTube","uri":"com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.cobalt.activity.ShellActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.cobalt.activity.ShellActivity.png"},{"title":"Play Store","uri":"com.sony.dtv.com.android.vending.com.google.android.finsky.activities.TvMainActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.android.vending.com.google.android.finsky.activities.TvMainActivity.png"},{"title":"Amazon Video","uri":"com.sony.dtv.com.amazon.aiv.us.com.amazon.ignition.IgnitionActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.amazon.aiv.us.com.amazon.ignition.IgnitionActivity.png"},{"title":"PlayStation Video","uri":"com.sony.dtv.com.sony.snei.video.hhvu.com.sony.snei.video.hhvu.MainActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.snei.video.hhvu.com.sony.snei.video.hhvu.MainActivity.png"},{"title":"Photo Sharing Plus","uri":"com.sony.dtv.com.sony.dtv.photosharingplus.com.sony.dtv.photosharingplus.ui.PSSinglePlayScreenActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.photosharingplus.com.sony.dtv.photosharingplus.ui.PSSinglePlayScreenActivity.png"},{"title":"Screen mirroring","uri":"com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity.png"},{"title":"Video","uri":"com.sony.dtv.com.sony.dtv.osat.video.com.sonyericsson.video.browser.BrowserActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.osat.video.com.sonyericsson.video.browser.BrowserActivity.png"},{"title":"Internet Browser","uri":"com.sony.dtv.com.opera.sdk.example.com.opera.sdk.example.SonyBrowserUiActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.opera.sdk.example.com.opera.sdk.example.SonyBrowserUiActivity.png"},{"title":"Crackle - Movies &amp; TV","uri":"com.sony.dtv.com.crackle.androidtv.com.crackle.alwayson.app.HomeActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.crackle.androidtv.com.crackle.alwayson.app.HomeActivity.png"},{"title":"Play Games","uri":"com.sony.dtv.com.google.android.play.games.com.google.android.gms.games.pano.activity.MainPanoActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.google.android.play.games.com.google.android.gms.games.pano.activity.MainPanoActivity.png"},{"title":"Netflix","uri":"com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity.png"},{"title":"Play Music","uri":"com.sony.dtv.com.google.android.music.com.google.android.music.tv.HomeActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.google.android.music.com.google.android.music.tv.HomeActivity.png"},{"title":"Kodi","uri":"com.sony.dtv.org.xbmc.kodi.org.xbmc.kodi.Splash","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.org.xbmc.kodi.org.xbmc.kodi.Splash.png"},{"title":"ES File Explorer","uri":"com.sony.dtv.com.estrongs.android.pop.com.estrongs.android.pop.app.openscreenad.NewSplashActivity","icon":"http:\/\/192.168.168.198\/DIAL\/icon\/com.sony.dtv.com.estrongs.android.pop.com.estrongs.android.pop.app.openscreenad.NewSplashActivity.png"},{"title":"Foxtel Play","uri":"com.sony.dtv.sonyselect-e9a19035bce66679973b5149f973abc708ad5cdb","icon":"https:\/\/content.erabu.sonymobile.com\/icons\/7928caf6-b96a-4dc5-8fd0-21a64f19dcac.png"},{"title":"Stan","uri":"com.sony.dtv.sonyselect-28bf30a6a7c8318359b76157c6123d5de91a26ee","icon":"https:\/\/images.erabu.sony.tv\/icons\/f51d1fac-6c05-46c4-8031-bba5cf5660c8.png"},{"title":"ABC iView","uri":"com.sony.dtv.sonyselect-436bfc9b5bd4e592539a08096f1341bcc3ca9604","icon":"https:\/\/images.erabu.sony.tv\/icons\/a5d0fed8-9f47-4479-8f61-3e464ef650db.png"},{"title":"SBS on Demand","uri":"com.sony.dtv.sonyselect-2e7fc758efc5f086a750ae20011633dbe25935cc","icon":"https:\/\/images.erabu.sony.tv\/icons\/93ce67ff-467c-4410-8bfe-2c1896c30e0c.png"},{"title":"9Now","uri":"com.sony.dtv.sonyselect-405f43aecbe92073ac3913eaa7500778e0cc8d3a","icon":"https:\/\/images.erabu.sony.tv\/icons\/b79f8b8b-82a4-46b9-b5a4-c4b426ae5044.png"},{"title":"500px","uri":"com.sony.dtv.sonyselect-e20c74d9c4c824d97dfa921dfa107f966bd3947f","icon":"https:\/\/images.erabu.sony.tv\/icons\/08bbabc3-e8e0-4620-891a-3b8d9e80f8bb.png"},{"title":"Digital Concert Hall","uri":"com.sony.dtv.ceb-5114","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_55\/sub_1\/x180.png"},{"title":"Activate Enhanced Features","uri":"com.sony.dtv.ceb-4834","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_0\/h.png"},{"title":"KiddoVid","uri":"com.sony.dtv.ceb-4278","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_493\/h.png"},{"title":"Funny For Free","uri":"com.sony.dtv.ceb-4282","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_494\/x180.png"},{"title":"iFood.tv","uri":"com.sony.dtv.ceb-3499","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_384\/x180.png"},{"title":"Meteonews TV","uri":"com.sony.dtv.ceb-5216","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_382\/x180.png"},{"title":"SKAI.gr","uri":"com.sony.dtv.ceb-4506","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_185\/h.png"},{"title":"uStudio","uri":"com.sony.dtv.ceb-4386","icon":"http:\/\/sonybivstatic-a.akamaihd.net\/bivl-ww\/static\/service\/icons\/service_109\/h.png"}]],"id":10}
{"method":"getSupportedApiInfo","params":[{"service": []}],"id":1, "version":"1.0"}
Instead of services, plural:

Code: Select all

{"result":[[{"service":"accessControl","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"actRegister","versions":[{"version":"1.0"}]}]},{"service":"appControl","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"getApplicationStatusList","versions":[{"version":"1.0"}]},{"name":"getApplicationList","versions":[{"version":"1.0","authLevel":"private"}]},{"name":"setTextForm","versions":[{"version":"1.1","authLevel":"generic"},{"version":"1.0","authLevel":"generic"}]},{"name":"getTextForm","versions":[{"version":"1.1","authLevel":"private"}]},{"name":"terminateApps","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setActiveApp","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getWebAppStatus","versions":[{"version":"1.0","authLevel":"private"}]}]},{"service":"audio","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"setSoundSettings","versions":[{"version":"1.1","authLevel":"generic"}]},{"name":"setSpeakerSettings","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getSoundSettings","versions":[{"version":"1.1"}]},{"name":"setAudioMute","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setAudioVolume","versions":[{"version":"1.0","authLevel":"generic"},{"version":"1.2","authLevel":"generic"}]},{"name":"getSpeakerSettings","versions":[{"version":"1.0"}]},{"name":"getVolumeInformation","versions":[{"version":"1.0"}]}]},{"service":"avContent","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"setFavoriteContentList","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setPlayTvContent","versions":[{"version":"1.1","authLevel":"generic"},{"version":"1.0","authLevel":"generic"}]},{"name":"getCurrentExternalInputsStatus","versions":[{"version":"1.1"},{"version":"1.0"}]},{"name":"getContentCount","versions":[{"version":"1.1","authLevel":"private"},{"version":"1.0","authLevel":"private"}]},{"name":"setTvContentVisibility","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getContentList","versions":[{"version":"1.0","authLevel":"private"},{"version":"1.2","authLevel":"private"}]},{"name":"getSchemeList","versions":[{"version":"1.0"}]},{"name":"deleteContent","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setPlayContent","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getParentalRatingSettings","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getPlayingContentInfo","versions":[{"version":"1.0","authLevel":"private"}]},{"name":"setDeleteProtection","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getSourceList","versions":[{"version":"1.0"}]}]},{"service":"browser","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"getTextUrl","versions":[{"version":"1.0","authLevel":"private"}]},{"name":"actBrowserControl","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setTextUrl","versions":[{"version":"1.0","authLevel":"generic"}]}]},{"service":"cec","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"setCecControlMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setPowerSyncMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setMhlPowerFeedMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setMhlAutoInputChangeMode","versions":[{"version":"1.0","authLevel":"generic"}]}]},{"service":"contentshare","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"closeContentShare","versions":[{"version":"1.0"}]},{"name":"getContentShareServerInfo","versions":[{"version":"1.0"}]},{"name":"togglePlayStatus","versions":[{"version":"1.0"}]},{"name":"rotatePhoto","versions":[{"version":"1.0"}]},{"name":"getContentList","versions":[{"version":"1.0"}]},{"name":"getUserList","versions":[{"version":"1.0"}]},{"name":"setQuickInvitationMode","versions":[{"version":"1.0"}]},{"name":"setUserNickName","versions":[{"version":"1.0"}]},{"name":"setBgmControlMode","versions":[{"version":"1.0"}]},{"name":"voteContent","versions":[{"version":"1.0"}]},{"name":"requestToNotifyEvent","versions":[{"version":"1.0"}]}]},{"service":"encryption","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"getPublicKey","versions":[{"version":"1.0"}]}]},{"service":"guide","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"getSupportedApiInfo","versions":[{"version":"1.0"}]},{"name":"getServiceProtocols","versions":[{"version":"1.0"}]}]},{"service":"recording","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"getRecordingStatus","versions":[{"version":"1.0"}]},{"name":"getScheduleList","versions":[{"version":"1.1","authLevel":"private"},{"version":"1.0","authLevel":"private"}]},{"name":"addSchedule","versions":[{"version":"1.1","authLevel":"generic"},{"version":"1.0","authLevel":"generic"},{"version":"1.2","authLevel":"generic"}]},{"name":"getHistoryList","versions":[{"version":"1.0","authLevel":"private"}]},{"name":"deleteSchedule","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getConflictScheduleList","versions":[{"version":"1.0","authLevel":"private"}]},{"name":"getSupportedRepeatType","versions":[{"version":"1.0"}]}]},{"service":"system","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"getSystemInformation","versions":[{"version":"1.0","authLevel":"private"}]},{"name":"getLEDIndicatorStatus","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getPowerStatus","versions":[{"version":"1.0"}]},{"name":"getNetworkSettings","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setPowerStatus","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setLanguage","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setPowerSavingMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setLEDIndicatorStatus","versions":[{"version":"1.1","authLevel":"generic"}]},{"name":"getDeviceMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getCurrentTime","versions":[{"version":"1.1"},{"version":"1.0"}]},{"name":"getInterfaceInformation","versions":[{"version":"1.0"}]},{"name":"setDeviceMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"requestReboot","versions":[{"version":"1.0"}]},{"name":"getSystemSupportedFunction","versions":[{"version":"1.0"}]},{"name":"getWolMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getPowerSavingMode","versions":[{"version":"1.0"}]},{"name":"getRemoteControllerInfo","versions":[{"version":"1.0"}]},{"name":"setWolMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getRemoteDeviceSettings","versions":[{"version":"1.0"}]}]},{"service":"videoScreen","protocols":["xhrpost:jsonizer"],"apis":[{"name":"getMethodTypes","versions":[{"version":"1.0"}]},{"name":"getVersions","versions":[{"version":"1.0"}]},{"name":"setAudioSourceScreen","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setSceneSetting","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getBannerMode","versions":[{"version":"1.0"}]},{"name":"getSceneSetting","versions":[{"version":"1.0"}]},{"name":"getAudioSourceScreen","versions":[{"version":"1.0"}]},{"name":"setBannerMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setPipSubScreenPosition","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"setMultiScreenMode","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getMultiScreenMode","versions":[{"version":"1.1"}]},{"name":"setPapScreenSize","versions":[{"version":"1.0","authLevel":"generic"}]},{"name":"getPipSubScreenPosition","versions":[{"version":"1.0"}]},{"name":"requestToNotifyScreenState","versions":[{"version":"1.1"}]}]}]],"id":1}
https://github.com/tmrobert8/openhab2-a ... nding.sony seems to have some good information too.

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

Re: Sony TV Network Remote Control Plugin

Post by kgschlosser » Sat Dec 30, 2017 5:06 pm

I have the full blown API already. it is broken down by year. and since you have a TV with the newest version of the API. (or close to it) I wanted to see exactly what the reported methods are from it. and confirm the layout. as there are some inconsistencies in the API documentation.

I am going to look at the camera API as well as the Audio API I know they overlap each other. the Scalar web API is designed in such a way that the different devices use the API in the same manner. there are things that are device specific as well as API version specific so I have to have it dynamically assemble the classes based on the information gotten from getSupportedApiInfo, getMethodTypes and getServiceProtocols, the latter 2 have been depreciated by sony so I am accounting for them being removed at some point so I am coding in the ability for both to be used.
If you like the work I have been doing then feel free to Image

Post Reply