You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
installed as deb: pi_stretch_motion_4.2.1-1_armhf.deb
motion as part of third party: MotionEyeOS
I run motion with MotionEye but it seems to be not an issue of the third party because:
I configured mysql to track the still images:
CREATEDATABASEmotion;
CREATEUSER 'motion'@'localhost' IDENTIFIED BY 'mypasswordformotion!';
GRANT ALL ON motion.* TO 'motion'@'localhost';
FLUSH PRIVILEDGES;
USE motion;
CREATETABLEimages (
id intnot nullprimary key auto_increment
, event_id int
, filename varchar(255) not null
, frame_number int
, file_type int
, image_width int
, image_height int
, motion_center_x int
, motion_center_y int
, changed_pixels int
, noise_level int
, motion_area_height int
, motion_area_width int
, threshold int
, camera int
, creation_time timestamp DEFAULT CURRENT_TIMESTAMPONUPDATECURRENT_TIMESTAMP
);
CREATETABLEmotion_events (
event_id intprimary key auto_increment
, camera tinyint
, start_time timestamp DEFAULT CURRENT_TIMESTAMPONUPDATECURRENT_TIMESTAMP
, end_time timestampNULL DEFAULT NULL
);
As you can see, the on_event_end is executed but not the sql_query_stop. Unfortunately the debug output show only "do_sql_query: Executing mysql query" but not the name "sql_xyz" or the sql itself.
All other sqls (sql_query_start, sql_query) are executed well.
The text was updated successfully, but these errors were encountered:
There is some kind of confusion here sql_query_stop is used to log FILE CLOSE event, not the end of the event itself. Since you are only saving pictures, the query is not executed, because FILE CLOSE is only related to a movie. If you try to set sql_log_movie on you would notice that query is being executed as expected
When only sql_log_picture on the comparison (sqltype & cnt->sql_mask) gives FALSE (8 & 5 == FALSE)
So we should either update documentation to make this clear and rename the confusing option to something like sql_query_movie_end. Or we can split the option into two, one (new) should always execute on event end, another (old, renamed) query - on movie end
Setting this so far as a bug and adding @Mr-Dave to judge and comment
I would very much welcome the splitting into the latter two variables (sql_query_movie_end and sql_query_event_end). And the (re)naming into speaking semantically correct terms is always a dream!
In the example sql in the documentation shows the ending of an event. So at least update this as soon as possible.
In my case it's not that problematic, i just use "on_event_end" for this and more... :)
I run motion with MotionEye but it seems to be not an issue of the third party because:
I configured mysql to track the still images:
motion configuration in "Extra Motion Options":
and put the motion options to MotionEye (which all work korrekt - if you look at the debug log):
EVENT_START
SOME IMAGES
END_EVENT
As you can see, the on_event_end is executed but not the sql_query_stop. Unfortunately the debug output show only "do_sql_query: Executing mysql query" but not the name "sql_xyz" or the sql itself.
All other sqls (sql_query_start, sql_query) are executed well.
The text was updated successfully, but these errors were encountered: