Open JuanCarlosSecmotic opened 1 year ago
Please, could you provide more information?
Additionally, could you provide curl like requests for all the steps?
thanks for answering, I have updated the issue with a zip with the necessary files to test it
@JuanCarlosSecmotic could you please open a PR with providing test case showing this issue failing? This would help a lot.
Testing with latests version of iotagent-ul and the following env vars
I've see that this request: Post -> http://localhost:4041/v2/op/update { "actionType": "update", "entities": [ { "type": "Light", "id": "Light:motion1", "polling": true, "ring" : { "type": "command", "value": "44423" } } ] }
should be performed over context broker, not over iotagent (http://localhost:1026/v2/op/update and providing fiware-service and fiware-servicepath). And then "polling":true
should not be provided to avoid errors.
I am trying to be able to receive a command when sending data, everything works fine when I create a device, but when the device is self-registered by a device group this command fails.
Create device group
Post -> http://localhost:4041/iot/services
{ "services": [ { "resource": "/iot/d", "apikey": "801230BJKL23Y9090DSFL123HJK09H324HV8732", "type": "Light", "polling": true, "attributes": [ { "object_id": "c", "name": "count", "type": "Integer" } ], "commands": [ { "name": "ring", "type": "command" } ] } ] }
I generate the device Post -> http://localhost:7896/iot/d?i=motion1&k=801230BJKL23Y9090DSFL123HJK09H324HV8732
c|3323
then I update the command through the iot Post -> http://localhost:4041/v2/op/update
{ "actionType": "update", "entities": [ { "type": "Light", "id": "Light:motion1", "polling": true, "ring" : { "type": "command", "value": "44423" } } ] }
it responds 204 but in orion the error has already been logged.
ring_info has this value -> There was an error in the response of a device to a command []:RequestError: Missing
url
propertyI have been testing, the autogenerated device does not have the attribute called polling in the IoT database, if I edit it manually and add it as true, the command works
UPDATE (compose file + config + postman collection added) environment.zip