Define the Models
As you are going to have multiple Things defined with the same schema, the first step will be to define a Model inside AnythingDB for each of the devices. Models are templates to store a default Thing schema to ease the process of adding new Things quickly.
The three following Models need to be created:
- Traffic Light
- Traffic Sound Sensor
- Parking Sensor
- Under New Model. , choose to add a
- Complete the information for the Properties, Actions and Events as defined below (or disable them if the Thing doesn’t have any).
-
Name the first Model TrafficLight and click
Create
-
Name the second Model TrafficSoundSensor and click
Create.
-
Name the third Model ParkingSensor and click
Create.
- In the panel on the right that appears, enter Thing Title as Parking Sensor.
- Click the plus sign next to Properties and create a Property named Presence with type Boolean.
- Click Save.
Note: Multiple versions of a Model can be implemented, to enable you to easily update schemas while defining your project. You can include a version title and version description to keep track of the changes.