Raspberry Pi Enable Cron log

By default, logging of Cron is disabled. To enable this log function, follow the steps below:

Use the below command to open up the ‘rsyslog.conf’ fine in the Nano editor

pi@rpi2 /etc $ sudo nano rsyslog.conf

Once the rsyslog is loaded into nano, navigate to the below section and un-comment the ‘cron’ option

# First some standard log files.  Log by facility.
auth,authpriv.*              /var/log/auth.log
*.*;auth,authpriv.none          -/var/log/syslog
cron.*                          /var/log/cron.log
daemon.*                        -/var/log/daemon.log
kern.*                          -/var/log/kern.log
lpr.*                           -/var/log/lpr.log
mail.*                          -/var/log/mail.log
user.*                          -/var/log/user.log

Save the document by pressing CTRL X, Y to confirm the file name and then Enter to comit the save, nano will then close.

Reboot the Raspberry Pi:

sudo reboot

Raspberry Pi Real Time Clock (RTC)

How to setup a Real Time Clock on a Raspberry Pi B v1.1


If you didn’t know, the Raspberry Pi doesn’t hold the time very well, this is because there is no on board Real Time Clock.


To keep the devices time accurate we need to add a module that holds the time whenever the PRI has no power running to it and then updates the RPi with the time saved on the battery powered module when the full power is restored and the system starts running again.

Continue reading Raspberry Pi Real Time Clock (RTC)

piTank Power Bar v1

To run the mains powered electrical items of the piTank I wanted a remotely controllable power bar connected to the same Raspberry Pi as the piTank software.

Future post:The piTank power bar will include input connections for thermal probes, water sensors, switch inputs and an external connector to a viewing panel mounted on the front of the cabinet.

What is the first thing you do when you have a good idea, Google it to see if anyone has done the same!

Continue reading piTank Power Bar v1

Raspberry Pi GPIO Start-up Script

On powering/reset of the Raspberry Pi connected to a relay board, the state of the relays needs to be defined and set.

Depending on your project it might not matter what state the relays are when the RPi is turned ON but for the piTank it is critical! (battery backup to come… but still this solution is needed)

The ‘original‘ WebUI does have a script on loading the webpage to define the pin modes but if there is a power cut and the RPi is restarted, we need these values set and activated when the RPi boots in case nobody loads the piTank webpage – thus not setting the pin modes or turning the heater/filter on.

The fix to this issue is gpiobootscript.sh

GPIO Readall

Continue reading Raspberry Pi GPIO Start-up Script