Motion - Feature Request 2007x 11x 19x 181541

Feature Request: <help> feature in HTML control


the new feature generates file:// style links which is useless when you're accessing the control port remotely. I would prefer to have a proper relative URL like "/motion/motionguide.html#option". Then it would be possible to point a webserver running on the (motion-)machine to a virtual directory by adding some rewrite rules or links.

-- AxelAmthor - 19 Nov 2007

Follow up

Well this is a requested feature from debian , but you're right that has no sense when you don't access from same machine when motion is running.

I don't think that file:// shoud be removed but introduce what you said , so let me think what is the better way implement both.

-- AngelCarpintero - 20 Nov 2007

I've added to svn -r267 what i suggested , so if control_localhost is not set to on webcontrol creates a link to :


It's based in GET request and is mandatory that Host: is passed :

 GET / HTTP/1.0
 Host: ip:8080

How to install :

 make install

 cp motion-help.conf /etc/apache/conf.d/.

 /etc/init.d/apache restart

 cd /var/www/html

 ln -s /usr/local/share/doc/motion-3.2.10 motion_guide

-- AngelCarpintero - 22 Nov 2007


What help feature is this???

-- KennethLavrsen - 21 Nov 2007

Take a look to CHANGELOG in new features for 3.2.10 :

* Added help in http control

FYI: Still there some parameter that are not in motion_guide.html so that is obvious that doesn't work

-- AngelCarpintero - 22 Nov 2007

I really dislike the file:/// idea.

It will not work on anything else than the local machine. Awful.

I NEVER run on the local machine myself and for sure many have a dedicated server for the cameras running Linux and viewing and controlling from a windows machine.

A help link either needs to show the help in the browser by picking up a help text OR link to the Motion site. Not a file:///

When I click on my help links I get an ugly error message.

-- KennethLavrsen - 24 Nov 2007

We have better options.

  • We have already help strings in conf.c that could be beautified. Small problem are the options that are the first in a group as they contain a header.
  • We can generate a help text file using TWiki when we build Motion same as when we build the motion_guide. This help text will be the one liner we use in ConfigFileOptions. And in this auto text we then link to the Motion site to the ConfigOptionXXX topic in case people need even more help.

We need to keep the control interface minimalistic but this little feature would not require much.

-- KennethLavrsen - 24 Nov 2007

It's a good solution , but i think that initial purpose was to add a "inline" help for http control when no available internet connection ...

So i can just remove file:// and link directly to Twiki for each option.

-- AngelCarpintero - 24 Nov 2007

Angel, that would bviously the best, but it woul put additional load on your web server since each and everyone worldwide is clicking on the help in his/her local install will access your web site. I rather like your very first approach, since this would enable an administrator to set up a rewrite rule for apache (if wanted) like http://ip/motionguide = (you know what I mean, this is not proper apache conf syntax) OR follow your fewinstall steps. Anyway, thanks to you all for this.

-- AxelAmthor - 24 Nov 2007

A help interface which is mainly for beginners which requires how to setup a rewrite rule on an apache server is maybe a bit up at level 5 or 6 on the KennethsNerdoMeter

When you click help you should get help. Enough help to knows what to do with the specific option.

Angel. One simpel way to get the text from the conf.c strings is to change all the section headers to start with a double ##.

When someone clicks the help link he gets the string from from the conf struct but the lines that start with ## are skipped so you do not get the headers for the first option in each section. That should be fairly easy to make. And noone will be hurt by seeing the header with a double ##.

In fact we could take advantage of this when we write to the thread configs. Today you also get these strange section headers in the thread config if an option happens to be the first in a section. We could skip the ## lines when writing to thread configs.

-- KennethLavrsen - 28 Nov 2007

I've removed previous implementation of this feature using file:// and /motion_guide/motion_guide.html , now only link to Twiki are implemented.

I'll add also help text from conf.c ( text help that it's also in motion.conf , threadX.conf ).

-- AngelCarpintero - 02 Dec 2007

Added text help.

-- AngelCarpintero - 02 Dec 2007
Topic revision: r12 - 11 Nov 2008, AngelCarpintero
Copyright © 1999-2017 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.