Unfortunately, I can only find examples of HTTP downlinks for TTNv2, not for TTNv3.
The aim is to control the two relays of a Dragino LT-22222-L I/O controller via http.
These are the 4 possible states:
relay1 Off relay2 Off AwAA “03 00 00” F-Port 2
relay1 On relay2 On AwEB “03 01 01” F-Port 2
relay1 On relay2 Off AwEA “03 01 00” F-Port 2
relay1 Off relay2 On AwAB “03 00 01” F-Port 2
This is how I’ve tried it so far:
curl --location \ --header ‘Authorization: Bearer NNXXX.My_Token_with_enable_Write_downlink_application_traffic’ \ --header ‘Content-Type: application/json’ \ --header ‘User-Agent: my-integration/my-integration-version’ \ --request POST \ --data ‘{“downlinks”:[{ “frm_payload”:“AwEB”, “f_port”:2 }] }’ \ ‘https://thethings.example.com/api/v3/as/applications/my-application-id/devices/eui-my_end-device_id/down/push’
Nothing appears on the console.
Maybe something has to be used for User-Agent: my-integration/my-integration-version?
Would be very grateful for any example or hint.