Category Archives: Raspberry Pi

Raspberry Pi to Banana Pi migration

You might have noticed that my site was down for maintenance on Wednesday, 2014-09-17. For better WordPress performance, I decided to migrate my blog to a brand-new Banana Pi server, featuring a Cortex-A7/ Allwinner A20 Dual-core CPU with Mali-400M2 GPU — that’s cheating — I know 😀.

Let’s go bananas … !

It took me a couple of hours and some tinkering to move my WordPress installation including the MySQL database onto the new server. So here are my first impressions:

Continue reading Raspberry Pi to Banana Pi migration

CUPS server with rcswitch-pi

My laser printer is placed far away from my desk and automatically connects to my WLAN router when it is switched on. I do not use the printer frequently, so that it is idle most of the time. Recently, I started some experiments controlling the light of my aquarium using a 433 MHz remote switch, which worked like a charm. I thought that it would be nice to save some power by letting the printer start as soon as a new print job arrives to the printer. So here is how it works:

Continue reading CUPS server with rcswitch-pi

Home-Automation using 433Mhz RC-Sockets

The small 35 liters fish tank in my living room is illuminated with a 6400 K energy-saving bulb. The light is controlled by a power outlet with a build-in digital timer. Unfortunately, the timer is somewhat complicated to program. Since it is not backed with a battery, one is losing all settings each time it is being disconnected. Therefore I wanted to control the light in a more convenient manner.

IMG_6847

Recently, I stumbled upon a kit of cheap (less than 10 €) 433 MHz RC power sockets. I soon had in mind to let my RasPi server take care about the fish tank illumination by connecting one of these sockets to the aquarium.G550694Each socket has a row of ten dip switches on its backside, in order to set a system code and to assign it to one out of four buttons on the remote control (A – D). The socket communicates at a frequency of 433 MHz, using ASK modulation. Although it would be possible to solder some wires to the remote buttons, directly connecting them with RasPi’s GPIO header, it is much more safe and convenient (and consuming less GPIO pins) to control the sockets using a 433 MHz transmitter.

433 MHz transmitter

PDR_0195It is important to chose a transmitter capable to communicate by ASK-, rather than FSK modulation (such as the HOPERF RFM12B). It requires only one GPIO pin to talk to Raspberry and can be safely wired to +5 V, since we’re not reading anything from the GPIO pin.

Download and install rcswitch-pi

For transmitting signals to the rc-switches, I downloaded the following code to my Pi:

$ git clone https://github.com/r10r/rcswitch-pi

in send.cpp I changed the line reading int PIN = 0; to the GPIO pin connected to the transmitter. GPIO numbering is done according to the WiringPi library:

gpio1Then, I typed “make”, chmod 755 and moved the “send” program into my binary PATH (e.g. /usr/local/bin).

Folder sharing with NFS

If you’re running out of space on your Pi’s SD memory card or want to share folders under Linux, you should consider using the Linux network file system (NFS). All you need to do is to install rpcbind, nfs-common and nfs-kernel-server on your Pi.

On a freshly installed you must enable the rpcbind service before you can start the nfs-kernel-server:

$ sudo update-rc.d rpcbind enable

The network file system is particularly useful if you want to merge folders across your home network which reside on different systems. In order to listen to my ogg/mp3 music collection I’ve attached a Raspberry Pi to the AUX input of my Hi-Fi equipment. The collection resides on a USB stick and can be accessed with the music player daemon (mpd) and Minion, so that I can use my smartphone as a remote. Another music collection resides on my AVM Fritz Box, which acts as a mediaserver and NAS.

Continue reading Folder sharing with NFS