Automated moth pictures for biodiversity research

Related tags

Miscellaneousmothpi
Overview

MothPi

Installation

System packages

Required packages:

sudo apt-get update
sudo apt-get -y upgrade && sudo apt autoremove

sudo apt install -y python3-setuptools python3-dev python3-pip libsystemd-dev python3-gphoto2 python3-gpiozero wiringpi python3-systemd gphoto2 python3-yaml
sudo pip3 install -r requirements.txt

Correct time stamps

Preserve timing information as well as possible:

  • Transport the camera with a battery, as it has an internal clock with limited power capacity; and check the correcttime in the camera when setting up; pictures then will have the correct timestamp.
  • If the Raspberry Pi will be without internet connection, install fake-hwclock or optionally install a hardware clock.
  • If it will have internet connection: Make sure that the systemd service systemd-timesyncd.service is enabled and started time zone is set correctly:
systemctl enable --now systemd-timesyncd.service
timedatectl set-ntp true 
timedatectl set-timezone "Europe/Berlin" # or any other timezone

Mothpi service

Also, the Mothpi program will run as user, so make sure that automatic start-up of user instances is activated:

loginctl enable-linger pi

Mothpi installation

The main Mothpi programm can be downloaded from this git repository.

git clone https://github.com/lumaku/mothpi ~/mothpi

If you use a development version and need an access token, set up an access token in Settings->Access Tokens, then use it to access this Mothpi repository.

MOTHPI_TOKEN=<token>
git clone https://gitlab-ci-token:${MOTHPI_TOKEN}@gitlab.lrz.de/visammod/mothpi ~/mothpi

The included script automates the updating process as well as other tasks.

Camera setup

  • Switch the camera "ON".
  • Make sure that PC connection over USB is activated. This can be verified by connecting it with USB cable to the Raspberry Pi. Then, the camera displays a "waiting for connection" message.
  • To reduce power usage, switch off the display setting "Sucher" in the menu for "Display/Sucher" on Page 3 of the Gear ⚙️ page. (Sony Alpha 6000)
  • Don't forget to activate the flash by pressing the flash button.

Run Mothpi

Start with mothpi.sh that provides a boilerplate for mothpi, including functions for:

  • automatic updates,
  • systemd services,
  • reverse ssh tunnel to the main server and
  • a pictures uploader.

Initialize with:

./mothpi.sh init

this will copy and enable systemd services and set up systemd service variables.

The core program that takes pictures is in mothpi/mothpy.py.

Mothpi App

The web app included in mothpi/app.py provides a web interface to check its status and change the configuration. It can be accessed on Port 8000. The IP address of the device is displayed on the e-Paper display, if available.

Example configuration page:

Configuration page of the Mothpi App

Mothpi default configuration

The mothpi configuration file will be saved in $HOME/.mothpi. Pictures are saved in /home/pi/pics/ and will be moved over to the server in regular intervals.

Periodic restarts are disabled by default, but can be activated over the configuration file.

Owner
Ludwig Kürzinger
Ludwig Kürzinger
One-stop-shop for docs and test coverage of dbt projects.

dbt-coverage One-stop-shop for docs and test coverage of dbt projects. Why do I need something like this? dbt-coverage is to dbt what coverage.py and

Slido 106 Dec 27, 2022
Easy to use phishing tool with 65 website templates. Author is not responsible for any misuse.

PyPhisher [+] Description : Ultimate phishing tool in python. Includes popular websites like facebook, twitter, instagram, github, reddit, gmail and m

KasRoudra 1.1k Dec 31, 2022
CarolinaCon CTF Online

CarolinaCon Online CTF CTF challenges from CarolinaCon Online April 23 through April 25, 2021. All challenges from the CTF will eventually be here. Co

49th Security Division 6 May 04, 2022
LSO, also known as Linux Swap Operator, is a software with both GUI and terminal versions that you can manage the Swap area for Linux operating systems.

LSO - Linux Swap Operator Türkçe - LSO Nedir? LSO, diğer adıyla Linux Swap Operator Linux işletim sistemleri için Swap alanını yönetebileceğiniz hem G

Eren İnce 4 Feb 09, 2022
PSP (Python Starter Package) is meant for those who want to start coding in python but are new to the coding scene.

Python Starter Package PSP (Python Starter Package) is meant for those who want to start coding in python, but are new to the coding scene. We include

Giter/ 1 Nov 20, 2021
Discover and load entry points from installed packages

Entry points are a way for Python packages to advertise objects with some common interface. The most common examples are console_scripts entry points,

Thomas Kluyver 69 Jul 05, 2022
Allow you to create you own custom decentralize job management system.

ants Allow you to create you own custom decentralize job management system. Install $ git clone https://github.com/hvuhsg/ants.git Run monitor exampl

1 Feb 15, 2022
Self sustained producer-consumer(prosumer) policy study using Python and Gurobi

Prosumer Policy This project aims to model the optimum dispatch behaviour of households with PV and battery systems under different policy instrument

Tom Xu 3 Aug 31, 2022
A small Blender addon for changing an object's local orientation while in edit mode

A small Blender addon for changing an object's local orientation while in edit mode.

Jonathan Lampel 50 Jan 06, 2023
Excel cell checker with python

excel-cell-checker Description This tool checks a given .xlsx file has the struc

Paul Aumann 1 Jan 04, 2022
Enjoy Discords Unlimited Storage

Discord Storage V.3.5 (Beta) Made by BoKa Enjoy Discords free and unlimited storage... Prepare: Clone this from Github, make sure there either a folde

0 Dec 16, 2021
Pokemon sword replay capture

pokemon-sword-replay-capture This is an old version (March 2020) pokemon-sword-replay-capture-mar-2020-version of my Pokemon Replay Capture software.

11 May 15, 2022
CPLib is the abbreviation of Competitive Programming Library.

CPLib CPLib is the abbreviation of Competitive Programming Library. It aims to be a general template and optimization library for competitive programm

12 Oct 16, 2021
Check bookings for TUM libraries.

TUM Library Checker Only for educational purposes This repository contains a crawler to save bookings for TUM libraries in a CSV file. Sample data fro

Leon Blumenthal 3 Jan 27, 2022
An application to see if your Ethereum staking validator(s) are members of the current or next post-Altair sync committees.

eth_sync_committee.py Since the Altair upgrade, 512 validators are randomly chosen every 256 epochs (~27 hours) to form a sync committee. Validators i

4 Oct 27, 2022
👀 nothing to see here

Woofy Woofy is blue dog companion token of YFI (Wifey) It utilizes a special Woof bonding curve which allows two-way conversion between the tokens. Th

Yearn Finance 36 Mar 14, 2022
Flask html response minifier

Flask-HTMLmin Minify flask text/html mime type responses. Just add MINIFY_HTML = True to your deployment config to minify HTML and text responses of y

Hamid Feizabadi 85 Dec 07, 2022
The RAP community of practice includes all analysts and data scientists who are interested in adopting the working practices included in reproducible analytical pipelines (RAP) at NHS Digital.

The RAP community of practice includes all analysts and data scientists who are interested in adopting the working practices included in reproducible analytical pipelines (RAP) at NHS Digital.

NHS Digital 50 Dec 22, 2022
This is sample project needed for security course to connect web service to database

secufaku This is sample project needed for security course to "connect web service to database". Why it suits alignment purpose It connects to postgre

Mark Nicholson 6 May 15, 2022
This repo will have a small amount of Chrome tools that can be used for DFIR, Hacking, Deception, whatever your heart desires.

Chrome-Tools Overview Welcome to the repo. This repo will have a small amount of Chrome tools that can be used for DFIR, Hacking, Deception, whatever

5 Jun 08, 2022