Hardware components | ||||||
| × | 1 |
Quick Demo (purpose) explained.
This project has the goal of sharing Quick Demo, a more complex purpose based on the funny purpose presented in Thingsee Training videos.
In the schematics section there is a flowchart explaining in more detail the actions triggered in this purpose.
In order to set up this purpose to your Thingsee do the following steps (either 1 or 2):
(Option 1)
- Download the code (from code section) to your computer;
- Open your Thingsee Creator account and import the purpose by using the "Import File" button from PURPOSES section;
- Send the purpose to your device by either using the "Send to Device" or "Download" button;
- Follow the normal procedures to update the profile to your device, according with your selection;
- Once the purpose is in your device start playing with it.
(Option 2)
- Copy the code (from the code section);
- Connect your device to your computer via a micro-USB cable;
- Open the Profile.JSN file with a code editor and overwrite the old code with the copied version;
- Save it and close the code editor software;
- Eject and unplug the device from your computer; and
- Let the device restart and start playing with it.
Quick Demo (purpose)
Scheme of the actions that will be triggered by each task of the purpose.
Rectangles with borders are tasks. Lozenges are decisions or triggers. And rectangles without borders are annotations i.e. "Do noting" is simply an annotation meaning that no action will be activated from that outcome of the decision.
Rectangles with borders are tasks. Lozenges are decisions or triggers. And rectangles without borders are annotations i.e. "Do noting" is simply an annotation meaning that no action will be activated from that outcome of the decision.
{
"pId": "1",
"apiVersion": "00.18",
"initPuId": 1,
"purposes": [
{
"puId": 1,
"name": "Quick Demo",
"initStId": 0,
"states": [
{
"stId": 0,
"name": "Wait",
"events": [
{
"evId": 0,
"name": "Timer 30s",
"actions": {
"engine": {
"gotoStId": 1
},
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00080100",
"threshold": {
"count": 1,
"relative": true
},
"measurement": {
"log": true
},
"thresholds": {
"isOneOf": [
30
]
}
}
]
},
{
"evId": 1,
"name": "Gen Imp",
"actions": {
"cloud": {
"sendEvent": true,
"sendPush": false
}
},
"causes": [
{
"sId": "0x00050400",
"threshold": {
"count": 1
},
"measurement": {
"log": false
},
"thresholds": {
"isGt": 0.1
}
}
]
},
{
"evId": 2,
"name": "Gen Bat",
"actions": {
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00030200",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 5000
},
"thresholds": {
"isAny": true
}
}
]
},
{
"evId": 3,
"name": "Charger plugged?",
"actions": {
"engine": {
"gotoStId": 3
},
"cloud": {
"sendEvent": true,
"sendPush": true
}
},
"causes": [
{
"sId": "0x00030400",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 2000
},
"thresholds": {
"isOneOf": [
1
]
}
}
]
}
]
},
{
"stId": 1,
"name": "Knock Me",
"events": [
{
"evId": 0,
"name": "Timer 45s",
"actions": {
"engine": {
"gotoStId": 0
},
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00080100",
"threshold": {
"count": 1,
"relative": true
},
"measurement": {
"log": true
},
"thresholds": {
"isOneOf": [
45
]
}
}
]
},
{
"evId": 1,
"name": "Impact 1g",
"actions": {
"engine": {
"gotoStId": 2
},
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00050400",
"threshold": {
"count": 1
},
"measurement": {
"log": false
},
"thresholds": {
"isGt": 1
}
}
]
},
{
"evId": 3,
"name": "Gen Lux",
"actions": {
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00060300",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 5000
},
"thresholds": {
"isAny": true
}
}
]
},
{
"evId": 4,
"name": "Charger plugged?",
"actions": {
"engine": {
"gotoStId": 3
},
"cloud": {
"sendEvent": true,
"sendPush": true
}
},
"causes": [
{
"sId": "0x00030400",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 2000
},
"thresholds": {
"isOneOf": [
1
]
}
}
]
}
]
},
{
"stId": 2,
"name": "Hide me",
"events": [
{
"evId": 0,
"name": "Lux 2",
"actions": {
"engine": {
"gotoStId": 0
},
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00060300",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 2000
},
"thresholds": {
"isLt": 2
}
}
]
},
{
"evId": 1,
"name": "Gen Env",
"actions": {
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00060200",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 5000
},
"thresholds": {
"isAny": true
}
},
{
"sId": "0x00060400",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 5000
},
"thresholds": {
"isAny": true
}
}
]
},
{
"evId": 2,
"name": "Charger plugged?",
"actions": {
"engine": {
"gotoStId": 3
},
"cloud": {
"sendEvent": true,
"sendPush": true
}
},
"causes": [
{
"sId": "0x00030400",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 2000
},
"thresholds": {
"isOneOf": [
1
]
}
}
]
}
]
},
{
"stId": 3,
"name": "Charging",
"events": [
{
"evId": 0,
"name": "Charger Unplugged?",
"actions": {
"engine": {
"gotoStId": 0
},
"cloud": {
"sendEvent": true
}
},
"causes": [
{
"sId": "0x00030400",
"threshold": {
"count": 1
},
"measurement": {
"log": false,
"interval": 2000
},
"thresholds": {
"isOneOf": [
0
]
}
}
]
}
]
}
]
}
]
}
Comments