Arduino MKR WAN 1300

It looks like you copied this from another forum? If yes: any responses there yet? Please add a link here, and keep the two places in sync… (Also, please see How do I format my forum post? [HowTo])

Some hints for now:

This is where the LoRaWAN downlink data is handled:

…but the following just expects new input. And also expects that from the serial port that you use to connect the device with your computer, not from the LoRaWAN downlink:

Even more, the above seems to expect some text. Don’t send text, neither in uplinks, nor in downlinks.

Instead, schedule a downlink for a single byte, being 8 bits that allow for 8 bitwise flags, and
see Arduino’s bitRead.

And as for controlling things through LoRaWAN: that’s not a typical use case.