Thingsee Support

Thingsee Profile (API)

Thingsee Profile
A profile is the core of Thingsee intelligence. It defines the behaviour, i.e. purpose, of the Thingsee device; states, sensors, thresholds, events and actions. ThingseeEngine is the run-time for profile and it is delivered as a binary component in Thingsee SW release.

ThingseeEngine can run only one profile at a time, but single profile can contain multiple different purposes. Purpose can be thought as a single use-case, such as a pet-tracking purpose, door-activity purpose, thermometer purpose, etc. A single profile can contain multiple purposes and make logic switch between purposes based on events happening in another purpose. For example, Thingsee device can act as thermometer (purpose) until it is changed to act as pet-tracker by mobile app. This way a single device can have multiple built-in purposes without any need to download a new purpose every time user wants to change device behaviour.

A profile is constructed by following these rules:

  • ThingseeEngine will have only one Profile
  • One Profile can contain multiple Purposes, but only one purpose is active
  • One Purpose can contain multiple States, but only one state is active
  • One State can contain multiple Tasks and any task can trigger an action (OR operand)
  • One Task can contain multiple Senses and all Senses must be true to trigger an event (AND operand)
  • One Sense contains thresholds

A state can be changed when any of the state events is true (OR operand). An event is true when all of its thresholds are true (AND operand).

     “profile” : {

       “apiVersion”: String,
       “pId”: String,
       “name”: String,
       “initPuId”: Number
       “purposes”: [{
          “puId”: Number,
          “name”: String,
          "initStId": Number
          "states": [{
              "stId": Number,
              “name”: String,
              "isGlobal": Boolean,
              "events": [{
                 "evId": Number,
                 “name”: String,
                 "eventLog": Boolean,
                 "actions": {
                     “sms”: {
                        “text”: String,
                        “phoneNumber”: [Array of Strings]
                     “cloud” : {
                        "sendEvent": Boolean,
                        “sendPush”: Boolean,
                        “sendLog”: Boolean,
                        “host”: String,
                        “port”: Number,
                        “api”: String
                     “engine”: {
                        "gotoStId": Number,
                        "gotoPuId": Number
                     “display”: {
                        "showText": String,
                     "causes" : [{
                        "sId": Number,
                        "orderId": Number,
                        "senseLog": Boolean,
                        “measurement”: {
                            “log”: Boolean,
                            “interval”: Number,
                            “count”: Number
                     “threshold”: {
                        “count”: Number,
                        “negate”: Boolean,
                        “relative”: Boolean,
                        “decimalAcc”: Number
                     "thresholds": {
                        "isOneOf": [Array of Numbers],
                        "isGt": Number,
                        "isLt": Number,
                        "isNotIn": [Array of Numbers],
                        "isAny": Boolean,
                        “isInsideGeo”: [Array of Numbers]


Parent object Object Mandatory Description
profile apiVersion Yes Version information of implemented Thingsee Engine API e.g. “00.11”
profile pId No Cloud generated profile identifier
profile name No Name of the profile. This is created by app, and not relevant for device sw.
profile initPuId Yes Initial purpose where the ThingseeEngine will be started
purposes puId Yes Index number for purpose. Defined by app.
purposes name No Name of the purpose. Used by app and not relevant for ThingseeEngine
purposes initStId Yes Initial state where the ThingseeEngine will be started
states stId Yes Index number for state. Defined by app.
states name No Name of the state. Defined by app, not relevant for ThingseeEngine
states isGlobal No Set to TRUE if state must be active always within this purpose
events evId Yes Index of event. Defined by app.
events name No Name of the event. Defined by app, not relevant for ThingseeEngine
events eventLog No Set to TRUE if events must be logged to device memory
events actions Yes Defines the actions that must be processed when thresholds are true.
actions sms No Configuration of SMS action
sms text Yes Content of SMS to be sent
sms phoneNumber Yes phoneNumber where the SMS should be sent in E.164 format, ie. +1 415 599 2671
actions cloud No Configuration of cloud action
cloud sendEvent No Set to TRUE if ThingseeEngine must send Thingsee Event to cloud
cloud sendLog No Set to TRUE if ThingseeEngine must flush log content to cloud
cloud sendPush No Set to TRUE if cloud server should send push notification for Thingsee Event. Note that this requires that sendEvent is also TRUE.
actions engine No Set engine control configuration
engine gotoStId No Sets Thingsee Engine to another state
engine gotoPuId No Sets Thingsee Engine to another purpose
actions display No Configuration of user interface actions (if device has display)
display showText Yes Content of text to be shown at UI
events senses Yes Defines the configuration of thresholds and sensors
senses sId Yes Sense identifier to be monitored
senses orderId No Defines the order index in case the sense must happen in some order
senses senseLog No Set to TRUE if senses are logged to device memory
senses measurement Yes Defines the frequency and other parameters how the sense is read.
measurement log No Set to TRUE if all sense readings are stored to device memory. This object is not valid for sensors using HW interrupts.
measurement interval Yes Interval of sense reading defined as milliseconds
measurement count No Number of sense reading after sense becomes TRUE (regardless of thresholds). Defaults to 0. This object is not valid for sensors using HW interrupts.
threshold count Yes How many times threshold must be TRUE to set sense to TRUE
threshold negate No If TRUE, the thresholds setting will be inversed
threshold relative No If TRUE, the thresholds will be handled as a relative value to a first reading value. Otherwise thresholds are handled as absolute values.
threshold decimalAcc No Accuracy of thresholds. Value 2 equals x.xx
threshold isOneOf No is TRUE if sense value is one of numbers
threshold isGt No is TRUE if value is greater than threshold
threshold isLt No is TRUE if value is less than threshold
threshold isNotIn No is TRUE if value is not any of numbers
threshold isAny No is TRUE always. This is useful for events where measurement interval is used as a trigger and fired every time
threshold isInsideGeo No Set to TRUE if location sense is inside specific geolocation coordinates array (polygonal geofence). Even number with minimum length of 6. Using invert sense can be used to map location outsideGeo with value set to false



Have more questions? Submit a request