Tag Archives: hacking

Hacking Windmills

Staggs sat in the front seat and opened a MacBook Pro while the researchers looked up at the towering machine. Like the dozens of other turbines in the field, its white blades—each longer than a wing of a Boeing 747—turned hypnotically. Staggs typed into his laptop’s command line and soon saw a list of IP addresses representing every networked turbine in the field. A few minutes later he typed another command, and the hackers watched as the single turbine above them emitted a muted screech like the brakes of an aging 18-wheel truck, slowed, and came to a stop.

Source: Researchers Found They Could Hack Entire Wind Farms | WIRED

In a networked world, you need cyber security everywhere. Especially when physical access is so easy to get. The BeyondCorp model of not trusting the network is a really good starting place for systems like this.

Weekend hacking… much progress

This was one of the most productive weekends of hacking that I’ve had in a long time. I finally managed to get all my fixes for the drupal epublish module upstream. And, as a bonus, I wrote a first pass at exporting the data via views because I needed that in order to make the Featured Veggie block on the PFP website work. I’m actually hoping this is going to turn into an epublish 1.6 release before the end of the month.

On the PFP site I completed the last few things I committed to as part of the winter feature additions. This now means that instead of featured programs on the front page, we’ve got features, promoting columns from our upcoming (or just released) newsletter. I also managed to pull of a bit of a back flip and via the afore mentioned epublish views, figure out what veggie was most recently highlighted in a newsletter. Thus creating the featured veggie box.

The mid-hudson astro site saw a bit of work as well. My lending module is now pretty robust, and ready for review to become an official drupal module. Hopefully it will get some testing over the next month and we can have start transitioning to it come April.

And lastly, I managed to connect up with some of the NY State Senate developers working open government initiatives. Hopefully we can get one of them to come down and give a lecture at MHVLUG, as I think a local talk on open government would be really spectacular.

Kindle Interupted

I broke down and bought myself a Kindle this past week. I will say that I am definitely in like with the device, but not really in love with it yet. The major reason for that is because in the kindle I can see so much more potential, which Amazon clearly has no interest in. Sadly, their main competitor, the Nook, has fully abandoned e-ink for the glossy shiney promiss of interactive CD-ROM… oh, sorry, wrong decade. I think they are now calling it interactive magazines.

E-ink is beautiful. Just beautiful. It is a pleasure to read, creates no eye strain, it’s paper, but better.

The missing potential is around how completely locked down development is, and looks like forever will be, on the Kindle. I recently tried to get access to the KDK to play around with astronomy code on the Kindle. E-ink represents a unique value in astronomy, because it is a dynamic screen that generates no light. I’ve got 15 lbs of books that I take to every star part (and another 15lbs I leave at home) to look up targets, facts and figures, when in the field. Replacing that with a Kindle would be amazing. Having Where Is Io run on the kindle would just kick some serious butt.

But that’s not in the cards. While this time I actually did get a response from the KDK folks, the tone was clear. They don’t want a homebrew market on the kindle, they only are going to let folks in with a product plan in place. Kindle active content is going to be extremely limited because of this, which I think is Amazon’s intent. Given that they are the ones paying for the wispernet cellular connection in every device, they’ve got some incentive to keep very tight control on what people can do. I get that, but as an open source developer, I still don’t like it.

It does sadden me, because I can see so much more potential for this device. Maybe Amazon will have a change of heart in the future. For now I’ll just have to live with this being a really great reader, and possibly play with some custom authoring myself.

Weekend Drupaling

I had a quite productive weekend working on the Poughkeepsie Farm Project site, and learned a lot of useful things about Drupal in the process.

Content Profiles

I now understand why core profiles are going away in Drupal 7, because they really do suck. All the flexibility and features that you get used to with custom content types and views go away when you are working on profiles. This became an issue as we were trying to create a Board of Directors page that was built dynamically from user accounts, and actually wanted to expose a draggable view to let people order lists of users manual (alphabetic sort wasn’t quite what we were looking for). I managed to convert over to content profiles, and life got a lot better. The results are here.

Epublish

This weekend we pushed out the first newsletter in the new format using the epublish module. I’ve been working with Susan (executive director) and Jane (newsletter editor) for the last month to get this right. There is a lot of initial investment here on all sides as I had to make a few code changes to get this to work well for us, and a lot of theming. It’s especially tricky as we’re trying to make an HTML email look basically just like the page people see, even though they go through entirely different templates and theme paths, and html support in email clients is far less intelligent than in browsers.

I also managed to collect and submit my patches upstream, so I feel like a good little open source citizen there.

Recipes

Recipes submission and indexing are now live on the site, using the really well put together recipe module. I had to build a slightly clever hack to list relevant recipes from the produce pages. I’m still trying to figure out the best way to get epublish and recipes to play nicely together, because right now they don’t. They both do slightly funny hacking with the body field and what’s in it, which is going to require patching one or both to get the display we want.

Events

The events infrastructure on the site is now using a local calendar instead of just loading from Google Calendar. This lets us have a google calendar compatible feed. As well as having our event links go to content in our site instead of loosing the user on a Google Calendar page. There are still a few kinks to work out here, but overall this is going pretty well.

All of these have been in the works for the bulk of January, and it’s great to get this stuff coming to fruition. Looking forward to how these are received by the membership. Now I’ve just got to make a few front page changes and we’ve got to pull together the volunteer opportunity database, and the main backend work for the 2011 season will be accomplished.

Where is Io progress

I’ve made some more progress on what will be my first Android market application – “Where is Io”.  I’ve learned a lot about sqlite performance on the phone, which isn’t bad as long as you limit the number of database opens you do.  I’m also trying to make the interface more self explanatory to even those with less astronomy knowledge.  Here are the current screen shots:

I’m not going to explain anything else on the interface, but I would love questions / comments in the blog if this seems confusing.  My “must do” task list probably puts this at about 2 weeks away from publish into the market.  Fortunately, Jupiter is only just coming out of the Sun now (with a missing belt!) so as long as I get this out in the next month or so it will be useful to folks.

Relearned Linear Algebra

After nearly a month of tinkering with code, nearly giving up twice, and realizing that I was going to actually need to relearn my linear algebra to get a real solution, I managed to create this graph.  It is the position of the moons of Jupiter relative to the planet as seen from earth.

Thanks to Thor for helping me get to the realization that straight up geometry wasn’t going to be good enough, and help boot strap my relearning of vector math.  Once I started using real linear algebra I didn’t even have to cheat on generating the sign.  Next step… JNI.

Monitoring and Controlling your Proliphix thermostat with Ruby

It’s been 2 years since I got my Proliphix thermostat, and while I did some early hacking on it, largely the whole effort just sat around for the last 2 years.  However, with the fun of connecting up my weather sensors, I went back in this weekend and beat the code into a much more sane interface.

Thermostat.rb 1.1.1 was released yesterday.  It provides a concise interface to the Proliphix web services API.  An example of the usage is something like:

  thermostat = Thermostat.new("hostname", "admin", "password")

  # get the current temperature
  current_temp = thermostat.temp

  # get the current setback heat value
  current_target_temp = thermostat.heat_to

  # set the thermostat to 69F (units are set in the thermostat)
  thermostat.heat_to = 69

I’ve got support under the covers for everything in the Proliphix API. I’ve only mapped about 1/2 of it to the user visible interface, starting with all the functions I’ve tended to need or use.  I was a good little agile developer and built unit tests for everything here.  Using the new module, I added the thermostat to my homegraph code, with some pretty reasonable results:

All this is released under the MIT license.

Building ruby projects with newgem

Over the weekend I was working on revamping a whole set of older ruby projects, some having to do with my Proliphix Thermostat.  I had this crufty Rakefile from the icalendar project that I’d been copying and modifying for new projects, and it was slowly degrading.  I thought that there had to be a better way.  There is, it’s called newgem.

Newgem is like h2xs in the Perl world, something to stub out a new module with all the right files and structures.  But, as the Ruby folks tend to do, it ups the ante in the process.  In addition to the basic build, packaging, testing, and coverage results you’d expect, you also get a targets for: creating you rubyforge website, publishing your gems to rubyforge and gemcutter, posting release announcements on rubyforge, and even posting blog posts about your release (though I haven’t configured that one yet).

The release cycle is now:

rake release
rake website
rake post_news

The Rakefile created is loading these features from base modules, so it’s only ~ 30 lines, a heck of a lot easier to maintain than the 300 line Rakefiles I had which provided about 1/2 these features inline.

If you are doing Ruby development, you should really check out newgem.

The new Poughkeepsie Farm Project site is live!

About 14 months ago I raised my hand to help with a more interactive web presence for the Poughkeepsie Farm Project.  This kicked off a large discussion over the course of the year, a web committee, and a great pro bono new graphic design.  Many many people were involved to get this project to completion, I just consider myself a catalyst.

Today, after a year of work, we launched the new farmproject.org:

Go check it out.  Now that we’re on a drupal platform, we’ll be rolling in smaller features over time.  I’ve got a few ideas queued up that I’ll try to get out there for the first member pickup at the end of May.