navelfluff

Morjens bara

Geeking up the garden lights

Let me tell you about my first Proper Hack. Our garden lights. This’ll be all text since i’m keen to get back to hacking it further.

Last year, we remade our garden and as a part of that, we decided to pull some cables under the grass so that we could have lighting in the garden without the unsightly extension cables running back and forth. In the same process, i suggested that the lights would be “centrally controlled” from the electric cabinet. I tried to keep the implied bits of “computer controlled” and “made by myself” unheard, but the plan was spotted and my wife got very suspicious.

So we came to the deal, in can build it if it works. Tough terms, i may add.

While the project is by no means finished, i have a proof of concept shining outside which i’d like to present. And yes, it got a bit geeky now that i think of it.

The least geeky bits are the ends. The lights are black Alppilux Averia with LED lighting. There are weather proof electrical outlets along the fence, and there are two electrical outlets for heating the cars in the winter. Oh, and then there are six sets of cables running through the wall. All this was installed by professionals.

The cables are terminated in a very nifty looking cabinet inside which is an eight relay card from KM Tronics. The card is run with five volts, both to run and for the signalling.

The relay card is going to be run by a Nanode (essentially a really neat Arduino clone with Ethernet built in). The Nanode itself was delivered as a bag of components but i did get it running and flashed and i got a program called RESTduino onto it which means that i can control the required eight ports of outputs over HTTP. Neat. Or that was the idea. The thing is that Nanode doesn’t really give you all the usual Arduino ports to toy with as much as you’d like. Port 4 is really reserved for serial output and hey, what’s a garden light cabinet without an LCD display? Nothing. And i’ve got one which is serial driven just waiting to be hooked up. Also, a bunch of the “high pins” are reserved for wireless connection and other fun bits.

So what’s a boy to do? With ports to drive and only four or five ports to go? Bit shift. I ordered a tube of 74HC595 chips which does just that; read the bits as a serial byte, do a bit of twiddling with two control pins et voilà, eight bits of output on three bits of input. I even got the prototype running on protoboard, a bunch of jumper wires and a Teensy yesterday, but i’ll still need to make it into production, so to speak. And i need to hack the RESTduino code to output a byte over serial and wiggling control signals, instead of toggling individual pins. I got the code written, but i still need to test it.

But as i said, the lights are already up. They’re currently controlled by a Linksys NSLU2 “Slug”, a NAS box which has been re-flashed to run Debian Linux. The Slug has my first ever Lua script which sends data to a USB-to-relay card adapter which i also bought from KM Tronics. So yeah, our garden lights run Linux. Or rather, Linux runs our garden lights. Cron turns them on and off.

This is all a wee bit overkill, of course. You don’t put a Linux box just to drive eight channels of electricity if the task can be adequately accomplished by an Arduino with an Ethernet (ie the Nanode). In the end, a Linux box, probably a Sheeva Plug or a Raspberry Pi (or even the Slug, if i can get it to automagically start after a power outage) will be the controller to run the schedules while the Nanode will blink the lights. I’ll still need to consider whether the light & car heating schedules will be based on how dark or cold it’s outside, or if i’m going to connect to a sunset/weather web service.

So there, my quick ramble. Now back to hacking my bit shifter into shape!

An end to whining

(This is a port from my original story from a few days back, which was written in Swedish)

I’m training myself to stop complaining, whining and moaning in a programme called A Complaint Free World. The idea is that it takes 21 days to form a habit. If you thus can go on without complaining for 21 consecutive days, you’ve formed yourself the habit of not complaining. To remind you of this mind bender experiment, you wear a violet bracelet. If you catch yourself complaining, you move the bracelet to the other wrist and start counting days from zero again. I want thank Tim Ferris for the inspiration.

The first day went well. The second day, i had to change wrists five times. Since that i’ve had to change wrists three or four times, the last time this morning. At that time, i had a five day run of no complaining.

Participating in this mind experiment, i’ve noticed how ingrained complaining about things is to my everyday parlance, even if my complaining really is meant just for fun. Since then, i’ve had times when i’ve really had to stress myself not to blurt out some complaining, which really doesn’t help much. And as time has passed, i’ve become more relaxed. Now i may catch myself in nearly exclaiming a complaint and stopping myself at last second. But i don’t stress it. I just start over.

I’ve set the following rules to what i consider complaining: If it sounds like complaining, it is complaining. If it’s describing an event or person negatively without indicating next steps to fix the problem (Tim wrote that), it’s complaining. Constructive criticism on the other hand is allowed and even welcomed. And as a father of two youngsters, nagging and “telling things the way they are” is frowned upon but allowed (in moderation). “Now you’ve got to sleep” is green; “now we will be late again” is allowed, barely. “You’re so whiny if you don’t sleep” and “we’re always late” is not. You get the drift. Change the wrist. You’ll learn.

Since my original post of this entry, i’ve had really good feedback. I’ve had cheers and positive comments, one person asking how to get the bracelets (they can be obtained from www.aComplaintFreeWorld.org – ten bands for ten bucks – or from me, if that’s easier for you) and a friend of mine actually joining me in the quest. I feel encouraged and honoured by his presence.

I still have eight bands left. If you want one, just ask. In fact, i challenge you to join.

Now on Android

I’ve been a Nokia user since 1995. My first phone was the immensely neat 2110. I moved into Series 60 as soon as it was feasible, meaning that i am one of the few who got the Nokia 3650, the blue and white phone with the number keys laid out in a circle, and apparently designed by Fisher-Price. My last Nokia phone was the Communicator E90 which i had until the magic smoke came out, which was about three weeks ago.

I have now departed from the Nokia ship. I have an Android. A HTC Desire Z.

While it felt sad (and a little bit like a betrayal), i haven’t regret my choice. I really like this phone. That stuff i’ve talked about before, integration, extsis on this phone. My address book on this phone is consolidated from my accounts at work, Google (which is where i keep my civilian mail), Twitter, Flickr and Facebook. Applications seamlessly use location, the camera or Google maps for location visualization. The phone comes with a built in DLNA controller which can play media on this phone or on the television, using the phone or the UPnP media servers at home. And i’ve come to foursquare on a daily basis.

Compared to my previous phone, the keyboard is a bit worse, but nearly everything else is better.

Blog spammers are getting smarter

I’ve received one line comments to the moderation queue nearly daily for the last weeks. While i do wish i would get proper comments at that speed (or even comments at all), the interesting thing is that these one liners do seem to even tangentially relate to the content of the blog post. For example, i got a comment to my interview with Piotr GrudziÅ„ski of Riverside, about microphones. I got another one for a 2006 posting about Moo cards, saying that calling cards are cool. I got a comment on optical cables in relation to my ICND training and one about soldering irons using ceramic elements. The last one was about my trip to Tokyo, which was the comment that made least sense to me.

What i suspect that these comments aim for are getting commenting rights on my blog, after which they’ll spew spam upon it.

But the moral of the story is that the spammers are using new and more intelligent tools to do their trade. And i don’t particularly love them for it.

Spam spam spam luverly spam….

How i learned to bicycle

I have a blog on Vox. I think i originally got it because it was an easy place to post mobile photos to. These days, i can do that with Flickr, Lokala and my Core dump, which is one reason why i haven’t posted to my Vox site for two and a half years. And evidently, i’m not alone, since Vox is now closing down.

I really only wrote one good post to Vox. In fact, i really only wrote one post to Vox. The rest are phone cam pics. And while copies of them probably exist elsewhere (not that it matters much with these pictures), i wanted to save this. It was an answer to the question Vox asked for inspiration:

Who taught you how to ride a bike?

My dad. I still remember it, and thinking of it, it is one of the most vivid memories i have left of him. We were at this traffic park (i don’t know if you have them in your part of the world, but basically it’s a bunch of streets with traffic signs and all, resembling the streets of a small town but meant for kids and their bikes).  I felt very wobbly but my dad said just pedal on and i’ll hold on to your bike for as long as is needed.

I pedalled and wobbled, my dad jogged behind the bike. In fact, i can still hear his steps now.

Eventually my biking started to get stable enough for me to actually trust my own biking. I believed i looked behind and my smiling dad told me that he’d already let go of the bike long ago!

In retrospect, i don’t know how that didn’t turn out to be the penultimate trustbreaker, but it wasn’t. Instead, i learned how to bike.

Thanks dad. I’ll teach my kids too.

- – -

Since i wrote this in January 2007, i have taught my daughter how to bicycle and i am teaching my son how to. I ran/run behind their bikes, but i think i was a bit more careful and communicating about letting go. Or maybe he too knew when he could. Maybe dads do :)

Support the musician

In these days of “free” music, there are a few views i’d like to present. These are views of my own and about how i like to spend money on music, and on musicians.

First a confession. I do … no wait, i have pirated music. I just realized that it’s been quite a while since. Services like Grooveshark and Spotify have effectively cut away my need to steal music. But yes, i do have bits of music on a few hard drives somewhere that do not belong to me. I’m not sure exactly where because i haven’t listened to them for a while. Maybe they’re on one of my hard disks that have crashed and the crime is prescribed.

That said, i also buy music. I don’t have the numbers, but we’re talking about maybe thirty CDs a year. Used to be more, but then Frans Keylard put his Rogues’ Gallery show on hiatus, which has been a blessing for my economy. But here’s the deal. Especially during my Rogues’ Gallery-induced shopping sprees, i often chose to buy music from artists i listened to on the shows, knowing that i probably won’t listen to them too much off-line. It was a conscious decision, not just to get a CD of music i liked, but primarily because i wanted to support the musicians making this great stuff! Yes, i could still hear them for free, but i wanted to put my money in the direction where the good stuff is made. 4517668895_4e56c3e3ed

Here’s another hook. As far as i can, i always try to buy the CDs from the artists themselves, or from their own label or outlet. And if there’s a Special Edition of any kind, as long as it isn’t stupidly expensive, i buy it. I’ve long thought about the economics of music and just a few days ago, i stumbled across this beautiful graph about just that. In short, if an artist wants to make “minimum wage” in the US, s/he needs a monthly sell of 143 self-pressed and delivered CDs. Sold in a “high street” shop or on iTunes, the number is between one and four thousand. The artist would need to sell 12’399 tracks on iTunes or Amazon to make US$1’160 a month, or stream 0.8 million times on Rhapsody, 1.5 million times on Last.FM or a whopping 4.5 million on Spotify. One album purchase straight from the source goes a long way.

I do realize that that much of my music money goes to artists who aren’t with a big honking record company, making it possible to buy from the artist themselves (case ex point, Radiohead, whose In Rainbows download i bought as well). The most financially successful artist i buy records from must be Porcupine Tree and Peter Gabriel. I bought pg’s Scratch My Back from WOMAD, and received a download of the album while-you-wait-for-delivery and a download code for a 24 bit rendition of the record.

Just the other day, i received the new The Alarm album Direct Action. I saw it on Last.FM, checked it out on Spotify, liked what i heard (a lot!) and bought it straight from the source. I received a special CD+DVD edition and got a interview+live CD as an extra surprise. And a warm and fuzzy feeling. How can i not honk my horn about a service and a delivery like that? And i’m waiting for Anathema’s “We’re here because we’re here” CD+DVD+book and Pineapple Thief’s “Someone here is missing” CD+book+sticky-notes bunch, both from the Burning Shed label store. The Marillion Weekend 2009 CDs arrived a few weeks back and the DVDs will as soon as they are pressed.

And just as extra icing, i tend to have them delivered to work, just to make my day :)

Five Fifteen still swing like a moose

Yay! I’m 40! Which is celebrated in low key style: yesterday i was to see 5.15, today i was awoken by wife and kids, tomorrow it’s dinner with friends, Saturday is day-off as my wife’s bro’s kid’s christening and Sunday it’s family gathering. But most of that is completely beside the point, because this is a write up about yesterday’s Five Fifteen gig. And some of it is true.

Not long ago, long haired internationally acclaimed rock and roll star Mika Järvinen got a telephone call in French. The person on the other side of the line wanted to know whether Five Fifteen would be available for a festival performance in what now is a week from now. Being the man he is, he of course said yes, then silently shook his head and proceeded to resurrect the band that had been on hiatus for the last few years. Most of the band members hadn’t played Five Fifteen for years and one guy in particular (on guitar) needed to stream his old performances from Spotify and YouTube to remind himself what he’d played back then, and how.

Yesterday night, Helsinki rock club On The Rocks was testing ground for Five Fifteen, freshly pulled from naphthalene. I talked with Mika before the show. He complained that he had “a good old-fashioned flu” and his back was sore. He was drinking something hot and didn’t sound like he was quite in shape for rock and roll.

Boy that changed.

Half an hour later, no less than eight musicians entered the fairly timid On the Rocks stage. The night had begun with a stand up comedy show and Mika promised the comedy would continue. Suddenly he was in an excellent mood, throwing jokes and looking great.

The band opened with Alcohol (Intro) from the last album and continued with Call the Doctor from (one of) the first. The night was a mix between the Alcohol record and stuff from all the back catalogue. It sounded very fat and very rock and roll. It was much appreciated. Extra kudos to the stuntman keyboardist and the drumming that i hadn’t appreciated enough before. It had sounded rather unspectacular on CD, compared to this!

In fact, i’ve always thunk there are two Five Fifteens, one on record and another on stage. The Five Fifteen on record sounds near-clinically sharp with well defined notes while the one on stage swings like a moose on a train and will not be stop. Sure things go a little wrong at times (like a guitar chord a step down or “hey, how do the lyrics start?” during the intro of the last song) but that just didn’t matter at all. It was full ahead, both on the more rocking tracks, the proggier tunes and the softer bits.

I for one welcome Five Fifteen to the stage. You were sorely missed and it’s good to see you back.

Your car: No user serviceable parts inside

How is it that a modern car is built to be as hostile to maintenance as possible, whereas a modern desktop computer is a dream to upgrade? And i’m talking about hardware here, in both cases.

An everyday example would be to change the light bulbs. In both my and my wife’s car, even attempting to perform this simple maintenance procedure will result in dirty clothing and body parts, possible cuts and much vituperation. A challenging task like changing that belt thingy which needs to be replaced every two years or so, requires the careful removal of all the engine and takes all day for a professional car service crew. Why has this been made so purposefully complicated?

Lately, i’ve also had to install a bunch of PCs and a rather impressive switch. Both are from HP and it’s obvious they’ve been built with hardware service in mind. Hoorays and kudos for Hewlett-Packard.

The PCs needed a second hard disk and a memory upgrade, the switch an additional bay of switch ports, a few optical interfaces and a redundant power supply. Compared to a few light bulbs, this does sound like rocket surgery, at least in writing. But nay. The PC cover comes off with a lifting of a handle. No tools required. A new hard disk can be slotted into its bay after fastening four guide screws onto the disk. And to install memory, you just slot it in and press the fastening clamps. On the smaller PCs, you can push a button to swing the power supply and the optical disc unit to the side so you can reach the memory slots without the slightest amount of pain. Or cuts, dirt or vituperation, for that matter. As a footnote, this goes for HP computers and network equipment. Your mileage may vary.

Since light bulbs, belts and whatnots need to be replaced in cars, either by users or professionals, why are they built according to the “no user serviceable parts inside” doctrine? I understand the protectionist argument that non-professionals (“muggles”) should keep their hands away from the innards of delicate machinery but having an easily serviceable car would make the lives of the professionals themselves so much easier. Is it just so that the car designers don’t give a crap about this stakeholder group?

Bad Behavior has blocked 2798 access attempts in the last 7 days.

Bear