Skip to main content

Control a TriggerTrap device without the smartphone app.

Project description

Control a TriggerTrap device without the smartphone app.

A TriggerTrap is (or was) a device that you can plug into your camera in order to control it with your smartphone.

However, in some cases you don’t really want to actually control it with your smartphone although it’s nice to have a simple way to control it. The sad thing is that isn’t any documentation or API to do that. The good thing is that the protocol is actually pretty simple and the aim of this project is to provide a way for Python developers to control TriggerTrap devices.

Installation

Through pip:

pip install pytriggertrap

Non-python requirements

This tool uses the ffmpeg binary, please make sure that it is installed and present in your PATH.

Usage

There is two ways to use this too:

  • Using the pytt CLI tool, that allows to do most things from the shell

  • Using the TTController class, for developers

If you want to use the class, then read the code, it is documented via docstrings.

The pytt tool

Different actions allow you to access the different features of the controller class.

timelapse_file

This will generate a “timelapse file”. Here’s the idea: a TriggerTrap is controlled via an audio signal. So if a device can generate the appropriate audio, then it will be able to control the camera. In the case of time lapses, it involves letting the thing running for a long time, maybe while you’re not even there. In this case, it is really annoying to have to leave your phone there.

The solution is the following: you just need to dig out an old MP3 player (anything will do the job) and then to generate a MP3 file that will be a pre-generated audio signal. You can generate it of the right size if you want a precise duration or just generate a few iterations and then put the file on “loop” in your player.

So:

  1. Generate the timelapse MP3 file

  2. Put the file in your player

  3. Plug the TriggerTrap on your player

  4. Play the music

  5. Wait for your timelapse to be complete

Suppose that I want to watch something for 6 hours (21600 seconds) in order to produce a 30 seconds timelapse video. Here’s the command:

pytt timelapse_file -i 21600 -o 30 -f timelapse.mp3

See the command’s built-in help for the options.

trigger

This will simply send a trigger to the camera. Just make sure that the TriggerTrap is connected to your computer’s audio.

Example

pytt trigger

See the command’s built-in help for more options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytriggertrap-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file pytriggertrap-0.1.0.tar.gz.

File metadata

File hashes

Hashes for pytriggertrap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 757a060c47b8573b508dbaabc016d32b0ff74cc584166893f17286245c42a29d
MD5 bca19d3049e460171d0a5eaf916e0aa3
BLAKE2b-256 aa8d5c666c2a85e8fdeb1d8dc79b242e1bc410b152a651c1764954f6494a2706

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page