Fighting COVID-19 with Digital Twins on the Moab platform

The Moab #IoT #DigitalTwin platform I created is now open source with the intent to help non-governmental organizations (NGOs) and non-profits in tackling the United Nations Sustainable Development Goals (SDGs).

The battle to contain and eradicated COVID-19 falls squarely withing the purview of SDG 3 which aspires to ensure health and well-being for all, including a commitment to end the epidemics of AIDS, tuberculosis, malaria and other communicable diseases by 2030. It also aims to achieve universal health coverage, and provide access to safe and effective medicines and vaccines for all.

You can’t manage or improve a situation without measuring. We won’t make progress against this virus “flying blind,” so testing & capturing other data attributes of everyone is essential. Creating digital twin models of people w/ the right set of properties & associated rules is a great place to start.

A digital twin model hosted within the Moab IoT platform would define a person’s name, description, the organization they belong to & the version number for the model. That model would then have a number of static, telemetry, and virtual properties to further describe the person’s state and make it easier for analytics to deliver actionable outcomes.

Static properties would include things like:

  • First name w/ string data type
  • Last name w/ string data type
  • Age w/ integer data type
  • Underlying issues w/ boolean data type (Y/N)
  • Male or female w/ boolean data type (male = 0/female = 1)
  • Home location w/ geopoint data type to know where the person lives
  • Work location w/ geopoint data type to know where the person works

Telemetry properties would include the following:

  • Sense of smell w/ boolean data type (Y/N)
  • Sense of taste w/ boolean data type (Y/N)
  • Trouble breathing w/ boolean data type (Y/N)
  • Extreme fatigue w/ boolean data type (Y/N)
  • Dry cough w/ boolean data type (Y/N)
  • Temperature w/ float data type & Fahrenheit unit of measure
  • COVID-19 test w/ integer data type (0 = not tested, 1 = posititve, 2 = negative)
  • Timestamp w/ datetime data type for time series analytics
  • Current location w/ geopoint data type to know where the person is
  • List of digital twin ids representing nearby people to facilitate contact tracing
  • Antibodies w/ boolean data type (Y/N)

Simple rules could test for the following:

  • if(sense of smell == false) then isolate and test
  • if(sense of taste == false) then isolate and test
  • if(trouble breathing == true) then isolate and test
  • if(extreme fatigue == true) then isolate and test
  • if(dry cough == true) then isolate and test
  • if(temperature >= 100.4 Fahrenheit) then isolate and test
  • if(test == 0) then test
  • if(test == 1) then isolate and call your doctor
  • if(antibodies == true) then immune and can work
  • if(test == 1) connect with list of nearby people contacted

Now it’s time to turn my high-level descriptions of representing people as digital twins into reality with the Moab Digital Twin platform. That means code, APIs and data. Since Moab follows API-first principles and doesn’t yet have a user interface, you’ll have to geek out with me as we build a system. It’s an open, multi-tenant system that embraces ubiquitous Web standards that everyone understands so let’s get started. I’m just using Postman to make RESTful API calls.

1) You start by creating a new organization which also creates a default global group and an initial user (you) with creator role privileges.

curl -L -X POST 'https://localhost/moab/api/v1/Organization' \

-H 'Content-Type: application/json' \

--data-raw '{

 "OrganizationName": "Moab Foundation",

 "OrganizationDescription": "Sustainable Development Goals Non Profit",

 "FirstName": "Rob",

 "LastName": "Tiffany",

 "UserDescription": "Executive Director",

 "UserEmailAddress": "",

 "UserPassword": "P@ssw0rd",

 "AgreeToTermsAndPolicies": 1


The API call returns the new user identity and security token to be used for subsequent API calls to the Moab system.

"Id": 1585147187123,

"SecurityToken": 1583347118504

2. Next, you create the Digital Twin Model with our new user credentials. This defines a generic human that you will add properties to.

curl -L -X POST 'https://localhost/moab/api/v1/DigitalTwinModel' \

-H 'Content-Type: application/json' \

-H 'Authorization: Bearer 1585147187123.1583347118504' \

--data-raw '{

 "Name": "Human",

 "Description": "A Digital Twin Model to monitor potential COVID-19 status",

 "Version": 1


The API call returns the Digital Twin Model identity.

"Id": 1585148087112

3. Next, you’ll create a Digital Twin Model Telemetry properties that match the ones I listed above. For starters, I’ll create a property for my body temperature that I’ll take several times a day. The measurement type is temperature, the data type is float, and the unit of measure is Fahrenheit. The weird numbers you see below are just referencing primary keys in lookup tables of the underlying database which is more efficient than sending large strings. For this example, I won’t bore you with adding multiple properties.

curl -L -X POST 'https://localhost/moab/api/v1/DigitalTwinModelTelemetryProperty' \

-H 'Content-Type: application/json' \

-H 'Authorization: Bearer 1585147187123.1583347118504' \

--data-raw '{

 "DataLabel": "Temp",

 "MeasurementType": 6,

 "DataType": 4,

 "UnitOfMeasure": 8,

 "DigitalTwinModel": 1585148087112,

 "DisplayName": "Body Temperature"


The API call returns the Digital Twin Model Telemetry property identity.

"Id": 1585149836455

4. Next up, I’ll create the Digital Twin instance of Rob Tiffany. This refers to “me” specifically and it references the digital twin model we just created.

curl -L -X POST 'https://localhost/moab/api/v1/DigitalTwin' \

-H 'Content-Type: application/json' \

-H 'Authorization: Bearer 1585147187123.1583347118504' \

--data-raw '{

 "Name": "Rob Tiffany",

 "Description": "Person to monitor",

 "DigitalTwinModel": 1585148087112,

 "Group": 1585147186035,

 "Enabled": 1


The API call returns the Digital Twin identity and security token that will be used to send to telemetry to Moab.

"Id": 1585148402314,

"SecurityToken": 1583375634831

5. Now it’s time to send my personal health telemetry. In the world of IoT, some kind of machine or device would send this data automatically. Since people can be digital twins too, this data can be sent manually or automated through an app running on your smartphone, tablet, smartwatch or laptop. For the weird boolean numbers below, 1 equals true and 0 equals false.

curl -L -X POST 'https://localhost/moab/api/v1/Telemetry' \

-H 'Content-Type: application/json' \

-H 'Authorization: Bearer 1585148402314.1583375634831' \

--data-raw '{







"Location":"47.747149, -121.975704"


As you can see, I can still smell and taste. I don’t have trouble breathing nor do I have a dry cough. My temperature is a little low and I haven’t taken a test. My location is defined by lat/long GPS coordinates.

We’re now up and running, I won’t torture you with more mind-numbing API calls. From now on, I’ll just be sending my personal data telemetry to update my digital twin instance over time. Maybe we can get other folks who are okay with potential privacy issues to send this simple telemetry as well. Ultimately, we want to have a map to see where clusters of infected people are in order to drive intelligent decisions.


Enter your email address to subscribe to my blog and receive notifications of new articles by email.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.