Street lights are amazing. When it’s light out, they turn off. At night, though, on they go! It’s like magic.

No, it’s science. In most cases, the mechanism to tell a street light to turn on or off is a photo-resistor of some sort. Here’s a good write-up of how they work, but the basic idea is that when sunlight hits the resistor, the street lamp turns off. No sun, nothing to hit the resistor/switch, and the light goes on. That’s painting with a broad brush — please don’t hammer me on the physics or on the fifth-grade-level appreciation of how circuits work, thanks! — but the idea is roughly correct. The lights are “on” unless something turns them off.

But what about street lights in a world before photo-resistors?

Welcome to Brightwater, New Zealand, a coincidentally-named (you’ll see!) town of about 1,800 people. According to Wikipedia, the town “was named by Alfred Saunders, the owner of a local flax mill situated on the banks of the Wairoa River, after a popular song at the time ‘Bright Water,’ which was about choosing non-alcoholic drinks over spirits,” but that comes with a “citation needed” flag on the encyclopedia. Regardless, the town of Brightwater wasn’t named after the hydroelectric plant which graced the town in 1910 or so, about sixty years after its founding.

That hydroelectric plant was a repurposed flour mill, well, at night at least. During the day, it was a mill like any other, in this case owned by a farmer named Robert Ellis. But, per the book “No. 8 Rewired” (a collection of inventions by New Zealanders), Ellis used the mill to produce electricity at night. To do so, Ellis hooked the mill up to a power grid of sorts which provided the electricity for five streetlights in town and one town over. All he had to do was trek down to the farm in the morning to disconnect the power, and the lights would turn off.

But that was a chore, one Ellis wanted to avoid. So he looked for another solution, and he found one: his chickens. Per No. 8 Rewind, Ellis “hooked up a plank to the switch and put the plank in the henhouse. When the [chickens] came home each night and jumped on the plank to roost, they also turned on the lights.” And the opposite happened when the chicken woke and left the henhouse; “when they went to go about their business, the plank clicked up and the power went off again.”

The need for poultry-powered street lights dissipated as technology improved. Ellis’s ingenuity should have made him the technological superstar for his small New Zealand town, but, alas, even that wasn’t meant to be. In 1908 — a few years before Ellis’ chicken turned the lights off — a Nobel physicist named Ernest Rutherford famously developed the basic, nucleus-centric model of the atom. Rutherford was born in Brightwater in 1871.

Bonus fact: How much would it cost to make a chicken sandwich from scratch? Depends on what “from scratch” means and how deep you want to go with it. In 2014, a guy decided to see what it would take if he started with almost nothing. He grew his own vegetables, ground his own wheat, collected salt from the ocean, harvested honey from bees, pressed his own self-grown sunflower seeds (for the oil), and slaughtered a chicken. The end result: Per the Today show, it was a pretty mediocre sandwich at the low, low price of about $1,500. On the plus side, he made series of YouTube videos about it, which you can watch starting here.

From the Archives: Chicken Bomb: Another unconventional use for chickens, although this one results in stuff blowing up.

Related: “No. 8 Rewired,” unreviewed in the United States.