2

We are using FIWARE Orion NGSI V2 version and MQTT JSON IoT Agent. We have attached the version of Context Broker and IoT Agent we are using below.

By default, whenever we send telemetry data through MQTT broker, for a device which does not exist in Fiware, the IoT Agent is automatically provisioning/creating the device in IoT Agent and corresponding entity in Context Broker.

We want to restrict this behavior and do not want the IoT Agent to auto-provision devices, but to only accept telemetry data for already registered devices.

We have already tried to set the IOTA_APPEND_MODE environment variable to false, also tried to set the autoprovision flag to false when creating the service group. None of these options are working and autoprovisioning is still happening.

Need your help and guidance on how do we disable the auto-provisioning IoT Agent.

IoT Agent version:

{"libVersion":"2.12.0-next","port":"4041","baseRoot":"/","version":"1.14.0-next"}

Context Broker Version:

    {
"orion" : {
"version" : "2.3.0",
"uptime" : "12 d, 18 h, 50 m, 12 s",
"git_hash" : "764f44bff1e73f819d4e0ac52e878272c375d322",
"compile_time" : "Tue Nov 5 09:16:27 UTC 2019",
"compiled_by" : "root",
"compiled_in" : "cfe8becf7aae",
"release_date" : "Tue Nov 5 09:16:27 UTC 2019",
"doc" : "https://fiware-orion.rtfd.io/en/2.3.0/"
}
}
Kavipriya M
  • 131
  • 5
  • 1
    I have realized you are using pretty old software versions. I'd recommend to update to newest ones (at the moment of writting this, Orion 3.7.0 and IOTA-JSON 1.22.0 (which uses IOTA Lib 2.21.0) – fgalan May 26 '22 at 14:03
  • Yes fgalan, totally agree with you on its time for us to upgrade to newer versions, but since we are in production and have already built many services around the older Orion NGSI V2 and IoT Agent, we want to upgrade with minimal impact and with minimal rework, hence there is a delay in our upgrade. But we will work on it and upgrade at the earliest, thanks for your recommendation and guidance. – Kavipriya M May 27 '22 at 11:48

2 Answers2

2

Have you tried to deactivate the autoprovision flag for a given iotagent device group?

https://github.com/telefonicaid/iotagent-node-lib/blob/f2e0305ca13a181140ee1fd1df8debb5a0838bee/doc/advanced-topics.md#autoprovision-configuration-autoprovision

Best

Perrolobo
  • 543
  • 3
  • 14
  • We tried to deactivate autoprovision flag in iotagent device group with the following JSON payload, but it does not seem to do anything, it did not have any effect on IoT Agent and still autoprovisioning is taking place. Can you please check the JSON payload and confirm if we are doing it right, or provide a sample JSON on how to do it please: { "services": [ { "apikey": "testkey", "cbroker": "http://orion-dev:1026", "resource": "/iot/json", "autoprovision" : "false" } ] } – Kavipriya M May 27 '22 at 11:28
  • We even tried the below payload { "services": [ { "apikey": "testkey", "cbroker": "http://orion-dev:1026", "resource": "/iot/json", "autoprovision" : false } ] } – Kavipriya M May 27 '22 at 11:37
  • 1
    Try to upgrade your deployment to a modern version:Fix: check autoprovision flag before register device https://github.com/telefonicaid/iotagent-json/releases/tag/1.18.0 – Perrolobo May 30 '22 at 09:45
2

Version 1.18.0 seems it fix some issues related with autoprovision flag. As @fgalan mentioned, the version you are running is quite old, so probably you need to upgrade at least to 1.18.0. I really encourage you to upgrade since it is backward compatible.

mapedraza
  • 86
  • 4