WHEN she woke up to her neighbors' shouts outside, Lundy's three-year-old toddler was already choking with the smoke that had seeped into their shack in Imizamo Yethu settlement on the outskirts of Cape Town, South Africa. "I just took my baby and ran away," said Lundy, who declined to give her full name, recalling the 2017 fire — one of the worst to hit the seaside city, dubbed South Africa's "fire capital" — which left her and about 15,000 others homeless. After taking her child to hospital to treat him for smoke inhalation, Lundy went home to find everything had burned down. Devastating fires occur with alarming frequency in South Africa's tightly-packed slums where shacks are built next to unpaved paths too narrow enough for a car, never mind a fire engine, to pass through. More than 5,000 fires break out in South Africa's informal settlements each year, according to official data, often caused by people using open flames for cooking, lighting and heat, or by faulty electrical appliances. Lumkani, a team of South African entrepreneurs, has developed two innovations to save both lives and homes: an alarm to alert residents to danger and insurance to help those who lose their property to get back on their feet. The value of losses to fires in informal settlements is increasing every year, reaching almost 180 million rand ($13 million) in 2017, according to the Fire Protection Association of Southern Africa."The real solution to shack fires is end of shacks," said Francois Petousis, one of four-year-old Lumkani's co-founders. "But ultimately you need these interim solutions," he added, as fires trap people in "extreme cycles of poverty". He described how a colleague was fired from his previous job in a fast-food restaurant for being absent for five days after his home burned down. It took him 18 months to get another job. "That cycle (of poverty) needs to be broken ... Life is unbearable enough in informal settlements as it is," he said. Unlike ordinary fire detectors, Lumkani's alarm — a small blue box attached to the ceiling which uses one battery in about 10 years — rings not only in the burning shack, but also in neighboring homes within a 60-metre radius. It detects a rapid rise in temperature instead of smoke or particles in the air, and also alerts the local fire department, while neighbors receive an automatic SMS warning them of the fire's location."Even if you're at work, you can know there's a fire in your community," said Petousis, which gives users the chance to run home or alert friends to come and help. Communities are often key to fire prevention, he said, describing how neighbors destroyed their own homes in Imizamo Yethu in another 2017 fire to create a fire break, which meant only 10 out of 220 shacks burned down. "The communities are the first responders and they work really well," he said, while acknowledging that having to demolish your own home to stop others losing theirs remains "a pretty terrifying reality". About 24,000 South Africans have installed the alarm since its launch four years ago, mostly in densely-populated settlements in Johannesburg and Cape Town where fires often spread quickly and gut entire neighborhoods. Several thousand homes in Bangladesh's capital, Dhaka, also have the alarms, through a partnership with a local charity. Lumkani hires agents from the communities who install free alarms in homes, which are either paid for by charities or given to them for free after buying Lumkani's insurance. The insurance scheme, costing about $4 a month, targets informal settlement residents and has been bought by about 1,000 people so far. David, a local hairdresser with a steady stream of clients, decided to pay 60 rand a month for the insurance after he lost his whole salon and equipment in the massive 2017 fire. "I don't want to lose everything again," he said, explaining that he was only able to recover with help from friends and family. But 60 rand a month is too much for many people in Imizamo Yethu — like Paula, who lives in a cramped two-room shack with a gas stove perched on her living room floor and makes ends meet by selling roasted chicken feet to locals."I can't find a better job, there's no work here," she said. "So everything I earn I spend on food and other essentials." But alternatives to deter fires also cost money - from decorating homes in intumescent paint, which swells up when heated protecting the material underneath, to safer stoves. For Richard Pithouse of the University of the Witwatersrand, who has written extensively on urban poverty, such innovations fail to address the root causes of the problem — lack of investment in decent housing. "The primary issue is that people are living in shacks ... When people are using gas to cook or candles for light in a tiny cramped space, made of highly flammable material, fires are obviously going to happen," he said. "The single biggest thing you can do to make a real intervention quickly is to electrify these places. Electricity is vastly safer and that's a question of political will — and that political will has largely been absent." After the devastation of 2017 and near loss of her son, Lundy works 12 to 14 hours a day at a cafe selling deep fried doughnuts and other snacks, earning around 1,200 rand a month. She is thinking about buying the insurance. "I'm worried about another fire. But what can I do?" she said, pointing to nearby shacks which were still scorched black with soot. "I don't have another place to stay."