Difference between revisions of "JSON API"

From Cosmostreamer Wiki
Jump to navigation Jump to search
Line 1: Line 1:
== Automovements control ==
== Automovements control ==


=== Store automovement preset ===  
=== Enable/disable automovements ===
<pre>{"cmd":"updateconfig","param":"automovement","value":"store","value2":"1"}</pre>
<pre>{"cmd":"updateconfig","param":"automovement","value":"setstate","value2":"1"}</pre>
<b>Params</b><br>
<b>Params</b><br>
<b>value2</b> position (0 - 255) <br>
<b>value2</b> 1 - enable, 0 - disable <br>
<br>
<br>


Line 13: Line 13:
<br>
<br>


=== Enable/disable automovements ===
=== Store automovement preset ===  
<pre>{"cmd":"updateconfig","param":"automovement","value":"setstate","value2":"1"}</pre>
<pre>{"cmd":"updateconfig","param":"automovement","value":"store","value2":"1"}</pre>
<b>Params</b><br>
<b>Params</b><br>
<b>value2</b> 1 - enable, 0 - disable <br>
<b>value2</b> position (0 - 255) <br>
<br>
<br>


== Camera gimbal control ==
== Camera gimbal control ==

Revision as of 20:12, 22 April 2022

Automovements control

Enable/disable automovements

{"cmd":"updateconfig","param":"automovement","value":"setstate","value2":"1"}

Params
value2 1 - enable, 0 - disable

Go to

{"cmd":"updateconfig","param":"automovement","value":"move","value2":"1"}

Params
value2 position (0 - 255)

Store automovement preset

{"cmd":"updateconfig","param":"automovement","value":"store","value2":"1"}

Params
value2 position (0 - 255)


Camera gimbal control

Move gimbal to normal position (center)
!{"cmd":"position","param":"normal"}

Move gimbal to selfie position (if available)
!{"cmd":"position","param":"selfit"}

Change gimbal mode (0 - 2)
!{"cmd":"gimbal","param":"mode","value":"1"}

Move gimbal. value - pan speed, value2 - tilt speed, value3 - roll speed. From -1.0 to 1.0, 0 - stop
{"cmd":"gimbal","param":"move","value":"-1.0","value2":"0.0","value3":"0.0"}

Set gimbal mode. value - mode. From 0 to 2
!{"cmd":"gimbal","param":"mode","value":"0"}

Camera control


Wiral Lite control

Tic-tac mode

Enable/disable Tic-tac mode

!{"cmd":"wiral","param":"mode","value":"tic-tac","value2":"1","value3":"-1"}

Params
value2 1 - enable Tic-tac mode, 0 - disable Tic-tac mode
value3 speed (0-255), -1 - use current speed

Move to position

!{"cmd":"wiral","param":"position","value":"set","value2":"0","value3":"-1"}

Params
value2 position (0 - 65535)
value3 speed (0-255), -1 - use current speed