I arrived in Cape Town, South Africa, around Christmastime, when the winds really start to pick up. The first time I turned on the radio, I heard about a township fire nearby that left thousands of people homeless in one night. I was shocked by the magnitude of the loss.

But then every day it seemed like there was another shack fire.

Priscilla Gala of Masiphumele Township lost her home and everything she owned in a fire.

It happened three times.

Gala says the first time her house burned down was 10 years ago.

“My sister-in-law burned in her room. She died,” Gala says matter-of-factly. Three years later, her house burned down again.

“Then again this December,” Gala says, shrugging her shoulders. “As we say in these shacks, you always have the feeling your house can burn down. You always have the fear.”

Woman stand among the remains of shacks after a fire spread through a township near Hout Bay on the outskirts of Cape Town, South Africa, December 2015. Credit: Schalk van Zuydam/AP Photo

Millions of South Africans live with the constant threat of fire and loss, in shacks built of zinc, wood, plastic and cardboard. The shacks are arranged one right up against the other so fire spreads easily, especially with the winds and widespread use of candles and paraffin stoves. Many of the fires start during cooking.

One day in late 2012, an electrical engineering professor named Samuel Ginsberg had enough. He asked his students at the University of Cape Town to come up with a low cost alarm system for shack dwellers.

François Patousis took up the challenge.

Patousis says that smoke alarms, which most Americans have in their homes, are too sensitive for shacks.

“Ceilings are too low,” he says, “and shack dwellers use open flames for cooking, heating and lighting.”

So Patousis developed a small device that would sense a rapid rise in heat, not smoke — which is a good indicator of a fire.

The alarm would have remained a school project, if not for a terrible fire in 2013 in Cape Town’s largest slum that left 6,000 people homeless on New Year’s Day.

Patousis says his school friend, Emily Vining, came to him sobbing when she heard about the fire and urged him to do something.

“[She told me] ‘You’ve started something. Let’s take this forward and make it something real.’”

The two of them formed a company, which they later named Lumkani (“beware” in Xhosa).

Patousis says once they started testing the alarm, they realized the prototype only went so far.

“The alarm was fine at alerting the person inside of their home,” he says. “But it actually needs to alert more than just the person living there,” because fire spreads so quickly.

So he installed a chip inside the device that receives and transmits a radio signal. And it’s wirelessly networked to all the other Lumkani boxes in the area.

When a Lumkani alarm detects a fire, it beeps for 20 seconds, and then triggers all the alarms within a 200-foot radius. A central device is also triggered that sends text messages to residents and GPS coordinates to the fire department.

“Basically that means you can create a community wide alert,” Patousis says. “Every single home that has a fire detector can know there’s a fire within my neighborhood.”

Today, Lumkani has 7,000 blue alarms in the field — in Cape Town, Pretoria and Johannesburg. Patousis and his partners say they’ve already helped stop what could have been nine major fires.

Right now, Lumkani is funded by charitable donations, with consumers paying a small, affordable fee — about $1.30 per box. But the company is looking for a more sustainable business model, and hopes to expand beyond South Africa's big cities throughout the nation and sub-Saharan Africa.

Patricia Gala in Masiphumelele has a Lumkani alarm in the shack she recently rebuilt. She’s cautiously optimistic that when the next fire comes, she’ll be prepared.

“If the alarm goes off, maybe we can save things and we can save other houses also. We’re waiting to see.”