理光Theta Z1不接受我更改文件格式的请求

Ricoh Theta Z1 Doesn't Accept My Request to Change File Format

我正在使用更新到最新固件 (1.60.1) 的 Ricoh Theta Z1。我正在尝试调试一个 Android 应用程序,但我发现我们的一个命令反复失败,所以我直接从我的开发箱连接到相机并直接通过 curl 测试协议。

我从文档中了解到此命令应该有效:

$ curl -X POST -H "Content-Type: application/json; charset=UTF-8"   -d '{"name":"camera.setOptions", "parameters":{"options":{"captureMode":"image","fileFormat":{"height":3360,"type":"jpeg","width":6720}}}}'   http://192.168.1.1/osc/commands/execute

但是当我 运行 这个命令时,我得到这个响应:

{"error":{"code":"invalidParameterValue","message":"Any input parameter or option name is recognized, but its value is invalid."},"name":"camera.setOptions","state":"error"}

尽管当我向相机询问其选项时,它会以它刚刚告诉我不会解析的确切块作为响应:

$ curl -X POST -H "Content-Type: application/json; charset=UTF-8" -d '{"name":"camera.getOptions", "parameters":{"optionNames":["clientVersion","captureMode","fileFormat"]}}' http://192.168.1.1/osc/commands/execute

得到这个响应:

{"name":"camera.getOptions","results":{"options":{"captureMode":"image","clientVersion":2,"fileFormat":{"height":3360,"type":"jpeg","width":6720}}},"state":"done"}

此外,当我 运行 第一个命令并省略 fileFormat 参数时,命令执行得很好。

知道我做错了什么吗?

经过反复试验,我发现可以使用camera.setOptions设置相机上的文件格式,但是only 如果 fileFormat 块是 options 块的唯一成员。也就是说,这个命令:

$ curl -X POST -H "Content-Type: application/json; charset=UTF-8"   -d '{"name":"camera.setOptions", "parameters":{"options":{"fileFormat":{"height":3360,"type":"jpeg","width":6720}}}}'   http://192.168.1.1/osc/commands/execute

会成功的。我认为这一定是 Theta Z1 相机中的一个错误,因为据我从文档 (https://api.ricoh/docs/theta-web-api-v2/commands/camera.set_options/ and https://developers.google.com/streetview/open-spherical-camera/reference/camera/setoptions) 中可以看出,不应该对 JSON 进入 options块。在任何情况下,解决方法都非常简单:发出一个命令来设置文件格式,并根据需要发出一个或多个命令来设置其他选项,然后就可以了。

仅供参考,dateTimeZone 也存在类似的错误。看到这个 post

https://community.theta360.guide/t/how-setup-datetime-on-theta-camera-using-web-api/6572/3?u=craig

似乎有几个选项需要设置为独立选项。

如果要设置dateTimeZone,它必须是唯一的选项集。我向 RICOH 报告了这件事。我将 post 你在社区上的发现。theta360.guide 论坛,以便更容易找到。谢谢