It was 7am when James Fox was dragged from his slumbers by an incessant ringing on the doorbell of his flat in Taipei where he was undergoing a 14-day coronavirus quarantine. Groggy with sleep, the US university researcher opened the door to find a policeman who began to berate him in rapid-fire Chinese.
"I had no idea why because I couldn't understand what he was saying," he said. His mistake was to switch his mobile phone to airplane mode to get a good night's sleep, thus dropping off Taiwan's surveillance grid for those under quarantine after arriving from overseas.
That was despite receiving two calls a day from a government-assigned social worker to check that he had not developed Covid-19 symptoms after a recent trip to Iceland.
His experience, which he shared on a Facebook group, offers a glimpse of the extent to which some governments are prepared to go to suppress the spread of Covid-19. It raises profound questions for Western democracies about how the state, big data and society should intersect as the pandemic takes hold.
Draconian measures have always been demanded at times of plague - the word quarantine comes from quarantino - 40 days - imposed on Milan and Venice when the Black Death struck in 1348. In today's data-driven society, such regimes can be far more precisely targeted.
Since January, different cultures and political systems have accepted varying levels of surveillance and intrusion into their citizens' private lives in the name of public health.
In China, where the outbreak began, an authoritarian data-state was already burgeoning under the leadership of Xi Jinping, with facial recognition software and vertically integrated online platforms already tracking everyday life. It was less of a leap for the Chinese to accept a world where phone apps track their movements via SIM cards, alerting users to nearby cases and whether they have been in close contact with infected patients.
One local health programme being tested in Hangzhou links to multiple platforms, including Alipay, one of China's top digital wallets, to generate a green, yellow or red code after personal information is input.
Green means a clean bill of health, allowing the greatest freedom of movement; yellow means a seven-day quarantine; red requires holders to report to the authorities for a two-week quarantine. Such measures might seem unthinkable in the west, but have already raised concerns that coronavirus could be a back door to a digital dystopia of the kind conjured in an essay by Yuval Noah Harari, the historian and philosopher.
The author of Sapiens and Homo Deus warns how malign governments might abuse the data from biometric bracelets, using the physiological responses to track not just what citizens click on or watch, but their emotional responses.
He writes: "A big battle has been raging over our privacy. The coronavirus crisis could be the battle's tipping point, for when people are given a choice of privacy or health, they will usually choose health."
This is true even for westerners like Mr Fox, who despite his rude awakening last week says he is grateful the Taiwanese government is enforcing quarantine so strictly.
"Taiwan's response has been one of the best in the world," he said. "It is a democratic society that has responded very differently from China and has been completely open with its citizens."
This points to a key factor in assessing digital health measures: trust and full "buy-in" from the public. What looks draconian and even dystopian in the hands of the Chinese government might seem benign and beneficial when introduced by a government that faces strong checks and balances.
The enforced wearing of biometric bracelets for all quarantined patients is a bigger civil liberties issue in Hong Kong - where the protection of basic freedoms provoked months of violent protest last year - than it was in Hubei.
Several world leaders with an authoritarian bent - Vladimir Putin, Viktor Orban and Narendra Modi - have been accused of political opportunism, using Covid-19 as a Trojan horse for legislation many fear will never be repealed and will tighten their grip on power.
Mr Orban's open-ended proposals in Hungary - that would see jail terms of five years for spreading false information - have deepened fears in the EU's most illiberal democracy. The human rights commissioner for the Council of Europe warns it could enable Mr Orban to "rule by decree".
In India, Mr Modi's opponents accuse him of using his new powers to quell opposition to Hindu-nationalist citizenship laws, whose anti-Muslim bias led to bloody ethnic riots last month. With a curfew imposed, graffiti in New Delhi attacking the law has been quietly expunged.
And in Russia, an announcement by its prime minister that the authorities wanted to use geolocation data to track those who have come into contact with anyone with coronavirus, and then check that self-isolation was being observed, raised instant objection from Russia's battered civil society.
"The scariest thing is that people may be sympathetic right now but when the epidemic is over, the abusive practices could be here to stay," said Sarkis Darbinyan, co-founder of the Roskomsvoboda website, which deals with internet freedoms.
Yet such a system is happily accepted in South Korea, where an emergency alert system transmits details of fresh Covid-19 cases to all mobile phones, warning people they may need to be tested. Names are not disclosed but details include age, and where a person lives or works.
Ben Griffin, an English teacher living in Gyeongju city, said he had not heard any protests - "people are just happy to know what's happening."
In Singapore, a voluntary contact-tracing smartphone app, Trace Together, has been launched, allowing the authorities to use Bluetooth to pinpoint within two metres anyone who has been exposed to the virus.
Nearly a fifth of Singapore's 5.2 million population have so far downloaded the app, which the government hopes will complement its 6,000-strong team of human track and trace detectives.
Acceptance of such intrusion is not simply Confucian-style respect for authority in Asian societies - both Taiwan and South Korea have emerged in living memory from dictatorship and have no appetite to return - but rather an ingrained sense of collective responsibility.
In Japan, where social pressure to conform is traditionally strong, the government has relied on it to ensure the public observes social distancing.
Perhaps more importantly, after SARS in 2003 and MERS in Korea in 2015, East Asian societies are simply prepared to do what it takes to keep the disease under.
What that means for western democracies remains unclear, but as death tolls in EU countries rapidly exceed those of China, a country 10 times more populous than Italy and Spain combined, the public are willing to accept controls many observers did not anticipate even a month ago.
According to a poll for Le Figaro, temporarily relinquishing fundamental freedoms was accepted by 90 per cent of the population of G7 nations - Britain included - with half the French canvassed feeling that they didn't go far enough.
The controls come with softer edges in Europe and Canada, with mass mobile phone data being used in an anonymised form to help governments identify where large gatherings are occurring or where infection hotspots are materialising, rather than tracking individuals.
In France, around 40,000 spot fines have been issued. However, the president is understood to have reservations about digital tracking, preferring to ask citizens to fill forms "on their honour" when leaving home.
"That's what differentiates democracies from authoritarian regimes," an aide for Emmanuel Macron told Le Parisien, conscious that too much enthusiasm for such measures may be used by the far-right when presidential elections come around in 2022.
In Germany, where there is a deep distrust of any form of surveillance in the country that endured both the Gestapo and the Stasi, plans to use mobile phone data to prevent the virus spreading are strongly opposed.
"For someone like me, for whom freedom of movement was a hard-won right, restrictions can only be justified if absolutely necessary," Angela Merkel, who grew up in the communist east, said in her television address last week.
She is sensitive to emotive claims that smartphones could become "an electronic ankle bracelet - the enemy in our apartment".
There are signs that public attitudes might change, however, as death tolls mount and the cost of economic shutdown starts to bite.
In Italy, so far the hardest-hit EU country, there has been scant public outcry as the government imposes ever-stricter curbs, perhaps because they are being imposed by a government consisting of the centre-left Democratic Party and the Five Star Movement.
Had they been imposed by Matteo Salvini's hard-right League party, there might have been a very different response - something Mr Salvini himself has recognised. "A government of the centre-right would have been lynched for the measures that have been taken," he has said.
Where individual countries land between public health and personal privacy may ultimately depend on how deeply the coronavirus affects them and how quickly a vaccine emerges to enable herd immunity.
Without a vaccine, scientists believe there is no obvious exit strategy for governments looking to loosen their measures without risking a second wave of illness.
Jens Spahn, the German health minister, suggested South Korean-style tracking via mobile phone data could be a way to lift restrictions. The appeal of this argument is only likely to grow over time.
As economies come under increasing strain, political scientists already see Western governments facing difficult choices. Indeed, as Ivan Krastev, author of After Europe, observed last week, there may come a moment - as deaths in Europe and America pass those of Asian countries - when Western publics ask why such measures were not instituted sooner.
"In the current crisis, citizens constantly compare the responses and effectiveness of their governments," he wrote. "And we should not be surprised if, the day after the crisis, China looks like a winner and the US looks like a loser."