Motion - Feature Request 2006x 04x 30x 212738

Feature Request: Text read from files.

Description

If I had a temprature sensor (or two) it would be nice to display it in a text area on each picture in real time. Also if I had other sensors, like inputs from switches, or light sensors. "door open" or "outsde lignts on" or "alarm armed".

If you could give it a file to read from each time a picture is generated that would be good enough. Anyone could create a simple script to write to that file every X seconds.

It would be great for monitoring sensors from something you are watching in timelaps or for live cams.

Possibly have a set format for the file so you can place text in all four corners from only one file.

Make a default, right corner if the file has no format "header" stating it's a formatted file.

Like have "#motion" as the first line means that this is a formatted file for motion, the next line is upper left, the next line is upper right and so on. A blank line means to leave whatever default text is there, like if you are using the standard time stamp.

-- TWikiGuest - 30 Apr 2006

Follow up

Motion is already very flexible thanks to the http remote control interface. Many people already do what you propose using this interface.

It is very simple to setup a cron job that runs every minute or every 10 minutes or whatever suits the purpose and sends the information to Motion as a simple http GET request.

An example. To set the text in the upper left and lower left of a 320x240 pixel display

Use a normal browser to access the remote control interface and set text_left to this value

Temperature: 10 C\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nCAMERA 1\nFront Yard

In the browser you now see the resulting URL where the \n and spaces gets URL encoded.

http://192.168.1.3:8080/1/config/set?text_left=Temperature%3A+10+C%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn
%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5Cn%5CnCAMERA+1%5CnFront+Yard

It is now very simple to make the cron script that replaces the temperature value with the actual temperature and displays this.

See also RemoteControlHttp

Comments

Topic revision: r3 - 20 Jul 2008, AngelCarpintero
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.