I need to forwarding decoded payload to an API Endpoint. Unfortunately one of the objects from the JSON package should contain the device EUI in order to assign the device. I can not change the API Endpoint rules, so I need to send within the decoding Payload the Device EUI. Does anyone have an Idea how I could realize it? This is what I put so far in the decoder, and it misses just the object “Device-EUI”.
function Decoder(bytes, port) {
var params = {
};
// Time measurement
time = (bytes[4] << 8) | bytes[3];
// Status measurement
status = bytes[0] & 0x1;
params.timestamp = time;
params.type = "PIR"
params.value = status;
return params;
}
Ok thanks, Just to be sure. If I have an endpoint like https://app.example.com/endpoint/data and want to send to it via HTTP Webhook of v3 a defined JSON package which contains both payload objects and the device-Id it is possible ?
The http integration will send a json message as defined by TTN which contains among many other things the device information (including EUI) and payload.
And nothing else. That means no meta data and so on which is automatically sended as defined by TTN. Can I realize it in TTN respectively TTI or do I need a seperate cloud envirement?