Headless Pi Zero VNC setup

After setting up a few pi zero’s with VNC without a monitor, here’s the process I follow that may be helpful if you are trying to do similar. I’m no expert but this works for me 🙂

sd card reader
pi zero+psu
wifi dongle+adapter if required
pc/laptop (I’m using a pc with ubuntu 16.04)

Raspian image – https://www.raspberrypi.org/downloads/raspbian/
Etcher – https://etcher.io/
SD card formatter – https://www.sdcard.org/downloads/formatter_4/
Continue reading

French TV in the UK

I’ve recently been on holiday in France and wanting to improve my French I picked up a 50EUR TNT sat box from Darty made by Strong model SRT 7404.
French TNT broadcasts are encrypted and require a card to view the broadcasts but also require an approved box, so he 50EUR covered both and  the card should/will be valid for four years.
The TNT broadcasts can be received with an LNB aimed at 19.2E (see here for how I achieved that).

Once home I connected everything up but encountered some issues with a power supply unit I was testing with, which surprisingly allow the unit to power on and scan but insufficient power to find any channels. Anyhow after changing the PSU for a beefy 12v DC 4amp all was good (unit requires 1.5amp).

After fixing the PSU issue, the box found the French channels and I added 28.2E to pick up the UK channels. The box is surprisingly snappy for
a cheap box, better than the Skybox f5.

It is annoying that sorted channel lists can’t be uploaded to the box as it makes sorting so much faster. But for 50EUR the box is snappy and works great (with a good power supply).

Pictures to follow…

Raspberry Pi – adding a cron job to run get_iplayer automatically

Finally getting round to automating my get_iplayer on my pi PVR with cron.

First find where your get_player PVR runs from by typing the following into the terminal

echo $PATH get_iplayer --pvr
my output was: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games get_iplayer --pvr

I had previously tried using:

cd ~/get_iplayer; ./get_iplayer –pvr

but this failed to work, so I recommend the echo path output string.

Next to write the cron job (adding the output file log location)

* 2,14 * * * PATH=./usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games get_iplayer --pvr  >>/home/pi/cron_log.txt

The 2,14 refers to 2am and 2pm, so the command will run at these times. See this wikipedia entry for further explanation and examples. Also note the “.” after the “=” this is required. The second part refers to the process you want to run (eg: run the PVR) and finally the “>” is where to save the output log to.

So now to add the cron job, open the terminal and type

crontab -e

The nano text editor should then open, the just add the line above to automate the PVR and save the output to /home/pi/cron_log.txt so you can check to see that everything is working as expected as the terminal window will not show the processes running. The double “>>” will ensure the new programmes are apended to the file rather than overwriting the file each time the process is run.

Now wait for 2am or 2am and check the log (alternatively set the time for a few minutes in the future to check its all working).

My previous post about get_iplayer here

More info about get_iplayer available on Square Penguin



Using a BT HomeHub 5 with Plusnet (or another ISP)

The BT HomeHub 5’s can be found on eBay for less than £30 and are reasonable cheap dual band router. I picked up a new BT Business HomeHub 5 for just £18, The business hubs are as far as I can tell the same hardware and offer a couple more features in the settings menu.

First thing to do is to check you have the ISP login details before you remove your old router then plug in the router in and connect it to a PC/Laptop preferably with an Ethernet cable. Then hold the reset button on the back until the unit reboots, once rebooted open a web browser and go to the hub manager page @

Once into the hub manager, go to settings, broadband and enter the plusnet (or other ISP) details:

Username - yourplusnetusername@plusdsl.net
Password - your plusnet password

Click connect and it should connect fine and job done. I then amended the wi-fi network name and passwords and changed the admin password to a stronger one.

The final thing to do is to turn off BT Wifi which if left on will create a new network for other BT customers to access your connection – even if on PlusNet. This is easy to turn off go to advanced settings, broadband, BT Wi-Fi and click disable. Then check on the home screen of the hub manager to confirm. I’m assuming this feature is as easy to turn off in a non-business hub.

Job done.

The unit has a usb port on the back and by plugging in a spare usb drive you can provide a network storage space accessible to all users of the network, which can be handy to share files between machines. No set-up required just plug in the drive.


Mechanical Keyboard Mod

I have joined the mechanical keyboard club and now have a CM storm Quickfire TK keyboard with cherry blue switches. Its a great keyboard and the mechanical switches make the process of typing much more pleasant and a little faster.

The keyboard can be ordered with different switch options, I have the blue switches, which has an audible click when the key stoke is actuated. They are a little noisy (in a good way) and more so as if you over press the key and they bottom out on the board. So to fix this double tap this I followed the o’ring mod which involves removing each key from the keyboard and adding an o’ring to the key then re-fitting. It takes a while but does soften the key after the actuation point is reached and makes them a little quieter.



Chromecast Audio

New toy, Chromecast audio, a great little device to connect an amplifier (and speakers) to your home network to enable music streaming all controlled from a phone, tablet or computer.

Works great and take only a few minutes to setup, then when you want to cast you tap or click the icon to connect to it. What’s great is that the Chromecast audio connects to your network or the internet to grab the stream, leaving your phone, tablet or pc as just a remote. So start playing on a phone, pause on a tablet and stop on a pc.

This ifixit article confirmed the internal DAC is an AKM4430ET (also used in Apple Airport Express), which Hydrogen Audio forums seem to think is reasonable and sounds pretty good to me. The device also includes an optical out so a 3.5mm toslink connector can be used to take digital audio out to go to a external DAC/AV receiver if required.

I have been using it to stream from the following:

To make it faster I have also written an NFC tag (cheap from ebay) with the trigger app to open the chromecast app (to make sure there connected) and then open player FM, one swipe and ready to go. Its easy to add a final tag to continue playing but I have lots of podcasts I dip in and out of so leave this bit off. I plan on writing some more to auto open BubbleUNPN and start playing next.

All in all its a great device for £30, thread on the AV forums here too.

Here’s the google product page link

Arduino – Weather Station with BMP180

Following on from this post, I have added a second sensor and developed the code further.

Here is the BMP180 (link to data sheet hosted with Adafruit), its a bosch sensor which will measure pressure and temperature – I bought from China via ebay – x2 sensors cost $2.96 delivered.

I outputted both the DHT22 and the BMP180 temperatures in the serial monitor to check to see how close they were – not too far out.

The board now looks like this:

Continue reading

Arduino – Simple weather station

I recently picked up a clone Arduino Uno from China via ebay along with some sensors and other bits and pieces to learn a bit about Arduino – First project a simple weather station.

For wiring instructions and arduino Libraries I used Adafruit, DHT22 here and 16×2 LCD here.

Then cobbling together some code from here which I made a few changes to:

  • Changed Fahrenheit to Celsius
  • Added a degree’s Celsius character
  • Changed the LCD and DHT22 Pins
  • Changed the error code to “looking”
  • Added a five second delay as the humidity reading was flickering on the display
  • Added the F as described in the comments – see bottom of post

Continue reading

Rechargeable Batteries

So after this happened:Which destroyed my wireless keyboard, I then checked some other devices found leaking Kodak cells in a fenix torch and leaking energizer cells in another torch, I decided to end this alkaline battery addiction and move over to low self discharge ni-mh rechargeable cells which won’t leak and corrode my devices and will be cheaper and better for the environment. Continue reading

New HDD – transfer data with rsync

A new Samsung 4tb external HDD has arrived to replace the almost full WD1tb HDD that is attached to a raspberry pi and serves up media to the network with minidlna and grabs iplayer programmes with getiplayer. So with 950gb(ish) of data to transfer from the old drive to the new drive I used rsync.

I did use another pc to transfer the data as it would have taken ages with the pi as both usb’s and the network are on all one SMSC9514 chip – but it would work.

First things first, I used Gparted to format the drive to EX4, a native linux file system. Then I connected up both drives and run this command in the terminal:

sudo rsync -rvtP  “/media/bertha/WD 1TB/” /media/bertha/samsung_4tb

Commands as follows:

-r, --recursive             recurse into directories
-v, --verbose               Increase verbosity
-t, --times                 Preserve times
 --progress                  Show progress during transfer
 -P                          equivalent to --partial --progress

Adding -n for a dryrun to check everything is a good idea!

-n, --dry-run               Perform a trial run with no changes made

Lots of great guides online to prep the rsync command – this one is great

It transferred the data at approx. 30Mb/s and took 8 hours or so. I will get another soon to keep a backup of the data and again use rsync to sync the data with a daily cron job.

Mobile internet – Alcatel Y855

In preparation for a forthcoming trip to the continent I realised I needed to sort out some internet access without paying the excessive roaming charges my provider insists on. So I needed a mi-fi unit, a small battery powered mobile internet router that I could connect to all my devices whilst only needing one sim card. This should work great as we can keep our phones on to receive calls and texts and then connect to the mi-fi for mobile data.

So after some research I decided that the EE Osprey (branded version of the Alcatel Y855) would do the trick, its 4G and they cropped up on ebay lots so, after a few bids, I won a brand new one in the box with the seals yet to cut for the bargain price of £23.00. Here it is:

Continue reading

Fitting a Record Vice

After months of two record plain screw vices sitting in the workshop, I finally got round to fitting one of them.

Fitted as follows, first I glued and screwed some 2×4″ to support the vice (I actually done this about six months ago).

Then flipped the bench over to make it easier to fit, marked up where I wanted the vice to fit. This made the job so much easier.

Next using a circular saw and a square clamped to the edge limits I made a series of cuts.

Then using a hammer and small prybar I removed the chunks, then belt sanded the surface.

Offering the vice up and marking where the fixing points were located. I used a punch to ensure I drilled in exactly the right place.

Then I drilled pilot holes upto 5mm and finally drove in the M10x70mm coach screws and M10 penny washers in with the impact driver.

These coach screws were great, super sharp and hold really well. They offer more than sufficient support and mean that the top workbench surface can be replaced without needing to remove the vice.

Next I just need to make an apron for the bench front.