Dynamic gateway meta data

Some of my network includes connections to helium which supplies a gateway b58 id, xxhash of the b58 as the gw eui and the gateway animal name. When we get an uplink from a helium device it looks like this below.

{
    "deduplicationId": "80ba2279-96d2-43ef-b9de-394f2ad84b6e",
    "time": "2023-09-06T21:30:02+00:00",
    "deviceInfo": {
        ...
    },
    "devAddr": "78000024",
    "adr": true,
    "dr": 4,
    "fCnt": 1011,
    "fPort": 136,
    "confirmed": false,
    "data": "AAss6sQlDnUZ/wg=",
    "object": {
        ...
    },
    "rxInfo": [
        {
            "gatewayId": "1037d81126469feb",
            "uplinkId": 45747,
            "time": "2023-09-06T21:30:02+00:00",
            "rssi": -123,
            "snr": -10,
            "context": "BUzVUw==",
            "metadata": {
                "region_common_name": "AU915",
                "gateway_id": "11s9eZL87C5b7g3eU12xaQn7kuc4SrczR2HP8m7uZUiQa2BUqn",
                "gateway_name": "interesting-amethyst-mouse",
                "region_config_id": "au915_1"
            },
            "crcStatus": "CRC_OK"
        },
        {
            "gatewayId": "2864afc74baa57f1",
            "uplinkId": 23247,
            "time": "2023-09-06T21:30:02+00:00",
            "rssi": -128,
            "snr": -12.2,
            "context": "T8P/rQ==",
            "metadata": {
                "gateway_id": "11kJam7LdWe43zeVm73ATLpSgdWL6ZQCqvXvYmUyt5UcZdWcxTV",
                "region_common_name": "AU915",
                "gateway_name": "jovial-silver-hedgehog",
                "region_config_id": "au915_1"
            },
            "crcStatus": "CRC_OK"
        }
    ],
    "txInfo": {
        "frequency": 917000000,
        "modulation": {
            "lora": {
                "bandwidth": 125000,
                "spreadingFactor": 8,
                "codeRate": "CR_4_5"
            }
        }
    }
}

In the rxInfo - is it possible to set or manipulate the data given in the metadata field by helium or even add another field? I would like to add in the gateway lat and lon locations which i can lookup via helium cli or rpc directly or store them locally in a db as new ones are seen for quicker lookup perhaps.

Is this at all possible and if so how would I go about it? I was hoping it may be possible by using the gateway meta dynamic option in the chirpstack.toml but it may need to happen before this point.

1 Like

I ended up working out a solution which seems to fit around both systems which i currently have deployed and monitoring as a WIP.