Define Your Assets

AnythingDB - Things

In this section, you can define the virtual digital representation of the smart connected home.
  • Things: Represent the entities in the smart connected ecosystem and store information about them.
    • Properties: Describe the Thing's attributes
    • Actions: Determine how you can interact with your Thing (for example, turn on/off)
    • Events: Monitor the changes that can modify a Thing’s property (for example, gas alarm, door open…)

For this project, you will define one Thing that will represent the Smart Home. The following properties, actions and events will be defined:

Properties:
  • Door-status
  • Fan-status
  • Gas-status
  • Humidity
  • Led-status
  • PIR-status
  • RGBD-mode
  • Raindrop-sensor
  • Temperature
  • Window-status
Actions:
  • OpenCloseDoor
  • OpenCloseWindow
  • TurnFanOnOff
Events:
  • GasAlarm
  • HighHumidity
  • HighTemperature
  • SecurityAlert
Click on + New Thing and add the following schema to define the Smart Home Thing:
{
   "actions":{
      "OpenCloseDoor":{
         "input":{
            "properties":{
               "command":{
                  "type":"string"
               }
            },
            "type":"object"
         }
      },
      "OpenCloseWindow":{
         "input":{
            "properties":{
               "status":{
                  "type":"string"
               }
            },
            "type":"object"
         }
      },
      "TurnFanOnOff":{
         "input":{
            "properties":{
               "mode":{
                  "type":"boolean"
               }
            },
            "type":"object"
         }
      }
   },
   "categories":[
      
   ],
   "description":"",
   "events":{
      "GasAlarm":{
         "data":{
            "type":"object"
         },
         "description":"",
         "title":""
      },
      "HighHumidity":{
         "data":{
            "type":"object"
         },
         "description":"",
         "title":""
      },
      "HighTemperature":{
         "data":{
            "type":"object"
         },
         "description":"",
         "title":""
      },
      "SecurityAlert":{
         "data":{
            "type":"string"
         },
         "description":"",
         "title":""
      }
   },
   "model":null,
   "properties":{
      "Door-status":{
         "readOnly":true,
         "title":"",
         "type":"string"
      },
      "Fan-status":{
         "readOnly":true,
         "title":"",
         "type":"boolean"
      },
      "Gas-status":{
         "readOnly":true,
         "title":"",
         "type":"boolean"
      },
      "Humidity":{
         "maximum":100,
         "minimum":0,
         "readOnly":true,
         "title":"",
         "type":"number",
         "unit":"%"
      },
      "Led-status":{
         "title":"",
         "type":"boolean"
      },
      "PIR-status":{
         "title":"",
         "type":"boolean"
      },
      "RGBD-mode":{
         "readOnly":true,
         "title":"",
         "type":"string"
      },
      "Raindrop-sensor":{
         "maximum":4096,
         "minimum":0,
         "readOnly":true,
         "title":"",
         "type":"number"
      },
      "Security-cam-img":{
         "title":"",
         "type":"string"
      },
      "Temperature":{
         "readOnly":true,
         "title":"",
         "type":"number",
         "unit":"ºC"
      },
      "Window-status":{
         "readOnly":true,
         "title":"",
         "type":"string"
      }
   },
   "title":"Home"
}