Home | Documentation (v4) | Documentation (v3) | Community forum

Events

Events are generated by the ChirpStack Gateway Bridge and forwarded to the configured integration. Depending the marshaler configuration, these are sent as:

  • JSON: JSON based on the Protobuf Buffers JSON mapping (for debugging)
  • Protobuf: Protocol Buffers binary encoding (recommended)

For the Protobuf message definitions, please refer to gw.proto.

Event types

stats - Gateway statistics

Defined by the GatewayStats Protobuf message.

JSON example:

{
	"gatewayId": "0016c001f153a14c",
	"time": "2022-08-03T14:37:59Z",
	"rxPacketsReceived": 1,
	"rxPacketsReceivedOk": 1,
	"txPacketsReceived": 1,
	"txPacketsEmitted": 1,
	"txPacketsPerFrequency": {
		"867300000": 1
	},
	"rxPacketsPerFrequency": {
		"867300000": 1
	},
	"txPacketsPerModulation": [{
		"modulation": {
			"lora": {
				"bandwidth": 125000,
				"spreadingFactor": 7,
				"codeRate": "CR_4_5",
				"polarizationInversion": true
			}
		},
		"count": 1
	}],
	"rxPacketsPerModulation": [{
		"modulation": {
			"lora": {
				"bandwidth": 125000,
				"spreadingFactor": 7,
				"codeRate": "CR_4_5"
			}
		},
		"count": 1
	}],
	"txPacketsPerStatus": {
		"OK": 1
	}
}

Defined by the UplinkFrame Protobuf message.

JSON example:

{
	"phyPayload": "gKb+agGABQABOIc6cwQ=",
	"txInfo": {
		"frequency": 867300000,
		"modulation": {
			"lora": {
				"bandwidth": 125000,
				"spreadingFactor": 7,
				"codeRate": "CR_4_5"
			}
		}
	},
	"rxInfo": {
		"gatewayId": "0016c001f153a14c",
		"uplinkId": 7895,
		"time": "2022-08-03T14:37:43.383634108Z",
		"rssi": -52,
		"snr": 13.75,
		"context": "xwx0GQ=="
	}
}

Acknowledgement (or error) after a downlink command.

The index of items correlates to the same order of the down command payload items.

Defined by the DownlinkTxAck Protobuf message.

JSON example:

{
	"gatewayId": "0016c001f153a14c",
	"downlinkId": 894104280,
	"items": [{
		"status": "OK"
	}, {}]
}

exec - Command execution response

Defined by the GatewayCommandExecResponse Protobuf message.

JSON example:

{
    "gatewayID": "0016c001f153a14c",
    "execId": 529413,
    "stdout": "[BASE64 ENCODED BLOB]",
    "stderr": "[BASE64 ENCODED BLOB]",
    "error": "optional error message"
}

raw - Raw packet-forwarder event

This payload is used for raw packet-forwarder events that are not integrated with the ChirpStack Gateway Bridge. Currently these are the:

Defined by the RawPacketForwarderEvent Protobuf message.

JSON example:

{
    "gatewayID": "0016c001f153a14c",
    "payload": "[BASE64 ENCODED BLOB]"
}