Raspberry Pi Zero, Motion 4 and Pi Camera – New version 2019

Article on the basis of & rsquo; an older 2014 for Raspberry Pi 3 (here) to update it with the latest Raspberry Pi Zero and his camera. Also for the miniaturize & rsquo; together.

 

  1. Preparation of Raspberry Pi Zero
    1. Enable SSH startup. It must be added to create the ssh file in / boot from the SD card
    2. Configure the wireless start. We must add the file wpa_supplicant.conf / boot from the SD card with the following content :
      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      country=FR
      network={
           ssid="your SSID"
           psk="Your password"
           key_mgmt=WPA-PSK
      }
  2. Camera Installation of Raspberry Pi Zero
  3. Turn the camera to the & rsquo; using raspi-config
  4. Disabling the LED camera. Add the following line to the end of file /boot/config.txt
    disable_camera_led=1
  5. Disabling LED Raspberry Pi. Add the following lines to the end of file /boot/config.txt
    dtparam=act_led_trigger=none
    dtparam=act_led_activelow=on
  6. Automation of loading the video module. Add to the end of file /etc/modules-load.d/modules.conf the line
    bcm2835-v4l2
  7. Restart the Raspberry
    reboot
  8. Update Raspberry
    apt-get update && apt-get upgrade
  9. Install Motion
    apt-get install motion
  10. Configure Motion with options for your needs. All options here. C & rsquo; is comprehensive, So we must take the time to look at them one by one to his need. My use j & rsquo;'ve updated the following options :
    • daemon to & lsquo; we’
    • ffmpeg_output_movies to & lsquo; off’ because not need videos
    • stream_localhost to & lsquo; off’ to access the streaming of & rsquo; other devices
    • webcontrol_localhost to & lsquo; off 'to disable & rsquo; d & rsquo interface in local administration
    • locate_motion_mode to 'preview' to apply the detection frame on the pictures stored
    • locate_motion_style to 'redbox' to a red frame
    • event_gap in & rsquo; 10 & rsquo;. After 10 taken without movement, l & rsquo; event is stopped
    • output_pictures to & lsquo; we’
    • text_changes to & lsquo; we’ to allow to calibrate motion detection (attribute threshold)
  11. And finally edit / etc / default / motion to activate the daemon mode
    start_motion_daemon=yes

You should now be able to login to see everything in action at & rsquo; http://IP du Raspberry:8081

 

Like this article ? Bear with me on patreon!

You may also like...