I have created a Milesight UC100 formatter, by editing the original script from Milesight.
It works on its own and with the history turned on in the device.
I hope it helps:
Feel free to use it or do what you want with it.
It is specifically for payload formatters in the TTN web console.
Regards
Matt