Motion - Xml Rpc Api

Motion XML-RPC remote control API

Original Author: Jeroen Vreeken (pe1rxq@amsat.org)

TWiki versions: KennethLavrsen and other contributors

Table of contents

1 Introduction

This document describes the XML-RPC API implemented in the motion program. It enables users to change configuration settings and initiate actions while motion is running.

2 Function calls

Several of the following function calls have an thread argument. When a value of 0 is used the effect of the function will be global. Each individual thread is number from 1 up.

2.1 motion.info

Function name motion.info
Description Get basic information about the motion instance connected
Arguments none
Return value(s) (si)
Motion version
Number of active threads

2.2 motion.conf

2.2.1 motion.conf.list

Function name motion.conf.list
Description Get a list of all config parameters
Arguments none
Return value(s) array of {s:s,s:s,s:s}
option: config option name
parameter: parameter type
help: help text describing option (tooltip)

2.2.2 motion.conf.get

Function name motion.conf.get
Description Get the value of a config option
Arguments (is)
thread nr
parameter name
Return value(s) (is)
success(0 on success, negative on error), value

2.2.3 motion.conf.set

Function name motion.conf.set
Description Get the value of a config option
Arguments (iss)
thread nr
parameter name
new value
Return value(s) none

2.2.4 motion.conf.write

Function name motion.conf.write
Description Write current config setting to config file(s)
Arguments none
Return value(s) none

2.3 motion.action

2.3.1 motion.action.makemovie

Function name motion.action.makemovie
Description Convert all current jpegs to an mpeg movie (only if berkeley mpeg_encode is used) or stop the current movie and start a new one (if ffmpeg is used)
Arguments (i)
thread
Return value(s) none

2.3.2 motion.action.snapshot

Function name motion.action.snapshot
Description Take a snapshot
Arguments (i)
thread
Return value(s) none

2.3.3 motion.action.quit

Function name motion.action.quit
Description Quit
Arguments none
Return value(s) none

2.4 motion.detection

2.4.1 motion.detection.pause

Function name motion.detection.pause
Description Stop detecting motion
Arguments (i)
thread
Return value(s) none

2.4.2 motion.detection.resume

Function name motion.detection.resume
Description Start detection motion (again)
Arguments (i)
thread
Return value(s) none

2.5 motion.track

2.5.1 motion.track.auto

Function name motion.track.auto
Description Enable/disable automatic motion tracking.
Arguments (ii)
thread
enable
Return value(s) none

2.5.2 motion.track.set

Function name motion.track.set
Description Move camera to an absolute position in degrees.
Arguments (iii)
thread
pan
tilt
Return value(s) none

2.5.1 motion.track.pan

Function name motion.track.pan
Description Move pan relativly to current position in degrees.
Arguments (ii)
thread
steps
Return value(s) none

2.5.1 motion.track.tilt

Function name motion.track.tilt
Description Move tilt relativly to current position in degrees.
Arguments (ii)
thread
steps
Return value(s) none

-- KennethLavrsen - 29 Sep 2004
Topic revision: r1 - 29 Sep 2004, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.