iotagent-ul icon indicating copy to clipboard operation
iotagent-ul copied to clipboard

Define resource path on service group and use it to send measurements

Open thinkingmik opened this issue 1 year ago • 2 comments

Hi,

I'm using docker image fiware/iotagent-ul:1.25.0 and I have a problem with iota service group and sending device measurement to it.

This is my service group (note the resource attribute set as /iot/json/mydevice):

{
    "services": [
        {
            "apikey": "52t4z7url7",
            "cbroker": "http://orion:23626",
            "entity_type": "Device",
            "resource": "/iot/json/mydevice"
        }
   ]
}

If I send a measurement like:

POST /iot/json/mydevice?k=52t4z7url7&i=001
Host: iotagent:23632
Content-Type: text/plain

temp|14

The endpoint respond with 404. It only works with default resource path /iot/d. Why I can't be able to send measurement to my custom resource path /iot/json/mydevice?

thinkingmik avatar Mar 23 '23 10:03 thinkingmik

Hi @fgalan, I have investigated the issue and found some fix. I was able to post and get services when I do changes in config.js file as default resource from iot/d to iot/json/mydevice. I would like to know if it is possible if we can create multiple services on different resource path as I was unable to do so.

KeshavSoni2511 avatar May 02 '23 12:05 KeshavSoni2511

I would like to know if it is possible if we can create multiple services on different resource path as I was unable to do so.

It would be a nice to have feature. It would be great if somebody in the community (maybe you? ;) could contribute with a pull request implementing it. The issue has been marked with "help wanted" label. Thanks in advance!

fgalan avatar May 09 '23 13:05 fgalan