Labna for mezze

I wanted to make labna, the soft cheese popular in the Middle East. Basically, it’s strained yoghourt. It would clearly be expensive to make it from good shop yoghourt, like Fage, at about £5 for a 900g tub, our favourite from Greece, so I decided to start making my own. Cue intensive internet “research”…

It turns out that Lakeland are selling the Easiyo yoghourt maker for half price, which I took to be an auspicious omen. The internet says the charity shops of the country are full of the things, because people get fed up with buying the ready-made powder the makers want you to keep buying, but I got myself a clean new one, for about £10.

The internet kindly pointed out that I wouldn’t need to go to all the bother of heating the milk to a certain temperature, and then cooling it before adding a live starter. Instead, I’m using UHT milk, which somebody else has heated, cooled, and put in a handy box.

So, I put UHT milk and a couple of spoonfuls of Yeo Valley organic natural live yoghourt in the inner jar, filled the youghourt maker with boiling water, put it all together, and left it overnight.

Putting the yoghourt I made into cheesecloth

The result was a good, set, yoghourt. Not very solid, but tasty. The next step was to put it in cheesecloth, and strain it. There’s three layers of cheesecloth in the picture, as I thought even quite thick yoghourt might run through it, but one turns out to be enough.

Labna, with the whey that came out of it.

Now, the Mezze book says one of the things I can do with labna is make little balls, and keep them in olive oil, in the fridge, ready for use. I had a go, but only made a few, before deciding that the process was too messy, and wasteful. The rest has gone back into the fridge to dry out some more.

Raspberry Pi 7 Segment display

Introduction

One of my #RaspberryPi Zeros is called PiClock, and has an 8 digit seven segment LED display. The program it runs displays the time, and sends it to two other Pis, that display it on Unicorn HD HATs. Between midnight and 8 am, it flashes the message “SLEEP” every five minutes, as well. The software library that it uses can display numbers, and most upper and lower case letters, but not all of them. I rather liked the idea of animating sequences of single segments on it, because, well you know, blinkenlights. I had a look at the software library, “7seg.py”, to see if I could get it to do that.

It turns out that the library uses a Python dictionary to look up the byte to send to the display for each of the characters it can display. Decoding the hexadecimal bytes took a few minutes, working from the code for the digits from 1 to 5.

The first bit is always a 0. The remaining seven are the seven segments, in the order abcdefg, which are laid out like this…

So, the codes for illuminating single segments are as follows…

Now to amend the library! I needed some typeable characters to put in the dictionary, ready to be used in strings in the python code. For no obvious reason, I chose a selection of brackets and the tilde character, and amended the library file. The selection of brackets didn’t work!

After trying characters until they did work, I ended up with #][£<$~ as the symbols for the segments abcdefg.

I’m only showing the amended part of the file, where the pattern to send to the display is looked up. The arrangement of the brackets and tilde for the segments is as follows…

Now I’m ready to program PiClock to do silly animations, which will be fun, and a lot easier than using the WordPress editor. Note to self: See if you can find a WYSIWYG editor for WordPress.

A marker

All the old stuff is here, and the remaining stuff on Blogger and Blogspot has been abandoned, and will not update.

It must be obvious by now that I have no idea what I’m doing with WordPress.

Rick Stein’s cookery books

Now that I think about it, these are so very much more than just recipe books. They’re works of art in themselves, with terrific photography. Not just the photographs of the food itself, but the pictures of the places Rick has visited. Mind you, some folks will feel cheated when they find just how many pages are sumptious photographs, rather than recipes, perhaps.

The fish and shellfish book, as you would expect from somebody with world-famous fish restaurants, has an excellent section on the methods used to make the various dishes. Want to know how to dismantle a crab? It’s there, with clear pictures. All of his books have thoughtful descriptions of the destinations, their cultures, and anecdotes about the people Rick met, who cooked dishes from him.

Secret France, Road to Mexico, Fish and Seafood, India… I use them all.

But, I say, Rick! Using the same picture in two books? I thought I was suffering from déjà vu… Both the Fish book and India have a picture of Amritsar fish. One is zoomed in a little, but…

The same photograph in two of Rick Stein’s books.

Python and SQL with matplotlib.

# Quick hack to graph last 500 greenhouse temperatures from weather database.
import mariadb
import matplotlib.pyplot as plt
conn = mariadb.connect(user="pi",password="password",host="localhost",database="weather")
cur = conn.cursor()
tempIN     = []
tempOUT    = []
timestamps = []
# Get the most recent 500 records.
cur.execute("SELECT greenhouse_temperature, ambient_temperature, created FROM WEATHER_MEASUREMENT 
             ORDER BY created DESC LIMIT 500")
for i in cur:
    tempIN.append(i[0])
    tempOUT.append(i[1])
    timestamps.append(i[2])  
conn.close()
plt.figure(figsize=(14, 6))
plt.title(label="Greenhouse and outside temperature up to "+str(timestamps[0]))
plt.xlabel("Date and time")
plt.ylabel("Temperature in Celsius")
plt.plot(timestamps, tempIN, label='Greenhouse temperature')
plt.plot(timestamps, tempOUT, label='Outside temperature')
plt.axhline(y=5.0, color='r', linestyle='-.')
plt.legend()
plt.savefig("/var/www/html/GHtemp.jpg")
plt.show()

Adventures with Bread, part 94

 Rye bread, again…

You know how it is. There’s a recipe on the flour bag, and you think you’ll try it out. Well, you know, rye bread is tasty…
 
Rye bread recipe from the back of a rye flour bag.
Cotswold Flour’s Rye Bread recipe.

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Last night, I made the poolish, and it was lovely and frothy by morning. I got the mighty Kenwood Chef out, with its dough hook, and followed the recipe carefully, all the way up to the bit telling me to prove it for 1.5 to 2 hours. After an hour, I found this situation…
 
Almost invisible bread tin, with dough rising madly, and flopping over the sides of the tin.
Underneath this over-excited dough, you can just about see the bread tin.
That’s a pretty standard sized loaf tin, but it makes a change for a rye dough to rise so well. I scooped as much of it up as I could, and put it all in a bigger tin, which I put in the oven before I remembered to take a picture.
 
The same amount of dough, in a bigger, shallower tin, in the oven.
Baking begins…

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Then it was time to take the spaniels for their first walk of the day. Luckily, I didn’t meet anyone, and was back in time to remove the tin from the oven, and see what I had created.
 
Big, flat loaf, baked.
The result of 40 minutes in the oven, at 220°C
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
The obligatory crumb shot.
This is called the “crumb shot”. Pretty good crumb, if you ask me.

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
And there’s the result. I buttered the slice, and ate it, in the interests of science. It has a good flavour, and I’m looking forward to the rest of it, over the next couple of days. I can’t help thinking I should have had some pastrami ready to go on it…
 
 
 

Python on Raspberry Pi, a note about structure, or something.

I’ve been struggling with a problem with a Pi camera for a couple of days. Instead of being able to start up the camera, I just had error messages about MMAL running out of resources.

Now, I knew I’d seen it before, and sure enough, Stack Overflow had quite a lot of questions about it. But I’d seen them before. And then I remembered that I never found out why the problem went away before.

As an experiment, I tried something that I thought couldn’t possibly work, and suddenly everything worked. All it took was moving the camera instantiation from the top of the program to just below all the function declarations.

At a guess, the camera startup can’t get the resources it needs, because the Python interpreter is chewing its way though all the function declarations, and using up something the camera software wanted.

It’s an age or so, since I wrote a language interpreter, and it was for a simple language, Pilot, but I know interpreters have reasons for liking programs in a particular order, so that’s my guess…

#MMALresources

Curse you, munmap_chunk()!

I still haven’t spotted a working solution to the problem where weather station programs in Python on Raspberry Pi fail, with no traceback details, after a couple of days.

I think it must be some resource in either the operating system, or the Python interpreter, running out, with very poor error reporting. I will leave it to people more familiar with the OS and interpreter to find out what it is, and fix it, in the fairly certain knowledge that everyone who could fix it has better things to do.

I found out that a Python program can actually restart itself, and changed mine to restart once a day. If that doesn’t fix it, I’ll let you know… (Update: it works.)

#RaspberryPi #Python 

Also: I used to have a comment on Stack Overflow, about this, but I removed it. The link below now just points to somebody else having the same problem.

My Stack Overflow comment on this.

Greenhouse computer improvement

New sensor!

I was using an MHT22, hanging on wires outside the case, for temperature readings on my greenhouse computer. I wasn’t happy with it, as it isn’t really compatible with the connections on the Raspberry Pi, and it has a habit of giving occasional absurd readings for no obvious reason.









So, I got myself a Microdia TEMPer-2, from PiHut, which plugs into a USB port. It has a fancy button on it, which activates the sending of text messages or emails, which I shall never be using. It also has an external plug in sensor, which is waterproof, a handy thing in a greenhouse!

It comes with a software mini-disc, which may possibly be useful if you’re using it on a PC, whatever they are. (Kidding. I’m writing this on my PC.) There are several web sites that tell you how to program Python to read from it, and it didn’t take me long to install the appropriate library on the greenhouse computer, and run the test command, sudo temper-poll. That worked, but then I ran into one of those programming blockages that can send you crazy. None of the various pieces of example code would work, mostly due to my inability to get the necessary permissions set correctly. It didn’t matter, I realised, after a lot of head scratching. Instead, I just used Python’s subprocess library to run the command that worked…
import subprocess

rv = str(subprocess.check_output(“sudo temper-poll”, shell=True))
# Split the string, keep fourth block, chop last five characters, make float.
temperature = float(rv.split()[4][:-5])

I’m hoping I won’t need to write any more software for the greenhouse for a while. The Raspberry Pi now monitors the temperature, switching the fan heater on if the temperature is below 5°C, uses its fish-eye camera to take pictures at set times for a time-lapse series, and takes a picture if it spots movement. Eventual improvements under consideration are a soil moisture detection sensor, automated watering… Nothing’s ever really finished, is it?



Proper Bechamel Sauce.

We keep an index book of recipes that we like, and rely on. It has several entries for Bechamel sauce, but only one of them can be the best.

There’s one in “The DIY Cook”, by Tim Hayward, and he’s really, really good, and so is his sauce…

There’s another, in Rick Stein’s “Secret France”, and do you know what? He’s really good as well, and the photography in his recent books is at pure genius level…

There are several other recipes…

But my favourite recipe for Bechamel Sauce is in an oldie but goodie, “Mediterranean Cooking” by Hilaire Walden. Fans, you are in luck. It’s still available, on Amazon, and it’s really cheap. This is so good that I haven’t bothered to see if Nigella does a good one. I bet she does, though…

So…

  • A pint of milk
  • 1⁄4 of an onion
  • A chopped up carrot
  • A fair bit of parsley
  • At least one bay leaf
  • 50g of unsalted butter
  • 25g of plain flour
  • 2 large eggs, beaten
  • Salt and pepper, if you like
Bung the milk in a pan, with the onion, carrot, parsley, and bay, bring it gently to a boil, cover it, and turn off the heat. Beat the eggs in a jug, or some container you prefer.

Let those sit for 15 minutes, while you do this in another pan. Melt the butter, stir in the flour, and let it cook for about a minute. A lot of cookery books tell you to cook it until it smells “biscuity”. I’ve never detected that smell from butter and flour, but if you can, that’s your guideline. I can’t smell saffron, let alone biscuity, so I ignore that instruction, and stir it until it is smooth.

Next, strain the milk into it, and throw the stuff in the strainer away, unless you can think of some arcane use for it.

Simmer the mixture for about five minutes, then take it off the heat, stir it like fury, while pouring in the beaten eggs as slowly as you can, tip it on top of your already partly cooked moussaka, or whatever other dish you are improving, and finish cooking it…