[Fiware-tech-help] Device Group not Found - MONGO-ALARM

Felix Richter felix.richter at student.uni-luebeck.de
Thu Nov 5 11:44:40 CET 2020


I use the following configuration of the Mongo-DB and the IOT Lorawan agent in Docker-Compose.yml:

-----------------------------------------------------------------------------------
mongo-db:
    image: mongo:3.6
    expose:
      - "27017"
    ports:
      - "27017:27017"
    networks:
      - default
    command: --bind_ip_all --smallfiles
    volumes:
      - mongo-db:/data

  iot-agent-lorawan:
    image: fiware/iotagent-lorawan
    depends_on:
      - mongo-db
    expose:
      - "4061"
    ports:
      - "4061:4061"
    networks:
      - default
    environment:
      - "IOTA_CB_HOST=orion"
      - "IOTA_CB_PORT=1026"
      - "IOTA_NORTH_PORT=4061"
      - "IOTA_REGISTRY_TYPE=mongodb"
      - "IOTA_MONGO_HOST=mongo-db"
      - "IOTA_MONGO_PORT=27017"
      - "IOTA_MONGO_DB=iotagent-lorawan"
      - "IOTA_PROVIDER_URL=http://iot-agent:4061"
-----------------------------------------------------------------------------------

Chirpstack is used as the application server.
For the Device-Provisioning i Followed the user manual for the LoRaWan-IOT-Agent.
https://fiware-lorawan.readthedocs.io/en/latest/users_manual/index.html
The Device-Provisioning looks as follows:

-----------------------------------------------------------------------------------
curl localhost:4061/iot/devices -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'fiware-service: organisation' --header 'fiware-servicepath: /sensors' -d @- <<EOF
{
  "devices": [
    {
      "device_id": "Elsys-ERS-Lite_001",
      "entity_name": "Elsys-ERS-Lite_001",
      "entity_type": "LoraDevice",
      "timezone": "Europe/Berlin",
      "attributes": [
        {
          "object_id": "elsys-ers-lite_001_humidity",
          "name": "humidity",
          "type": "Number"
        },
        {
          "object_id": "elsys-ers-lite_001_temperature",
          "name": "temperature",
          "type": "Number"
        },
        {
          "object_id": "elsys-ers-lite_001_vdd",
          "name": "vdd",
          "type": "Number"
        }
      ],
      "internal_attributes": {
        "lorawan": {
          "application_server": {
            "host": "172.25.21.55:1883",
            "username": "",
            "password": "",
            "provider": "loraserver.io"
          },
          "dev_eui": "17ffa804e38f29a8",
          "app_eui": "0000000000000000",
          "application_id": "2",
          "application_key": "3cab62ae157ecf6a6288284fcfed2bbf",
          "data_model": "application_server"
        }
      }
    }
  ]
}
EOF
-----------------------------------------------------------------------------------

The Device-Provisioning is working in the sense, that im getting the correct sensor data.
But after submitting the Device-Provisioning im getting the following Error-Message:

-----------------------------------------------------------------------------------
time=2020-11-05T09:40:13.152Z | lvl=DEBUG | corr=7e6492a8-7418-4f69-bd47-d4f26f606078 | trans=7e6492a8-7418-4f69-bd47-d4f26f606078 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"LoraDevice"} | comp=IoTAgent
time=2020-11-05T09:40:13.153Z | lvl=DEBUG | corr=7e6492a8-7418-4f69-bd47-d4f26f606078 | trans=7e6492a8-7418-4f69-bd47-d4f26f606078 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"LoraDevice"}] | comp=IoTAgent
time=2020-11-05T09:40:13.153Z | lvl=ERROR | corr=7e6492a8-7418-4f69-bd47-d4f26f606078 | trans=7e6492a8-7418-4f69-bd47-d4f26f606078 | op=IoTAgentNGSI.Alarms | srv=n/a | subsrv=n/a | msg=Raising [MONGO-ALARM]: {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group","code":404} | comp=IoTAgent
-----------------------------------------------------------------------------------

Furthermore i have to redo the Device-Provisioning everytime i restart my Docker-Compose since the Device-Provisioning is not getting stored in the Mongo-DB.
What can i do, to improve the situation?

With kind regards,
Felix

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20201105/ff67edb6/attachment.html>


More information about the Fiware-tech-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy