An agricultural forecast display for the home garden

The currently generated forecast image:

The currently generated forecast image

Man this project took a while. I've long loved e-ink displays; I keep multiple libraries worth of books on a variety of e-ink devices. Given my penchant for bending little linux devices to my will, old Amazon Kindles seemed to be a perfect new target.

A lot of this was inspired by this remarkably similar web page. Mine will hopefully help keep my plants alive, which I consider a little more important than a list of chores and packages being delivered.

That empty column on the right side is for additional information that's not yet available. Imagine that, a work in progress.

Jailbreaking Kindles

Should you decide to come back round to this, there are a few specific resources you need to visit, probably in a particular order.

  1. Identify your device

    The "nickname" field is the important one, it's what will be referred to during further research

  2. Verify the firmware version. Settings -> Device Info
  3. Start reading up on your device.

I'm not going to link to any more specific pages than this. They'll likely break at some point and that's never fun. Digging into the guts of these devices is not for the faint of heart. They're very strangely built and just barely working. I have grand plans for a bunch of data display terminals related to all sorts of things and I used this as an exercise to get acquanited with them. For all my complaints they are a fantastic all-in-one package for developing on e-ink. The alternative is buying displays, building a microcontroller or single-board computer to drive them, figuring out packaging, and finally getting to your project. Kindles have beautiful little cases, a robust battery, and with the proper firmware versions, the ability to simple SSH in or mount the filesystem for updates. Be still my heart.

Buy a 3D Printer

I've wanted one for so long. This was such a poor excuse to buy one.

As long as I've wanted one I've been practicing my modeling skills. Can't justify a new tool if you don't have the skills to design for it. The KT4 I use for this is actually a press fit into this frame. It could be a little more stable but it sits quite nicely on a table.

Manufacture that puppy. Not pictured: days of calibration. The tape is holding down a corner that started to warp.

Curse 99.99% of weather APIs

They all limit your requests, hide data behind other products, or require you to sign up for an account.

Not open-meteo. They aggregate all sorts of models from NWPs (National Weather Providers) and basically every bit of weather data possible is available. They also have THE BEST request configurator I have ever seen in my life. You check the boxes you want, the data is displayed, and a URL for the request is generated. Patrick you are my hero.

It works great as long as Patrick doesn't mess anything up and predict floods of biblical proportions or temperatures that will melt skyscrapers.

He's a class act though and had it fixed basically instantly. I cannot sing the praises for this project enough.

String it all together with software

The Unified Application Launcher (KUAL) is provided by the Mobileread Jailbreaks, and launches this dashboard application. The template SVG and some other small changes to the start script were changed. A lot of layout has to be done once you're on the actual hardware. There's always a strange difference in widths and margins in situations like this. Takes a few revisions to get everything laid out perfectly.

An update works thusly:

  1. RTC alarm brings the device out of deep sleep.
  2. Control script hangs out for a while to allow the network stack to wake up and refresh.
  3. The image refresh script figures out what time it is, whether that means it's day or night, and calls for the weather update.
  4. The API request comes back and formatted into the various SVG fields.
  5. A new PNG for the screen is generated.
  6. The screen is refreshed with the new image.
  7. Another hardware alarm in the RTC is set.
  8. Deep sleep.

That's it

I should change the template to not overlay the precipitation chance/sum when the chance is 100%, but that didn't come up until the forecast came round to include that.

If I ever figure out how to multiplex enough analog moisture sensors together the right hand side will display the current saturation of the beds. That way, together with the precipitation data, it'll be easier to plan the watering schedule. You can see a bit of the warping in the lower left-hand corner.