-
Notifications
You must be signed in to change notification settings - Fork 91
Description
When trying to create a device group (service) I've been having issues with assigning lazy, commands and static attributes to it. Using a similar payload to the example from the documentation:
{
"services": [
{
"entity_type": "Device",
"resource": "/iot/ul",
"protocol": "HTTP_UL",
"apikey": "801230BJKL23Y9090DSFL123HJK09H324HV8732",
"iotagent": "http://agentHost:port",
"commands": [
{
"name": "wheel1",
"type": "Wheel"
}
],
"lazy": [
{
"name": "luminescence",
"type": "Lumens"
}
],
"attributes": [
{
"name": "status",
"type": "Boolean"
}
]
}
]
}
Sending this payload in a POST to /iot/services on a IoT UL Agent doesn't return any error, and the service will be created, however when retrieving this service with a GET, only the attributes seem to have been taken into consideration, as the lazy and commands are not present. Static attributes behave the same way. When creating a Device, lazy, commands and static attributes are all created as expected, but with the device groups only attributes work.
Is this intended behaviour? If so, what determines whether or not you can have lazy, commands or static attributes in a device group? And shouldn't the API respond with a 400 error if those are included when they aren't meant to be?