Skip to content

Model your first entity

OnTwins separates what a kind of thing is from the individual things you have.

A model is the kind: every conference room has a temperature and sits inside a floor. An entity is one of them: the room at the end of the second floor. You define the model once and create as many entities from it as you have rooms.

That separation is why a project with a thousand entities is not a thousand times the work. Return to Scenes Studio and open Models.

Create a model with a name, a short code name in the Latin alphabet such as ConferenceRoom, and a description if it helps.

You can also give it a parent model to inherit from, but you do not need one. Every model already inherits from Thing, the root type OnTwins provides, which is where the ability to contain other entities comes from — so a model with no parent is still a complete, usable type.

Open the model’s telemetry and add one item: a name such as temperature, with a numeric schema.

This declares that rooms of this kind have a temperature. It says nothing about where that number comes from — the dataset you created in the last step is not mentioned here, and does not need to be. Models describe the site; datasets describe what the field sends. Connecting the two is the next step, and keeping them apart is what lets either side change without breaking the other.

Leave the unit alone. Units belong to the data, where you set them in step five.

From the model, create one entity. Choose the model, give the entity a name that identifies the real thing, and set initial property values if the model defines any.

Name it after what it actually is — Room 204, not Entity 1. These names are what operators read on screens later.

Entities are not a flat list. They stand for a real place, and real places have structure: a room is inside a floor, a floor is inside a building. You record that by relating entities to one another.

Containment is the relationship every model inherits from Thing, so any entity can hold others without your declaring anything. The result is the tree you navigate — which is how a project with thousands of entities stays walkable instead of becoming a list you have to search.

One entity has nothing to relate to yet, so leave it on its own for now. In a real project you would create the building and its floors first, then relate each room to the floor it sits in.

Note that relating entities is a logical statement, not a spatial one. Saying the room is inside the floor does not say where the room is. Giving the entity coordinates and a shape you can see happens in a scene, in step six.


The entity exists and declares a temperature; the reading exists and belongs to nobody. Next, wire and interpret the value to join them.