birds like wires

Search

Showing 'scripting' tagged articles.

Raspberry Pi Status Board

Status board on a portrait-orientated display, at the bottom of some stairs.

It was only a matter of time. I’ve had two Pi boards sat around for a while now; so long, in fact, that they’re both the 256MB Model B types and weren’t made in Wales. This summer, as part of the annual revamp in our studios, the much-neglected information screen finally bobbed high enough up on the to-do list to be in danger of actually getting done. Combine that with a collection of retired portrait-capable plasma screens in the basement and we’ve got ourselves a project!

What started this all off was the buzz there had been around Panic’s latest offering: Status Board. What I found a little uncomfortable was the fact that you needed to dedicate an iPad to the job, which just seemed downright weird. I’m up to my ears in old Macs, but iPads are rather more difficult to find without being attached to a protective owner. Nevertheless, there was an option for having one that shouldn’t have needed to be unplugged and used elsewhere too often, so I hurried off and bought Status Board.

Weighing The Options

I quickly realised that while Status Board may be a great app in the right environment, to do the kind of thing I had in mind would mean writing most of the code myself anyway. There is, of course, no magic button that creates displays for monitoring studios. When you add to that the extra fee for HDMI output (which is galling enough without having to be reminded about it every time you use AirPlay for the output), plus the cost of an iPad HDMI converter and the fact that the display was standard-def and only had VGA and composite inputs; it was a non-starter.

Keep reading...

Dead Simple Dynamic DNS Updater

I’d been messing with ddclient, trying to get things to play nicely with DNS-O-Matic, Tunnelbroker and Hurricane Electric’s own dynamic DNS system. Problem was, although everything was configured correctly it still wouldn’t update my DNS! It worked when I told it to, but when the IP genuinely changed, it all went wrong.

It turns out that when my IP changed, ddclient was indeed trying to update things. However, it was trying to do it over the IPv6 tunnel which, due to the altered IP address, was now broken. And I could find no way in the config to specify that the tunnel should be updated first, over IPv4. Hmm.

So, I sacked off ddclient and went for the world’s simplest dynamic DNS client. A bash script and curl.

Easy Peasy

Most of the dynamic DNS services have a simple HTTP method for updating. Some have HTTPS, so you’re not waving your password around in clear text. Switching to an IPv4-only updating mechanism is as simple as this:

Keep reading...

SqueezePlay for Joggler

Latest Release: 7th November 2014

Version 1.59 (7.7.2-9710) – CHANGELOG
Download USB Installer – (12MB)
The USB Installer is for use with the O2 Native OS only.


SqueezePlay is an open source music player written by Logitech for their line of wireless audio devices. Ordinarily, SqueezePlay is used on desktop systems, but because the interface was designed with touchscreens in mind, it’s particularly well suited to the Joggler’s display.

This version has had the standard skin adapted for 800×480 resolution, is compatible with Jogglers running both the native operating system and ones based on Ubuntu, and is compiled from some of the latest source code. It also features a simple install method, which should load it onto your Joggler without too much fuss.

Keep reading...

Security, Energy and Home Automation

'Setting up alertme' by bjdawes on Flickr

Everybody loves a bit of home automation, don’t they? Traditionally, geeks such as myself would be toying around with X10 modules, which provide a mature platform for automating pretty much anything in your home. But if X10 isn’t your thing, there may be an alternative.

Here’s my admission. I never figured X10 out. If I’d bought a few modules and started playing I’d probably have got a lot further, but I always held back because of the price of the modules and the fact that I already use powerline communication for ethernet, and didn’t really like the idea of putting more interference into my mains supply.

Keep reading...

Mac OS X Energy Scripting

'Now You're Playing With Power.' by Dan_H on Flickr

We’ve got a variety of Macs running OS X versions 10.4, 10.5 and 10.6. They’re all managed from an Xserve with MCX preferences through Workgroup Manager, but for some reason I’ve just never managed to get them all to settle nicely with their power management settings.

While it’s lovely to have the control of these things through Workgroup Manager, I finally got miffed with it not working, particularly with the Tiger clients. It’s also not good to have rooms of machines burning away power and their components pointlessly.

‘Terminal’

So I did what I usually do. Write a script. There’s an excellent blog called Managing OS X which had already covered this issue, so using GregN’s script as inspiration I came up with this, in Perl for some reason.

Loading ‘powerman.pl’ from GitHub...

The idea is that this runs via launchd however often you would like. Using Lingon to create a .plist file, I have it triggered every hour. It uses the hostname of the machine to determine where it is, with different rules applied if the system is a ‘cluster’ or a ‘studio’ machine. Once per boot it reapplies the power management policy, and on every run it examines the state of the machine and decides whether it should be powered down.

Keep reading...