Skip to content

Job macros feature #14

@hogwell

Description

@hogwell

Description

The original raspimjpeg had a feature called "Job Macros".

This should be re-implemented to allow the user to respond to certain runtime events
with appropriate macro scripts.

This includes adding support for the 'um' command.

For example, a user might want to run a special script whenever an image is taken, or a so-called "soft" error occurs, etc.

Additional Information (Optional)

In the original Rpi_Cam_Web_Interface software, certain events would optionally trigger
running certain configured macro scripts placed in the macros_path.

From the wiki:

"Macros can be updated and enabled / disabled from the web interface.
This uses the um (update macro) pipe command. This takes 2 variables.
The first is a number (starting from 0) indexing the macros ('error_soft','error_hard','start_img','end_img','start_vid','end_vid','end_box','do_cmd','motion_event','startstop')
and the second is the filename of the macro in the macros folder.
Disabling of macros is done by prepending a '-' character to the name.
This causes the macro not to be found and therefore not executed.
So, for example, 'um 6 -end_box.sh' would disable the end_box script. "

The options for this and their default values are seen in the default /etc/raspimjpeg config file.

#Job macros - prefix with & to make it run asynchronously
error_soft error_soft.sh
error_hard error_hard.sh
start_img start_img.sh
end_img &end_img.sh
start_vid &start_vid.sh
end_vid end_vid.sh
end_box &end_box.sh
do_cmd &do_cmd.sh
motion_event motion_event.sh
startstop startstop.sh

Checks

  • I have not found any related feature requests
  • I have not found this feature in the application
  • I want to contribute to the development of this feature

Metadata

Metadata

Assignees

Labels

featureUsed to develop new features and directly affecting the application

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions