0

I have several Sony electronics like TV, BD player, hi-res music player and bt speakers which are all upnp compatible. I plan to let my home automation system to voice control the hapz1es player which already has app to do the control. From the device and service description url I find there is a standard service and a vender specified service.

<service>
<serviceType>urn:schemas-sony-com:service:ScalarWebAPI:1</serviceType>
<serviceId>urn:schemas-sony-com:serviceId:ScalarWebAPI</serviceId>
<SCPDURL>/ScalarWebApiSCPD.xml</SCPDURL>
<controlURL>/upnp/control/ScalarAPI</controlURL>
<eventSubURL/>
</service>
<av:X_ScalarWebAPI_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_ScalarWebAPI_Version>1.0</av:X_ScalarWebAPI_Version>
<av:X_ScalarWebAPI_BaseURL>http://192.168.86.169:60200/sony</av:X_ScalarWebAPI_BaseURL>
<av:X_ScalarWebAPI_ServiceList>
<av:X_ScalarWebAPI_ServiceType>guide</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>system</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>audio</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>avContent</av:X_ScalarWebAPI_ServiceType>
</av:X_ScalarWebAPI_ServiceList>
</av:X_ScalarWebAPI_DeviceInfo>

The service description ScalarWebApiSCPD.xml has action list. By monitoring the network traffic between app and player, I figure out that I can POST to http://192.168.86.169:60200/sony to do some control like tunr on/off

POST /sony/system HTTP/1.1 HOST: 192.168.86.169:60200 content-type: application/json content-length: 100

{"method":"setPowerStatus","params":[{"status":"active","standbyDetail":""}],"id":1,"version":"1.1"}

But is there a way to get the method list? Or any general ways to do a query to api and it returns all valid methods and params? It is a upnp device, and upnp devices suppose to be able to exchange device abilities.

glavewu
  • 1
  • 3

1 Answers1

0

For get list of methods use method "getMethodTypes"

Post Body:

{"method": "getMethodTypes", "params": [""], "id": 1, "version": "1.0"}

How you turn off your device? What you send status?

ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
ErmaCK
  • 46
  • 1
  • 4