尝试使用新的索尼音频控制应用编程接口与我的STR-DN1080 (固件M41.R.0377),但有很多问题遵循指南上的https://developer.sony.com/develop/audio-control-api/。当然,它看起来很漂亮,但是教程并不是很有用。
因此,基于该门户,听起来我需要通过SSDP/UPNP发现接收器的端口。没有太多关于如何做到这一点的指导,所以我使用了一个Android应用程序"UPNP浏览器“,找到了3个独立的URL。在http://str.dn.1080.ip:52323/dmr.xml中,我找到了基本URL:port和可用的服务:
<av:X_ScalarWebAPI_DeviceInfo>
<av:X_ScalarWebAPI_Version>1.0</av:X_ScalarWebAPI_Version>
<av:X_ScalarWebAPI_BaseURL>http://str.dn.1080.ip:10000/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>
然后,遵循getSystemInformation的应用程序接口参考(v1.4),我向http://str.dn.1080.ip:10000/sony/system/getSystemInformation发出GET命令,但我得到的只有{"error":[404,"Not Found"]}
我现在被难住了,正在寻求索尼开发者支持的帮助。我遗漏了什么?是否需要在我的接收器上启用某些功能?有没有隐藏的固件,自动更新程序不适用?
谢谢!
发布于 2018-03-05 17:18:19
发布于 2018-07-15 02:23:43
对于那些搜索如何在Windows中通过curl使用Sony API的人,并在接受的答案上添加内容,您需要将单引号替换为双引号,然后转义JSON中的双引号:
curl -i -d "{\"method\": \"getSystemInformation\",\"id\": 1,\"params\":
[],\"version\": \"1.4\"}" http://str.dn.1080.ip:10000/sony/system
对于邮递员,将type设置为POST,URL设置为:http://str.dn.1080.ip:10000/sony/system,并将Body指定为raw/JSON,然后粘贴JSON:
{
"method":"getSystemInformation",
"id":1,
"params":[],
"version":"1.4"
}
https://stackoverflow.com/questions/48896515
复制相似问题