FIWARE IoT Agent for LoRaWAN protocol (with CayenneLpp and CBOR data models)
10K+
The Internet of Things Agent for LoRaWAN protocol enables data and commands to be exchanged between IoT devices and the NGSI interface of a context broker using the LoRaWAN protocol.
It is based on the IoT Agent Node.js Library. Further general information about the FIWARE IoT Agents framework, its architecture and the common interaction model can be found in the library's GitHub repository.
This project is part of FIWARE. For more information check the FIWARE Catalogue entry for the IoT Agents.
The IoT Agent must be instantiated and connected to an instance of the
Orion Context Broker, a sample docker-compose file can be found
below.
If the IOTA_REGISTRY_TYPE=mongodb, a MongoDB database instance is also required - the
example below assumes that you have a /data directory in your hosting system in order to hold database files - please
amend the attached volume to suit your own configuration.
version: "3.1"
services:
iot-agent:
image: fiware/iotagent-lorawan
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongodb
expose:
- "4041"
ports:
- "4041:4041"
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongo-db"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-lorawan"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
mongodb:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo
ports:
- "27017:27017"
command: --bind_ip_all --smallfiles
volumes:
- mongodb:/data
orion:
image: fiware/orion
hostname: orion
container_name: fiware-orion
depends_on:
- mongodb
expose:
- "1026"
ports:
- "1026:1026"
command: -dbhost mongodb
volumes:
mongo-db: ~
Many settings can be configured using Docker environment variables. A typical IoT Agent Docker container is driven by environment variables such as those shown below:
IOTA_CB_HOST - Hostname of the context broker to update contextIOTA_CB_PORT - Port that context broker listens on to update contextIOTA_NORTH_PORT - Port used for configuring the IoT Agent and receiving context updates from the context brokerIOTA_REGISTRY_TYPE - Whether to hold IoT device info in memory or in a databaseIOTA_MONGO_HOST - The hostname of MongoDB - used for holding device and service informationIOTA_MONGO_PORT - The port that MongoDB is listening onIOTA_MONGO_DB - The name of the database used in MongoDBIOTA_PROVIDER_URL - URL passed to the Context Broker when commands are registered, used as a forwarding URL
location when the Context Broker issues a command to a deviceThe full set of overrides for the general parameters applicable to all IoT Agents are described in the Configuration section of the IoT Agent Library Installation Guide.
Further settings for the IoT Agent for the LoRaWaN Protocol itself - such as specific configurations for the LoRaWaN Protocol - can be found in the IoT Agent for the LoRaWaN Protocol Users Guide.
The Dockerfile associated with this image can be used to build an image in several ways:
Dockerfile retrieves the latest version of the codebase direct from GitHub (the build-arg is
optional):docker build -t iot-agent . --build-arg DOWNLOAD=latest
Dockerfile with the build argument
DOWNLOAD=stabledocker build -t iot-agent . --build-arg DOWNLOAD=stable
Dockerfile with the build argument DOWNLOAD=<version>docker build -t iot-agent . --build-arg DOWNLOAD=1.7.0
GITHUB_ACCOUNT and GITHUB_REPOSITORY
arguments to the docker build command.docker build -t iot-agent . --build-arg GITHUB_ACCOUNT=<your account> --build-arg GITHUB_REPOSITORY=<your repo>
Alternatively, if you want to build directly from your own sources, please copy the existing Dockerfile into file the
root of the repository and amend it to copy over your local source using :
COPY . /opt/iotagent-lora/
Full instructions can be found within the Dockerfile itself.
Content type
Image
Digest
Size
116.1 MB
Last updated
almost 7 years ago
docker pull fiware/iotagent-lorawan