I wonder how to InfluxDB integration proceed to store multiple gateways uplink meta-data that shall be different.
I suceed to get gateway uplink meta-data when device is received by only one gateway.
But when device is received by 2 (or more) gateways, it seems that only one gateway uplink meta-data is stored ?
if len(pl.RXInfo) != 0 {
var rssi int
for i, rxInfo := range pl.RXInfo {
if i == 0 || rxInfo.RSSI > rssi {
rssi = rxInfo.RSSI
}
}
var snr float64
for i, rxInfo := range pl.RXInfo {
if i == 0 || rxInfo.LoRaSNR > snr {
snr = rxInfo.LoRaSNR
}
}
measurements[0].Values["rssi"] = rssi
measurements[0].Values["snr"] = snr
}
Only best RSSI and SNR are sent to InfluxdB, not all the gateways information.
It means that in a multiple gateway conditions, best SNR and best RSSI are not necessary provided by the same gateway.
May it be possible to store all gateways RSSI, SNR information from uplink metadata in influxdB?