It is very similar to the motion-control program that used the old XmlRpcApi
. The difference is that it uses the new MotionHttpAPI
The reason I made it was because I just needed something easy to use with Lirc
. So here it is.
Comments/improvements/etc are welcome.
Latest release: Version 0.2
Before running the program, you just need to have Python
After/if you have Python installed, you just download the file, edit it where it says "CHANGE ME" with the apropriate variables (see below), and run it.
The only variables which you usually need to change are:
url = "localhost:8080" # CHANGE ME - motion host and port (see control_*)
threadnr = "0" # CHANGE ME - thread number to control (0 - for people with just one camera)
user = "" # CHANGE ME - username for basic auth
passwd = "" # CHANGE ME - password for basic auth
passwdmode = 0 # CHANGE ME - 0 = disable, 1 = enable (set it to 1 if you enabled "control_authentication" in motion.conf)
Note: If you set
passwdmode = 0
and motion requires authentication, it will ask in stdin for a password and freeze.
- 0.1 -- initial release, mostly everything should work.
- 0.2 -- added authentication support.
No more ideas yet.
- 11 Aug 2005
It will be easier for people to know when you make updates if you give the file a version number and put a brief change history in this topic.
- 10 Aug 2005