surv_camera
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| surv_camera [2024/02/27 01:28] – created memeruiz | surv_camera [2024/04/09 23:31] (current) – [Configuration] memeruiz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Surveillance Camera RaspberryPi Zero W]] ====== | + | ====== Surveillance Camera |
| + | |||
| + | ===== Hardware ===== | ||
| + | |||
| + | * Raspberry PI Zero W | ||
| + | * Raspberry PI Camera V2.1 NOIR | ||
| + | * Raspberry PI Camera Cable for Zero | ||
| + | * Solar Panel (25Watt, 12V (nominal), 17.8V Max | ||
| + | * Solar Charge Controller (10Amp) (12/24V) | ||
| + | * Two LED lights (IR 8W +Visible 18W) | ||
| + | * 2x MOSFET switches | ||
| + | * 1x AHT21 Temp/ | ||
| + | * 1x ADS1115 ADC | ||
| + | * 1x microusb cable (RPI Zero power) | ||
| + | * Fake Camera body | ||
| + | * Outdoor project box | ||
| + | * Cable connectors | ||
| + | * 12V 4AH battery | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | ===== Software ===== | ||
| + | |||
| + | * MotionEyeOS version: 20200606 | ||
| + | * MotionEye 4.2.2 | ||
| + | * Motion 0.42.1 | ||
| + | * Motionpush | ||
| + | |||
| + | ==== Configuration ==== | ||
| + | |||
| + | === MotionEye === | ||
| + | |||
| + | * File Storage: | ||
| + | * Upload Service: SFTP server | ||
| + | * We setup a user in my server for this. User: motioneye | ||
| + | * location: / | ||
| + | * Include Subfolders: yes | ||
| + | * Video Device | ||
| + | * Video Resolution: 800x600 (fast), | ||
| + | * Automatic Brightness: yes | ||
| + | * Motion detection | ||
| + | * Auto Noise Detection: yes | ||
| + | * Motion Gap 30 | ||
| + | * Mininum motion Frames: 20 frames | ||
| + | * Use mask | ||
| + | * Motion Notifications | ||
| + | * Run a command: yes | ||
| + | * Command: / | ||
| + | * Motionpush | ||
| + | * Has to be downloaded to the dev computer | ||
| + | * Edit example.conf and motionpush executable: | ||
| + | * motionpush: | ||
| + | * CONFIG_FILE="/ | ||
| + | * Follow Telegram instructions to create a bot | ||
| + | * Create a Telegram Channel | ||
| + | * Configure (with BotFather) the bot to be able to "post in the channel" | ||
| + | * Add the bot to the channel administrators | ||
| + | * Edit Telegram stuff in example.conf | ||
| + | * Copy example.conf to / | ||
| + | * Copy motionpush to / | ||
| + | |||
| + | Test bot with : | ||
| + | |||
| + | |||
| + | curl -X POST " | ||
| + | |||
| + | Edit example.conf with: | ||
| + | |||
| + | TELEGRAM_BODY=" | ||
| + | Tap <a href=\"< | ||
| + | |||
| + | |||
| + | Project: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Download image: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | wiki: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Telegram Push notifications: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
| + | === ssh remote forwarding === | ||
| + | |||
| + | * On the PI you must run: | ||
| + | |||
| + | ssh -R *: | ||
| + | |||
| + | * Now you can access from 2.22 with localhost: | ||
| + | * Configure your modem to forward port 9000 to internal computer 192.168.2.22 to port 9000 | ||
| + | |||
| + | |||
| + | === nextcloud === | ||
| + | |||
| + | * Install nextcloud on debian. Follow these instructions: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | * For configuring apache: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | * In nextcloud config.php file add this: | ||
| + | |||
| + | | ||
| + | |||
| + | * This will instruct nextcloud to update new available files to its webfront end | ||
| + | * Add motioneye debian user to group www-data (to be able to put files inside nextcloud data directory) | ||
| + | * Inside motioneye home directory do a symlink to nextcloud directory: | ||
| + | |||
| + | mkdir / | ||
| + | chown -R www-data: | ||
| + | chmod g+w / | ||
| + | cd / | ||
| + | ln -s camera1 / | ||
| + | chown -R www-data: | ||
| + | |||
| + | === UART + Wanderer === | ||
| + | |||
| + | In motioneyeOS things are a bit different: | ||
| + | |||
| + | For activating the UART raspberry pi zero w port: | ||
| + | |||
| + | Edit / | ||
| + | |||
| + | Add this: | ||
| + | |||
| + | dtoverlay = miniuart-bt | ||
| + | |||
| + | / | ||
| + | |||
| + | With this configuration two uart units are activated | ||
| + | |||
| + | Bluetooth is not necessary to be disabled. Apparently it is already disabled on MotionEyeOS. Also the console is not redirected to the serial. | ||
| + | |||
| + | Test with a loopback cable between tx and rx and with this test program: | ||
| + | |||
| + | |||
| + | import serial | ||
| + | test_string = "Test serial port ..." | ||
| + | port_list = ["/ | ||
| + | for port in port_list: | ||
| + | try: | ||
| + | serialPort = serial.Serial(port, | ||
| + | print (" | ||
| + | bytes_sent = serialPort.write(test_string) | ||
| + | print (" | ||
| + | loopback = serialPort.read(bytes_sent) | ||
| + | if loopback == test_string: | ||
| + | print (" | ||
| + | else: | ||
| + | print (" | ||
| + | serialPort.close() | ||
| + | except IOError: | ||
| + | print (" | ||
| + | |||
| + | == Wanderer == | ||
| + | |||
| + | For the serial connection to the wanderer we used: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | It must be converted to python2 along with several dependencies | ||
| + | |||
| + | It works! | ||
| + | |||
| + | == references == | ||
| + | |||
| + | https:// | ||
| + | https:// | ||
surv_camera.1708997284.txt.gz · Last modified: 2024/02/27 01:28 by memeruiz
