Dietpi-CAM Enable motion detection Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
TokoDude

Dietpi-CAM Enable motion detection

Post by TokoDude »

Hey guys!

I have installed the latest version of dietpi on my raspbery Pi 2 B.
But unfortunately I can not get motion detection to work.
I have the default settings except for:
Motion detect mode : is set on Internal. (I dont have an External motion sensor)
And i had Motion detection on.
I want dietpi-cam to automatically saves photos or take a video when someone walks by my camera.

Can some one help me with this?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi-CAM Enable motion detection

Post by Fourdee »

Hi,

The motion detection is currently not working correctly. This is a known issue and we aim to investigate this for the v119 update: https://github.com/Fourdee/DietPi/issue ... -218521999
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
TokoDude

Re: Dietpi-CAM Enable motion detection -UPDATE ERROR

Post by TokoDude »

I have installed the latest version
I get the following error code when i reach the Webinterface:
Error in raspimpjeg
Restart raspimpjef *./rpi_camWeb_interface_installer.sh start or the whole RPI

Tryed:
Reinstalled dietpi with the latest updates and kernel.
Reinstalled dietpicam
GPU memory to 192 MB
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi-CAM Enable motion detection

Post by Fourdee »

Hi,

Thanks for the report.

I did a fresh installation of DietPiCam on a new DietPi v119 installation, working fine. So there must be some previous files/settings from your existing installation, throwing this out.

Can you reboot your system, login then paste results from:

Code: Select all

ps aux
Also try running raspimjpeg process in foreground to check for any errors:

Code: Select all

#stop
killall -w raspimjpeg &> /dev/null
killall -w php &> /dev/null

#start
mkdir -p /dev/shm/mjpeg
chown www-data:www-data /dev/shm/mjpeg
chmod 777 /dev/shm/mjpeg

sleep 1
sudo -u www-data raspimjpeg
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
TokoDude

Re: Dietpi-CAM Enable motion detection

Post by TokoDude »

I did an clean install.
Formated the SD card and downloaded the latest dietpi version from dietpi.com and updated to 119.
Here is the list from the ps aux:


  • USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    root 1 2.2 0.4 5468 3824 ? Ss 17:39 0:04 /sbin/init
    root 2 0.0 0.0 0 0 ? S 17:39 0:00 [kthreadd]
    root 3 0.0 0.0 0 0 ? S 17:39 0:00 [ksoftirqd/0]
    root 4 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/0:0]
    root 5 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/0:0H]
    root 6 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/u8:0]
    root 7 0.0 0.0 0 0 ? S 17:39 0:00 [rcu_sched]
    root 8 0.0 0.0 0 0 ? S 17:39 0:00 [rcu_bh]
    root 9 0.0 0.0 0 0 ? S 17:39 0:00 [migration/0]
    root 10 0.0 0.0 0 0 ? S 17:39 0:00 [migration/1]
    root 11 0.0 0.0 0 0 ? S 17:39 0:00 [ksoftirqd/1]
    root 12 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/1:0]
    root 13 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/1:0H]
    root 14 0.0 0.0 0 0 ? S 17:39 0:00 [migration/2]
    root 15 0.0 0.0 0 0 ? S 17:39 0:00 [ksoftirqd/2]
    root 16 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/2:0]
    root 17 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/2:0H]
    root 18 0.0 0.0 0 0 ? S 17:39 0:00 [migration/3]
    root 19 0.0 0.0 0 0 ? S 17:39 0:00 [ksoftirqd/3]
    root 20 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/3:0]
    root 21 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/3:0H]
    root 22 0.0 0.0 0 0 ? S 17:39 0:00 [kdevtmpfs]
    root 23 0.0 0.0 0 0 ? S< 17:39 0:00 [netns]
    root 24 0.0 0.0 0 0 ? S< 17:39 0:00 [perf]
    root 25 0.0 0.0 0 0 ? S 17:39 0:00 [khungtaskd]
    root 26 0.0 0.0 0 0 ? S< 17:39 0:00 [writeback]
    root 27 0.0 0.0 0 0 ? S< 17:39 0:00 [crypto]
    root 28 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 29 0.0 0.0 0 0 ? S< 17:39 0:00 [kblockd]
    root 30 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/0:1]
    root 31 0.0 0.0 0 0 ? S< 17:39 0:00 [rpciod]
    root 32 0.0 0.0 0 0 ? S 17:39 0:00 [kswapd0]
    root 33 0.0 0.0 0 0 ? S< 17:39 0:00 [vmstat]
    root 34 0.0 0.0 0 0 ? S 17:39 0:00 [fsnotify_mark]
    root 35 0.0 0.0 0 0 ? S< 17:39 0:00 [nfsiod]
    root 44 0.0 0.0 0 0 ? S< 17:39 0:00 [kthrotld]
    root 45 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/1:1]
    root 46 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/2:1]
    root 47 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 48 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 49 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 50 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 51 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 52 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 53 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 54 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 55 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 56 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 57 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 58 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 59 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 60 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 61 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 62 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 63 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 64 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 65 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 66 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 67 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 68 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 69 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 70 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 71 0.0 0.0 0 0 ? S< 17:39 0:00 [VCHIQ-0]
    root 72 0.0 0.0 0 0 ? S< 17:39 0:00 [VCHIQr-0]
    root 73 0.0 0.0 0 0 ? S< 17:39 0:00 [VCHIQs-0]
    root 74 0.0 0.0 0 0 ? S< 17:39 0:00 [iscsi_eh]
    root 75 0.0 0.0 0 0 ? S< 17:39 0:00 [dwc_otg]
    root 76 0.0 0.0 0 0 ? S< 17:39 0:00 [DWC Notificati
    root 77 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/u8:1]
    root 78 0.0 0.0 0 0 ? S 17:39 0:00 [VCHIQka-0]
    root 79 0.0 0.0 0 0 ? S< 17:39 0:00 [SMIO]
    root 80 0.0 0.0 0 0 ? S< 17:39 0:00 [deferwq]
    root 81 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/u8:2]
    root 82 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 83 0.1 0.0 0 0 ? S 17:39 0:00 [mmcqd/0]
    root 84 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/2:2]
    root 85 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/3:1]
    root 86 0.0 0.0 0 0 ? S 17:39 0:00 [scsi_eh_0]
    root 87 0.0 0.0 0 0 ? S< 17:39 0:00 [scsi_tmf_0]
    root 88 0.0 0.0 0 0 ? S 17:39 0:00 [usb-storage]
    root 89 0.0 0.0 0 0 ? S< 17:39 0:00 [bioset]
    root 91 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/2:1H]
    root 92 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/0:1H]
    root 93 0.0 0.0 0 0 ? S 17:39 0:00 [jbd2/mmcblk0p2
    root 94 0.0 0.0 0 0 ? S< 17:39 0:00 [ext4-rsv-conve
    root 95 0.0 0.0 0 0 ? S< 17:39 0:00 [ipv6_addrconf]
    root 108 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/1:1H]
    root 129 0.3 0.3 9132 2616 ? Ss 17:39 0:00 /lib/systemd/sy
    root 146 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/1:2]
    root 148 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/3:2]
    root 160 0.0 0.0 0 0 ? S 17:39 0:00 [kworker/0:2]
    root 168 0.1 0.3 11364 2840 ? Ss 17:39 0:00 /lib/systemd/sy
    root 397 0.0 0.2 3396 2056 ? Ss 17:39 0:00 /lib/systemd/sy
    message+ 409 0.0 0.3 5492 2764 ? Ss 17:39 0:00 /usr/bin/dbus-d
    root 430 0.0 0.0 0 0 ? S< 17:39 0:00 [kworker/3:1H]
    root 431 0.0 0.1 2472 1244 ? Ss 17:39 0:00 /usr/sbin/dropb
    root 582 0.0 0.0 0 0 ? S< 17:39 0:00 [cfg80211]
    root 773 0.0 0.2 4052 1804 tty1 Ss+ 17:39 0:00 /sbin/agetty --
    root 780 0.0 0.1 1824 1220 ? Ss 17:39 0:00 /sbin/netplugd
    root 816 0.0 0.6 8728 5640 ? Ss 17:39 0:00 dhclient -v -pf
    root 877 0.0 0.3 5100 2536 ? Ss 17:39 0:00 /usr/sbin/cron
    www-data 888 0.0 0.5 8100 4188 ? Ss 17:39 0:00 /usr/sbin/light
    root 902 0.0 2.1 92756 17840 ? Ss 17:39 0:00 php-fpm: master
    www-data 903 0.0 1.0 92884 8852 ? S 17:39 0:00 php-fpm: pool w
    www-data 904 0.0 1.0 92756 8184 ? S 17:39 0:00 php-fpm: pool w
    www-data 905 0.0 0.9 92756 8024 ? S 17:39 0:00 php-fpm: pool w
    www-data 906 0.0 0.9 92756 7964 ? S 17:39 0:00 php-fpm: pool w
    root 912 0.0 0.3 7212 3012 ? S 17:40 0:00 sudo -u www-dat
    www-data 917 0.0 0.2 3392 1676 ? S 17:40 0:00 raspimjpeg
    root 925 0.0 0.3 7212 3084 ? S 17:40 0:00 sudo -u www-dat
    www-data 930 0.3 1.5 26884 12992 ? S 17:40 0:00 php /var/www/di
    root 1481 1.0 0.2 2928 1956 ? Ss 17:41 0:00 /usr/sbin/dropb
    root 1489 0.2 0.4 5952 3852 pts/0 Ss 17:41 0:00 -bash
    root 1647 0.0 0.2 4740 2188 pts/0 R+ 17:42 0:00 ps aux

[/quote]

And on the last command i get this error:
root@DietPi:~# sudo -u www-data raspimjpeg
start monitoring for pid: 2240
{2016/06/02 17:49:47} start monitoring for pid: 2240
RaspiMJPEG Version 5.5.2
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Error: Could not create camera
Executing macro /var/www/dietpicam/macros/error_hard.sh "Could not create camera"
sh: 1: /var/www/dietpicam/macros/error_hard.sh: Permission denied
start monitoring for pid: 2248
{2016/06/02 17:49:52} start monitoring for pid: 2248
RaspiMJPEG Version 5.5.2
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Error: Could not create camera
Executing macro /var/www/dietpicam/macros/error_hard.sh "Could not create camera"
sh: 1: /var/www/dietpicam/macros/error_hard.sh: Permission denied
start monitoring for pid: 2255
{2016/06/02 17:49:57} start monitoring for pid: 2255
RaspiMJPEG Version 5.5.2
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Error: Could not create camera
Executing macro /var/www/dietpicam/macros/error_hard.sh "Could not create camera"
sh: 1: /var/www/dietpicam/macros/error_hard.sh: Permission denied

Spams the same issue the hole time.
Thank you for your response!!! :D
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi-CAM Enable motion detection

Post by Fourdee »

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Error: Could not create camera
Theres 2 things I know that can cause this issue:
- < 128MB GPU memory split. I know you mentioned 192MB, so lets check this below.
- Ribbon cable not plugged in correctly, fully or the right way round.

Can you verify your GPU memory split (=128 or higher):

Code: Select all

cat /DietPi/config.txt | grep 'gpu_mem'
And lets just ensure the camera is enabled (=1):

Code: Select all

cat /DietPi/config.txt | grep 'start_x'
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
TokoDude

Re: Dietpi-CAM Enable motion detection

Post by TokoDude »

Sorry :cry:
I put the camera on the DSI DISPLAY port :ugeek:
Dident notice it because the camera led was on :lol: What a fail.

--------------
Topic can be closed.
Solved motion issue (removed old post)
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi-CAM Enable motion detection

Post by Fourdee »

TokoDude wrote:Sorry :cry:
I put the camera on the DSI DISPLAY port :ugeek:
Lmao, no worries. I've done worse ;)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply