November 22, 2008

links for 2008-11-22

Posted by delicious at 08:04 AM | Comments (0) | TrackBack

November 20, 2008

Posting Data to Pachube Using Ruby

This is just a short post to share how I'm pushing the data being recorded by the Mazzini prototype up to Pachube. It's a fairly simple snippet of Ruby and I'll stick it into the extended entry as it's only really of interest to the committed. Click on to read more.

Pachube feeds can be generated in CSV or EEML and either pushed up to Pachube (when you want to update it) or pulled by the Pachube servers (where you stick the file on a publicly-accessible web server and Pachube poll it). I wanted to publish my feed in EEML (because it's more detailed) and also wanted to push the updates out myself as that saved setting up an externally-facing server and meant I can publish updates more frequently than every fifteen minutes.

The Pachube guys have made uploading data for a feed pretty trivial, you just push the CSV or EEML data to the URL for the feed with an HTTP PUT request.

You'll need to know the URL for your feed (for example /api/12345.xml) and your Pachube API key, plus have your sensor data ready to upload. Generating the data was one of the reasons I ended up with this script in Ruby - I feed the data from the Arduino into a Ruby on Rails app, and use it to generate the EEML as a simple XML document.

That lets me pull the data out in the middle of a rake task with something like this:


app = ActionController::Integration::Session.new
app.get(app.url_for(:controller => 'reporter', :action => 'latest'))
data_to_send = app.html_document.root.to_s

That results in the EEML data being stored as a string in the variable data_to_send.

You'll need to add require 'net/http' to pull in the HTTP library, and then you can publish data to Pachube with this code, replacing the relevant parts with your feed path and Pachube developer key.


# And update our feed on Pachube
begin
http = Net::HTTP.new('www.pachube.com', 80)
http.start do |http|
req = Net::HTTP::Put.new('/api/12345.xml', {'X-PachubeApiKey' => 'PUT_YOUR_API_KEY_HERE'})
req.body = data_to_send
resp = http.request(req)
puts resp.body
end
puts "Submitted to Pachube"
rescue
# Probably not much we can do, lets hope that the next one works
puts "Problem submitting results to Pachube"
puts "Error reported was:"
puts $!
end

And that's it. Your data will now be live on Pachube.

Update: When I posted about this to the Green-Web-UK mailing list, James reminded me that I could've used his EEML Ruby gem to generate the EEML data rather than create a whole Rails app.

Tags:

Posted by Adrian at 11:54 AM | Comments (1) | TrackBack

November 19, 2008

The Mazzini Prototype is Measuring

Over on the company blog, I've just posted an update of how things are going with the Mazzini project. Things are starting to get really interesting - I've got an old ice-cream tub filled with electronics that's measuring the power that one of my computers is using. It's also logging the temperature in the room, and how much light there is.

All that data is being uploaded to the Internet, so you can head over to the Mazzini project's Pachube page and see for yourself what is being recorded.

So now I'm looking at how to take the prototype forward, and turn it into something that's useful for more people than just me. Again, there are more details in the update.

Tags:

Posted by Adrian at 10:23 PM | Comments (0) | TrackBack

November 17, 2008

links for 2008-11-17

Posted by delicious at 08:03 AM | Comments (0) | TrackBack

November 15, 2008

The Most Important Topics to Discuss or Disseminate?

In a couple of weeks it's the first Barcamp Liverpool. One of the "rules" of Barcamps is that everyone who turns up should have a talk ready that they offer to present. I've been pondering over what I should prepare for my talk.

So far I've generally hinted at doing something Arduino-related, and have been assuming I'd either talk about monitoring your home (show the Mazzini prototype, talk about that and some of the similar projects from others, or some of the things I learn about at Homecamp); or running a more general "Getting started with Arduino" session where I plug some LEDs and a switch into a breadboard and write a bit of Arduino code. And I expect I'll still have something along those lines as one of my proposals.

However, I've just realised that I should be turning my thinking on its head. Rather than coming up with ideas based on the knowledge that I've got that others might find interesting, I should instead be answering the question:

You've got the attention of a couple-of-dozen motivated and intelligent geeks; how do you want to change their lives?

Now you could improve their knowledge, which is what my initial ideas cover; but maybe it would be better to inspire them to go out and improve the world, or challenge their thinking and affect their future behaviour.

I'm setting myself the challenge to go to Barcamp Liverpool with two proposals: one along the lines of the Arduino tutorial, and another that falls into the second category. I'm just not sure what it will be about. Maybe I'll talk about starting and building businesses that make a difference; or lead a brainstorming session to work out what's going wrong in Liverpool and how to fix it; or implore people to find ways to improve the reuse and recycling of technology to improve the environment; or...

I'd love to hear anyone's ideas, comments or thoughts on what this second proposal should aim to achieve. I'd love it even more if you came along to Barcamp Liverpool and presented something along these lines to inspire me. How cool would it be if we could point to Barcamp Liverpool as the spark that started things happening?

Tags:

Posted by Adrian at 04:13 PM | Comments (0) | TrackBack

November 13, 2008

Liverpool Software City International 2008

Software City held its second annual event last week. It's a Liverpool software networking and pitch-to-investors event which sees a collection of companies present their ideas to a panel of advisors/investors (including ex-Dragon Richard Farleigh this year) who respond with some questions and suggestions. The rest of us watch and take the opportunity to chat to peers (i.e. others in the software business, not a collection of Lords), investors, development agency representatives and other hangers-on during the breaks and post-event drinks.

It was a good event and I made some useful contacts, including finding out about the NWDA's hi-growth business funding/assistance scheme and discovering that one-man offices are available on Liverpool Innovation Park for less than £150/month.

In lieu of a proper review, I'll just mention some of the more interesting companies who pitched during the event. Maybe they'll be some of the future stars I was looking for recently...

Momote

Momote have a cross-platform mobile phone development platform. I thought that's what J2ME was supposed to be, but looking at their website it seems more of an XML-based offering. That reminds me of the stuff I worked on back at Trigenix before they were bought by Qualcomm. I'd be interested to find out more about it, and see how their offering is different from the ones tried before.

New Concept Gaming

These guys are building some cool new devices to let you get more active with your games console. In a similar vein to the Wiimote for the Wii, but they have controllers for PS3 and XBox in addition to the Wii. They've got the jOG on sale already, which lets you jog on the spot to get your in-game character to move around, and have another product in development which also notices when you crouch down or jump.

Yuuguu

Yuuguu were the only company I'd heard of before, although I didn't really understand what they offer. I've got more of an idea now - they're trying to help people collaborate remotely by offering a product to let you IM, share your desktop and audio conference.

They want to make it easy to enable adhoc collaboration, without having to book phone conference sessions, etc. and now have integration with existing IM networks and the ability for users to collaborate with people who don't have the Yuuguu software installed by accessing the service through their web browser. I think they need to let people use it purely in the browser too, as that will help get over the initial "not sure I want to download and install yet another bit of software" reluctance.

Should I pitch at Software City 2009?

Tags:

Posted by Adrian at 01:33 PM | Comments (0) | TrackBack

links for 2008-11-13

Posted by delicious at 08:06 AM | Comments (0) | TrackBack

November 12, 2008

EPC - Easy Profit Con?

On the face of it, the Government's Energy Performance Certificates sound like a good idea: every home being sold, or rented, has to provide a rating similar to that of a fridge or a washing machine, giving its energy efficiency on a scale of A to G.

In practice though (in my experience at least) they seem more of an easy money-making scheme that looks like it's doing something to help, without actually helping much. Our flat had its EPC survey done recently, which seemed to consist of a bloke wandering round recording the sizes of the rooms and noting down features like double-glazing and whether or not the light bulbs are compact fluorescents.

We got the results today, and its rating is D (65). According to the landlord, the UK average is E (46), so it's doing well for a high-ceilinged Georgian terrace built around 1870. I'm surprised it's fared better than Geoff's place in Cambridge, which only ranked at E and is a fairly similar sort of building - just a few decades newer (at a guess).

Phil Clark's flat is a lot newer, being built in 2003, but as he blogged today, is still a way off the top rating; coming in with a C. I suppose that shows we've got a lot of scope to improve matters, which is handy given the targeted reductions in CO2 emissions.

It's a shame then, that the EPCs don't seem to be suggesting anything useful to improve energy efficiency. Our recommendations (filtered through the landlord - I haven't seen the actual report myself) are pretty similar to Phil's "install low energy lighting" - the landlord is looking into replacing the few light fittings that can't take low-energy lighting, and the only other recommendation would be to add a room-thermostat to the existing per-radiator thermostat controls. The government could've sent everyone a check-list of basic things to implement and saved everyone a fortune.

Geoff's certificate shows that even if he followed all their suggestions it still wouldn't get his house out of the E band! If that's true then we either need to start demolishing most of our houses, or give up on the whole fight against climate change.

Apparently our survey didn't make any recommendations about the lack of double-glazing because the huge sash windows are protected by the house being in a conservation area. Surely double-glazed sash windows could be installed? It could be that it's a convenient get-out clause for the landlord, which I can understand given the amount it would cost to replace all the windows in the twenty flats they own in the terrace; but that cuts to the heart of the problem: how to bring the existing building stock up to top efficiency without destroying the character of the properties or costing a fortune.

Tags:

Posted by Adrian at 01:10 PM | Comments (2) | TrackBack

November 04, 2008

2009 - Liverpool's Year of the Environment

Following on from a successful year as Capital of Culture, next year sees Liverpool focus on the environment. Up until recently though I didn't know much more than that. No-one seemed to have any idea of what the plans were, or who was involved in making it happen.

Information about it is starting to leak out. Last week I attended the first part of the Trade Waste Management & Computer Security event at the new BT Convention Centre where Councillor Berni Turner outlined what they're planning.

And before I'd had time to write-up my notes and publish them here, the details have been released on the Liverpool City Council website.

I think the most interesting ideas are the green ambassadors and the hosting of special events to encourage debate about environmental issues in each of Liverpool's five neighbourhoods.

Hopefully I'll be able to find out a bit more about getting involved before January. I wonder if anyone wants to help me build/fund a live energy usage display for the city...?

Tags:

Posted by Adrian at 04:14 PM | Comments (2) | TrackBack

November 02, 2008

Going Back to the Plans

Life seems to be a whirlwind of networking events at the minute, which is how I managed to have signed up for last Thursday's Life Is Too Short To Go Unnoticed without really knowing what it entailed. It's strange how the world sometimes throws you exactly what you need, and an opportunity to work on the business rather than in it was something I was looking forward to.

Quarter of an hour in and I was beginning to have reservations. It seemed to be shaping up to a formulaic "here's lots of snippets about successful companies, you should try to be more like them" - the kind of event where you sit there nodding and thinking "oh, how clever", but once you get back to your business you realise that you haven't discovered a new way of doing anything. I was even wondering how I could find a game card so I could play Buzzword Bingo.

However, that was just the presenters, John Leach and Simon Bailey from Winning Pitch, warming up. They started to win me over during the second presentation, when John pulled up a slide entitled "The UK Sales Mentality". Pictured below were Del Boy, Arthur Daley and Frank Butcher, and John set about explaining how he hates shows like The Apprentice and Natural Born Sellers with their ultra-competitive, win-at-all-costs sales mentality.

From there I enjoyed the rest of the day. They encouraged interaction with the attendees and had a few practical exercises which helped us to start applying their ideas to our own situation. At the start of the day they outlined their objective, which was for everyone to find the top three tasks to have completed (the first step of) before the end of Friday, and at the end we each took our turn to share some of them with the rest of the group.

Mine were:

  1. Write a basic business plan for MCQN Ltd.
  2. Finish the Mazzini prototype. This is well under-way, and I'd have worked on it anyway, but it's important to give me something to demonstrate.
  3. Apply for some funding. This isn't vital, but will mean I can spend more time working on Mazzini. There are a few possibilities I've come across lately and, even if I don't get the money, just going through the process will sharpen up my thinking and talking about what I'm doing.

The business plan is the big task from that. It's also the one I've been putting off for the longest. I'm quite annoyed with myself, and a little amazed, that I've avoided it for so long. I'm a strong advocate for having a plan, regardless of whether or not you manage to follow it to completion. I'd almost suggest creating a plan and then immediately throwing it away, as the process of working out your route forces you to think about what you want and how you might get there. Your subconscious is then primed so that it can spot opportunities when they present themselves. I doubt that you'll end up where you thought you'd be when you wrote the plan, but I bet that it's a better place than you'd have ended up if you hadn't made one.

I didn't manage to get my three tasks started by the end of Friday, but that's because I already had the day earmarked to finish my VAT return. So I've given myself an extension till the end of the weekend, and am well on my way to achieving that. I haven't been able to work on the Mazzini prototype because I'm not at home, but the first draft of the plan was done yesterday, and I'm pulling together a list of the funding opportunities today.

Tags:

Posted by Adrian at 11:31 AM | Comments (0) | TrackBack