This is a fork from the official Milesight Repo.
I added usefull and for us needed information about the sensors to all payload encoder to use this information via mqtt.
the added infos are based on the LoRaObject
decoded.devEUI = LoRaObject.devEUI;
decoded.applicationName = LoRaObject.applicationName;
decoded.deviceName = LoRaObject.deviceName;
decoded.rssi = LoRaObject.rxInfo[0].rssi;
decoded.loRaSNR = LoRaObject.rxInfo[0].loRaSNR;
decoded.mac = LoRaObject.rxInfo[0].mac;
decoded.gw = LoRaObject.rxInfo[0].name;
decoded.timestamp = LoRaObject.time;
decoded.type = 'AM307L';
{
"battery": 96,
"co2": 421,
"humidity": 56,
"light_level": 4,
"pir": 1,
"pressure": 1025.4,
"temperature": 27.8,
}
{
"devEUI": "24e124707e111005",
"deviceName": "Multisensor AM307L",
"type": "AM307L",
"gw": "Local Gateway",
"mac": "24e124fffef8706c",
"timestamp": "2024-09-17T18:04:35.151882Z",
"applicationID": 5,
"applicationName": "cloud",
"loRaSNR": 10.5,
"rssi": -89,
"battery": 96,
"co2": 421,
"humidity": 56,
"light_level": 4,
"pir": 1,
"pressure": 1025.4,
"temperature": 27.8,
"tvoc": 1,
}
- Download this repo as ZIP file.
- On your Milesight Gateway go to "Network Server/Payload Codec"
- Choose Local upload and select the downloaded release.zip
Only the bigger Gateways have the feature to upload all codecs at once. On the smaler gateways like the UG63 mini you have to copy each payload codec by hand.