-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfaclon_mongoDB
72 lines (66 loc) · 1.33 KB
/
faclon_mongoDB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
db.user_auth.insert({
userID: 'rockyb',
userPass:'hellokitty',
userEmail: '[email protected]'
});
db.user_details.insert({
userID: 'rockyb',
userName:'Rocky Balboa',
userRole:'Viewer',
userMob:'8765987949',
userPic:'path2pic',
userEmail: '[email protected]',
userGCM: '609612932495',
deviceIDs: ['D0XYZ1','D0ABC2'],
splans:
[{
splanName: 'Water Analytics',
splanCost: 500,
splanCycle: 30,
splanStart: '31/04/2016',
splanTenure: 5},
{
splanName: 'Water Analytics lvl2',
splanCost: 5000,
splanCycle: 15,
splanStart: '31/04/2016',
splanTenure: 5
}],
wdgtUsed:[{wdgtID : 'W001',
devID: 'D0XYZ1'},
{wdgtID : 'W001',
devID: 'D0XYZ2'}],
triggers:[{
trigName:'Tank filled',
trigCondition: 'If (height >= 95%)',
trigSuccessMsg:'Tank is full',
tDevID:'D0XYZ1'
},
{
trigName:'Tank empty',
trigCondition: 'If (height<= 10%)',
trigSuccessMsg:'Tank is empty',
tDevID:'D0ABC2'
}]
});
db.devices.insert({
devRegID:'123455',
devType: 'water',
devName:'Water level sensor',
devLocation: 'Bari Sadri',
devHardVer: '2.0.1'
devID: 'D0XYZ1'
});
db.devices.insert({
devRegID:'123432',
devType: 'water',
devName:'Water level sensor',
devLocation: 'Bhandup West',
devHardVer: '2.0.2',
devID: 'D0XYZ1'
});
db.widgets.insert({
wdgtID: 'W001',
wdgtName: 'Tank filling',
wdgtDType: ['water']
});