iotagent-node-lib 4.7.0 → 4.9.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 (110) hide show
  1. package/.github/workflows/ci.yml +6 -3
  2. package/.nyc_output/e4b1fe20-197e-4221-9f8d-6db65ff234b2.json +1 -0
  3. package/.nyc_output/processinfo/e4b1fe20-197e-4221-9f8d-6db65ff234b2.json +1 -0
  4. package/.nyc_output/processinfo/index.json +1 -0
  5. package/CHANGES_NEXT_RELEASE +1 -0
  6. package/Changelog +793 -0
  7. package/doc/README.md +1 -0
  8. package/doc/admin.md +8 -4
  9. package/doc/api.md +8 -4
  10. package/doc/devel/northboundinteractions.md +122 -15
  11. package/doc/models/models.md +260 -0
  12. package/doc/requirements.txt +1 -1
  13. package/docker/Mosquitto/Dockerfile +1 -1
  14. package/lib/commonConfig.js +11 -2
  15. package/lib/fiware-iotagent-lib.js +15 -11
  16. package/lib/jexlTranformsMap.js +182 -35
  17. package/lib/model/Command.js +9 -0
  18. package/lib/model/Device.js +1 -0
  19. package/lib/services/commands/commandRegistryMongoDB.js +15 -1
  20. package/lib/services/commands/commandService.js +3 -3
  21. package/lib/services/common/domain.js +4 -3
  22. package/lib/services/devices/deviceRegistryMongoDB.js +1 -1
  23. package/lib/services/devices/deviceService.js +11 -2
  24. package/lib/services/devices/devices-NGSI-LD.js +1 -2
  25. package/lib/services/devices/devices-NGSI-v2.js +1 -2
  26. package/lib/services/ngsi/entities-NGSI-LD.js +69 -13
  27. package/lib/services/ngsi/ngsiService.js +3 -1
  28. package/lib/services/northBound/contextServer-NGSI-LD.js +5 -3
  29. package/lib/services/northBound/contextServer-NGSI-v2.js +12 -3
  30. package/lib/services/northBound/contextServer.js +2 -1
  31. package/lib/services/northBound/northboundServer.js +2 -1
  32. package/lib/services/northBound/restUtils.js +6 -2
  33. package/lib/templates/createDevice.json +4 -0
  34. package/lib/templates/updateDevice.json +4 -0
  35. package/package.json +1 -1
  36. package/test/functional/config-test.js +1 -1
  37. package/test/functional/testUtils.js +13 -2
  38. package/test/unit/expressions/jexlExpression-test.js +165 -1
  39. package/test/unit/ngsi-ld/examples/contextRequests/createDatetimeProvisionedDevice.json +1 -4
  40. package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDevice.json +3 -12
  41. package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceMultientity.json +3 -12
  42. package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic.json +6 -24
  43. package/test/unit/ngsi-ld/examples/contextRequests/createProvisionedDeviceWithGroupAndStatic2.json +1 -4
  44. package/test/unit/ngsi-ld/examples/contextRequests/updateContext1.json +1 -4
  45. package/test/unit/ngsi-ld/examples/contextRequests/updateContext3WithStatic.json +1 -4
  46. package/test/unit/ngsi-ld/examples/contextRequests/updateContext4.json +1 -4
  47. package/test/unit/ngsi-ld/examples/contextRequests/updateContext5.json +1 -4
  48. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin6.json +1 -4
  49. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin7.json +1 -4
  50. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin8.json +4 -2
  51. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAliasPlugin9.json +1 -4
  52. package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandError.json +3 -9
  53. package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandExpired.json +13 -19
  54. package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandFinish.json +13 -19
  55. package/test/unit/ngsi-ld/examples/contextRequests/updateContextCommandStatus1.json +4 -9
  56. package/test/unit/ngsi-ld/examples/contextRequests/updateContextCompressTimestamp1.json +1 -4
  57. package/test/unit/ngsi-ld/examples/contextRequests/updateContextCompressTimestamp2.json +1 -4
  58. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin1a.json +1 -4
  59. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin2.json +2 -8
  60. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin29.json +1 -4
  61. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin4.json +2 -8
  62. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin4a.json +3 -12
  63. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin6.json +3 -5
  64. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin7.json +1 -4
  65. package/test/unit/ngsi-ld/examples/contextRequests/updateContextExpressionPlugin8a.json +1 -4
  66. package/test/unit/ngsi-ld/examples/contextRequests/updateContextJsonProperty.json +13 -0
  67. package/test/unit/ngsi-ld/examples/contextRequests/updateContextListProperty.json +14 -0
  68. package/test/unit/ngsi-ld/examples/contextRequests/updateContextListRelationship.json +14 -0
  69. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin1.json +2 -8
  70. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin2.json +2 -8
  71. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin3.json +3 -8
  72. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin4.json +1 -4
  73. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin5.json +2 -8
  74. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityPlugin8.json +2 -8
  75. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin1.json +2 -8
  76. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin2.json +1 -4
  77. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin3.json +1 -4
  78. package/test/unit/ngsi-ld/examples/contextRequests/updateContextMultientityTimestampPlugin4.json +2 -8
  79. package/test/unit/ngsi-ld/examples/contextRequests/updateContextRelationship.json +11 -0
  80. package/test/unit/ngsi-ld/examples/contextRequests/updateContextValueType1.json +51 -0
  81. package/test/unit/ngsi-ld/examples/contextRequests/updateContextValueType2.json +65 -0
  82. package/test/unit/ngsi-ld/examples/contextRequests/updateContextVocabProperty.json +11 -0
  83. package/test/unit/ngsi-ld/examples/contextRequests/updateProvisionCommands1.json +2 -8
  84. package/test/unit/ngsi-ld/examples/contextRequests/updateProvisionDeviceStatic.json +1 -4
  85. package/test/unit/ngsi-ld/general/startup-test.js +3 -0
  86. package/test/unit/ngsi-ld/lazyAndCommands/command-test.js +1 -1
  87. package/test/unit/ngsi-ld/lazyAndCommands/lazy-devices-test.js +71 -1
  88. package/test/unit/ngsi-ld/ngsiService/attributeTypes-test.js +293 -0
  89. package/test/unit/ngsi-ld/ngsiService/unsupported-endpoints-test.js +0 -10
  90. package/test/unit/ngsi-ld/ngsiService/value-types-test.js +221 -0
  91. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast1.json +0 -11
  92. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast10.json +0 -14
  93. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast2.json +0 -11
  94. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast3.json +0 -11
  95. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast4.json +0 -11
  96. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast5.json +0 -7
  97. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast6.json +0 -17
  98. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast7.json +0 -19
  99. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast8.json +0 -14
  100. package/test/unit/ngsi-ld/examples/contextRequests/updateContextAutocast9.json +0 -14
  101. package/test/unit/ngsi-ld/ngsiService/languageProperties-test.js +0 -109
  102. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast1.json +0 -8
  103. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast2.json +0 -8
  104. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast3.json +0 -8
  105. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast4.json +0 -8
  106. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast5.json +0 -8
  107. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast6.json +0 -8
  108. package/test/unit/ngsiv2/examples/contextRequests/updateContextAutocast7.json +0 -8
  109. package/test/unit/ngsiv2/ngsiService/subscriptions-test.js +0 -326
  110. /package/test/unit/ngsi-ld/examples/contextRequests/{updateContextLanguageProperties1.json → updateContextLanguageProperty.json} +0 -0
@@ -5,17 +5,12 @@
5
5
  "type": "Robot",
6
6
  "position_status": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "commandStatus",
10
- "@value": "UNKNOWN"
11
- }
8
+ "value": "UNKNOWN"
9
+
12
10
  },
13
11
  "position_info": {
14
12
  "type": "Property",
15
- "value": {
16
- "@type": "commandResult",
17
- "@value": " "
18
- }
13
+ "value": " "
19
14
  }
20
15
  }
21
- ]
16
+ ]
@@ -3,10 +3,7 @@
3
3
  "@context": "http://context.json-ld",
4
4
  "TheTargetValue": {
5
5
  "type": "Property",
6
- "value": {
7
- "@type": "DateTime",
8
- "@value": "2007-11-03T13:18:05.000Z"
9
- }
6
+ "value": "2007-11-03T13:18:05.000Z"
10
7
  },
11
8
  "id": "urn:ngsi-ld:Light:light1",
12
9
  "state": {
@@ -3,10 +3,7 @@
3
3
  "@context": "http://context.json-ld",
4
4
  "TheTargetValue": {
5
5
  "type": "Property",
6
- "value": {
7
- "@type": "DateTime",
8
- "@value": "2007-11-03T13:18:05.000Z"
9
- }
6
+ "value": "2007-11-03T13:18:05.000Z"
10
7
  },
11
8
  "id": "urn:ngsi-ld:Light:light1",
12
9
  "state": {
@@ -9,10 +9,7 @@
9
9
  },
10
10
  "weather": {
11
11
  "type": "Property",
12
- "value": {
13
- "@type": "Summary",
14
- "@value": "Humidity NaN and pressure 20800"
15
- }
12
+ "value": "Humidity NaN and pressure 20800"
16
13
  }
17
14
  }
18
15
  ]
@@ -9,17 +9,11 @@
9
9
  },
10
10
  "humidity": {
11
11
  "type": "Property",
12
- "value": {
13
- "@type": "Percentage",
14
- "@value": "12"
15
- }
12
+ "value": "12"
16
13
  },
17
14
  "weather": {
18
15
  "type": "Property",
19
- "value": {
20
- "@type": "Summary",
21
- "@value": "Humidity 6 and pressure 20800"
22
- }
16
+ "value": "Humidity 6 and pressure 20800"
23
17
  }
24
18
  }
25
19
  ]
@@ -9,10 +9,7 @@
9
9
  },
10
10
  "weather": {
11
11
  "type": "Property",
12
- "value": {
13
- "@type": "Summary",
14
- "@value": "Humidity NaN and pressure 20800"
15
- }
12
+ "value": "Humidity NaN and pressure 20800"
16
13
  }
17
14
  }
18
15
  ]
@@ -5,10 +5,7 @@
5
5
  "type": "WeatherStation",
6
6
  "weather": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Summary",
10
- "@value": "Humidity 6 and pressure 1040"
11
- }
8
+ "value": "Humidity 6 and pressure 1040"
12
9
  },
13
10
  "pressure25": {
14
11
  "type": "Property",
@@ -16,10 +13,7 @@
16
13
  },
17
14
  "humidity12": {
18
15
  "type": "Property",
19
- "value": {
20
- "@type": "Percentage",
21
- "@value": "12"
22
- }
16
+ "value": "12"
23
17
  }
24
18
  }
25
19
  ]
@@ -5,10 +5,7 @@
5
5
  "type": "WeatherStation",
6
6
  "weather": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Summary",
10
- "@value": "Humidity 6 and pressure 1040"
11
- }
8
+ "value": "Humidity 6 and pressure 1040"
12
9
  },
13
10
  "pressure25": {
14
11
  "type": "Property",
@@ -16,17 +13,11 @@
16
13
  },
17
14
  "humidity12": {
18
15
  "type": "Property",
19
- "value": {
20
- "@type": "Percentage",
21
- "@value": "12"
22
- }
16
+ "value": "12"
23
17
  },
24
18
  "alive": {
25
19
  "type": "Property",
26
- "value": {
27
- "@type": "None",
28
- "@value": "undefined"
29
- }
20
+ "value": "undefined"
30
21
  },
31
22
  "updated": {
32
23
  "type": "Property",
@@ -5,11 +5,9 @@
5
5
  "manufacturer": {
6
6
  "type": "Property",
7
7
  "value": {
8
- "@type": "Object",
9
- "@value": {
10
- "VAT": "U12345678",
11
- "name": "Manufacturer1"
12
- }
8
+ "VAT": "U12345678",
9
+ "name": "Manufacturer1"
10
+
13
11
  }
14
12
  },
15
13
  "type": "Light"
@@ -3,14 +3,11 @@
3
3
  "@context": "http://context.json-ld",
4
4
  "revisions": {
5
5
  "type": "Property",
6
- "value": {
7
- "@type": "Array",
8
- "@value": [
6
+ "value": [
9
7
  "v0.1",
10
8
  "v0.2",
11
9
  "v0.3"
12
10
  ]
13
- }
14
11
  },
15
12
  "id": "urn:ngsi-ld:Light:light1",
16
13
  "type": "Light"
@@ -7,10 +7,7 @@
7
7
  },
8
8
  "weather": {
9
9
  "type": "Property",
10
- "value": {
11
- "@type": "Summary",
12
- "@value": "Humidity NaN and pressure NaN"
13
- }
10
+ "value": "Humidity NaN and pressure NaN"
14
11
  },
15
12
  "id": "urn:ngsi-ld:WeatherStation:ws1",
16
13
  "type": "WeatherStation"
@@ -0,0 +1,13 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "config": {
5
+ "type": "JsonProperty",
6
+ "json": {
7
+ "foo": "bar"
8
+ }
9
+ },
10
+ "id": "urn:ngsi-ld:Light:light1",
11
+ "type": "Light"
12
+ }
13
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "lightValues": {
5
+ "type": "ListProperty",
6
+ "listValue": [
7
+ 0,
8
+ 1
9
+ ]
10
+ },
11
+ "id": "urn:ngsi-ld:Light:light1",
12
+ "type": "Light"
13
+ }
14
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "placedIn": {
5
+ "type": "ListRelationship",
6
+ "listObject": [
7
+ "unr:ngsi-ld:xxx",
8
+ "unr:ngsi-ld:yyyy"
9
+ ]
10
+ },
11
+ "id": "urn:ngsi-ld:Light:light1",
12
+ "type": "Light"
13
+ }
14
+ ]
@@ -5,10 +5,7 @@
5
5
  "type": "WeatherStation",
6
6
  "pressure": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Hgmm",
10
- "@value": "52"
11
- }
8
+ "value": "52"
12
9
  }
13
10
  },
14
11
  {
@@ -17,10 +14,7 @@
17
14
  "type": "Higrometer",
18
15
  "humidity": {
19
16
  "type": "Property",
20
- "value": {
21
- "@type": "Percentage",
22
- "@value": "12"
23
- }
17
+ "value": "12"
24
18
  }
25
19
  }
26
20
  ]
@@ -4,10 +4,7 @@
4
4
  "id": "urn:ngsi-ld:WeatherStation:ws4",
5
5
  "pressure": {
6
6
  "type": "Property",
7
- "value": {
8
- "@type": "Hgmm",
9
- "@value": "52"
10
- }
7
+ "value": "52"
11
8
  },
12
9
  "type": "WeatherStation"
13
10
  },
@@ -15,10 +12,7 @@
15
12
  "@context": "http://context.json-ld",
16
13
  "humidity": {
17
14
  "type": "Property",
18
- "value": {
19
- "@type": "Percentage",
20
- "@value": "12"
21
- }
15
+ "value": "12"
22
16
  },
23
17
  "id": "urn:ngsi-ld:WeatherStation:Higro2000",
24
18
  "type": "WeatherStation"
@@ -4,10 +4,7 @@
4
4
  "id": "urn:ngsi-ld:WeatherStation:ws4",
5
5
  "pressure": {
6
6
  "type": "Property",
7
- "value": {
8
- "@type": "Hgmm",
9
- "@value": "52"
10
- }
7
+ "value": "52"
11
8
  },
12
9
  "sn": {
13
10
  "type": "Property",
@@ -19,10 +16,8 @@
19
16
  "@context": "http://context.json-ld",
20
17
  "humidity": {
21
18
  "type": "Property",
22
- "value": {
23
- "@type": "Percentage",
24
- "@value": "12"
25
- }
19
+ "value": "12"
20
+
26
21
  },
27
22
  "id": "urn:ngsi-ld:WeatherStation:Station Number 50",
28
23
  "type": "WeatherStation"
@@ -5,10 +5,7 @@
5
5
  "type": "Higrometer",
6
6
  "pressure": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Hgmm",
10
- "@value": "16"
11
- }
8
+ "value": "16"
12
9
  }
13
10
  }
14
11
  ]
@@ -5,10 +5,7 @@
5
5
  "type": "Higrometer",
6
6
  "pressure": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Hgmm",
10
- "@value": "17"
11
- }
8
+ "value": "17"
12
9
  }
13
10
  },
14
11
  {
@@ -17,10 +14,7 @@
17
14
  "type": "Higrometer",
18
15
  "pressure": {
19
16
  "type": "Property",
20
- "value": {
21
- "@type": "Hgmm",
22
- "@value": "16"
23
- }
17
+ "value": "16"
24
18
  }
25
19
  }
26
20
  ]
@@ -5,10 +5,7 @@
5
5
  "type": "Higrometer",
6
6
  "pressure": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Hgmm",
10
- "@value": "17"
11
- },
8
+ "value": "17",
12
9
  "unitCode": "Hgmm"
13
10
  }
14
11
  },
@@ -18,10 +15,7 @@
18
15
  "type": "Higrometer",
19
16
  "pressure": {
20
17
  "type": "Property",
21
- "value": {
22
- "@type": "Hgmm",
23
- "@value": "16"
24
- }
18
+ "value": "16"
25
19
  }
26
20
  }
27
21
  ]
@@ -5,10 +5,7 @@
5
5
  "type": "WeatherStation",
6
6
  "pressure": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Hgmm",
10
- "@value": "52"
11
- },
8
+ "value": "52",
12
9
  "observedAt": "2016-05-30T16:25:22.304Z"
13
10
  }
14
11
  },
@@ -18,10 +15,7 @@
18
15
  "type": "Higrometer",
19
16
  "humidity": {
20
17
  "type": "Property",
21
- "value": {
22
- "@type": "Percentage",
23
- "@value": "12"
24
- },
18
+ "value": "12",
25
19
  "observedAt": "2023-03-21T18:30:30.948Z"
26
20
  }
27
21
  }
@@ -5,10 +5,7 @@
5
5
  "type": "Higrometer",
6
6
  "humidity": {
7
7
  "type": "Property",
8
- "value": {
9
- "@type": "Percentage",
10
- "@value": "12"
11
- },
8
+ "value": "12",
12
9
  "observedAt": "2024-06-25T16:04:13.914Z"
13
10
  }
14
11
  }
@@ -10,10 +10,7 @@
10
10
  "type": "Higrometer",
11
11
  "humidity": {
12
12
  "type": "Property",
13
- "value": {
14
- "@type": "Percentage",
15
- "@value": "16"
16
- },
13
+ "value": "16",
17
14
  "observedAt": "2023-03-21T16:57:54.046Z"
18
15
  }
19
16
  }
@@ -4,18 +4,12 @@
4
4
  "PING_info": {
5
5
  "observedAt": "2015-08-05T07:35:01.468Z",
6
6
  "type": "Property",
7
- "value": {
8
- "@type": "commandResult",
9
- "@value": "1234567890"
10
- }
7
+ "value": "1234567890"
11
8
  },
12
9
  "PING_status": {
13
10
  "observedAt": "2015-08-05T07:35:01.468Z",
14
11
  "type": "Property",
15
- "value": {
16
- "@type": "commandStatus",
17
- "@value": "OK"
18
- }
12
+ "value": "OK"
19
13
  },
20
14
  "id": "urn:ngsi-ld:SensorCommand:sensorCommand",
21
15
  "type": "SensorCommand"
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "locatedIn": {
5
+ "type": "Relationship",
6
+ "object": "urn:ngsi-ld:XXX"
7
+ },
8
+ "id": "urn:ngsi-ld:Light:light1",
9
+ "type": "Light"
10
+ }
11
+ ]
@@ -0,0 +1,51 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "id": "urn:ngsi-ld:Light:ws1",
5
+ "type": "Light",
6
+ "consumption": {
7
+ "type": "Property",
8
+ "value": 1,
9
+ "valueType": "Number"
10
+ },
11
+ "alive": {
12
+ "type": "Property",
13
+ "value": "foo"
14
+ },
15
+ "updated": {
16
+ "type": "Property",
17
+ "value": false,
18
+ "valueType": "Boolean"
19
+ },
20
+ "manufacturer": {
21
+ "type": "Property",
22
+ "value": {
23
+ "hello": "world"
24
+ },
25
+ "valueType": "Object"
26
+ },
27
+ "revisions": {
28
+ "type": "Property",
29
+ "value": [
30
+ 1,
31
+ 2
32
+ ],
33
+ "valueType": "Array"
34
+ },
35
+ "date": {
36
+ "type": "Property",
37
+ "value": "2025-07-18",
38
+ "valueType": "Date"
39
+ },
40
+ "time": {
41
+ "type": "Property",
42
+ "value": "14:22:11",
43
+ "valueType": "Time"
44
+ },
45
+ "datetime": {
46
+ "type": "Property",
47
+ "value": "2025-07-18T14:22:11.000Z",
48
+ "valueType": "DateTime"
49
+ }
50
+ }
51
+ ]
@@ -0,0 +1,65 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "id": "urn:ngsi-ld:Light:ws1",
5
+ "type": "Light",
6
+ "consumption": {
7
+ "type": "Property",
8
+ "value": {
9
+ "@type": "Number",
10
+ "@value": 1
11
+ }
12
+ },
13
+ "alive": {
14
+ "type": "Property",
15
+ "value": "foo"
16
+ },
17
+ "updated": {
18
+ "type": "Property",
19
+ "value": {
20
+ "@type": "Boolean",
21
+ "@value": false
22
+ }
23
+ },
24
+ "manufacturer": {
25
+ "type": "Property",
26
+ "value": {
27
+ "@type": "Object",
28
+ "@value": {
29
+ "hello": "world"
30
+ }
31
+ }
32
+ },
33
+ "revisions": {
34
+ "type": "Property",
35
+ "value": {
36
+ "@type": "Array",
37
+ "@value": [
38
+ 1,
39
+ 2
40
+ ]
41
+ }
42
+ },
43
+ "date": {
44
+ "type": "Property",
45
+ "value": {
46
+ "@type": "Date",
47
+ "@value": "2025-07-18"
48
+ }
49
+ },
50
+ "time": {
51
+ "type": "Property",
52
+ "value": {
53
+ "@type": "Time",
54
+ "@value": "14:22:11"
55
+ }
56
+ },
57
+ "datetime": {
58
+ "type": "Property",
59
+ "value": {
60
+ "@type": "DateTime",
61
+ "@value": "2025-07-18T14:22:11.000Z"
62
+ }
63
+ }
64
+ }
65
+ ]
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "@context": "http://context.json-ld",
4
+ "category": {
5
+ "type": "VocabProperty",
6
+ "vocab": "actuator"
7
+ },
8
+ "id": "urn:ngsi-ld:Light:light1",
9
+ "type": "Light"
10
+ }
11
+ ]
@@ -4,17 +4,11 @@
4
4
  "id": "urn:ngsi-ld:Light:light1",
5
5
  "move_info": {
6
6
  "type": "Property",
7
- "value": {
8
- "@type": "commandResult",
9
- "@value": " "
10
- }
7
+ "value": " "
11
8
  },
12
9
  "move_status": {
13
10
  "type": "Property",
14
- "value": {
15
- "@type": "commandStatus",
16
- "@value": "UNKNOWN"
17
- }
11
+ "value": "UNKNOWN"
18
12
  },
19
13
  "type": "Light"
20
14
  }
@@ -18,10 +18,7 @@
18
18
  },
19
19
  "serverURL": {
20
20
  "type": "Property",
21
- "value": {
22
- "@type": "URL",
23
- "@value": "http://fakeserver.com"
24
- }
21
+ "value": "http://fakeserver.com"
25
22
  },
26
23
  "type": "MicroLights"
27
24
  }
@@ -89,6 +89,7 @@ describe('NGSI-LD - Startup tests', function () {
89
89
  process.env.IOTA_FALLBACK_PATH = 'smartgondor';
90
90
  process.env.IOTA_LD_SUPPORT_NULL = 'false';
91
91
  process.env.IOTA_LD_SUPPORT_DATASET_ID = 'false';
92
+ process.env.IOTA_LD_SUPPORT_DATA_TYPE = 'valueType';
92
93
 
93
94
  nock.cleanAll();
94
95
 
@@ -125,6 +126,7 @@ describe('NGSI-LD - Startup tests', function () {
125
126
  delete process.env.IOTA_FALLBACK_PATH;
126
127
  delete process.env.IOTA_LD_SUPPORT_NULL;
127
128
  delete process.env.IOTA_LD_SUPPORT_DATASET_ID;
129
+ delete process.env.IOTA_LD_SUPPORT_DATA_TYPE;
128
130
  });
129
131
 
130
132
  afterEach(function (done) {
@@ -155,6 +157,7 @@ describe('NGSI-LD - Startup tests', function () {
155
157
  config.getConfig().mongodb.port.should.equal('5555');
156
158
  config.getConfig().mongodb.db.should.equal('themongodb');
157
159
  config.getConfig().mongodb.replicaSet.should.equal('customReplica');
160
+ config.getConfig().server.ldSupport.dataType.should.equal('valueType');
158
161
  done();
159
162
  });
160
163
  });