Skip to content

ChirpStack Application Server is an open-source LoRaWAN application-server.

License

Notifications You must be signed in to change notification settings

CESARBR/knot-thing-lorawan

 
 

Repository files navigation

KNoT-VirtualThing-LoRaWAN

KNoT VirtualThing-LoRaWAN is based on the ChirpStack Application Server, which is one of the services that ChirpStack uses for the LoRaWAN network.

KNoT VirtualThing-LoRaWAN add to the ChirpStack App Server a new integration that allows interaction with KNoT Cloud services. So, to send the LoRaWAN data to the KNoT Cloud you will need to run all the ChirpStack Services including the KNoT VirtualThing-LoRaWAN instead ChirpStack Application Server.

Basic installation and usage

Requirement

Configuration

  • To run all services go to /ChirpStack_Docker_Compose and unzip the chirpstack-docker.zip and move the directory /chirpstack-docker to out of the /knot-thing-lorawan.
    • The configuration/chirpstack-application-server/chirpstack-application-server.toml file contains the general specifications of the application. Parameters:
      • [application_server.integration] : inform what integration will be set on the platform to send the data.

        • enabled: the array of integrations enabled
      • [application_server.integration.knot]: give to the knot integration all the information that is needed to communicate with the cloud.

        • url : AMQP url used by the KNoT cloud.
        • name: name of the application on the KNoT cloud.
        • user_token: ( important ) Token authenticates the connection with KNoT cloud.
      • [[application_server.integration.knot.devices]] : Array of the KNoT devices configuration. This is an array, for more information about .toml files, go to https://toml.io/en/

        • deveui: LoRaWAN EUI Device
        • token: if you want to put a KNoT id and token that you already have, please first config this section with all the information about the sensors, run the application and then the file will be generated on /knot/deviceContext.yaml, set the right permission to edit the file and put there your ids and tokens then run the application again to load your old ids and tokens.
        • name: device name.
        • [application_server.integration.knot.devices.config.schema] and [application_server.integration.knot.devices.config.event] More informarion about KNoT device config values, go to: https://knot-devel.cesar.org.br/doc/thing/unit-type-value.html?highlight=value%20type
    • On the file docker-compose.yml you will find the information about all the services including the subnetwork used on this compose, you can change it if you wanted on the section networks: lora: ipam: config: - subnet:
    • Important, to run the knot-lorawan-service you need to upload or build the knot-chirpstack-app image as you can see on the section chirpstack-application-server.
  • To send data to the KNoT cloud, the device decoder has to follow a return format: The decode must return an OBJ with a data array as follow:
    {
        "data": [
            {
                "name": "temperature",
                "sensorId": 2,
                "value": 26.9
            },
            {
                "name": "humidity",
                "sensorId": 1,
                "value": 77.5
            }
        ]
    }

Docker build

Building and running

Change the working directory to the project root:

$ cd <path/to/knot-thing-lora>

To create the docker image:

$ docker build . --file Dockerfile --tag knot-chirpstack-app

Some files need to be persisted outside the container to avoid data loss. Go to /chirpstack-docker and write:

$ sudo chmod 777 -R configuration/knot/

To run all services, go to /chirpstack-docker and write:

$ sudo docker-compose up -d

To look at knot-sql logs in container:

$ docker logs -f <docker-container>

ChirpStack Application Server

Tests

ChirpStack Application Server is an open-source LoRaWAN Application Server, part of the ChirpStack open-source LoRaWAN Network Server stack. It is responsible for the node "inventory" part of a LoRaWAN infrastructure, handling of received application payloads and the downlink application payload queue. It comes with a web-interface and API (RESTful JSON and gRPC) and supports authorization by using JWT tokens (optional). Received payloads are published over MQTT and payloads can be enqueued by using MQTT or the API.

Architecture

architecture

Component links

Links

Sponsors

CableLabs SIDNFonds acklio

License

ChirpStack Application Server is distributed under the MIT license. See also LICENSE.

About

ChirpStack Application Server is an open-source LoRaWAN application-server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 61.1%
  • JavaScript 37.9%
  • Shell 0.4%
  • HTML 0.4%
  • Makefile 0.2%
  • Dockerfile 0.0%