Send Gateway Metadata to Aplication Server

Good evening, I would like to know how to send the metadata that are available on:
aplication server / gateways / [gateway name] / gateway configuration / Metadata.
“Metadata can be used by the ChirpStack Gateway Bridge to push information about the gateway (e.g. ip / hostname, serial number, temperatures, …). This information is automatically updated when gateway statistics are received.”
I am building a gateway with Lipo batteries, solar charging, and a BME280.
I would like to send this data:
Battery percentage.
Temperature and Humidity of the case where the gateway is.

I don’t know how to make the data available for sending to the aplication server.


The latest application server version includes this feature. See v3.9.0. Make sure to update as well network server at v3.8.0

In cases and you point out like getting temperature and humidity, you must have some sort of script that can call the actual software that acquires that data throughout the sensor and output the data into sdtout.

yes, i have application server 3.9.0.
However, when accessing the metadata page (application server / gateways / [gateway name] / gateway configuration / Metadata) only the message appears:

What extra configuration should I do so that the data is shown on this page?

I have a python script that reads bme280 and shows the data when accessed by ssh.
I did not understand how to make the gateway send this data to the application server.
Is there an example for me to follow of how the gateway sends the information to the application server?

Sorry for so many questions, I have some experience with IOT, but I’m new to Lora / ChirpStack

That’s because you have not added yet any metadata. There are two types of meta data that you can set, the first one is static and the other one is dynamic.

Static Metadata
Aims to be used to send information that you know it won’t change on each static packet sent from gateway to chirpstack infra.

For example if you have a serial number as it’s stated in official documentation you can add within meta_data.static at your toml configuration the following:


Producing this at application server:

Dynamic Metadata
When you want to send information that changes over time which is your case.

For that, you must configure where the script is located in meta_data.dynamic.commands at your toml configuration.

temperature="python /opt/gateway-temperature/"

You must in addition define the timeout to wait for the script to throw something into stdout and the execution interval which is the period at which the script should be executed over time.

Results will be similar to those as you would use for static metadata.


Thank you very much @sophiekovalevsky .
I read all the gateway-bridge documentation and for some reason I missed this part.