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,