I am having an issue with a Lorawan S2100 Data Logger with a PAR sensor attached where I get a -2 error which is triggered by the payload message being the incorrect length. I believe it is due to the payload formatter script I am using.
Here is a link to it: TTN Formatter - Pastebin.com
I use this script for older Lorawan temperature/humidity sensors as well as the newer S2106 pH/Temp sensor. Any help would be appreciated, thanks.