Motion - Bug Report 2016x 06x 23x 135630
You are here: Foswiki>Motion Web>BugReports>BugReport2016x06x23x135630 (23 Jun 2016, SimoneRiccardi)Edit Attach

BUG: Unable to run python script on_motion* etc...

motion Version 3.2.12+git20140228 Python 3.4.2 Raspberry Pi 3 model B

Topic alredy opened on Mar 30, 2014 here https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=73427

Current "half-solved" way is to run motion in a non-daemon mode ("sudo motion -n").

If I set a py file destination Command to be executed when whatever on_something happens, the command is not interpreted... I put the log file with maximum verbosity but it just said that the command has been launched, and nothing more...

If I execute a bash command with a Python file execution inside, the bash scripts are executed properly but once the execution arrives to the python, it doesn't get executed.

Example of my file "sound.sh"
#!/bin/sh
omxplayer /home/pi/Documents/Turboy_Project/Cat.mp3
python /home/pi/Documents/Turboy_Project/input10.py

BTW just to be clear all the file asked to be executed by motion has been set executable +x and have been set ownership to user "motion" and group "motion". I tried python and python3 execution with same issue
# Command to be executed when a motion frame is detected (default: none)
on_motion_detected /home/pi/Documents/Turboy_Project/input10.py

Environment

Motion version: 3.2.12
ffmpeg version:  
Shared libraries: ffmpeg, mysql, postgresql
Server OS: Raspbian GNU/Linux 8
-- SimoneRiccardi - 23 Jun 2016

Follow up

Fix record

BugReportForm edit

TopicTitle Unable to run python script on_motion* etc...
BugStatus New
AssignedBugTo
SubmittedBy Main.turboy
Topic revision: r1 - 23 Jun 2016, SimoneRiccardi
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.