The Things Node Downlink syntax

I think it is possible to set i.e. the color of the led of the things node by sending a downlink payload but I can not find any description of what the payload bytes would have to be. is there somewhere a description of what happens if the node receives a message?

see - https://www.thethingsnetwork.org/docs/devices/node/api.html

49%20PM

disclaimer: I never tried that myself :wink:

Thanks for the link but as far as i understand these are the api calls that wil set the led color via the software but what i am looking for is how the standard firmware will react to payloads received from the gateway.

The downlinks are part of the generic TTN Arduino LoRaWAN library, not of the specific The Things Node SDK. The latter only takes care of the specific sensors.

So, taken from an example from that generic SDK:

void onMessage(const uint8_t *payload, size_t size, port_t port)
{
  debugSerial.println("-- MESSAGE");
  debugSerial.print("Received " + String(size) + " bytes on port " + String(port) + ":");

  for (int i = 0; i < size; i++)
  {
    debugSerial.print(" " + String(payload[i]));
  }

  debugSerial.println();
}

…along with something like the following in setup():

// Set callback for incoming messages
ttn.onMessage(onMessage);