iotagent-node-lib 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +134 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +16 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +55 -0
  4. package/.github/advanced-issue-labeler.yml +30 -0
  5. package/.github/workflows/issue-labeler.yml +43 -0
  6. package/CHANGES_NEXT_RELEASE +0 -2
  7. package/config.js +5 -5
  8. package/doc/api.md +1483 -298
  9. package/doc/deprecated.md +7 -1
  10. package/doc/development.md +120 -0
  11. package/doc/howto.md +58 -62
  12. package/doc/installationguide.md +3 -11
  13. package/doc/requirements.txt +1 -1
  14. package/docker/Mosquitto/Dockerfile +1 -1
  15. package/lib/commonConfig.js +7 -10
  16. package/lib/fiware-iotagent-lib.js +0 -10
  17. package/lib/jexlTranformsMap.js +2 -1
  18. package/lib/model/Device.js +0 -1
  19. package/lib/model/Group.js +0 -1
  20. package/lib/model/dbConn.js +1 -7
  21. package/lib/plugins/bidirectionalData.js +8 -26
  22. package/lib/plugins/expressionPlugin.js +8 -40
  23. package/lib/plugins/jexlParser.js +28 -0
  24. package/lib/services/commands/commandService.js +1 -1
  25. package/lib/services/common/iotManagerService.js +0 -1
  26. package/lib/services/devices/deviceRegistryMongoDB.js +10 -10
  27. package/lib/services/devices/deviceService.js +16 -20
  28. package/lib/services/devices/devices-NGSI-v2.js +2 -5
  29. package/lib/services/ngsi/entities-NGSI-LD.js +16 -60
  30. package/lib/services/ngsi/entities-NGSI-v2.js +179 -119
  31. package/lib/services/northBound/deviceProvisioningServer.js +17 -17
  32. package/lib/templates/createDevice.json +5 -6
  33. package/lib/templates/createDeviceLax.json +6 -8
  34. package/lib/templates/deviceGroup.json +1 -5
  35. package/lib/templates/updateDevice.json +9 -2
  36. package/lib/templates/updateDeviceLax.json +14 -5
  37. package/package.json +1 -1
  38. package/scripts/legacy_expression_tool/README.md +262 -0
  39. package/scripts/legacy_expression_tool/legacy_expression_tool.py +423 -0
  40. package/scripts/legacy_expression_tool/requirements.txt +3 -0
  41. package/test/unit/examples/deviceProvisioningRequests/provisionBidirectionalDevice.json +5 -5
  42. package/test/unit/examples/groupProvisioningRequests/bidirectionalGroup.json +4 -4
  43. package/test/unit/general/contextBrokerKeystoneSecurityAccess-test.js +3 -13
  44. package/test/unit/ngsi-ld/expressions/jexlBasedTransformations-test.js +0 -2
  45. package/test/unit/ngsi-ld/lazyAndCommands/merge-patch-test.js +31 -30
  46. package/test/unit/ngsi-ld/plugins/bidirectional-plugin_test.js +8 -8
  47. package/test/unit/ngsi-ld/plugins/custom-plugin_test.js +152 -0
  48. package/test/unit/ngsi-ld/plugins/multientity-plugin_test.js +1 -1
  49. package/test/unit/ngsi-mixed/provisioning/ngsi-versioning-test.js +33 -37
  50. package/test/unit/ngsiv2/examples/contextRequests/createMinimumProvisionedDevice4.json +5 -1
  51. package/test/unit/ngsiv2/examples/contextRequests/updateContext.json +2 -0
  52. package/test/unit/ngsiv2/examples/contextRequests/updateContext1.json +3 -1
  53. package/test/unit/ngsiv2/examples/contextRequests/updateContext3WithStatic.json +2 -0
  54. package/test/unit/ngsiv2/examples/contextRequests/updateContext4.json +4 -1
  55. package/test/unit/ngsiv2/examples/contextRequests/updateContext5.json +12 -0
  56. package/test/unit/ngsiv2/examples/contextRequests/updateContext6.json +10 -0
  57. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin1.json +2 -0
  58. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin2.json +3 -1
  59. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin3.json +3 -1
  60. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin4.json +3 -1
  61. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin5.json +3 -1
  62. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin6.json +3 -1
  63. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin7.json +3 -1
  64. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin8.json +3 -1
  65. package/test/unit/ngsiv2/examples/contextRequests/updateContextAliasPlugin9.json +3 -1
  66. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast1.json +2 -0
  67. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast2.json +2 -0
  68. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast3.json +3 -1
  69. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast4.json +3 -1
  70. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast5.json +3 -1
  71. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast6.json +3 -1
  72. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast7.json +3 -1
  73. package/test/unit/ngsiv2/examples/contextRequests/updateContextCommandError.json +3 -1
  74. package/test/unit/ngsiv2/examples/contextRequests/updateContextCommandExpired.json +3 -1
  75. package/test/unit/ngsiv2/examples/contextRequests/updateContextCommandFinish.json +3 -1
  76. package/test/unit/ngsiv2/examples/contextRequests/updateContextCommandStatus.json +2 -0
  77. package/test/unit/ngsiv2/examples/contextRequests/updateContextCommandStatus2.json +2 -0
  78. package/test/unit/ngsiv2/examples/contextRequests/updateContextCompressTimestamp1.json +3 -1
  79. package/test/unit/ngsiv2/examples/contextRequests/updateContextCompressTimestamp2.json +3 -1
  80. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin1.json +2 -0
  81. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin11.json +2 -0
  82. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin12.json +2 -0
  83. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin13.json +3 -1
  84. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin2.json +2 -0
  85. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin29.json +2 -0
  86. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin3.json +2 -0
  87. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin30.json +2 -0
  88. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin31.json +2 -8
  89. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin32.json +2 -0
  90. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin33.json +2 -0
  91. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin34.json +2 -0
  92. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin35.json +22 -0
  93. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin36.json +1 -0
  94. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin4.json +2 -0
  95. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin40.json +42 -0
  96. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin41.json +33 -0
  97. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin5.json +2 -0
  98. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin6.json +2 -0
  99. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin7.json +2 -0
  100. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin8.json +2 -0
  101. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionPlugin9.json +2 -0
  102. package/test/unit/ngsiv2/examples/contextRequests/updateContextExpressionSkip.json +12 -0
  103. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityJexlExpressionPlugin1.json +1 -1
  104. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin1.json +1 -1
  105. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin10.json +1 -1
  106. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin11.json +1 -1
  107. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin12.json +1 -1
  108. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin13.json +1 -1
  109. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin14.json +1 -1
  110. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin15.json +1 -1
  111. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin16.json +1 -1
  112. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin17.json +1 -1
  113. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin2.json +1 -1
  114. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json +37 -0
  115. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin3.json +1 -1
  116. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin4.json +1 -1
  117. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin5.json +1 -1
  118. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin6.json +1 -1
  119. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin7.json +1 -1
  120. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin8.json +1 -1
  121. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin9.json +1 -1
  122. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityTimestampPlugin1.json +1 -1
  123. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityTimestampPlugin2.json +1 -1
  124. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityTimestampPlugin3.json +1 -1
  125. package/test/unit/ngsiv2/examples/contextRequests/updateContextMultientityTimestampPlugin4.json +2 -0
  126. package/test/unit/ngsiv2/examples/contextRequests/updateContextProcessTimestamp.json +2 -0
  127. package/test/unit/ngsiv2/examples/contextRequests/updateContextStaticAttributes.json +2 -0
  128. package/test/unit/ngsiv2/examples/contextRequests/updateContextStaticAttributesMetadata.json +3 -1
  129. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestamp.json +3 -1
  130. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampFalse.json +12 -0
  131. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampFalseTimeInstant.json +12 -0
  132. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampOverride.json +2 -0
  133. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampOverrideWithoutMilis.json +2 -0
  134. package/test/unit/ngsiv2/examples/contextRequests/updateContextTimestampTimezone.json +3 -1
  135. package/test/unit/ngsiv2/expressions/jexlBasedTransformations-test.js +355 -75
  136. package/test/unit/ngsiv2/general/contextBrokerOAuthSecurityAccess-test.js +18 -51
  137. package/test/unit/ngsiv2/general/https-support-test.js +1 -5
  138. package/test/unit/ngsiv2/lazyAndCommands/command-test.js +4 -10
  139. package/test/unit/ngsiv2/lazyAndCommands/polling-commands-test.js +9 -26
  140. package/test/unit/ngsiv2/ngsiService/active-devices-test.js +143 -57
  141. package/test/unit/ngsiv2/ngsiService/autocast-test.js +14 -21
  142. package/test/unit/ngsiv2/ngsiService/staticAttributes-test.js +3 -5
  143. package/test/unit/ngsiv2/ngsiService/subscriptions-test.js +1 -10
  144. package/test/unit/ngsiv2/plugins/alias-plugin_test.js +20 -30
  145. package/test/unit/ngsiv2/plugins/bidirectional-plugin_test.js +6 -69
  146. package/test/unit/ngsiv2/plugins/compress-timestamp-plugin_test.js +4 -6
  147. package/test/unit/ngsiv2/plugins/custom-plugin_test.js +150 -0
  148. package/test/unit/ngsiv2/plugins/multientity-plugin_test.js +87 -16
  149. package/test/unit/ngsiv2/plugins/timestamp-processing-plugin_test.js +2 -3
  150. package/test/unit/ngsiv2/provisioning/device-group-api-test.js +2 -3
  151. package/test/unit/ngsiv2/provisioning/device-provisioning-api_test.js +15 -55
  152. package/test/unit/ngsiv2/provisioning/device-registration_test.js +1 -7
  153. package/test/unit/ngsiv2/provisioning/device-update-registration_test.js +2 -9
  154. package/test/unit/ngsiv2/provisioning/singleConfigurationMode-test.js +0 -11
  155. package/test/unit/ngsiv2/provisioning/updateProvisionedDevices-test.js +0 -7
  156. package/test/unit/plugins/capture-provision-inPlugins_test.js +0 -6
  157. package/doc/advanced-topics.md +0 -626
  158. package/doc/expressionLanguage.md +0 -762
  159. package/lib/plugins/expressionParser.js +0 -205
  160. package/test/unit/expressions/expression-test.js +0 -197
  161. package/test/unit/ngsi-ld/expressions/expressionBasedTransformations-test.js +0 -882
  162. package/test/unit/ngsiv2/expressions/expressionBasedTransformations-test.js +0 -951
  163. package/test/unit/ngsiv2/expressions/expressionCombinedTransformations-test.js +0 -296
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "consumption": {
3
5
  "value": 52,
4
6
  "type": "Number"
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "consumption_x": {
3
5
  "type": "Number",
4
6
  "value": null
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "pressure": {
3
5
  "type": "Number",
4
6
  "value": 10
@@ -7,4 +9,4 @@
7
9
  "type": "Number",
8
10
  "value": 200
9
11
  }
10
- }
12
+ }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"ws1",
3
+ "type":"WeatherStation",
2
4
  "pressure":{
3
5
  "type": "Number",
4
6
  "value": 1040
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"ws1",
3
+ "type":"WeatherStation",
2
4
  "pressure": {
3
5
  "type": "Number",
4
6
  "value": 1040
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "consumption": {
3
5
  "type": "Number",
4
6
  "value": 0.44
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id": "light1",
3
+ "type": "Light",
2
4
  "pressure": {
3
5
  "type": "Number",
4
6
  "value": 1040
@@ -1,12 +1,6 @@
1
1
  {
2
- "undef": {
3
- "type": "json",
4
- "value": null
5
- },
6
- "nil": {
7
- "type": "json",
8
- "value": null
9
- },
2
+ "id":"ws1",
3
+ "type":"WeatherStation",
10
4
  "falsy": {
11
5
  "type": "Boolean",
12
6
  "value": false
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"gps1",
3
+ "type":"GPS",
2
4
  "location": {
3
5
  "type": "geo:json",
4
6
  "value": {
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"gps1",
3
+ "type":"GPS",
2
4
  "location": {
3
5
  "type": "geo:json",
4
6
  "value": {
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"gps1",
3
+ "type":"GPS",
2
4
  "location": {
3
5
  "type": "geo:json",
4
6
  "value": {
@@ -1,2 +1,24 @@
1
1
  {
2
+ "id":"gps1",
3
+ "type":"GPS",
4
+ "TimeInstant": {
5
+ "type": "DateTime",
6
+ "value": "2015-08-05T07:35:01.468+00:00"
7
+ },
8
+ "location": {
9
+ "value": {
10
+ "coordinates": [
11
+ 13,
12
+ 52
13
+ ],
14
+ "type": "Point"
15
+ },
16
+ "type": "geo:json",
17
+ "metadata": {
18
+ "TimeInstant": {
19
+ "type": "DateTime",
20
+ "value": "2015-08-05T07:35:01.468+00:00"
21
+ }
22
+ }
23
+ }
2
24
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "id":"gps1","type":"GPS",
2
3
  "mylocation": {
3
4
  "type": "geo:json",
4
5
  "value": {
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"ws1",
3
+ "type":"WeatherStation",
2
4
  "pressure25":{
3
5
  "type": "Number",
4
6
  "value": 52
@@ -0,0 +1,42 @@
1
+ {
2
+ "entities": [
3
+ {
4
+ "id": "water1",
5
+ "type": "WaterTank",
6
+ "contB": {
7
+ "value": "31450.000",
8
+ "type": "Number",
9
+ "metadata": {
10
+ "TimeInstant": {
11
+ "type": "DateTime",
12
+ "value": "2015-08-05T07:35:01.468Z"
13
+ }
14
+ }
15
+ },
16
+ "TimeInstant": {
17
+ "type": "DateTime",
18
+ "value": "2015-08-05T07:35:01.468Z"
19
+ }
20
+ },
21
+ {
22
+ "id": "PA_B_0001",
23
+ "type": "WaterTank",
24
+ "waterLeavingTanks": {
25
+ "value": 3145,
26
+ "type": "Number",
27
+ "metadata": {
28
+ "TimeInstant": {
29
+ "type": "DateTime",
30
+ "value": "2015-08-05T07:35:01.468Z"
31
+ }
32
+ }
33
+ },
34
+ "TimeInstant": {
35
+ "type": "DateTime",
36
+ "value": "2015-08-05T07:35:01.468Z"
37
+ }
38
+ }
39
+ ],
40
+ "actionType": "append"
41
+ }
42
+
@@ -0,0 +1,33 @@
1
+ {
2
+ "id":"gps1","type":"GPS",
3
+ "TimeInstant": {
4
+ "type": "DateTime",
5
+ "value": "2015-08-05T07:35:01.468+00:00"
6
+ },
7
+ "location": {
8
+ "value": {
9
+ "coordinates": [
10
+ 13,
11
+ 52
12
+ ],
13
+ "type": "Point"
14
+ },
15
+ "type": "geo:json",
16
+ "metadata": {
17
+ "TimeInstant": {
18
+ "type": "DateTime",
19
+ "value": "2015-08-05T07:35:01.468+00:00"
20
+ }
21
+ }
22
+ },
23
+ "temperature": {
24
+ "value": null,
25
+ "type": "Number",
26
+ "metadata": {
27
+ "TimeInstant": {
28
+ "type": "DateTime",
29
+ "value": "2015-08-05T07:35:01.468+00:00"
30
+ }
31
+ }
32
+ }
33
+ }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "alive": {
3
5
  "type": "None",
4
6
  "value": null
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "manufacturer": {
3
5
  "type": "Object",
4
6
  "value": { "name":"Manufacturer1", "VAT":"U12345678" }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "revisions": {
3
5
  "type": "Array",
4
6
  "value": [ "v0.1", "v0.2", "v0.3" ]
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"ws1",
3
+ "type":"WeatherStation",
2
4
  "consumption": {
3
5
  "type": "Number",
4
6
  "value": 8.8
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "updated": {
3
5
  "value": true,
4
6
  "type": "Boolean"
@@ -0,0 +1,12 @@
1
+ {
2
+ "id":"skip1",
3
+ "type":"skipvalue",
4
+ "condition": {
5
+ "value": 33,
6
+ "type": "Number"
7
+ },
8
+ "neverSkip": {
9
+ "value": false,
10
+ "type": "Number"
11
+ }
12
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType":"update",
2
+ "actionType":"append",
3
3
  "entities":[
4
4
  {
5
5
  "id":"lightPseudo:id",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws4",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws9",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws11",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "sh1",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "sh2",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "sh3",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "gps1",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "gps1",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws9b",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws4",
@@ -0,0 +1,37 @@
1
+ {
2
+ "actionType": "append",
3
+ "entities": [
4
+ {
5
+ "id": "gps1",
6
+ "type": "GPS",
7
+ "explicit": {
8
+ "type": "number",
9
+ "value": 12
10
+ },
11
+ "expectedAtt": {
12
+ "type": "number",
13
+ "value": 13
14
+ },
15
+ "nonexpectedAtt": {
16
+ "type": "number",
17
+ "value": null
18
+ }
19
+ },
20
+ {
21
+ "explicit": {
22
+ "type": "number",
23
+ "value": 52
24
+ },
25
+ "type": "GPS",
26
+ "id": "SO5"
27
+ },
28
+ {
29
+ "explicit": {
30
+ "type": "number",
31
+ "value": 13
32
+ },
33
+ "type": "GPS",
34
+ "id": "SO6"
35
+ }
36
+ ]
37
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws4",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  { "id": "ws5",
5
5
  "type": "WeatherStation"
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  { "id": "ws6",
5
5
  "type": "WeatherStation"
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "Sensor",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "Sensor",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws7",
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws8",
@@ -41,5 +41,5 @@
41
41
  }
42
42
  }
43
43
  ],
44
- "actionType": "update"
44
+ "actionType": "append"
45
45
  }
@@ -24,5 +24,5 @@
24
24
  }
25
25
  }
26
26
  ],
27
- "actionType": "update"
27
+ "actionType": "append"
28
28
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "actionType": "update",
2
+ "actionType": "append",
3
3
  "entities": [
4
4
  {
5
5
  "id": "ws5",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"sensorCommand",
3
+ "type":"SensorCommand",
2
4
  "PING_status": {
3
5
  "type": "commandStatus",
4
6
  "value": "OK",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "state":{
3
5
  "type": "Boolean",
4
6
  "value": true,
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"motion1",
3
+ "type":"Motion",
2
4
  "moving":{
3
5
  "value": true,
4
6
  "type": "boolean"
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"lamp1",
3
+ "type":"Lamp",
2
4
  "luminosity": {
3
5
  "value": "100",
4
6
  "type": "text"
@@ -13,4 +15,4 @@
13
15
  }
14
16
  }
15
17
  }
16
- }
18
+ }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "state": {
3
5
  "value": true,
4
6
  "type": "boolean",
@@ -26,4 +28,4 @@
26
28
  "type": "DateTime",
27
29
  "value": "2015-08-05T07:35:01.468Z"
28
30
  }
29
- }
31
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "lightNoTimestamp1",
3
+ "type": "Light",
4
+ "state": {
5
+ "value": true,
6
+ "type": "boolean"
7
+ },
8
+ "dimming": {
9
+ "value": 87,
10
+ "type": "number"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "lightNoTimestamp1",
3
+ "type": "Light",
4
+ "state": {
5
+ "value": true,
6
+ "type": "boolean"
7
+ },
8
+ "TimeInstant": {
9
+ "value": "2015-12-14T08:06:01.468Z",
10
+ "type": "DateTime"
11
+ }
12
+ }
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "state": {
3
5
  "value": true,
4
6
  "type": "boolean",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "state": {
3
5
  "value": true,
4
6
  "type": "boolean",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "id":"light1",
3
+ "type":"Light",
2
4
  "state": {
3
5
  "value": true,
4
6
  "type": "boolean",
@@ -26,4 +28,4 @@
26
28
  "type": "DateTime",
27
29
  "value": "2015-08-05T00:35:01.468-07:00"
28
30
  }
29
- }
31
+ }