Skip to content

Commit 70d8bcc

Browse files
authored
Merge pull request #793 from orchestracities/fix/iotagent-manager-payload
Including Lazy, Commands, Internal and Static Attributes in payload to IoT Agent Manager
2 parents c07889b + 64563fb commit 70d8bcc

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

CHANGES_NEXT_RELEASE

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Update codebase to use ES6
1616
- Fix or disable eslint errors
1717
Add prettier code formatting
1818
Add husky and lint-staged
19+
Fix: Add support for lazy and internal_attributes in service notifications to Manager (#768)
1920
Fix: combine multi-entity and expressions with duplicate attribute name, by enabling expression over object_id (which are not duplicated in a attribute mapping contrary to name) (#941)
2021
Fix: bug in legacy and JEXL expression that was not converting "0" to 0
21-
Fix: support for mapping different attributes to the same entity_name
22+
Fix: support for mapping different attributes to the same entity_name

lib/services/common/iotManagerService.js

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function register(callback) {
5050
service_path: service.subservice,
5151
attributes: service.attributes,
5252
static_attributes: service.staticAttributes,
53+
internal_attributes: service.internalAttributes,
54+
lazy: service.lazy,
5355
commands: service.commands,
5456
description: service.description,
5557
timezone: service.timezone,

test/unit/examples/iotamRequests/registrationWithGroups.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@
1818
"type": "Boolean"
1919
}
2020
],
21-
"commands":[{"name":"wheel1","type":"Wheel"}]
21+
"lazy": [
22+
{
23+
"name": "luminescence",
24+
"type": "Lumens"
25+
}
26+
],
27+
"commands":[
28+
{
29+
"name": "wheel1",
30+
"type": "Wheel"
31+
}
32+
]
2233
}
2334
]
2435
}

test/unit/examples/iotamRequests/registrationWithGroupsWithoutCB.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@
1717
"type": "Boolean"
1818
}
1919
],
20-
"commands":[{"name":"wheel1","type":"Wheel"}]
20+
"commands": [
21+
{
22+
"name": "wheel1",
23+
"type": "Wheel"
24+
}
25+
],
26+
"lazy": [
27+
{
28+
"name": "luminescence",
29+
"type": "Lumens"
30+
}
31+
]
2132
}
2233
]
2334
}

test/unit/examples/iotamRequests/registrationWithStaticGroups.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525
"values": "123,12"
2626
}
2727
],
28-
"commands":[{"name":"wheel1","type":"Wheel"}]
28+
"commands": [
29+
{
30+
"name": "wheel1",
31+
"type": "Wheel"
32+
}
33+
]
2934
}
3035
]
3136
}

0 commit comments

Comments
 (0)