skip to Main Content

I have some issues with the Orion Context Broker. I am using raspberry pi to publish the JSON data to mosquitto broker that runs as a docker container. I can receive the data from the publisher, and the broker should pass the data to the Orion Context Broker. I created an entity like this:

curl localhost:1026/v2/entities -s -S -H 'Content-Type: application/json' -d @- <<EOF
{
  "id": "SensTemp",
  "type": "Sensor",
  "temperature": {
     "value": 28,
     "type": "Float"
   }
 }
EOF

I can update the temperature value manually without any problems using the curl command. The problem is that the data from my mosquitto container doesnt go to the Orion Context Broker. Here are my docker containers:

version: "3.3"
services:

          mongo-db:
            image: mongo:3.6
            hostname: mongo-db
            container_name: db-mongo
            expose:
             - "27017"
            ports:
             - "27017:27017"
            networks:
             - default
            command: --bind_ip_all --smallfiles

          orion:
             image: fiware/orion
             ports:
                 - "1026:1026"
             networks:
                 - default
             depends_on:
                 - mongo-db
             command: -dbhost mongo-db -logLevel DEBUG
             healthcheck:
                   test: ["CMD", "curl", "-f", "http://0.0.0.0:1026/version"]
                   interval: 1m
                   timeout: 10s
                   retries: 3

          mqtt:
            image: eclipse-mosquitto:latest
            container_name: mqtt
            ports:
              - "1883:1883"
              - "9001:9001"
            expose:
              - "1883"
              - "9001"
            volumes:
              - /opt/mosquitto/var/run:/var/run

Here is the proof of received data from my raspberry pi publisher:

wiresharkproofmqttarriving

How can I set up the Orion to get the data from my mosquitto container?

3

Answers


  1. Chosen as BEST ANSWER

    Problem Solved! The problem was in the Agent, i was using Ultralight IOT agent instead of the JSON Agent.


  2. When yo create the device, Did you indicate the transport?

    For example

     "device_id":   "streetLight001",
     "entity_name": "urn:ngsi-ld:StreetLight:001",
     "entity_type": "StreetLight",
     "protocol":    "PDI-IoTA-UltraLight",
     "transport":   "MQTT",
     "timezone":    "America/Bogota",
    
    Login or Signup to reply.
  3. When yo create the device, Did you indicate the transport and attributes (see this image)?
    entity creation with atributes

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search