Tag Archives: Linux

Adding wi-fi to a Raspberry Pi without a powered hub

It is a commonly known problem that the Raspberry Pi cannot provide enough power for most USB wi-fi adapters. This can be solved with the use of a powered hub, however I have plans to integrate the Raspberry Pi into other devices; due to space constraints I decided that it would be better to convert a dongle to draw power separately to its data connection, also taking the opportunity to reduce the distance that it projects past the end of the board.
The modified dongle plugged into the top USB port of a Raspberry pi Continue reading

A script to download 4oD

Anyone living in the UK will be familiar with the superb video on demand service run by Channel4; while it does have years worth of programmes, it doesn’t have an option to view the content without an internet connection. This is particularly frustrating as my TV doesn’t have an internet connection, although it does have support for USB mass storage devices. To work around this, I’ve written a ruby script that downloads 4oD videos to local MPEG-4 files. Continue reading

Updating my youtube music player

Recently the youtube search results page changed slightly; this caused my youtube music player to stop working properly. I’ve rewritten parts of it; not only to work with the new youtube search, but I’ve also taken the opportunity to improve a few other areas.

The biggest change is the integration of an automatic pause feature based on bluetooth proximity sensing. If a bluetooth device’s MAC address is entered, the music will automatically pause when that device leaves visible range; once it returns, the music will resume automatically. I have also added the ability to use 3 basic commands at the search prompt: /skip /pause and /play; they do exactly what you’d expect. Continue reading

Pausing Banshee using bluetooth proximity

In my continued efforts to control everything with bluetooth proximity, I’ve successfully nailed another target: Banshee media player. Banshee is the default media player supplied with Ubuntu and has some surprisingly useful command line arguments that allow it to be controlled from ruby scripts. I’ve written one that pauses banshee if I leave the room while something is playing and then resumes where it left off as I re-enter the room. Continue reading

Using text to speech to announce new emails on arrival home

I’ve done some more tinkering with bluetooth proximity detection and have succeeded in making my life slightly more like a science fiction film. When I arrive home, my computer uses text to speech to greet me and tell me if I’ve got any new emails. This reuses the code from last week to detect the presence of my phone via bluetooth, with the slight alteration of tracking what the previous state was. We only want to trigger the announcement when the phone returns to the room, not the whole time the phone is in the room. Continue reading

Controlling the mains with bluetooth proximity

I’ve found another use for my parallel port controlled socket box; by using it in conjunction with a bluetooth dongle, I can detect when I have wandered out of the room. I can turn off a load of peripherals, then turn them all back on when I return to the room seamlessly. I’ve simply plugged the extension leads which power my monitors, speakers, kettle, lamps and fan into the parallel controlled socket then let a ruby script act as the brains of the operation. Continue reading

Controlling the mains via the parallel port

Today I’m looking at controlling a 240V socket with the parallel port on my Linux desktop; this design can take the full 13A available and can control any device or extension lead with a 13A plug. I’m currently using it to turn lights and monitors off at night, but I have also used it in the past to check live weather reports and automatically turn a fan on. The only limitations to its use are the number of appliances with plugs and your imagination. Continue reading

Playing youtube music from the command line

Record collections certainly used to be nice, but sometimes it’s much nicer to have every song you can possibly think of at your fingertips. Youtube is a good source, but has several things holding it back; most significantly ads, playlists that don’t function as on-the-fly play queues and it cannot easily be operated remotely over ssh. Remote ssh control is useful because I’m often sat in a room with both my netbook and another computer with much better sounding speakers. I’ve overcome these problems by writing a ruby script. Continue reading