Sunday, December 14, 2014

Raspberry Pi Streaming Webcam with Motion

To setup a streaming webcam:

sudo apt-get install motion

sudo vi /etc/motion/motion.conf  # to enable web access

sudo vi /etc/default/motion      # to enable the daemon to start


sudo service motion start


For motion configuration options, see: ConfigFileOptions

You might also need to add this to your /etc/rc.local file to enable to pi camera on boot:

sudo modprobe bcm2835-v4l2

And if you want to turn the camera led off, add the following to the /boot/config.txt file:

disable_camera_led=1

Tuesday, November 4, 2014

Install Python MySQL Connector on Debian

Download the "Platform Independent" version from MySQL and follow the instructions here.

Check the version:
user@host ~ $ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
>>> mysql.connector.__version__
'2.0.2'

Thursday, September 25, 2014

Using apt-get to update packages

Get the latest package lists:
$apt-get update
Check the versions:
$ apt-cache policy bash
bash:
  Installed: 4.2+dfsg-0.1
  Candidate: 4.2+dfsg-0.1+deb7u3
  Version table:
     4.2+dfsg-0.1+deb7u3 0
        500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages
 *** 4.2+dfsg-0.1 0
        100 /var/lib/dpkg/status
$ 
Install the update:
$ sudo apt-get install bash
...
The following packages will be upgraded:
  bash
1 upgraded, 0 newly installed, 0 to remove and 206 not upgraded.
Need to get 1,443 kB of archives.
...
$

Friday, September 19, 2014

Temperature and Heating Charts

Interesting inside/outside temperature and heating/cooling charts from data collected over the past year:

Thursday, September 18, 2014

Copying Photos from Iphone to Mac

The easiest way I've found to copy photos from your iPhone to your Mac:

Plug in your phone, open Preview, select the File menu, Import from Dan's Iphone...

IMAP Whitelist Email Filter

The amount of spam email I've been receiving recently has been on the increase. Even with server-side spam assassin and client-side junk filtering enabled I was still receiving hundreds (yes, hundreds) of junk emails each day to my Inbox. I needed a new solution. Enter imapfilter.

To install on Debian try: apt-get install imapfilter

Imapfilter is a neat little tool that can be scripted in LUA to connect to an IMAP mailbox and perform certain operations. It was easy enough to build a simple whitelist email filter to delete all emails except those from good addresses. I set this script to run every 20 minutes or so and now my Inbox is soooo much happier. :)

Sunday, February 23, 2014

Raspberry Pi Stack

Raspberry Pi Stack

Setek Dual Stackable Case for Raspberry Pi

Monday, February 17, 2014

Script to Add Multiple Lines to a File

Shell script command to add multiple lines to a file:

cat <<EOF >> /tmp/newFile
# these lines are added added
# more lines here
EOF