You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am fairly new to Fiware and I am interested in using an IoT-Agent to collect sensor data from an existing MQTT broker. I am trying to make things work by using this tutorial as a starting point and changing some environmentals in the docker-compose.yml.
The MQTT-broker I'd like to connect to uses root CA, mqtts and user credentials to login. My docker-compose looks like this:
iot-agent:
image: fiware/iotagent-ul:1.7.0
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongo-db
- mosquitto
networks:
- default
expose:
- "4041"
ports:
- "4041:4041"
environment:
- IOTA_CB_HOST=orion # name of the context broker to update context
- IOTA_CB_PORT=1026 # port the context broker listens on to update context
- IOTA_NORTH_PORT=4041
- IOTA_REGISTRY_TYPE=mongodb #Whether to hold IoT device info in memory or in a database
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
- IOTA_MONGO_HOST=mongo-db # The host name of MongoDB
- IOTA_MONGO_PORT=27017 # The port mongoDB is listening on
- IOTA_MONGO_DB=iotagentul # The name of the database used in mongoDB - IOTA_MQTT_HOST=hostaddress.de # The host name of the MQTT Broker
- IOTA_MQTT_PORT=8883 # The port the MQTT Broker is listening on to receive topics
- IOTA_MQTT_PROTOCOL=mqtts
- IOTA_MQTT_USERNAME=Mqtt-Account
- IOTA_MQTT_PASSWORD=Mqtt-Password
- IOTA_PROVIDER_URL=http://iot-agent:4041
healthcheck:
test: curl --fail -s http://iot-agent:4041/iot/about || exit 1
After docker-compose up I do provision a service and a device like in the tutorial and send the c|1 message to the according topic of the motion sensor (/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs). But the IoT-Agent does not receive anything. I guess the connection to the broker fails. Can anyone please tell me what I am doing wrong here (most likely serveral things)? Do these environmentals even work with the iot-agent-ul? I found them in the documentation of the iotagent-json.
Edit: I changed the docker-image to iotagent-json and at least now it connects to the broker.
The text was updated successfully, but these errors were encountered:
In general, the tutorials aren't the right place to ask for general FIWARE support - please raise a question on StackOverflow tagged with fiware andiot where it will get a lot more exposure and attention.
You may be hitting the open issue #8 - There was a bug/undocumented change in the latest release of the Ultralight agent - this tutorial is deliberately still using Orion 2.1 and Ultralight 1.7.
The tutorial shows how to listen to an MQTT topic - you can check to see if anything is arriving (or send a spoof measure to check)
You can also check the debug from the IoT Agent to see if the debug log holds anything useful.
As up to now the IoTA-UL does not support TLS connections for mqtt. This is also addressed by this Issue iotagent-ul/issue/354. I fixed that by having the broker on the same VM and doing a TLS termination with NGINX for all the other mqtt traffic.
Hi, I am fairly new to Fiware and I am interested in using an IoT-Agent to collect sensor data from an existing MQTT broker. I am trying to make things work by using this tutorial as a starting point and changing some environmentals in the docker-compose.yml.
The MQTT-broker I'd like to connect to uses root CA, mqtts and user credentials to login. My docker-compose looks like this:
After
docker-compose up
I do provision a service and a device like in the tutorial and send the c|1 message to the according topic of the motion sensor (/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs
). But the IoT-Agent does not receive anything. I guess the connection to the broker fails. Can anyone please tell me what I am doing wrong here (most likely serveral things)? Do these environmentals even work with the iot-agent-ul? I found them in the documentation of the iotagent-json.Edit: I changed the docker-image to iotagent-json and at least now it connects to the broker.
The text was updated successfully, but these errors were encountered: