An agricultural forecast display for the home garden

The currently generated forecast and bed state image:

The currently generated forecast image

This project is ongoing. 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.

The black and gray column on the right is mock (random) data. The number is the percent saturation of the bed, 100% is soil at field capacity.

The percentage read is applied to the opacity of a black rectangle. Darker is wetter. In the real version of this software sitting on the table the moisture level is read during screen refresh once an hour, and pushed into that stack from top down. There's about 50 hours of historical data displayed there.

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 acquainted 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 simply SSH in or mount the filesystem for updates. Be still my heart.

Sometimes the Kindle gets a new IP address so you can use this to scan for it.

sudo nmap -sP octets.redacted/24 | awk '/^Nmap/{ip=$NF}/F0:A2:25/{print ip}'

Your mileage may vary, who knows if Amazon's vendor ID is consistent across all Kindles forever.

Custom parts

This snap fit frame required a few revisions, as with all things.

The second version is stiffer and doesn't flip over backwards as much. My modeling ability is better than the design of this frame now but I haven't rebuilt it so it's terrible.

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

Here's a shot of a layout that needs work, due to overlapping readings and the blank sensor data.

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. Soil sensor state is checked.
  5. SVG data is filled.
  6. A new PNG for the screen is generated.
  7. The screen is refreshed with the new image.
  8. Another hardware alarm in the RTC is set.
  9. Deep sleep.

Sensing moisture level

The previous photo was before moisture status was hooked up. Capacitive moisture sensors can be attached to ESP8266 WiFi chips to provide a web server that will return analog sensor readings after onboard ADC.

This video shows attaching a Wemos D1 Mini microcontroller/WiFi chip to an analog capacitive soil moisture sensor.

While this one highlights problems with those capacitive sensors and how to fix. The short of it is to paint them.

So here they are dipped in layers of Plastidip. I coated about a dozen, fewest with 2 coats, most with 10 or 11. I put one with 10 coats into the bed. Adding so much plastic coating reduced the sensitivity of the probe by about an order of magnitude.

The plug connectors were also removed and the sensor leads soldered directly to the board contacts, then coated with everything else.

It has to be plugged into a USB battery bank, or delivered 5V somehow. It lives for about a day at a time while I work on it.