Orion updating the context even on sending even on sending wrong context attributes

asked 2021-10-22 11:26:23 +0100

anuragm20 gravatar image

Hi, I have setup iotagent-json and orion and have registered group and device on iotagent-json. now if i am sending extra attribute in the data-payload (on iotagent port 7896) for updating device attributes value. Iotagent is showing below error: "name":"DEVICENOTFOUND","message":"No device was found with id:GmMobileApplication","code":404} though the entity context is updated in orion for all the correct attributes.

On further analysis i could see that orion is also sending message ""code":"404","reasonPhrase":"No context element found","details":"GmMobileApplication"" to iotagent, yet orion is updating its database.

I am not able to understand the reason for this kindly suggest.

IotAgent json version: 1.17.0 Orion: 3.1.0

edit retag flag offensive close merge delete

Comments

As I know, you have to use an MQTT server as described in the doc (https://fiware-iotagent-json.readthedocs.io/en/latest/stepbystep/index.html). But if you want to send data directly to IoT Agent via HTTP, try to use IoT Agent UL (https://github.com/telefonicaid/iotagent-ul)

pasquy73 gravatar imagepasquy73 ( 2021-10-27 08:48:26 +0100 )edit

Here are my steps to configure IoT Agent UL (1.12.0-next): git clone https://github.com/telefonicaid/iotagent-ul.git cd iotagent-ul/ npm install cp config.js config-ul.js Change params in config-ul.js if you need node bin/iotagent-ul config-ul.js

pasquy73 gravatar imagepasquy73 ( 2021-10-27 08:53:21 +0100 )edit

Provisioning: Service curl -iX POST 'http://localhost:4061/iot/services' -H 'Content-Type: application/json' -H 'fiware-service: openiot' -H 'fiware-servicepath: /'

pasquy73 gravatar imagepasquy73 ( 2021-10-27 08:54:07 +0100 )edit

{ "services": [ { "apikey": "1234567890", "cbroker": "http://localhost:1026", "entity_type": "Thing", "resource": "/iot/d" } ] }

pasquy73 gravatar imagepasquy73 ( 2021-10-27 08:54:58 +0100 )edit

Provisioning: Device curl -iX POST 'http://217.172.12.187:4061/iot/devices' -H 'Content-Type: application/json' -H 'fiware-service: openiot' -H 'fiware-servicepath: /'

pasquy73 gravatar imagepasquy73 ( 2021-10-27 09:01:58 +0100 )edit