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
Show my read on kindle this year

Show my kindle status on GitHub

yihong 26 Jun 20, 2022
A collection of Workflows samples for various use cases

Workflows Samples Workflows allow you to orchestrate and automate Google Cloud and HTTP-based API services with serverless workflows.

Google Cloud Platform 76 Jan 07, 2023
Pygments is a generic syntax highlighter written in Python

Welcome to Pygments This is the source of Pygments. It is a generic syntax highlighter written in Python that supports over 500 languages and text for

1.2k Jan 06, 2023
Dapp / Forge traces enhancer

traces-explorer Dapp / Forge traces enhancer Usage traces.py and pattern_* files should be in the same directory make test traces.txt py traces.

1 Feb 02, 2022
Python library to natively send files to Trash (or Recycle bin) on all platforms.

Send2Trash -- Send files to trash on all platforms Send2Trash is a small package that sends files to the Trash (or Recycle Bin) natively and on all pl

Andrew Senetar 224 Jan 04, 2023
A simple wrapper to analyse and visualise reinforcement learning agents' behaviour in the environment.

Visrl Visrl (pronounced "visceral") is a simple wrapper to analyse and visualise reinforcement learning agents' behaviour in the environment. Reinforc

Jet New 14 Jun 27, 2022
Exactly what it sounds like, which is something rad

EyeWitnessTheFitness External recon got ya down? That scan prevention system preventing you from enumerating web pages? Well look no further, I have t

Ellis Springe 18 Dec 31, 2022
A collection of python exercises to help your learning path!

How to use Step 1: run this command git clone https://github.com/TechPenguineer/Python-Exercises.git Step 2: Run this command cd Python-Exercises You

Tech Penguin 5 Aug 05, 2021
Step by step development of a vending coffee machine project, including tkinter, sqlite3, simulation, etc.

Step by step development of a vending coffee machine project, including tkinter, sqlite3, simulation, etc.

Nikolaos Avouris 2 Dec 05, 2021
An extended, game oriented, turtle

Burtle A Better TURTLE. Makes making games easier. write less do more!! Documentation & guide: https://alannxq.github.io/burtle/ Installation pip inst

5 May 19, 2022
an opensourced roblox group finder writen in python 100% free and virus-free

Roblox-Group-Finder an opensourced roblox group finder writen in python 100% free and virus-free note : if you don't want install python or just use w

mollomm1 1 Nov 11, 2021
Architectural Patterns implementation by using notification handler module prototype

This repository covers singleton, indirection, factory, adaptor, mediator patterns in python language by using university hypothetical notification module prototype. The code is just for demonstratin

Muhammad Umair 2 Jan 08, 2022
Make dbt docs and Apache Superset talk to one another

dbt-superset-lineage Make dbt docs and Apache Superset talk to one another Why do I need something like this? Odds are rather high that you use dbt to

Slido 81 Jan 06, 2023
The Google Assistant on a rotary phone

Google Assistant Rotary Phone Shoutout to my dad who had this idea a year ago and I'm only now getting around to doing it. Notes This is the code used

rydercalmdown 10 Nov 04, 2022
Modern API wrapper for Genshin Impact built on asyncio and pydantic.

genshin.py Modern API wrapper for Genshin Impact built on asyncio and pydantic.

sadru 212 Jan 06, 2023
List Less Than Ten with python

List Less Than Ten with python

PyLaboratory 0 Feb 07, 2022
Projeto para ajudar no aprendizado da linguagem Pyhon

Economize Este projeto tem o intuito de criar desáfios para a codificação em Python, fazendo com que haja um maior entendimento da linguagem em seu to

Lucas Cunha Rodrigues 1 Dec 16, 2021
Repository for 2021 Computer Vision Class @ Chulalongkorn University

2110443 - Computer Vision (2021/2) Computer Vision @ Chulalongkorn University Anaconda Download Link https://www.anaconda.com/download/ Miniconda and

Chula PIC Lab 5 Jul 19, 2022
Fofa asset consolidation script

资产收集+C段整理二合一 基于fofa资产搜索引擎进行资产收集,快速检索目标条件下的IP,URL以及标题,适用于资产较多时对模糊资产的快速检索,新增C段整理功能,整理出

白泽Sec安全实验室 36 Dec 01, 2022
A Sophisticated And Beautiful Doxing Tool

Garuda V1.1 A Sophisticated And Beautiful Doxing Tool Works on Android[Termux] | Linux | Windows Don't Forget to give it a star ❗ How to use ❓ First o

The Cryptonian 67 Jan 10, 2022