Hi!
I am new to this, and I am using the wavetrend water temperature sensor (Water Temperature Sensor - Alliot Technologies) with TTS.
I have connected the device with TTS, now to set its time interval. Is there anyone who could assist, I am having trouble how could I do it.
Whilst in service the device generally originates messages and the application server does not need to provide a response, however at activation there is a message exchange between
device and application server that is designed to provide the device it’s configuration. This
process needs to succeed for the device to be successfully installed.
An overview of the process is as follows:
- On activation the Device sends an Installation Request message (type HEX ‘00’) to the
Application server. - The Application Server must respond by scheduling a Device Configuration message
(type HEX ‘01’) using the Network Server downlink mechanism. The Device
Configuration message will contain the specific configuration for the device together
with the ‘nonce’ value provided in the Installation Request message. - The Device will respond to the Application Server with an Installation Response
message (type HEX ‘02’). The Application Server should inspect the ‘error’ field of this
message to determine success of the installation process.
But I am not sure, where to configure it in TTS.
Reference
Code:
$raw = sprintf("%s%s%s%08x%s%s%s%s%s%s%s%s%s", “01”, “02”, $sequence, time(),$nonce, $downlink_days, $flags, $scald_threshold, $freeze_threshold, $report_period, $sensor_1_config, $sensor_1_config, $sensor_1_config)
$data = base64_encode(hex2bon($raw));
$json=sprintf("{“downlinks”:[{“frm_payload”:"%s",“f_port”:1,“priority”:“NORMAL”}]}",$data);
$url =sprint(“https://thethings.example.com/api/v3/as/applications/app1/webhooks/wh1/devices/dev1/down/push”,$device_id)
$defults = array(CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $json);
$ch = curl_init();
curl_setopt($ch, $defualts);
$request_headers = array (“Authorization: Bearer NNSXS.XXXXXXXXX”,“Content-Type: application/json”);
curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);
curl_exec($ch)
Kind regards,