Raspberry pi 3 CSI camera with motion /dev/video0

There are a number of topics on the web, about getting a modified version of motion (motion-mmcal) to work with raspberry pi v2.1 CSI camera.

A simpler method is to expose the camera interface through the standard video 4 linux kernel interface /dev/video0.

This can be achieved by simply enabling the video 4 linux kernel module and installing the standard motion.

Install motion

Enable the kernel module on boot

Load the module without reboot

Start service as normal


Raspberry pi 3 disable red and green lights

Disabling the lights on raspberry pi has been documented a number of times on the web.
If differs from model to model, however the following method just sets the brightness to zero and should work on all models.

Modify your /etc/rc.local too like the following


Seedbox autoupload to google drive with rclone

If you are an avid seedbox user, here is another option for automatic uploads to google drive.
There are many ways of achieving this, including a cronjob.
I like this option, as it only runs rclone when a torrent completes.

Using inotifywait to watch for file system events, we look out for primarily the ‘move’ event.
When your torrent completes, it moves the completed torrent into the completed folder.
When this event takes place, when then execute rcopy.sh

Setup rclone and scripts

rwait.sh

rcopy.sh

Permissions and PATH

Once you have setup the 2 scripts, make them executable

Permissions

If ~/bin is not in your path, then add it and reload your shell

Edit Path

Finally you can either run the main script in a cronjob or do as i do, and run it in the screen session

Finalize and run in the background

Screen session

You can read more about inotifywait and rclone here
https://linux.die.net/man/1/inotifywait
https://rclone.org/


Bordgais Energy Charts

Work in progress. script available soon including gas bills.


Distributed FFMPEG using Google App Engine

I’ve developed a distributed ffmpeg google app engine solution.

The solution uses a combination of publish subscribe and redis queues for distributed communication.
https://github.com/dmzoneill/appengine-ffmpeg

Its composed of 2 services which scale horizontally (default and worker).

Coordinator (default service and human interface)

Worker