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
Simplest way to find Appointments in Bürgeramt Berlin, Not over engineered.

Simplest way to find Appointments in Bürgeramt Berlin, Not over engineered. Der einfachste Weg, Termine im Bürgeramt Berlin zu finden, ohne viel Schnickschnack.

Jannis 8 Nov 25, 2022
Code repository for the Pytheas submersible observation platform

Pytheas Main repository for the Pytheas submersible probe system. List of Acronyms/Terms USP - Underwater Sensor Platform - The primary platform in th

UltraChip 2 Nov 19, 2022
A python script to simplify recompiling, signing and installing reverse engineered android apps.

urszi.py A python script to simplify the Uninstall Recompile Sign Zipalign Install cycle when reverse engineering Android applications. It checks if d

Ahmed Harmouche 4 Jun 24, 2022
Heads Down Application for Mac OSX

Heads Down A Mac app that lives in your ribbon—with a click of the mouse, temporarily block distracting websites and applications to encourage "heads

20 Mar 10, 2021
Voldemort's Python import helper

importmagician Voldemort's Python import helper pip install importmagician Import from uninstalled Python directories Say you have a directory (relat

Zhengyang Feng 4 Mar 09, 2022
Wrappers around the most common maya.cmds and maya.api use cases

Maya FunctionSet (maya_fn) A package that decompose core maya.cmds and maya.api features to a set of simple functions. Tests The recommended approach

Ryan Porter 9 Mar 12, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

18.6k Jan 02, 2023
The mock Pokemon Environment I built in 2019 to study Reinforcement Learning + Pokemon

ghetto-pokemon-rl-environment ##NOT MAINTAINED! Fork and maintain yourself. Environment I made back in 2019 to use Pokemon to practice reinforcement l

2 Dec 09, 2021
A price calculator for multiple things

Price Calculator A price calculator for multiple things Example I have 0.0567kg diamond. The price of diamond in kg is: $4500. Then it says: The price

Abel 1 Nov 26, 2021
Biohacking con Python honeycon21

biohacking-honeycon21 This repository includes the slides of the public presentation 'Biohacking con Python' in the Hack&Beers of HoneyCON21 (PPTX and

3 Nov 13, 2021
A Notifier Program that Notifies you to relax your eyes Every 15 Minutes👀

Every 15 Minutes is an application that is used to Notify you to Relax your eyes Every 15 Minutes, This is fully made with Python and also with the us

Ashely Sato 1 Nov 02, 2021
Some ideas and tools to develop Python 3.8 plugins for GIMP 2.99.4

gimp-python-development Some ideas and tools to develop Python 3.8 plugins for GIMP 2.99.4. GIMP 2.99.4 is the latest unstable pre-release of GIMP 3.

Ismael Benito 53 Sep 25, 2022
Pacman - A suite of tools for manipulating debian packages

Overview Repository is a suite of tools for manipulating debian packages. At a h

Pardis Pashakhanloo 1 Feb 24, 2022
Module 2's katas from Launch X's python introduction course.

Module2Katas Module 2's katas from Launch X's python introduction course. Virtual environment creation process (on Windows): Create a folder in any de

Javier Méndez 1 Feb 10, 2022
Inverted-pendulum-with-fuzzy-control - Inverted pendulum with fuzzy control

Fuzzy Inverted Pendulum Basically, this project consists of an inverted pendulum

Mahan Ahmadvand 1 Aug 25, 2022
Like Docker, but for Squeak. You know, for kids.

Squeaker Like Docker, but for Smalltalk images. You know, for kids. It's a small program that helps in automated derivation of configured Smalltalk im

Tony Garnock-Jones 14 Sep 11, 2022
For radiometrically calibrating and PSF deconvolving IRIS data

irispreppy For radiometrically calibrating and PSF deconvolving IRIS data. I dislike how I need to own proprietary software (IDL) just to simply prepa

Aaron W. Peat 4 Nov 01, 2022
Python implementation of Newton's Fractal

Newton's Fractal Animates Newton's fractal between two polynomials of the same order. Inspired by this video by 3Blue1Brown. Example fractals can be f

Jaime Liew 10 Aug 04, 2022
Safe temperature monitor for baby's room. Made for Raspberry Pi Pico.

Baby Safe Temperature Monitor This project is meant to build a temperature safety monitor for a baby or small child's room. Studies have shown the ris

Jeff Geerling 72 Oct 09, 2022
The Official Jaseci Code Repository

Jaseci Release Notes Version 1.2.2 Updates Added new built-ins for nodes and edges (context, info, and details) Fixed dot output Added reset command t

136 Dec 20, 2022