# Getting Started

ANTARES is a Horizontal IoT Platform, which means we try to make our services as generic as possible so that your vertical IoT solution can adapt to the commonly used architecture. Many IoT cases can be solve using our services, for example, smart home, smart metering, asset tracking, smart building, and others.

This documentation will show you how to send sensor data to ANTARES. There are four steps that can be take to achieve this:&#x20;

1. Account registration&#x20;
2. Create app&#x20;
3. Add device&#x20;
4. Sending data to Antares

More detailed steps can be found after this segment. If any information is incorrect or any part of this tutorial is incomplete, please feel free to let us know at <support@antares.id>.


# Account Registration

The ANTARES console is available at the [following link](https://console.antares.id/). If you already have an ANTARES account, please login directly to the console. If not, you need to register in order to use the ANTARES service. Want to register? Please visit the [following link](https://console.antares.id/) or click the Register button on the console page.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/8FZ8hWMGyPQ9MiYhC5ur/BUAT%20GITBOOK.png" alt=""><figcaption><p>Login Page Interface</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/oKWNFKGURznrshaMzWs8/BUAT%20GITBOOK.png" alt=""><figcaption><p>Register Page Interface</p></figcaption></figure>

After filling in the required things, we will send you a verification email. Please click on the link contained in the email to verify your account. **If the verification email has not appeared in your email**, you can click **Resend Verification** as shown in the image below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/YXlTDQ4lWMMlkm07rdFe/BUAT%20GITBOOK.png" alt=""><figcaption><p>Resend Verification Page Interface</p></figcaption></figure>

Since you have created an account, you can directly enter the ANTARES console. The display will be like below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FNYdt001RXAvJZTUoMtli%2Fimage.png?alt=media&amp;token=e7872bda-d9fb-4bb4-83cf-887767dfd28e" alt=""><figcaption></figcaption></figure>


# Create App

Before creating an application, you must **generate an access key**. This process is only done once if you are a new ANTARES user. You can find this option by visiting the menu **Account -> Access Key -> Get Access key**. Access Key is your account identity. Please keep your access key safe.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FLkI79Rf4Ni7jRDPbBQBb%2Fimage.png?alt=media&amp;token=0a0e57c6-13df-4bdc-ac80-6a1e316d348e" alt=""><figcaption></figcaption></figure>

After that, we can create the application. Back to the **Applications** menu on the dashboard page, click **Create an Application**. You will go to the following page:

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/phnft9APHh7sYIORTEud/BUAT%20GITBOOK.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Gbn6T6oSJE63xKHwdOIi/BUAT%20GITBOOK.png" alt=""><figcaption></figcaption></figure>

Please fill in the required information. For the **Application Name**, efforts are made to **give a name that is unique and different from the previous application name**, and for the **Application ID** it is adjusted to the needs and **is not required**. After all the required information is filled in click **+Add.**

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/SXtdql0GYuiLHvASbWd7/BUAT%20GITBOOK.png" alt=""><figcaption></figcaption></figure>

**Congratulations, you have made your first application at ANTARES!** You can find the application on your dashboard.


# Add Devices to the Application

The Internet of Things is concerned with objects or **things**. In this segment, we will create a **device** for storing data.

After we create an application and click on the application that has been created, the page below will appear. Please click **Add Device**. In addition to connecting **Add Device** to add a device, you can also create a device using the RESTful API in the [HTTP API](https://antares.id/id/docs.html#http) segment. You can also subscribe to the device, so if new data enters the device, you will get a **notification**. You can take advantage of these notifications to create logic in the programs you make.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fk3H8Xg4nRfEK3Me64QkB%2Fimage.png?alt=media&amp;token=ef441b68-b829-48fc-9ed7-7e52e2f91751" alt=""><figcaption></figcaption></figure>

First, create a device name like in the image below, in this tutorial, the device will be named **"sensorSignal"**. **then also select one of the active packages you have**. If you have set the device name and selected the package then click **+ Add**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FQzpdjwSDVAmgvkZqCVl9%2Fimage.png?alt=media&amp;token=98085b4e-e8ab-4d04-933e-961bd89a3166" alt=""><figcaption></figcaption></figure>

A display will appear of the device that has been created. Data from the device will be entered and displayed in the table provided as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FEX49MPewyubRP0Q6LtCb%2Fimage.png?alt=media&amp;token=9949e8e9-109a-4593-8c1f-b8ecac9305e8" alt=""><figcaption></figcaption></figure>

Devices that have been successfully created will be displayed on the Applications dashboard page.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FgBIv1CCoraQueziN1KCO%2Fimage.png?alt=media&amp;token=232e9663-f41d-4624-8df5-7d98d6211df8" alt=""><figcaption></figcaption></figure>

Congratulations, you have successfully created a device. Follow the next step to put the data on the device that you have created.


# Installation Board and Library

This documentation will explain how to install the Board in the Arduino IDE which is required to be a common prerequisite in the Antares documentation.

{% content-ref url="/pages/aBIPRFiOJkl7W6lKK31M" %}
[ESP8266](/en/getting-started/installation-board-and-library/esp8266)
{% endcontent-ref %}

{% content-ref url="/pages/z8qNglw4NIeocq7KXTbJ" %}
[ESP32](/en/getting-started/installation-board-and-library/esp32)
{% endcontent-ref %}


# ESP8266

This tutorial will explain the installation of the ESP8266 board used in the ESP8266 Documentation found on the Antares Platform.

## Installation Step

### 1. Open Arduino IDE , Click Files -> Preferences

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7n0QDeGb1opahUK83Jg0/Preferences.png" alt=""><figcaption></figcaption></figure>

### 2. Enter the following URL into Additional Board Manager URLs and click OK.

```
http://arduino.esp8266.com/stable/package_esp8266com_index.json
```

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/c2s53Lxx95BS6zid0fFb/Additional%20URL%20esp8266.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can add multiple URLs by adding commas to separate them if needed.

```
URL1,URL2
example : 
http://arduino.esp8266.com/stable/package_esp8266com_index.json,URL2
```

{% endhint %}

### 3. Click **Tools -> Board -> Boards Manager**

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/L21QcCy6hO54plKZVMxb/Tools.png" alt=""><figcaption></figcaption></figure>

### 4. Enter keyword "esp8266" in the search box to make it easier for you. If you have found esp8266 by ESP8266 Community, in the Antares documentation using version 3.1.2 and then click Install.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/cMIKxeVJOngzP82QOuZY/Instal%20ESP8266%20Vers.png" alt=""><figcaption></figcaption></figure>

### 5.  Wait a while for the installation to complete

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/1D9pNk9WSBnclE8mYvzz/Instalasi%20Berhasil.png" alt=""><figcaption></figcaption></figure>


# ESP32

This tutorial will explain the installation of the ESP32 board used in the Documentation on the Antares Platform.

## Installation Step

### 1. Open Arduino IDE , then click Files -> Preferences

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/WBt6Xjkz8gBsWV8BVpPd/Preferences%20(1).png" alt=""><figcaption></figcaption></figure>

### 2. Enter the following URL into Additional Board Manager URLs and click OK.

```
/https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
```

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/b7klFzGhb2mtVWhwARVM/Additional%20URL.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can add multiple URLs by adding commas to separate them if needed.

```
URL1,URL2
example :
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,URL2
```

{% endhint %}

### 3. Click **Tools -> Board -> Boards Manager**

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/r2yWQ0jzq30OG8W2diz4/Tools.png" alt=""><figcaption></figcaption></figure>

### 4. Enter keyword "esp32" in the search box to make it easier for you. If you have found esp32 by Espressif System, in the Antares documentation using version 2.0.11 and then click Install.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/opvYqfzmOVjGzNiJ0qQC/instalasi%20Board.png" alt=""><figcaption></figcaption></figure>

### 5. Wait a while for the installation to complete

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/koVJd6LMXWWipTGB8AlZ/Instalasi%20ESP32%20Berhasil.png" alt=""><figcaption></figcaption></figure>


# STM32

This tutorial will explain the installation of the STM32 board used in the LoRa STM32 Documentation found on the Antares Platform.

## Follow These Steps

### 1. Open the Arduino IDE, select Files -> Preferences

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FX8J0aLxDTD1E8NgFra2m%2Fimage.png?alt=media&amp;token=32b787e4-53b5-4412-867b-3b2f4826f7a7" alt=""><figcaption></figcaption></figure>

### 2. Enter the following URL into the Additional Board Manager URLs box then click OK.

```
https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json
```

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FFV0QZYVrMye2ZNEdCmPm%2Fimage.png?alt=media&amp;token=ad0bde8d-a753-4c66-8272-65d831f55c6c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can add multiple URLs by adding commas to separate them if needed.
{% endhint %}

### 3. Select Tools -> Board -> Boards Manager

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FK60oGsnocac06KkTTT7S%2Fimage.png?alt=media&amp;token=79cbd82a-aa32-4540-b65f-8aaecd2e42d3" alt=""><figcaption></figcaption></figure>

### 4.Enter the keyword "esp8266" in the search box to make it easier for you. If you have found esp8266 by ESP8266 Community, the Antares documentation here uses version 3.1.2 and then click Install.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FLrE9lRLEVWjpKl6GefLO%2Fimage.png?alt=media&amp;token=a32de199-71f8-4299-b962-b9e1d1246622" alt=""><figcaption></figcaption></figure>

### 5.  Wait for some time for the installation to complete

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F2qECrs9rui7mnd4j6tBw%2Fimage.png?alt=media&amp;token=859f63ef-68d3-4d2f-944c-44b95e99058b" alt=""><figcaption></figcaption></figure>


# Arduino IDE Installation

## Installation Step

### 1. Visit [arduino.cc](https://www.arduino.cc/) and click [software](https://www.arduino.cc/en/software/) for installation.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/2vpc2KzMleUR5D8Dshqq/Laman%20Arduino.png" alt=""><figcaption></figcaption></figure>

### 2. Choose installation bundle math with Operation System that used.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/we1zkSMMmnU6uMvyCSUN/Download%20Pilih%20OS.png" alt=""><figcaption></figcaption></figure>

### 3. Click  "JUST DOWNLOAD" to do the process download.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Xm94ip86jBStAmsn0r1g/Just%20Download.png" alt=""><figcaption></figcaption></figure>

### 4. Save the Installation Bundle into your storage.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/B4UYThRVBXFKsS9ph2L5/Laman%20Download.jpg" alt=""><figcaption></figcaption></figure>

### 5. Choose "I Agree" for the next step of process installation.&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/5mxQVBXXuR5XOhgc1eCO/I%20Agree.png" alt=""><figcaption></figcaption></figure>

### 6. Choose "Next" for the next step of process installation..&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/UG2rp0iLpQzZq7Wp45be/Next1.png" alt=""><figcaption></figcaption></figure>

### 7. Choose "Install" for the next step of process installation.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/nEyMPdVJ7nVAkiwytCpn/Installation.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can change the "Destination Folder" according to the desired installation location.&#x20;
{% endhint %}

### 8. Wait until installation process done.&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/wa6DyJDL3d16SxgLJwU6/Installation%20Process.jpg" alt=""><figcaption></figcaption></figure>

### 9.  Choose "Install" for the next step of process installation.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7a6NfJWtBnbKhcxgsOHu/tutorial-install-arduino-ide-9.jpg" alt=""><figcaption></figcaption></figure>

### 10. Installation done

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/lyMDWx1tgBlf23HtxHTc/Finish.jpg" alt=""><figcaption></figcaption></figure>

**Congratulation, Installation is finish!**


# Arduino Library Installation

On this page contains an explanation of how to install the library on the Arduino IDE. The libraries needed for simple projects in the Antares documentation are as follows.

{% content-ref url="/pages/nu1pT8EkyJpA0h1652VG" %}
[Antares LoRaWAN](/en/getting-started/arduino-library-installation/antares-lorawan)
{% endcontent-ref %}

{% content-ref url="/pages/VN0oDiN8gAmOOpcE3r4g" %}
[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endcontent-ref %}

{% content-ref url="/pages/cv7WjXFDOqCkMdIkZ9Z0" %}
[Antares Wi-Fi MQTT](/en/getting-started/arduino-library-installation/antares-wi-fi-mqtt)
{% endcontent-ref %}

{% content-ref url="/pages/lbZY2ZSc6IlDlAKdauPl" %}
[DHT11 Sensor Library](/en/getting-started/arduino-library-installation/dht11-sensor-library)
{% endcontent-ref %}

{% content-ref url="/pages/jG6ms5mM8UU1zhYyTwQD" %}
[Adafruit SSD1306](/en/getting-started/arduino-library-installation/adafruit-ssd1306)
{% endcontent-ref %}


# Antares LoRaWAN

In this documentation you will be explained how to install the Antares LoRaWAN library on the Arduino IDE. This library is used to test the ESP32 LoRa Antares documentation. This library is suitable for the **Lynx-32 Development Board**.

## Please follow these steps:

### 1. Download Library

The first step is to download the following library in .zip format.

{% file src="/files/pl5CT5Uxc0zJkt232rhG" %}

{% hint style="warning" %}
Notes: The libraries we support are only for **Lynx-32 Antares Development Board** hardware.
{% endhint %}

### 2. Installing Zip Library

In this step you are asked to open the library manager by opening the **Sketch menu> Include Library> Add .Zip Library** as shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/qJNXyQQiwzrllxg9rX2g/1_manage%20Libraries.png" alt=""><figcaption><p>Image of the Sketch menu in the Arduino IDE.</p></figcaption></figure>

Find the location of the downloaded library file, then input the downloaded file as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/H4SDwqFxOFArHKJwF80v/2_Pencarian%20Antares%20Lorawan%20Library.png" alt=""><figcaption><p>Figure Select Zip File in the Arduino IDE.</p></figcaption></figure>

### 3. Success Indicators

If the library installation is successful, you can see the example programme in the **File > Example > Antares LoRaWAN menu**. The result looks like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/fRuQi0hzMiagWCbUHCas/4_installed.png" alt=""><figcaption><p>Example image of LoRaWAN Antares in the Arduino IDE.</p></figcaption></figure>


# Antares Wi-Fi HTTP

In this documentation you will be explained how to install the Antares ESP library with HTTP protocol and Wi-Fi connectivity on the Arduino IDE. This library is used to test the ESP32 Wi-Fi HTTP project in the Antares documentation. This library is suitable for **ESP32** and **ESP8266**.

## Follow These Steps

### 1. Download Library

The first step is to download the following library in .zip format.

{% file src="/files/LnyrYr62WjYXairbpsG2" %}

{% hint style="warning" %}
Notes: The above library can be used for ESP 32 and ESP 8266 using Wi-Fi communication and HTTP communication protocol..
{% endhint %}

### 2. Installing Zip Library

In this step you are asked to open the library manager by opening the **Sketch menu> Include Library> Add .Zip Library** as shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/n3IA4k1QQLampMIYtRNf/1_include.png" alt=""><figcaption><p>Image of the Sketch menu in the Arduino IDE.</p></figcaption></figure>

Find the location of the library file that has been downloaded, then input the downloaded file as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/ZNucOLm8Q9nISzSq2Ebn/2_select.png" alt=""><figcaption><p>Image Select Zip File in the Arduino IDE.</p></figcaption></figure>

### 3. Success Indicators

If the library installation is successful, you can see the example programme in the **File > Examples > Antares ESP HTTP menu.** The result looks like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/zXI3DgTaP79wTZ6ACwMz/3_success.png" alt=""><figcaption><p>Figure Example of Antares ESP HTTP and MQTT in the Arduino IDE.</p></figcaption></figure>


# Antares Wi-Fi MQTT

In this documentation you will be explained how to install the Antares ESP library with **MQTT** protocol and Wi-Fi connectivity on the Arduino IDE. This library is used to test the ESP32 Wi-Fi MQTT project in the Antares documentation. This library is suitable for **ESP32** and **ESP8266**.

## Follow These Steps

### 1. Download Library

The first step is to download the following library in .zip format.

{% file src="/files/kpYjaaiaEOcPNBKfqCI1" %}

{% hint style="warning" %}
Notes: The above library can be used for ESP 32 and ESP 8266 using Wi-Fi communication and MQTT communication protocol.
{% endhint %}

### 2. Install Zip Library

In this step you are asked to open the library manager by opening the **Sketch menu> Include Library> Add .Zip Library** as shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/n3IA4k1QQLampMIYtRNf/1_include.png" alt=""><figcaption><p>Image of the Sketch menu in the Arduino IDE.</p></figcaption></figure>

Find the location of the library file that has been downloaded, then input the downloaded file as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/ZNucOLm8Q9nISzSq2Ebn/2_select.png" alt=""><figcaption><p>Image Select Zip File in the Arduino IDE.</p></figcaption></figure>

### 3. Success Indicators

If the library installation is successful, you can see the example programme in the **File > Examples > Antares ESP MQTT** menu. The result looks like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/zXI3DgTaP79wTZ6ACwMz/3_success.png" alt=""><figcaption><p>Figure Example of Antares ESP HTTP and MQTT in the Arduino IDE.</p></figcaption></figure>


# DHT11 Sensor Library

In this documentation you will be explained how to install the DHT11 library in the Arduino IDE. This library is used to try out the simple projects offered in the Antares documentation.

## Follow These Steps

### 1. Open Library Manager

In this step you are asked to open the library manager by opening the **Sketch > Include Library > Manage library** menu as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/J1Dgg50mL2uXLcUEO4Mm/1_manage%20Libraries.png" alt=""><figcaption><p>Image of the Sketch menu in the Arduino IDE.</p></figcaption></figure>

### 2. Install DHT Sensor Library

In this step you need to find the DHT11 Sensor Library in the Library Manager as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/jhx4mtqFwq6Wy7BfxQ8e/2_Pencarian%20DHTSensor%20Library.png" alt=""><figcaption><p>Image of DHT Sensor Library search in Library Manager.</p></figcaption></figure>

Make sure the library version used is the same as that used in the **ESP32** project, in the Antares documentation using the **DHT Sensor Library Version 1.4.4.** Then after being sure of the library version, then do the installation by pressing Install as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/kMR7mSSAwkN1Q3ZsPcNc/3_Install.png" alt=""><figcaption><p>Image of DHT Sensor Library Installation.</p></figcaption></figure>

### 3. Success Indicators

If the library installation is successful, the results will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/H1LmnYp8MGtYP8vgd2Ou/4_installed.png" alt=""><figcaption><p>An indicator of successful library installation in the Arduino IDE.</p></figcaption></figure>


# Adafruit SSD1306

In this documentation you will be explained how to install the Adafruit SSD1306 OLED library in the Arduino IDE. This library is used to try out the simple projects offered in the Antares documentation.

## Follow These Steps

### 1. Open Library Manager

In this step you are asked to open the library manager by opening the **Sketch > Include Library > Manage library** menu as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/J1Dgg50mL2uXLcUEO4Mm/1_manage%20Libraries.png" alt=""><figcaption><p>Image of the Sketch menu in the Arduino IDE.</p></figcaption></figure>

### 2. Install Adafruit SSD1306

In this step you need to find the DHT11 Sensor Library in the Library Manager as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/BiBgO5Kk4lbgjVsEdOHs/2_Pencarian%20Adafruit%20SSD1306%20Library.png" alt=""><figcaption><p>Image of Adafruit SSD1306 Library search in Library Manager.</p></figcaption></figure>

Make sure the library version used is the same as that used in the ESP32 project, in the Antares documentation using **Adafruit SSD1306 Version 2.5.7.** Then after being sure of the library version, then do the installation by pressing **Install** as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/zJ7Ux4v9kzJVVpPEzC6v/3_Install.png" alt=""><figcaption><p>Installation image of Adafruit SSD1306 Library.</p></figcaption></figure>

### 3. Success Indicators

If the library installation is successful, the results will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/IiZJBDtrFdgIztGz0pTK/4_installed.png" alt=""><figcaption><p>An indicator of successful library installation in the Arduino IDE.</p></figcaption></figure>


# STM32 Cube IDE Installation

## Follow These Steps :&#x20;

1. ### Visit the  [STM32 Cube IDE](https://www.st.com/en/development-tools/stm32cubeide.html) page. Click  [Get Software](https://www.st.com/en/development-tools/stm32cubeide.html#get-software) to install

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fdr8ZvdtKp2cRKj4emNCP%2Fimage.png?alt=media&amp;token=74c5752e-4709-45c3-8d0a-65ec78f58679" alt=""><figcaption><p>STM32 Installation Page</p></figcaption></figure>

2. ### Select the installation package according to the Operating System used, select Get Latest.

   <figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FYIGgzqXQtQpbwAIaebdY%2Fimage.png?alt=media&amp;token=8740b89e-30d2-49b9-b871-62331bbde985" alt=""><figcaption><p>Software Download Page</p></figcaption></figure>

3. ### &#x20;After clicking Get Latest, the License Agreement will appear. You only need to click Accept.

   <figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fklh9CTDAg92Ogq3prc66%2Fimage.png?alt=media&amp;token=789f5e6f-e4ed-49dd-9ad1-99de32e55df4" alt=""><figcaption><p>Accept License Agreement</p></figcaption></figure>

You need to fill in some data such as name and email to be able to download the software because the download link will be sent to the email. For those of you who already have an account, you can directly login using your account and can immediately download the software.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FE9mvurHhuj9zNK5F1peI%2Fimage.png?alt=media&amp;token=2346f541-e0f7-43be-ba2e-c917f730a928" alt=""><figcaption><p>Fill name and email</p></figcaption></figure>

4. ### After the STM32 CUBE IDE software has been successfully downloaded, you need to install the software by clicking the next button until the install button appears.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FxzfTADxlTh1PxzGzNxuV%2Fimage.png?alt=media&amp;token=1ba2c5f0-7300-4cae-987b-a6936162c7d0" alt=""><figcaption><p>Install STM32 CUBE IDE</p></figcaption></figure>

5. ### Installation Done


# Expansion Pack I-CUBE-LRWAN Installation

## Follow These Steps : &#x20;

### 1. Visit the [I-CUBE-LRWAN](https://www.st.com/en/embedded-software/i-cube-lrwan.html) page. Click  [Get Software](https://www.st.com/en/embedded-software/i-cube-lrwan.html#get-software)  to install&#x20;

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FfcZjrR6Mhc2MlXpuiCfB%2Fimage.png?alt=media&amp;token=855dde52-b623-4790-8bde-971737ccc0d5" alt=""><figcaption><p>Software Download Page</p></figcaption></figure>

### 2. Select the installation package according to the Operating System being used, select Get Latest.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPEhcmtiXDqdquZUsodj5%2Fimage.png?alt=media&amp;token=4d505abf-fa3d-46cb-870c-5805ec315e36" alt=""><figcaption><p>Get Software</p></figcaption></figure>

### 3. After clicking Get Latest, the License Agreement will appear. You only need to click Accept.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F5Ok9juijY9NFgcFAXVCw%2Fimage.png?alt=media&amp;token=9f4521d3-5d0a-4151-b04f-4f36b4b9d141" alt=""><figcaption><p>Accept License Agreement</p></figcaption></figure>

You need to fill in some data such as name and email to be able to download the software because the download link will be sent to the email. For those of you who already have an account, you can directly login using your account and can immediately download the software.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FIAObDAfxtJQ7zYIswWOr%2Fimage.png?alt=media&amp;token=f9ac8329-3abc-4568-819c-e27b23eaf199" alt=""><figcaption><p>Fill name dan email</p></figcaption></figure>

### 4. After downloading the expansion pack, you can extract the downloaded file to the directory you want.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F02xay08U6He2y1KPrgZy%2Fimage.png?alt=media&amp;token=b5265de5-e93f-481c-8831-e464e21afe0e" alt=""><figcaption><p>Extract Expansion File</p></figcaption></figure>

### 5. Package Installation Completed.


# Software Installation

This page contains an explanation of how to install the software & tools used in the Antares documentation. The software & tools needed are as follows.

{% content-ref url="/pages/6E1stFA7MSkc0qeSSNqF" %}
[MQTTX Installation](/en/getting-started/software-installation/mqttx-installation)
{% endcontent-ref %}

{% content-ref url="/pages/tu455rRp3uHggb6ccuoX" %}
[Postman Installation](/en/getting-started/software-installation/postman-installation)
{% endcontent-ref %}


# MQTTX Installation

## Installation Steps

### 1. Visit the [mqttx](https://mqttx.app/) . Click [download](https://mqttx.app/downloads) to install

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/eSaSnegg5sPkvKpKmzF9/1.webp" alt=""><figcaption></figcaption></figure>

### 2. Select the installation package according to the Operating System used, then it will be downloaded automatically

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/NGDt7tP01bRWlTxQUNIa/2.webp" alt=""><figcaption></figcaption></figure>

### 3.Check the installation on your device's download page

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/DGiFOWQqv5Bbc9FSHBst/3.jpg" alt=""><figcaption></figcaption></figure>

### 6. Select "Next" to continue the installation process.&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/69vkgR32VhYwE5c9XrM5/4.jpg" alt=""><figcaption></figcaption></figure>

### 7. Select "Install" to continue the installation process.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/WTKj9c3o8qCAEdq4RnK8/5.webp" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can change the "Destination Folder" according to the desired installation location by clicking Browse..&#x20;
{% endhint %}

### 8. Wait for the installation process to finish.&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/ZUpgWNPeEowbEwBe2j1v/6.jpg" alt=""><figcaption></figcaption></figure>

### 9. Installation complete&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/HdZbwvqo9bQxHEnzOPlP/7.jpg" alt=""><figcaption></figcaption></figure>


# Postman Installation

**Follow These Steps**

### 1. Visit the page [Postman API Platform](https://www.postman.com/) . Click the Icon according to the Operating System being used&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/BzGP45fJbFTOCqQY5417/spaces_Vedf7jNkP3vIvCJzAXum_uploads_3Z2XI3P1DRFNlEspjDr2_Icon%20Windows%20POSTMAN.webp" alt=""><figcaption></figcaption></figure>

### 2. On the Postman Download page click the Windows 64-bit icon to download, in this tutorial using the Windows 64-bit Operating System.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/aOj6bG3sb991ykdXijtT/spaces_Vedf7jNkP3vIvCJzAXum_uploads_DUiUq1aZNqkoNFog6xw2_Download%20POSTMAN.webp" alt=""><figcaption></figcaption></figure>

### 3. Check the installation on your device's download page, then double-click to install.&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/lddOo9SaeOOTtOglN4Ab/spaces_Vedf7jNkP3vIvCJzAXum_uploads_1oIFxYEL3xpgwC6RZY86_Downloaded%20POSTMAN%20(2).webp" alt=""><figcaption></figcaption></figure>

### 4.The installation process starts when a page like the one below appears&#x20;

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/WCav5myfhcDRaOjlWDyi/spaces_Vedf7jNkP3vIvCJzAXum_uploads_CrCvBXyV3EBSEJpjMpQO_Instalasi%20Postman%20Process%20POSTMAN.webp" alt=""><figcaption></figcaption></figure>

### 6.The POSTMAN page will open automatically after the installation process is complete as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/1DVQvh3BpQPY1D40YNj7/spaces_Vedf7jNkP3vIvCJzAXum_uploads_i44j2bDsHP1DaROz3ofg_Instalasi%20Selesai%20POSTMAN.webp" alt=""><figcaption><p><br></p></figcaption></figure>

### 7. Installation Complete


# Operating System (OS) on SD Card Installation

Before using the Raspberry Pi, the SD Card that will be installed on the Raspberry Pi board must be installed with the operating system (OS). The way that can be done to install the OS is to use the Raspberry Pi Imager, which can be downloaded at the [link](https://www.raspberrypi.com/software/).  After downloading and installing Raspberry Pi Imager on a computer, you can then follow the following steps.

## Follow These Steps

### 1. Install the SD Card on the Computer

You can install an SD card on your computer using a card reader.

### 2. Format SD Card

Make sure the SD Card is empty by formatting it first. After formatting, open "Disk Management" in the search bar. Make sure that the SD Card is in Healthy condition (marked in blue) as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/tJy4sprWK4UwncC9079z/1_Located%20Volume.png" alt=""><figcaption><p>Formatted SD Card (Healthy Condition)</p></figcaption></figure>

If the SD Card has an unallocated volume, you can right-click on the disc and select New Simple Volume as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/xztEOPGWBb4qzW7sBph4/2_Unallocated%20Volume.png" alt=""><figcaption><p>SD Card with Unallocated Volume</p></figcaption></figure>

In the window that appears, select Next until the Format Partition section. Follow the settings as shown below and then select Next again and press Finish.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FjGuTXIb44sg0OVgSmnHA%2Fimage.png?alt=media&amp;token=1400172a-7f43-4bc2-969c-7f9100ce7b55" alt=""><figcaption><p>Settings on SD Card Partition Format</p></figcaption></figure>

### 3. Open Raspberry Pi Imager

Here is the initial view of the newly opened Raspberry Pi Imager.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FtCShkqKPWcbNk78BgEZR%2Fimage.png?alt=media&amp;token=e875a94a-d069-4ac2-ae41-65b8cd351285" alt=""><figcaption><p>Tampilan Awal Raspberry Pi Imager</p></figcaption></figure>

### 4. Select the Operating System Type(OS)

In the application, select "CHOOSE OS", so that various operating systems (OS) that can be installed will appear. In the OS list that appears, select Raspberry Pi OS (32-bit) as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/2s5fAlLLeDc7jk8MfxYb/5_OS%20Pi.png" alt=""><figcaption><p>List of Installable Operating Systems (OS)</p></figcaption></figure>

### 5. Select the SD Card to Install the OS

Select the SD Card to install the OS by pressing the "CHOOSE STORAGE" button. The image below shows the list of SD Cards already installed on the computer.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/0KxpaAFK6OcHkRpdcSMA/6_Storage%20SD%20Card.png" alt=""><figcaption><p>List of SD Cards Installed in the Computer.</p></figcaption></figure>

### 6. Enter the Advanced Option Menu

You can enter the Advanced Option menu by pressing the icon on the bottom right, as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FhzCCcZnjkzsaNEcPRZRL%2Fimage.png?alt=media&amp;token=d2ded24b-2398-4d97-bf64-a7340e7209ad" alt=""><figcaption><p>Icon Advaced Option</p></figcaption></figure>

In the display that appears, tick the "Set hostname" and "Enable SSH" sections as shown below. The hostname can be changed according to your preference.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FdozsC471PtTXeP8VK5ps%2Fimage.png?alt=media&amp;token=e18e4575-8ef4-4846-9f63-43c7963ae3f5" alt=""><figcaption><p>Setting Hostname and SSH</p></figcaption></figure>

Tick the "Set username and password" and "Configure wireless LAN" sections. The username and password will be used for SSH login, while the SSID and password sections can be filled in with the WiFi network that the Raspberry Pi will connect to.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F5cOIWSuT7XbmVBLDFI5V%2Fimage.png?alt=media&amp;token=995d3201-0261-4a18-8dc1-7b250980551b" alt=""><figcaption><p>Set up WiFi and Password</p></figcaption></figure>

Tick "Set locale settings", then enter the Time zone section with the Asia/Jakarta option and the Keyboard layout section with the us option, then press the SAVE button.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FSuvnDO5lX1Oa53F70bVb%2Fimage.png?alt=media&amp;token=8b03984c-a9c2-4296-9d9d-0fddce490d70" alt=""><figcaption><p>Set Locale Settings</p></figcaption></figure>

### 7. Write OS on SD Card

After everything is ready, press WRITE, then the display that will appear is as shown below. Wait until the installation process is complete, then remove the SD Card from the computer and install it on the Raspberry Pi.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Ft8C39VvTf8kbRcu3eluG%2Fimage.png?alt=media&amp;token=239edb4e-8229-4b78-a912-948dd3975f93" alt=""><figcaption><p>Write OS process on SD Card</p></figcaption></figure>


# Quickstart

Below are some examples of code that you can use to send data from the project you have created to ANTARES.

{% tabs %}
{% tab title="ESP8266(HTTP)" %}
Below is a video tutorial that you can use to send and get data from ANTARES via ESP8266 (HTTP). Please install [this library](https://github.com/antaresdocumentation/antares-esp8266-http) on Arduino IDE.

{% embed url="<https://youtu.be/Eg06Q1HsWdM>" %}

{% code lineNumbers="true" %}

```arduino
#include <AntaresESP8266HTTP.h>

#define ACCESSKEY "your-access-key"
#define WIFISSID "your-wifi-ssid"
#define PASSWORD "your-wifi-password"

#define applicationName "your-application-name"
#define deviceName "your-device-name"

AntaresESP8266HTTP antares(ACCESSKEY);

void setup() {
  Serial.begin(115200);
  antares.setDebug(true);
  antares.wifiConnection(WIFISSID,PASSWORD);
}

void loop() {
  int temp = random(25,30);
  int hum = random(75,90);

  antares.add("temperature", temp);
  antares.add("humidity", hum);

  antares.send(applicationName, deviceName);
  delay(10000);
}
```

{% endcode %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/NElAwqjSpAiwAOdco0PY/BUAT%20GITBOOK.png" alt=""><figcaption></figcaption></figure>

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}

{% tab title="ESP8266(MQTT)" %}
Please install [this library](broken://spaces/SG57S3sc1YOZETuRdW3k) on Arduino IDE.

{% code lineNumbers="true" %}

```arduino
#include <AntaresESP8266MQTT.h>

#define ACCESSKEY "your-access-key"
#define WIFISSID "your-wifi-ssid"
#define PASSWORD "your-wifi-password"

#define applicationName "your-application-name"
#define deviceName "your-device-name"

AntaresESP8266MQTT antares(ACCESSKEY);

void setup() {
  Serial.begin(115200);
  antares.setDebug(true);
  antares.wifiConnection(WIFISSID,PASSWORD);
  antares.setMqttServer();
}

void loop() {
  int temp = random(25,30) ;
  int hum = random(75,90);

  antares.add("temperature", temp);
  antares.add("humidity", hum);

  antares.publish(applicationName, deviceName);
  delay(5000);
}
```

{% endcode %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/3FZGvRCugdCCFnlPV1dN/quickstart.png" alt=""><figcaption></figcaption></figure>

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}

{% tab title="NODE JS" %}
Please install antares-http with npm first, make sure npm and NodeJS are installed on CMD (Windows) or Terminal (Linux): More information about Antares for NodeJS can be found at [antares-http npm page](broken://spaces/SG57S3sc1YOZETuRdW3k).

<pre class="language-bash"><code class="lang-bash"><strong>npm init
</strong>npm install antares-http --save
</code></pre>

```javascript
const antares = require('antares-http');

data = {
  temperature: 32,
  humidity: 80,
}
antares.setAccessKey('your-access-key');
antares.send(data, 'your-project-name', 'your-device-name')
.then((response) => {
  console.log(response);
});
```

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/3FZGvRCugdCCFnlPV1dN/quickstart.png" alt=""><figcaption></figcaption></figure>

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}

{% tab title="PYTHON" %}
Please install `antares-http` with pip first, make sure pip and Python are installed on CMD (Windows) or Terminal (Linux):

More information about Antares for Python can be found at [interares-http PyPi page](https://pypi.org/project/antares-http/).

```bash
pip install antares-http
```

```python
from antares_http import antares

data = {
    'temperature' : 32,
    'humidity' : 80
}
antares.setAccessKey('your-access-key')
antares.send(data, 'your-project-name', 'your-device-name')
```

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/3FZGvRCugdCCFnlPV1dN/quickstart.png" alt=""><figcaption></figcaption></figure>

**Congratulations, you have sent your data to ANTARES.**
{% endtab %}
{% endtabs %}


# Antares Insight Hub

Antares Insight Hub is a Software as a Service provided by the Antares platform. In this Insight Hub service, you can use data analysis functions to gain useful insights for your use case. You need raw data from the IoT devices you deploy in the field. This documentation will guide you through setting up your device integration for the use case you want to analyse the data for. Here is the documentation you need to start using the Antares Insight Hub service.


# Getting Started

## Steps to Using Antares Insight Hub

### 1. Account Registration

Make sure you have created an antares account on the following page.

{% content-ref url="/pages/QMl8xUWdkjq1mDC60pwc" %}
[Account Registration](/en/getting-started/account-registration)
{% endcontent-ref %}

### 2. Request Access Antares Insight Hub

To get access to Antares Insight you will be faced with two options, namely Request Demo and Request Free Trial. The following is an explanation of each option.

{% tabs %}
{% tab title="Request Demo" %}
Request Demo is a feature where you can access the Antares Insight demo page. On the demo page you are not given full access, you can only see the data that will be presented by Antares. If you are interested in this demo feature, you can request a demo on the following page.

{% content-ref url="/pages/IXUEKU6391vLWBY2iGC9" %}
[Request Demo](/en/antares-insight-hub/getting-started/request-demo)
{% endcontent-ref %}
{% endtab %}

{% tab title="Request Free Trial" %}
Request Free Trial is a feature where you can access the Antares Insight page for **3 months for free**. On the free trial page you will be given full access to manage usecases, applications and devices. If you want to manage your own usecases and IoT devices as an admin, you can request a Free Trial on the following page.

{% content-ref url="/pages/ie0SfxjnTSUVzDvBtuB1" %}
[Request Free Trial](/en/antares-insight-hub/getting-started/request-free-trial)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

### 3. Access The Antares Insight Hub Service

After getting Demo / Free Trial access, the next step you need to select the following tabs according to the selected access.

{% tabs %}
{% tab title="Demo Access" %}
After requesting a demo, you will get a **platform ID**, **email** and **password** generated by antares. This information is obtained via the email registered to your Antares account after you request a demo.\
Here are the steps after getting demo access.

### 1. Demo Account Login

Login using your **platform ID, email**, and **password** on the End User tab of the Antares login page.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1bho4f1q4VbxzrCg79iB%2Fimage.png?alt=media&amp;token=e60705fd-c34b-451a-a4e4-2a06dfcb32fa" alt=""><figcaption></figcaption></figure>

### 2. Access the Antares Insight page

You can see the demo data on the left navigation bar when you login successfully. You can see **Overview**, **Antares Insight** and **Usecase**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FXSfxrsDbC5ED3mX8WFeG%2Fimage.png?alt=media&amp;token=569b7d87-e843-4688-9c48-b8b7524e6423" alt=""><figcaption></figcaption></figure>

| Antares Insight Service | Description                                                                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Overview                | On the Overview page, you can select a usecase to see a summary of analytics data and insights as a whole.                                                                          |
| Insight Hub             | On the Insight Hub page, you can select a usecase to display data analysis results and future insight recommendations from a usecase.                                               |
| Usecase                 | On the Usecase page, you can select a usecase to view the raw data on each device grouped into the selected usecase. This page also summarises the details of the selected usecase. |
| {% endtab %}            |                                                                                                                                                                                     |

{% tab title="Free Trial Access" %}
After requesting a free trial, you will get an email notification stating that access permissions for the selected usecase have been permitted. By getting access to this free trial, your Antares account automatically gets full access to the Antares Insight service according to the selected usecase.

### 1. Access the Antares Insight Page

You can view **Overview**, **Antares Insight** and **Usecase**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FcqHJy2MW21pfB5DzMbuv%2Fimage.png?alt=media&amp;token=609bc069-3273-495b-96fe-6bdb157ae90a" alt=""><figcaption></figcaption></figure>

| Antares Insight Service | Description                                                                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Overview                | On the Overview page, you can select a usecase to see a summary of analytics data and insights as a whole.                                                                          |
| Insight Hub             | On the Insight Hub page, you can select a usecase to display data analysis results and future insight recommendations from a usecase.                                               |
| Usecase                 | On the Usecase page, you can select a usecase to view the raw data on each device grouped into the selected usecase. This page also summarises the details of the selected usecase. |

### 2. Make Usecase

Once the free trial access is obtained, you need to create a usecase to be able to utilise the Antares insight hub service.

#### Enter Usecase Page

Click the usecase icon on the left navigation bar as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzkMhbBAQsfWsk1oKKz5Z%2Fimage.png?alt=media&amp;token=845ce0fb-c316-4d8f-9a35-6e9055519f5d" alt=""><figcaption></figcaption></figure>

#### Choose the usecase you want to create&#x20;

Here are some of the usecases available in Antares Insight.

{% content-ref url="/pages/dCJUPx1QHg1yZiAoe7iP" %}
[Power Meter](/en/antares-insight-hub/usecase/power-meter)
{% endcontent-ref %}

{% content-ref url="/pages/W79NJ48lqMzMFkVlSt0S" %}
[Water Meter](/en/antares-insight-hub/usecase/water-meter)
{% endcontent-ref %}

{% content-ref url="/pages/3rrXlfacvtaEvondr1Kv" %}
[Water Level](/en/antares-insight-hub/usecase/water-level)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}


# Request Demo

Request Demo is a feature where you can access the Antares Insight demo page. On the demo page you are not given full access, you can only see the data that will be presented by Antares.

## Steps to Request Demo

### 1. Open Overview / Insight Hub / Usecase Menu

Click one of the Overview / Insight Hub / Usecase menus, then there will be a pop-up notification that appears as in the picture below. Then, click ‘Request Demo’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F6IrFxP35zjoNmj9rAQCR%2Fimage.png?alt=media&amp;token=4638ac7f-68af-4bbb-ab88-9157f4f8671f" alt=""><figcaption></figcaption></figure>

### 2. Verify Phone Number

After clicking ‘Request Demo’ at the previous stage, you will be asked to verify your telephone number as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FyfxPfINJ6klORxuiopz8%2Fimage.png?alt=media&amp;token=26717e84-d146-421a-86ae-384837a8bf7b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can skip this step if you have previously verified your phone number on the **Account Settings** page.
{% endhint %}

After you click **Complete Now** you will be directed to the account menu to verify your telephone number.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FReKLHctG89fWv2ughDSj%2Fimage.png?alt=media&amp;token=2e6d1b2d-6978-4f36-be77-2992111d071a" alt=""><figcaption></figcaption></figure>

### 3. Submit Form Request Demo

After you verify the telephone number, the page will be displayed as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F9tI1PqYLUvd8A77nKifo%2Fimage.png?alt=media&amp;token=701189e1-2369-463e-95fd-0f1cadc05fbc" alt=""><figcaption></figcaption></figure>

Make sure the Name, Email, and Phone Number data listed matches your data, if it matches then click ‘Request’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fdabw3MtaCbr4IIemuJ2y%2Fimage.png?alt=media&amp;token=7541aefa-cd79-4cea-aa18-5737574f613f" alt=""><figcaption></figcaption></figure>

After clicking ‘Request’ you will get a pop-up notification ‘Thank you for your request’.

### 4. Check Notification by Email

Check your email registered to your antares account as you will also be notified by email regarding the demo account information provided by antares.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPyTgRi3T9wfGUn21MjI8%2Fimage.png?alt=media&amp;token=43b7d4fd-7e57-4ab9-a19b-9437254292c0" alt=""><figcaption></figcaption></figure>


# Request Free Trial

Request Free Trial is a feature where you can access the Antares Insight page for **3 months for free**. On the free trial page you will be given full access to manage usecases, applications and devices.

## Steps to Request Free Trial&#x20;

### 1. Open Overview / Insight Hub / Usecase Menu

On the Overview / Insight Hub / Usecase menu, there will be a pop-up notification that appears as shown below. Then, click ‘Request Free Trial’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FIXw4RrjiYV9b1zLSs0WJ%2Fimage.png?alt=media&amp;token=fccc7b3d-c754-4103-98e8-fbb8209616fa" alt=""><figcaption></figcaption></figure>

### 2. Verify Phone Number dan Business Profile

After clicking ‘Request Free Trial’ at the previous stage, you will be asked to verify your telephone number and complete your business profile as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FmaGvb3aTGZ6urS763j0b%2Fimage.png?alt=media&amp;token=0d3beb6f-1f3c-404f-9137-eefed8be9449" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can skip this step if you have previously verified your phone number on the **Account Settings** page.
{% endhint %}

After you click **Complete Now** you will be directed to the account menu to verify your phone number and business profile.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F8uHFlrkwCOwfKIkzzVgw%2Fimage.png?alt=media&amp;token=06a01875-1117-4ea8-8d0c-29252e0fb347" alt=""><figcaption></figcaption></figure>

### 3. Submit Form Request Free Trial

Once you have verified your phone number and business profile, the page will be displayed as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FDQNVbxCoeZjIYABtLKGz%2Fimage.png?alt=media&amp;token=449ad7e9-4eed-45bd-a6c6-3f094cecd183" alt=""><figcaption></figcaption></figure>

In the Request a Free Trial column, select the usecase you need for the Free Trial (Power Meter / Water Meter / Water Level). You can choose more than 1 usecase. Check the data that is automatically filled in on the free trial request form, if it is appropriate then click ‘Request’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FLjnB7K6ddyLMQJtS4GAs%2Fimage.png?alt=media&amp;token=2663c43d-fe57-44b5-bb1e-742a03c44f01" alt=""><figcaption></figcaption></figure>

After clicking ‘Request’ you will get a pop-up notification ‘Thank you for your request’.

### 4. Check Notification by Email

Check your email registered to your antares account as you will also be notified via email regarding the freetrial access information provided by antares.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FgLNhX9HgeDgO5FHf5c3A%2Fimage.png?alt=media&amp;token=937db25e-1c0e-4914-af8f-c7094b702690" alt=""><figcaption></figcaption></figure>


# Usecase

The utilisation of IoT technology is inseparable from a usecase. We can create IoT usecases to solve a problem that exists in our environment. You can group your IoT devices into a Usecase and then integrate it with the Antares Insight Hub service. Here are some usecase options available in Antares Insight.

{% content-ref url="/pages/dCJUPx1QHg1yZiAoe7iP" %}
[Power Meter](/en/antares-insight-hub/usecase/power-meter)
{% endcontent-ref %}

{% content-ref url="/pages/W79NJ48lqMzMFkVlSt0S" %}
[Water Meter](/en/antares-insight-hub/usecase/water-meter)
{% endcontent-ref %}

{% content-ref url="/pages/3rrXlfacvtaEvondr1Kv" %}
[Water Level](/en/antares-insight-hub/usecase/water-level)
{% endcontent-ref %}


# Power Meter

## Introduction

In this project you will be directed to create a power meter usecase. You need a power meter device that has been integrated with Antares. You are asked to group devices based on the application name and device name into the power meter usecase group. This process is called **Integrate Device** in the Antares Insight Hub service.

## Prerequisites

Before starting the project, make sure you have followed the mandatory prerequisites. Here is the prerequisite page that needs to be prepared.

{% content-ref url="/pages/qkv4JJxZTr3fZpE9R1IH" %}
[Power Meter Usecase Prerequisites](/en/antares-insight-hub/usecase/power-meter/power-meter-usecase-prerequisites)
{% endcontent-ref %}

## Usecase Power Meter Creation Steps

## 1. Integrate Device

### 1.1. Open Usecase Power Meter Menu

On the left navigation bar, select ‘Usecase’. Then on the Usecase menu select ‘Power Meter’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPGEWmYqidZD8TQxAG3Qh%2Fimage.png?alt=media&amp;token=b21f6dce-c6fc-411d-b4cd-32ddfb92ca06" alt=""><figcaption></figcaption></figure>

### 1.2.Do Device Integration

On the Power Meter Usecase Page, Click ‘Integrate’ then a pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGdpSw7VmHYbiy4HWOXD6%2Fimage.png?alt=media&amp;token=4debecb8-54be-48b3-ad29-28678e99c7a2" alt=""><figcaption></figcaption></figure>

Next, fill in the Integrate Device form by filling in the **‘Application Name’**, select **‘Device Name’** then fill in other data such as **Decoder Type, Device Label, Serial Number, Address** and **Map Location**.

{% hint style="info" %}
Make sure the **Decoder Type** matches the type of Device you are using.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F8IUMDAozVlbBwjNqREut%2Fimage.png?alt=media&amp;token=99e9ea9e-956e-4507-911f-1ff70bb6b120" alt=""><figcaption></figcaption></figure>

The following is an explanation of the Integrate Device form parameters

<table><thead><tr><th width="92">No.</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Usecase</td><td>Select the usecase according to your needs. There are 3 (three) usecase options, namely Power Meter, Water Meter, and Water Level.</td></tr><tr><td>2.</td><td>Application</td><td>After creating an application, you can use the application in a usecase</td></tr><tr><td>3.</td><td>Device</td><td>After adding the device to the application, select the device for the usecase you will be using.</td></tr><tr><td>4.</td><td>Device Label</td><td>Create labels for the devices you will use</td></tr><tr><td>5.</td><td>Decoder Type</td><td>A decoder option is provided by Antares. The decoder serves to ensure that the payload used by the user matches the format used by Antares.</td></tr><tr><td>6.</td><td>Serial Number</td><td>Enter the serial number for the device you will be using</td></tr><tr><td>7.</td><td>Address</td><td>Provide the address that will be used for your usecase</td></tr><tr><td>8.</td><td>Map Location</td><td>Select the coordinates on the map according to the address you have listed</td></tr></tbody></table>

Make sure the data filled in the form is correct. After filling in the data on the Integrate Device form, then click ‘Integrate’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FcXIRxlFNLgBsGG82qc4z%2Fimage.png?alt=media&amp;token=f36d031a-f652-4109-b86f-81e2306515f2" alt=""><figcaption></figcaption></figure>

Once you have successfully integrated the device, the display will change as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F9gm7LfLE8A4Zj1neJBed%2Fimage.png?alt=media&amp;token=8179fa39-dabe-4122-9ead-6f8d420ea5ac" alt=""><figcaption></figcaption></figure>

### 1.3. View Detail Device

On the usecase page, you can view data from particular devices that have been successfully integrated. To view data from a particular device, click the device that you have integrated to see more data information.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fl1irJ0NGoak6dZaokUWP%2Fimage.png?alt=media&amp;token=f1ce3a96-ce38-4085-8dc8-dc1af9a3b8bf" alt=""><figcaption></figcaption></figure>

The following is a detailed view of the device that has been opened.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FgYN5iQTxGkgwaBBtGto9%2Fimage.png?alt=media&amp;token=9f1f0852-9aa8-4fca-93c1-d19f7c7a3e0e" alt=""><figcaption></figcaption></figure>

## 2. Testing Payload

To ensure the Antares Insight service is working properly, make sure the payload sent by the user's device matches the format that has been determined in Antares Insight. You can then follow the steps below to use the Payload Decoder feature.

### 2.1. Choose Payload Decoder

On the left navigation bar, click the ‘Usecase’ menu then select ‘Power Meter’. After opening the Power Meter Usecase page, click ‘Payload Decoder’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FCGY1p67ymjz77nk3K24p%2Fimage.png?alt=media&amp;token=9ef6d21e-a054-498a-9427-4f2ab80ff08e" alt=""><figcaption></figcaption></figure>

A popup will appear as shown below, select the decoder you want to use.

{% hint style="info" %}
There are several decoders provided by Antares. You can customise the decoder selection according to your device type.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzAB2kpnZkcYy4Egw7kY8%2Fimage.png?alt=media&amp;token=dcd8e1b8-e177-47a6-8896-0b01cf5c0c2f" alt=""><figcaption></figcaption></figure>

### 2.2. Input Data Payload

You can see an example payload based on the device recommendation on the following page.

{% content-ref url="/pages/9zkokmmduXkOsGxw4Ixe" %}
[Payload Example Power Meter](/en/antares-insight-hub/usecase/power-meter/payload-example-power-meter)
{% endcontent-ref %}

Enter the payload for your device in the ‘Input Decoder’ field. After entering the payload, click the ‘Submit’ button.

{% hint style="info" %}
Payloads that have been customised to the format used in Antares will automatically appear in the ‘Decoder Results’ column.
{% endhint %}

## 3. Setup Device Threshold

In this section you can set the threshold for **alert notification**. You can enter a **maximum of 3 data parameters** that you want to be used as **alert notifications**. You can also limit it to a **maximum of 3 threshold points**. For more details you can see it on the following page.

{% content-ref url="/pages/EWqPDLteuL2f0ygw62Ld" %}
[Setup Device Threshold Power Meter](/en/antares-insight-hub/usecase/power-meter/setup-device-threshold-power-meter)
{% endcontent-ref %}

## 4. Setting Estimation Cost

In this section you can set the price of electricity usage. On the Power Meter Usecase page, click **‘Set Estimation Cost’** then a popup form will appear that you need to fill in.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FpoECwaZgl0y554yF2iba%2Fimage.png?alt=media&amp;token=653cd6db-f074-4071-9e65-3b38a525222b" alt=""><figcaption></figcaption></figure>

Next you need to fill in the **‘Currency’** and **‘Price per kWh’** data on the Estimation Cost form.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FB5ddHP55UNH6gfCd7fGv%2Fimage.png?alt=media&amp;token=bec061a7-da51-4d0d-8faa-f8ca29700d49" alt=""><figcaption></figcaption></figure>

Next, click ‘Apply to Power Meter Device’ to apply the cost estimation settings to the power meter usecase. If the process is successful, the results will be as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fe3QWRafvx2Kubwa4SRCw%2Fimage.png?alt=media&amp;token=eb599bf4-063b-456b-9503-456b5287771b" alt=""><figcaption></figcaption></figure>

## Manage Usecase

## 1. Edit Device Usecase

In this section you can edit usecase data details such as ‘**Application Name’, ‘Device Name’, Decoder Type, Device Label, Serial Number, Address and Map Location** that you previously filled in when filling out the integrate device form. On the Power Meter Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FRocfcwm5AK8VL9PJh4fF%2Fimage.png?alt=media&amp;token=dfcfc93f-bb96-4e4d-9cd9-b802394505b4" alt=""><figcaption></figcaption></figure>

On the selected device page click ‘Edit Details’, then the Edit Integrate device popup form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Ff2Jm9kDS3MVpDLffkhik%2Fimage.png?alt=media&amp;token=a5e1a2a9-0aef-47a5-b99c-fc839b0aa990" alt=""><figcaption></figcaption></figure>

You can rearrange the device usecase data as needed.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FpFVo6P9gkey1fuBzrxCu%2Fimage.png?alt=media&amp;token=b88a7624-4e93-41b0-841c-e08a83fe14f6" alt=""><figcaption></figcaption></figure>

## 2. Edit Device Power Meter

In this section, you can edit the device in the application antares. You can change the subscription package, set LoRa, and view other data. On the Power Meter Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FRiuEX5tg56pu7uL4mPOr%2Fimage.png?alt=media&amp;token=cb885083-bf92-4a39-9789-a4a4763d0ab3" alt=""><figcaption></figcaption></figure>

On the selected device page click ‘Config’, then you will be directed to the device page that you want to configure.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FcnHdKcSQ6j74W153jLch%2Fimage.png?alt=media&amp;token=203f0ece-d532-425f-a089-ad228f0acb12" alt=""><figcaption></figcaption></figure>

You can configure devices such as **‘Set LoRa’,** **‘Webhhok’, ‘Subscription’**, and view other data details.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1ApFhqtFtD6igt4tjaW8%2Fimage.png?alt=media&amp;token=801d2412-1a50-4fbe-9f27-bd5cfb0feede" alt=""><figcaption></figcaption></figure>


# Power Meter Usecase Prerequisites

Before you create a Usecase, make sure you have fulfilled the following prerequisites:

### 1. Have an Antares Account

Make sure you have an antares account, if you don't have one then you can access the following page.

{% content-ref url="/pages/QMl8xUWdkjq1mDC60pwc" %}
[Account Registration](/en/getting-started/account-registration)
{% endcontent-ref %}

### 2. Creating Application and Device in Antares

Make sure you have created applications and devices on the Antares Platform. Here are the steps to create an application and device:

{% content-ref url="/pages/GoDrpZWdEHSjm8HJcPBT" %}
[Create App](/en/getting-started/create-app)
{% endcontent-ref %}

{% content-ref url="/pages/G07RPeX4vSQLhzFiJJPd" %}
[Add Devices to the Application](/en/getting-started/add-devices-to-the-application)
{% endcontent-ref %}

### 3. Have an access to Antares Insight

Make sure you have Free Trial Access to Antares Insight Hub, if you don't have it then you can access the following page.

{% content-ref url="/pages/ie0SfxjnTSUVzDvBtuB1" %}
[Request Free Trial](/en/antares-insight-hub/getting-started/request-free-trial)
{% endcontent-ref %}

### 4. Have a Power Meter Device as Recommended

There are several devices recommended by Antares to optimise the use of usecases. You can see some compatible power meter devices on the following page.

{% content-ref url="/pages/FnlkYDbz9JKmE5P7FKWg" %}
[Power Meter Device Recommendation](/en/antares-insight-hub/usecase/power-meter/power-meter-device-recommendation)
{% endcontent-ref %}

### 5. Knowing the Payload Example from used device

Make sure the device you are using is in accordance with the device recommended by Antares, then you can see the sample payload used.

{% content-ref url="/pages/9zkokmmduXkOsGxw4Ixe" %}
[Payload Example Power Meter](/en/antares-insight-hub/usecase/power-meter/payload-example-power-meter)
{% endcontent-ref %}


# Power Meter Device Recommendation

In order to optimise the use of usecases, Antares has recommended devices that are compatible with Antares Insight at this time.

## Device Power Meter Recommendation

### 1. Scheneider PowerLogic PM8000

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FG9Y4tAMrUjIQ42p820eN%2Fimage.png?alt=media&amp;token=e19befb2-de28-4eea-b834-3ee2f8af6229" alt=""><figcaption><p>Power Meter Schneider</p></figcaption></figure>

### 2. Power Meter Scheneider EasyLogic PM2200

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzcCF4T1GXpm2JeuPd0eg%2Fimage.png?alt=media&amp;token=52028ec5-ce38-4d84-845f-d325179c08bf" alt=""><figcaption><p>Power Meter Schneider</p></figcaption></figure>

If you are interested in the following products, you can access more information by following this link:

[Schneider Electric](https://www.se.com/id/en/product-category/4100-power-energy-monitoring-system/)

## Payload Example

You can see an example payload of a power meter device on the following page.

{% content-ref url="/pages/9zkokmmduXkOsGxw4Ixe" %}
[Payload Example Power Meter](/en/antares-insight-hub/usecase/power-meter/payload-example-power-meter)
{% endcontent-ref %}


# Payload Example Power Meter

**Payload Device Power Meter**

To ensure that the Antares Insight service works properly, make sure that the payload sent by the user's device complies with the format specified in Antares Insight.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FAxSFCX6UXEk9OtQRsqjd%2Fimage.png?alt=media&amp;token=751df52d-130f-4a59-9d1f-8fdf716c15c0" alt=""><figcaption><p>Format Payload Antares</p></figcaption></figure>

The following is an example of a payload on an Antares device that is in accordance with Antares Insight requirements based on **decoder type**:

{% tabs %}
{% tab title="Schneider Power Meter" %}

## 1. Example Payload Input

Here is an example of the payload before passing through the Antares Insight decoder.

```
{
  "Ia": "1.265",
  "Ib": "2.891",
  "Ic": "2.828",
  "vll": "378.163",
  "vab": "378.163",
  "vbc": "374.163",
  "vca": "383.158",
  "vln": "218.159",
  "va": "219.041",
  "vb": "214.496",
  "vc": "222.749",
  "pf": "0.789",
  "kW": "1.212",
  "kVA": "1.523",
  "kWh": "5970459",
  "kVAh": "6716964",
  "freq": "50.145"
}
```

## 2. Decoded Payload Output

Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "currentR": 1.265,
  "currentS": 2.891,
  "currentT": 2.828,
  "voltageLineToLine": 378.163,
  "voltageRS": 378.163,
  "voltageST": 374.163,
  "voltageRT": 383.158,
  "voltageLineToNeutral": 218.159,
  "voltageRN": 219.041,
  "voltageSN": 214.496,
  "voltageTN": 222.749,
  "activePower": 1.212,
  "apparentPower": 1.523,
  "reactivePower": 0.9357208383866418,
  "totalActivePower": 5970459,
  "totalReactivePower": 6716964,
  "powerFactor": 0.789,
  "frequency": 50.145
}
```

{% endtab %}
{% endtabs %}


# Setup Device Threshold Power Meter

## Device Threshold Power Meter Setup Steps

### 1. Open Power Meter Usecase Page

On the left navigation bar, click the usecase menu. Next click the power meter usecase page, then select the device you want to set the thershold for as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fvrk3WqFWGsCtXchUojEI%2Fimage.png?alt=media&amp;token=49ffffe4-7467-404a-be23-d799e3986d7d" alt=""><figcaption></figcaption></figure>

### 2. Setting the Threshold

On the device page click ‘Set Threshold’, then the Set Threshold pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FacHh2SWhI9L0zQL6cIEM%2Fimage.png?alt=media&amp;token=f13a78c8-1ed2-4d34-91cb-1e463fc76952" alt=""><figcaption></figcaption></figure>

A pop up will appear as shown below. Select the parameter you want to set the threshold for.

{% hint style="info" %}
You can only set thresholds for a maximum of 3 parameters
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FIv221ECAHgGeGYasH3mF%2Fimage.png?alt=media&amp;token=2487574c-6031-4890-9f19-38b41cc4f4a6" alt=""><figcaption></figcaption></figure>

Complete the form by filling in the **parameters, minimum value, maximum value, threshold value**. Also label and change the colour for the upper and lower bounds of the threshold as shown below.

{% hint style="info" %}
You can add a maximum of 3 threshold points
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FP6tyEGzJWcQ9Gu9UYBd2%2Fimage.png?alt=media&amp;token=12e01133-709d-4d27-a2bd-d28fad5b1d1b" alt=""><figcaption></figcaption></figure>

If it is appropriate then you can click ‘Save’ to save the threshold settings. If this process is successful, the result will look like the following image.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F0U9v5cAydh4SrzLmXAc8%2Fimage.png?alt=media&amp;token=847983b7-0b52-4672-b3d4-9ecc21186327" alt=""><figcaption></figcaption></figure>


# Water Meter

## Introduction

In this project you will be directed to create a water meter usecase. You need a water meter device that has been integrated with Antares. You are asked to group devices based on the application name and device name into the water meter usecase group. This process is called Integrate Device in the Antares Insight Hub service.

## Prerequisites

Before starting the project, make sure you have followed the mandatory prerequisites. Here is the prerequisite page that needs to be prepared.

{% content-ref url="/pages/RJ9fHUjg3r545iLI0ybs" %}
[Water Meter Usecase Prerequisites](/en/antares-insight-hub/usecase/water-meter/water-meter-usecase-prerequisites)
{% endcontent-ref %}

## Water Meter Usecase Creation Steps

## 1. Integrate Device

### 1.1. Open Usecase Water Meter Menu

On the left navigation bar, select ‘Usecase’. Then on the Usecase menu select ‘Water Meter’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FukwwAzBClNOXQ3ZnqSch%2Fimage.png?alt=media&amp;token=b7bedbc0-4358-4b76-b2e8-a15b57b90b66" alt=""><figcaption></figcaption></figure>

### 1.2. Do Device Integration

On the Water Meter Usecase Page, Click ‘Integrate’ then a pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F6rk4ASgZULzI9AwU5wJQ%2Fimage.png?alt=media&amp;token=b825881c-3895-4554-a870-4d42ae952936" alt=""><figcaption></figcaption></figure>

Next, fill in the Integrate Device form by filling in the **‘Application Name’**, select **‘Device Name’** then fill in other data such as **Decoder Type**, **Device Label**, **Serial Number**, **Address and Map Location**.

{% hint style="info" %}
Make sure the **Decoder Type** matches the type of Device you are using.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fr7XNwzgrcMppwB6pI1wk%2Fimage.png?alt=media&amp;token=555b3170-8d31-4c1c-8c60-ee2a53f97fd1" alt=""><figcaption></figcaption></figure>

The following is an explanation of the Integrate Device form parameters:

<table><thead><tr><th width="92">No.</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Usecase</td><td>Select the usecase according to your needs. There are 3 (three) usecase options, namely Power Meter, Water Meter, and Water Level.</td></tr><tr><td>2.</td><td>Application</td><td>After creating an application, you can use the application in a usecase</td></tr><tr><td>3.</td><td>Device</td><td>After adding the device to the application, select the device for the usecase you will be using.</td></tr><tr><td>4.</td><td>Device Label</td><td>Create labels for the devices you will use</td></tr><tr><td>5.</td><td>Decoder Type</td><td>A decoder option is provided by Antares. The decoder serves to ensure that the payload used by the user matches the format used by Antares.</td></tr><tr><td>6.</td><td>Serial Number</td><td>Enter the serial number for the device you will be using</td></tr><tr><td>7.</td><td>Address</td><td>Provide the address that will be used for your usecase</td></tr><tr><td>8.</td><td>Map Location</td><td>Select the coordinates on the map according to the address you have listed</td></tr></tbody></table>

Make sure the data filled in the form is correct. After filling in the data on the Integrate Device form, then click ‘Integrate’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FOd9tL0H9RMuqOYk5EVA9%2Fimage.png?alt=media&amp;token=a2dab9ea-f4bf-4797-8724-12c6ed49b48d" alt=""><figcaption></figcaption></figure>

Once you have successfully integrated the device, the display will change as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FNe3ithLAJQ1dnqntp6Cb%2Fimage.png?alt=media&amp;token=7969b6fd-865f-43cc-9d2b-ee554fff1e20" alt=""><figcaption></figcaption></figure>

### 1.3. See Device Detail

On the usecase page, you can view data from particular devices that have been successfully integrated. To view data from a particular device, click the device that you have integrated to see more data information.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FSgKpfkpTN5qZ4QkyzcIk%2Fimage.png?alt=media&amp;token=7a6c02bc-0b86-430a-b66b-73fd1bddeae2" alt=""><figcaption></figcaption></figure>

The following is a detailed view of the device that has been opened.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FDfvZlMYxH65xfiG9TfcL%2Fimage.png?alt=media&amp;token=9ea1eccd-4f7c-40ad-9ebf-b0d4094a7556" alt=""><figcaption></figcaption></figure>

## 2. Testing Payload

To ensure the Antares Insight service is working properly, make sure the payload sent by the user's device matches the format specified in Antares Insight. You can then follow the steps below to use the Payload Decoder feature.

### 2.1. Choose Payload Decoder

On the left navigation bar, click the ‘Usecase’ menu then select ‘Water Meter’. After opening the Water Meter Usecase page, click ‘Payload Decoder’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGrp60WGUm7YCYTRPihmw%2Fimage.png?alt=media&amp;token=bfe661f8-ea1f-4cd6-b494-736cc331139e" alt=""><figcaption></figcaption></figure>

A popup will appear as shown below, select the decoder you want to use.

{% hint style="info" %}
There are several decoders provided by Antares. You can customise the decoder selection according to your device type.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FZyw0shenui2H9jIVspf3%2Fimage.png?alt=media&amp;token=6ca8f5e1-c6c3-4ac0-a152-96bb4978dff6" alt=""><figcaption></figcaption></figure>

### 2.2. Input Data Payload

You can see an example payload based on the device recommendation on the following page.

{% content-ref url="/pages/uPXyS6Gw2pziW1S8UO6K" %}
[Payload Example Water Meter](/en/antares-insight-hub/usecase/water-meter/payload-example-water-meter)
{% endcontent-ref %}

Enter the payload for your device in the ‘Input Decoder’ field. After entering the payload, click the ‘Submit’ button.

{% hint style="info" %}
Payloads that have been customised to the format used in Antares will automatically appear in the ‘Decoder Results’ column.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FUkwZ2M2UMHRm1sMiJNI7%2Fimage.png?alt=media&amp;token=f8004b8c-7581-440e-a063-e74e8b24ca59" alt=""><figcaption></figcaption></figure>

## 3. Setup Device Threshold

In this section you can set the threshold for **alert notification**. You can enter a **maximum of 3 data parameters** that you want to be used as **alert notifications**. You can also limit it to a **maximum of 3 threshold** points. For more details you can see it on the following page.

{% content-ref url="/pages/JnDjiFUqv0TiPO9wAyPN" %}
[Setup Device Threshold Water Meter](/en/antares-insight-hub/usecase/water-meter/setup-device-threshold-water-meter)
{% endcontent-ref %}

## 4. Setting Estimation Cost

In this section you can set the price of electricity usage. On the Water Meter Usecase page, click **‘Set Estimation Cost’** then a popup form will appear that you need to fill in.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FF1YMcc1V6V2WNL59FXz0%2Fimage.png?alt=media&amp;token=299def93-203b-4381-8602-50e898d1ad05" alt=""><figcaption></figcaption></figure>

Next you need to fill in the **‘Currency’** and **‘Price per kWh’** data on the Estimation Cost form.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FVLLhUoNAQFdyh9VG1BmK%2Fimage.png?alt=media&amp;token=05e78538-7bcc-4f1f-b521-d1e71fccbbf5" alt=""><figcaption></figcaption></figure>

Next, click ‘Apply to Water Meter Device’ to apply the cost estimation settings to the water meter usecase. If the process is successful, the results will be as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FBHW0X5zQmYx3EfXQBZzP%2Fimage.png?alt=media&amp;token=a24cf447-19b0-4eaa-b8f0-cf8f86fbd0fd" alt=""><figcaption></figcaption></figure>

## Manage Usecase

## 1. Edit Device Usecase

In this section you can edit usecase data details such as **‘Application Name’, ‘Device Name’, Decoder Type, Device Label, Serial Number, Address and Map Location** that you previously filled in when filling out the integrate device form. On the Water Meter Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FMYcBqKsKhK7hnjgs2KV6%2Fimage.png?alt=media&amp;token=1208aefb-eee7-4f89-bbc0-777485c10ef2" alt=""><figcaption></figcaption></figure>

On the selected device page click ‘Edit Details’, then the Edit Integrate device popup form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FyZYOFhMpmtJz7bt1wCXe%2Fimage.png?alt=media&amp;token=67a81b64-61e1-4978-bf5e-3b29564c5db4" alt=""><figcaption></figcaption></figure>

You can rearrange the device usecase data as needed.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FvWKXEQwO2TAkJYPLTHfo%2Fimage.png?alt=media&amp;token=117cadf3-fe9d-4e10-bb9e-9ad98dee5f24" alt=""><figcaption></figcaption></figure>

## 2. Edit Device Water Meter

In this section, you can edit the device in the application antares. You can change the subscription package, set LoRa, and view other data. On the Water Meter Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGawnLpYgFdaZ7MpZ9ylP%2Fimage.png?alt=media&amp;token=d2fa1c21-8801-4f12-b565-b6b4fcee66d3" alt=""><figcaption></figcaption></figure>

On the selected device page click ‘Config’, then you will be directed to the device page that you want to configure.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FD0rGsn1xgVD6neyQSmkR%2Fimage.png?alt=media&amp;token=7e29ec7a-da37-4189-8d22-916b314c447c" alt=""><figcaption></figcaption></figure>

You can configure devices such as **‘Set LoRa’, ‘Webhhok’, ‘Subscription’**, and view other data details.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F5hOlHLhU39BI2BFiD0dC%2Fimage.png?alt=media&amp;token=8869b317-7966-4372-889f-afbc1ccf1536" alt=""><figcaption></figcaption></figure>


# Water Meter Usecase Prerequisites

Before you create a Usecase, make sure you have fulfilled the following prerequisites:

### 1. Have an Antares Account

Make sure you have an antares account, if you don't have one then you can access the following page.

{% content-ref url="/pages/QMl8xUWdkjq1mDC60pwc" %}
[Account Registration](/en/getting-started/account-registration)
{% endcontent-ref %}

### 2. Make an Application and Device in Antares

Make sure you have created applications and devices on the Antares Platform.

Here are the steps to create the application and device:

{% content-ref url="/pages/GoDrpZWdEHSjm8HJcPBT" %}
[Create App](/en/getting-started/create-app)
{% endcontent-ref %}

{% content-ref url="/pages/G07RPeX4vSQLhzFiJJPd" %}
[Add Devices to the Application](/en/getting-started/add-devices-to-the-application)
{% endcontent-ref %}

### 3. Have an access to Antares Insight

Make sure you have Free Trial Access to Antares Insight Hub, if you don't have it then you can access the following page.

{% content-ref url="/pages/ie0SfxjnTSUVzDvBtuB1" %}
[Request Free Trial](/en/antares-insight-hub/getting-started/request-free-trial)
{% endcontent-ref %}

### 4. Have a Water Meter Device as Recommended

There are several devices recommended by Antares to optimise usecase usage. You can see some compatible water meter devices on the following page.

{% content-ref url="/pages/xcN0tX5G5R2DlFiacGxS" %}
[Water Meter Device Recommendation](/en/antares-insight-hub/usecase/water-meter/water-meter-device-recommendation)
{% endcontent-ref %}

### 5. Knowing the Payload Example of the Device used

Make sure the device you are using is in accordance with the device recommended by Antares, then you can see the sample payload used.

{% content-ref url="/pages/uPXyS6Gw2pziW1S8UO6K" %}
[Payload Example Water Meter](/en/antares-insight-hub/usecase/water-meter/payload-example-water-meter)
{% endcontent-ref %}


# Water Meter Device Recommendation

In order to optimise the use of usecases, Antares has recommended devices that are compatible with Antares Insight at this time.

## Device Water Meter Recommendation

### 1. Barindo SWM

There are 2 (two) types of water meters provided by Barindo, namely:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FEgYQzsfqZZU8hNxBj7f3%2Fimage.png?alt=media&amp;token=6d49f712-07f9-4f76-bc09-dead0f18164c" alt=""><figcaption><p>Barindo Smart Meter</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fbgu02msgg8z7n8GjZiIa%2Fimage.png?alt=media&amp;token=82b7c432-aa9b-4c5e-91d2-841ac2734a90" alt=""><figcaption><p>Barindo Meter Mechanic</p></figcaption></figure>

If you are interested in the following products, you can access more information by following this link:

[Barindo](https://barindo.com/)

### 2. Wiracyble SWM

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FJ8zF8OGTHG5NpOh05hbd%2Fimage.png?alt=media&amp;token=6c27e40b-b0ff-4c04-9551-39d749b3a635" alt=""><figcaption><p>Wiracyble Smart Water Meter</p></figcaption></figure>

If you are interested in the following products, you can access more information by following this link:

[Wiracyble Smart Water Meter](https://weiots.io/product/iot-sensors/cyble-nonmag-sensor)

### 3. Alltek SWM

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FM9z7p5t8nG0FMVribckx%2Fimage.png?alt=media&amp;token=bba65612-7355-4a6a-a94a-2982eaafecc1" alt=""><figcaption><p>Retrofit Smart Water Meter Alltek</p></figcaption></figure>

If you are interested in the following products, you can access more information by following this link:

[Alltek SWM](https://www.alltek.sg/shop/)

### 4. Retrofit T3

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F8aJnHKEX0NcCO83Jvhrf%2Fimage.png?alt=media&amp;token=f31d4bfc-2d2f-4c30-8253-0c388f3a60d3" alt=""><figcaption><p>Retrofit Smart Water Meter T3</p></figcaption></figure>

If you are interested in the following products, you can access more information by following this link:

[T3 SWM](https://everynet.com/)

## Payload Example

You can see an example of the payload of a water meter device on the following page.

{% content-ref url="/pages/uPXyS6Gw2pziW1S8UO6K" %}
[Payload Example Water Meter](/en/antares-insight-hub/usecase/water-meter/payload-example-water-meter)
{% endcontent-ref %}


# Payload Example Water Meter

**Payload Device Water Level**

To ensure that the Antares Insight service works properly, make sure that the payload sent by the user's device complies with the format specified in Antares Insight.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FhFbArBvyekoETQkP7Ziw%2Fimage.png?alt=media&amp;token=a0287970-f3a5-42c6-8519-490417276b2d" alt=""><figcaption></figcaption></figure>

The following is an example of a payload on an Antares device that is in accordance with Antares Insight requirements based on **decoder type**:

{% tabs %}
{% tab title="Barindo SWM" %}

## 1. Example Payload Input

Here is an example of the payload before passing through the Antares Insight decoder.

```
68640087000000080d5e3c4401FF0001A682B546DE10AC4EC7615E56B4201297901F0E303030323032313034323230393200540052901E30361211034A59150818052300010130680D1F000000000049071F0025F506000000000000000000000000000000000000000000000000000000000000000000000000000001000000455F0500000023
```

## 2. Decoded Payload Output

Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "serialNumber": "087000000080d5e3c4401ff0",
  "forwardWaterFlow": 2035048,
  "reverseWaterFlow": 0,
  "waterUnit": "L",
  "interval": null,
  "timestamp": "2023-05-18T08:15:59.000Z",
  "status": {
    "alarmDuration": 0,
    "alarmOrigin": "45"
  },
  "batteryLevel": 100
}
```

{% endtab %}

{% tab title="Wiracyble SWM" %}

## 1. Example Payload Input

Here is an example of the payload before passing through the Antares Insight decoder.

```
08000ce440242a0010c48406000422c052ff9f1c00
```

## 2. Decoded Payload Output

Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "serialNumber": null,
  "forwardWaterFlow": 271040,
  "reverseWaterFlow": 0,
  "waterUnit": "L",
  "interval": null,
  "timestamp": "1970-01-13T17:14:44.000Z",
  "status": {
    "alarmStatus": "0",
    "valveStatus": "1"
  },
  "batteryLevel": 100
}
```

{% endtab %}

{% tab title="Alltek SWM" %}

## 1. Example Payload Input

Here is an example of the payload before passing through the Antares Insight decoder.

```
6f034001236806d51e0000001e0000002b062b020c05d00710000024cf
```

## 2. Decoded Payload Output

Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "serialNumber": "d5066823014003",
  "forwardWaterFlow": 0.03,
  "reverseWaterFlow": 0.001,
  "waterUnit": "L",
  "interval": null,
  "timestamp": "2000-05-12T02:43:06.000Z",
  "status": {
    "valve": "On",
    "batteryVoltage": "Normal",
    "vBack": "Under Voltage",
    "tamperStatus": "Not Removed",
    "openingValveStatus": "Unexecuted",
    "closingValveStatus": "Unexecuted",
    "reverseFlowStatus": "Normal",
    "valveStatus": "Normal",
    "gprsBatteryVoltage": "Normal",
    "sensorFailure": "Normal",
    "smallFlowAlarm": "Normal",
    "largeFlowAlarm": "Normal",
    "systemReset": "Normal",
    "priceError": "Normal",
    "magneticInterference": "Normal",
    "leakage": "Normal",
    "currentMagneticInterference": "Normal"
  },
  "batteryLevel": 100
}
```

{% endtab %}

{% tab title="Retrofit T3 " %}

## 1. Example Payload Input

Here is an example of the payload before passing through the Antares Insight decoder.

```
6F030811170070895201000000006089520150895201408952012B05000604090503E407000023A8
```

## 2. Decoded Payload Output

Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "serialNumber": "0017110803",
  "forwardWaterFlow": 22186.352,
  "reverseWaterFlow": 0,
  "waterUnit": "L",
  "interval": 5,
  "timestamp": "2020-03-05T09:04:06.000Z",
  "status": {
    "valveStatus": "Open",
    "batteryVoltage": "Normal",
    "tamperStatus": "Not Removed",
    "openingValveStatus": "Unexecuted",
    "closingValveStatus": "Unexecuted",
    "reverseFlowStatus": "Normal",
    "valveCondition": "Normal",
    "magneticInterferenceBefore": "No",
    "magneticInterferenceNow": "No",
    "sensorFailure": "No",
    "lowFlowAlert": "No",
    "highFlowAlert": "No",
    "leakAlert": "No",
    "systemReset": "Normal"
  },
  "batteryLevel": 100
}
```

{% endtab %}
{% endtabs %}


# Setup Device Threshold Water Meter

## Threshold Water Meter Device Setup Steps

### 1. Open Water Meter Usecase Menu

On the left navigation bar, click the usecase menu. Next click the water meter usecase page, then select the device that you want to set the thershold as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F6kVRlHuKiJsYJWdrT4NM%2Fimage.png?alt=media&amp;token=5b8969b1-49f2-4562-bf9d-c546ccd409e9" alt=""><figcaption></figcaption></figure>

### 2. Set Threshold

On the device page click ‘Set Threshold’, then the Set Threshold pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPqYTdl52MRmGLp8mvQnN%2Fimage.png?alt=media&amp;token=8604609b-f139-4c82-84c5-360dd8473f9d" alt=""><figcaption></figcaption></figure>

A pop up will appear as shown below. Select the parameter you want to set the threshold for.

{% hint style="info" %}
You can only set thresholds for a maximum of 3 parameters
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FyhetGd3ssUy3K7HU7bYL%2Fimage.png?alt=media&amp;token=15f01b1c-c37e-4748-84dd-8e917f00a7e3" alt=""><figcaption></figcaption></figure>

Complete the form by filling in the **parameters, minimum value, maximum value, threshold value**. Also label and change the colour for the upper and lower bounds of the threshold as shown below.

{% hint style="info" %}
You can add a maximum of 3 threshold points
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGn2kaEus4SKZtOC1DMTd%2Fimage.png?alt=media&amp;token=49bf0b59-ad06-470f-a069-fe5c72c3fa27" alt=""><figcaption></figcaption></figure>

If it is appropriate then you can click ‘Save’ to save the threshold settings. If this process is successful, the result will look like the following image.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F5inorc33FlpT9EG6Z1os%2Fimage.png?alt=media&amp;token=1b7a6580-8f2d-424d-ad01-e59764c24fda" alt=""><figcaption></figcaption></figure>


# Water Level

## Introduction

In this project you will be directed to create a water level usecase. You need a water level device that has been integrated with Antares. You are asked to group devices based on the application name and device name into the water level usecase group. This process is called Integrate Device in the Antares Insight Hub service.

## Prerequisites

Before starting the project, make sure you have followed the mandatory prerequisites. Here is the prerequisite page that needs to be prepared.

{% content-ref url="/pages/PaFl1sEt8T3PfCjxGovB" %}
[Water Level Usecase Prerequisites](/en/antares-insight-hub/usecase/water-level/water-level-usecase-prerequisites)
{% endcontent-ref %}

## Water Level Usecase Creation Steps

## 1. Integrate Device

### 1.1. Open Usecase Water Level Menu

On the left navigation bar, select ‘Usecase’. Then on the Usecase menu select ‘Water Level’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F2ewtFxGnwreILdekvWH8%2Fimage.png?alt=media&amp;token=2b1236c1-30d9-4e65-870f-cea6253f7635" alt=""><figcaption></figcaption></figure>

### 1.2. Do Device Integration

On the Water Level Usecase Page, Click ‘Integrate’ then a pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FEoKvXA5VfrAXf2aLElag%2Fimage.png?alt=media&amp;token=40b76c93-76c0-4fe8-860a-620a6a7cd67e" alt=""><figcaption></figcaption></figure>

Next, fill in the Integrate Device form by filling in the **‘Application Name’**, select **‘Device Name’** then fill in other data such as **Decoder Type, Device Label, Serial Number, Address and Map Location**.

{% hint style="info" %}
Make sure the **Decoder Type** matches the type of Device you are using.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fv6lfrfxV4oJ7UgoGMlss%2Fimage.png?alt=media&amp;token=88c0d8af-678a-4128-8787-4631642c2ced" alt=""><figcaption></figcaption></figure>

The following is an explanation of the Integrate Device form parameters:

<table><thead><tr><th width="92">No.</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Usecase</td><td>Select the usecase according to your needs. There are 3 (three) usecase options, namely Power Meter, Water Meter, and Water Level.</td></tr><tr><td>2.</td><td>Application</td><td>After creating an application, you can use the application in a usecase</td></tr><tr><td>3.</td><td>Device</td><td>After adding the device to the application, select the device for the usecase you will be using.</td></tr><tr><td>4.</td><td>Device Label</td><td>Create labels for the devices you will use</td></tr><tr><td>5.</td><td>Decoder Type</td><td>A decoder option is provided by Antares. The decoder serves to ensure that the payload used by the user matches the format used by Antares.</td></tr><tr><td>6.</td><td>Serial Number</td><td>Enter the serial number for the device you will be using</td></tr><tr><td>7.</td><td>Address</td><td>Provide the address that will be used for your usecase</td></tr><tr><td>8.</td><td>Map Location</td><td>Select the coordinates on the map according to the address you have listed</td></tr></tbody></table>

Make sure the data filled in the form is correct. After filling in the data on the Integrate Device form, then click ‘Integrate’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FQtTim3WGQG8rUcWHVBam%2Fimage.png?alt=media&amp;token=922c1d90-03fe-4456-8c29-5c6545ae2327" alt=""><figcaption></figcaption></figure>

Once you have successfully integrated the device, the display will change as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F8paec1qMf8mKiXfWAcW7%2Fimage.png?alt=media&amp;token=3e42e936-2c6f-433d-b15d-f0ffe629fa72" alt=""><figcaption></figcaption></figure>

### 1.3. See Device Detail

On the usecase page, you can view data from particular devices that have been successfully integrated. To view data from a particular device, click the device that you have integrated to see more data information.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FO1mHXeytWzDQpLN8GqSC%2Fimage.png?alt=media&amp;token=6b1028d6-cc83-48ab-8a79-79f4bdcec278" alt=""><figcaption></figcaption></figure>

The following is a detailed view of the device that has been opened.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FWslmshE9Yz4nrpUMghkN%2Fimage.png?alt=media&amp;token=f62fb37a-4e9d-423b-adce-fcb3cabc64fd" alt=""><figcaption></figcaption></figure>

## 2. Testing Payload

To ensure the Antares Insight service is working properly, make sure the payload sent by the user's device matches the format specified in Antares Insight. You can then follow the steps below to use the Payload Decoder feature.

### 2.1. Choose Payload Decoder

On the left navigation bar, click the ‘Usecase’ menu then select ‘Water Level’. After opening the Water Level Usecase page, click ‘Payload Decoder’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FEQQ2H51ZH3izT7tpArkS%2Fimage.png?alt=media&amp;token=d2ff63a7-fb99-4c01-bde4-b72dc9f46064" alt=""><figcaption></figcaption></figure>

A popup will appear as shown below, select the decoder you want to use.

{% hint style="info" %}
There are several decoders provided by Antares. You can customise the decoder selection according to your device type.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FwFzFB6pRlknGeuAX9XFU%2Fimage.png?alt=media&amp;token=ca1471c1-cf9a-40fd-a5fc-ddc7fe072453" alt=""><figcaption></figcaption></figure>

### 2.2. Input Data Payload

You can see an example payload based on the device recommendation on the following page.

{% content-ref url="/pages/KtIpzyFJNzhheu6MxeGe" %}
[Payload Example Water Level](/en/antares-insight-hub/usecase/water-level/payload-example-water-level)
{% endcontent-ref %}

Enter the payload for your device in the ‘Input Decoder’ field. After entering the payload, click the ‘Submit’ button.

{% hint style="info" %}
Payloads that have been customised to the format used in Antares will automatically appear in the ‘Decoder Results’ column.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FG6BxP9VYADPvsj8EB98k%2Fimage.png?alt=media&amp;token=608833b7-fdee-47a7-829e-72dbe6fc9a0c" alt=""><figcaption></figcaption></figure>

## 3. Setup Device Threshold

In this section you can set the threshold for **alert notification**. You can enter a maximum of **3 data parameters** that you want to be used as **alert notifications**. You can also limit it to a **maximum of 3 threshold points**. For more details you can see it on the following page.

{% content-ref url="/pages/3Kho7AHvi043yX9DhPqE" %}
[Setup Device Threshold Water Level](/en/antares-insight-hub/usecase/water-level/setup-device-threshold-water-level)
{% endcontent-ref %}

## Manage Usecase

## 1. Edit Device Usecase

In this section you can edit usecase data details such as **‘Application Name’, ‘Device Name’, Decoder Type, Device Label, Serial Number, Address and Map Location** that you previously filled in when filling out the integrate device form. On the Water Level Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FtbhJciABQp3JoTkEiy7f%2Fimage.png?alt=media&amp;token=53cc934b-075e-4a07-9d24-31b4ab6e947c" alt=""><figcaption></figcaption></figure>

On the selected device page click ‘Edit Details’, then the Edit Integrate device popup form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGGBVlqYEDe5JE2LVT133%2Fimage.png?alt=media&amp;token=481a8a92-2aea-4334-a0d9-e716dc0b92c2" alt=""><figcaption></figcaption></figure>

You can rearrange the device usecase data as needed.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGA1T7zux5nzT64rmDvPo%2Fimage.png?alt=media&amp;token=9e5f6d5a-0837-4ad4-975a-25a24be956cd" alt=""><figcaption></figcaption></figure>

## 2. Edit Device Water Level

In this section, you can edit the device in the application antares. You can change the subscription package, set LoRa, and view other data. On the Water Level Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F7oyLkRyDgf14pb21JMa0%2Fimage.png?alt=media&amp;token=23994b04-7aee-49d5-bcd2-feac36d35d5c" alt=""><figcaption></figcaption></figure>

On the selected device page click ‘Config’, then you will be directed to the device page that you want to configure.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fs6foQnu0Wb7xmu2WJMrl%2Fimage.png?alt=media&amp;token=2c82a339-ee76-4413-ad88-d21c171fdc8c" alt=""><figcaption></figcaption></figure>

You can configure devices such as **‘Set LoRa’, ‘Webhhok’, ‘Subscription**’, and view other data details.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F7Wo3G0jL0vl6Eus9HCsn%2Fimage.png?alt=media&amp;token=1269432b-a508-4db2-bdac-085b9324d890" alt=""><figcaption></figcaption></figure>


# Water Level Usecase Prerequisites

Before you create a Usecase, make sure you have fulfilled the following prerequisites:

### 1. Have an Antares Account

Make sure you have an antares account, if you don't have one then you can access the following page.

{% content-ref url="/pages/QMl8xUWdkjq1mDC60pwc" %}
[Account Registration](/en/getting-started/account-registration)
{% endcontent-ref %}

### 2. Make an Application and Device in Antares

Make sure you have created applications and devices on the Antares Platform.&#x20;

Here are the steps to create an application and device:

{% content-ref url="/pages/GoDrpZWdEHSjm8HJcPBT" %}
[Create App](/en/getting-started/create-app)
{% endcontent-ref %}

{% content-ref url="/pages/G07RPeX4vSQLhzFiJJPd" %}
[Add Devices to the Application](/en/getting-started/add-devices-to-the-application)
{% endcontent-ref %}

### 3. Have an access Antares Insight

Make sure you have Free Trial Access to Antares Insight Hub, if you don't have it then you can access the following page.

{% content-ref url="/pages/ie0SfxjnTSUVzDvBtuB1" %}
[Request Free Trial](/en/antares-insight-hub/getting-started/request-free-trial)
{% endcontent-ref %}

### 4. Have Water Level Device as Recommended

There are several devices recommended by Antares to optimise the use of usecases. You can see some compatible water level devices on the following page.

{% content-ref url="/pages/fZrJMGwKVLLMxpyRaf8b" %}
[Water Level Device Recommendation](/en/antares-insight-hub/usecase/water-level/water-level-device-recommendation)
{% endcontent-ref %}

### 5. Knowing the Payload Example of the Device used

Make sure the device you are using is in accordance with the device recommended by Antares, then you can see the sample payload used.

{% content-ref url="/pages/KtIpzyFJNzhheu6MxeGe" %}
[Payload Example Water Level](/en/antares-insight-hub/usecase/water-level/payload-example-water-level)
{% endcontent-ref %}


# Water Level Device Recommendation

In order to optimise the use of usecases, Antares has recommended devices that are compatible with Antares Insight at this time.

## Device Water Level Recommendation

### 1. Pentarium Water Level

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FZ3qVjLsAjNIeO7kjXhKs%2Fimage.png?alt=media&amp;token=fc5e8178-6410-4ae0-b429-050b9964a25f" alt=""><figcaption><p>Water Level Pentarium</p></figcaption></figure>

If you are interested in the following products, you can access more information by following this link:

[Pentarium](http://pentarium.id/)

## Payload Example

You can see an example of the payload of a water meter device on the following page.

{% content-ref url="/pages/KtIpzyFJNzhheu6MxeGe" %}
[Payload Example Water Level](/en/antares-insight-hub/usecase/water-level/payload-example-water-level)
{% endcontent-ref %}


# Payload Example Water Level

**Payload Device Water Level**

To ensure that the Antares Insight service works properly, make sure that the payload sent by the user's device complies with the format specified in Antares Insight.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FXydIAHScf5N0f0m59DmP%2Fimage.png?alt=media&amp;token=4a5f15ee-df82-4307-981d-8e705393ab04" alt=""><figcaption><p>Format Payload Antares</p></figcaption></figure>

The following is an example of a payload on an Antares device that is in accordance with Antares Insight requirements based on **decoder type**:

{% tabs %}
{% tab title="Pentarium Water Level" %}

## 1. Example Payload Input

Here is an example of the payload before passing through the Antares Insight decoder

```
182;76.40;28.46;0;4.23;78.50;159
```

## 2. Decoded Payload Output

Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "level": 182,
  "humidity": 76.4,
  "temperature": 28.46,
  "pressure": 0,
  "batteryVoltage": 4.23,
  "current": 78.5,
  "ultrasonicSensorRaw": 159
}
```

{% endtab %}
{% endtabs %}


# Setup Device Threshold Water Level

## Setup Steps Device Threshold Water Level

### 1. Open Water Level Usecase Page

On the left navigation bar, click the usecase menu. Next, click the water level usecase page, then select the device that you want to set the thershold for as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGNtfb4c2kwyUQba5IXUE%2Fimage.png?alt=media&amp;token=a02073d8-6642-4eb1-bac9-a71c7130b22a" alt=""><figcaption></figcaption></figure>

### 2. Set Threshold

On the device page click ‘Set Threshold’, then the Set Threshold pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FdR1eGi7FYBBcPI94PBvh%2Fimage.png?alt=media&amp;token=fcfe931c-9186-4121-b4f1-bc90793d6ffe" alt=""><figcaption></figcaption></figure>

A pop up will appear as shown below. Select the parameter you want to set the threshold for.

{% hint style="info" %}
You can only set thresholds for a maximum of 3 parameters
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FwvSSnZsQTa6zU7dKvp5i%2Fimage.png?alt=media&amp;token=30c55272-d8ee-42b8-abd7-58863d79b1d8" alt=""><figcaption></figcaption></figure>

Complete the form by filling in the **parameters, minimum value, maximum value, threshold value**. Also label and change the colour for the upper and lower bounds of the threshold as shown below.

{% hint style="info" %}
You can add a maximum of 3 threshold points
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzUr4dLvc5tP7UE4ROmwS%2Fimage.png?alt=media&amp;token=7ee27791-0575-45b8-8ac4-a0b3d5b62000" alt=""><figcaption></figcaption></figure>

If it is appropriate then you can click ‘Save’ to save the threshold settings. If this process is successful, the result will look like the following image.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FklIppc4ZSlTF3Tvl1fQg%2Fimage.png?alt=media&amp;token=b77aae8a-b7ef-4cf3-9762-1bf64a880666" alt=""><figcaption></figcaption></figure>


# Environment Monitoring

## Introduction

In this project you will be directed to create an environment monitoring usecase. You need an environment monitoring device that has been integrated with Antares. You are asked to group devices based on application name and device name into environment monitoring groups. This process is called **Integrate Device** in the Antares Insight Hub service.

## Prerequisites

Before starting the project, make sure you have followed the mandatory prerequisites. Here is the prerequisite page that needs to be prepared.

{% content-ref url="/pages/LHeYAbbVGRJ9x8V5k0w0" %}
[Prerequisites for Use of Environmental Monitoring](/en/antares-insight-hub/usecase/environment-monitoring/prerequisites-for-use-of-environmental-monitoring)
{% endcontent-ref %}

## Environment Monitoring Usecase Creation Steps

## 1. Integrate Device

### 1.1. Open the Environment Monitoring Usecase Menu

On the left navigation bar, select "Usecase". Then on the Usecase menu select "Environment Monitoring".

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FxWk2U7eHRyv5JnzZDZ8X%2Fimage.png?alt=media&amp;token=3541c50f-5519-42ed-9371-782b5a8ab290" alt=""><figcaption></figcaption></figure>

### 1.2. Performing Device Integration

On the Environment Monitoring Usecase Page, click "Integrate" then a pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzpNlFgy0j2KaULzlaZjZ%2Fimage.png?alt=media&amp;token=867ff7ea-cb68-4a9a-9188-eb7a473aa45b" alt=""><figcaption></figcaption></figure>

Next, fill in the Integrate Device form by filling in the **"Application Name",** select **"Device Name"** then fill in other data such as **Decoder Type**, **Device Label,** **Serial Number, Address** and **Map Location**.

{% hint style="info" %}
Make sure the **Decoder Type** matches the type of Device you are using.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F6CnM4cEU6RSVFVL3C7bW%2Fimage.png?alt=media&amp;token=367fc38c-5b62-41a6-b90f-5627d840dc41" alt=""><figcaption></figcaption></figure>

The following is an explanation of the Integrate Device form parameters

<table><thead><tr><th width="92">No.</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Usecase</td><td>Select the usecase according to your needs. There are 3 (three) usecase options, namely Power Meter, Water Meter, and Water Level.</td></tr><tr><td>2.</td><td>Application</td><td>After creating an application, you can use the application in a usecase</td></tr><tr><td>3.</td><td>Device</td><td>After adding the device to the application, select the device for the usecase you will be using.</td></tr><tr><td>4.</td><td>Device Label</td><td>Create labels for the devices you will use</td></tr><tr><td>5.</td><td>Decoder Type</td><td>A decoder option is provided by Antares. The decoder serves to ensure that the payload used by the user matches the format used by Antares.</td></tr><tr><td>6.</td><td>Serial Number</td><td>Enter the serial number for the device you will be using</td></tr><tr><td>7.</td><td>Group Category</td><td>Choice of room category at the installation location of the sensor used</td></tr><tr><td>8.</td><td>Offset</td><td>Offset value for calibration if there is a difference between the sensor value and the value of other measuring instruments</td></tr><tr><td>9.</td><td>Address</td><td>Provide the address that will be used for your usecase</td></tr><tr><td>10.</td><td>Map Location</td><td>Select the coordinates on the map according to the address you have listed</td></tr></tbody></table>

Make sure the data filled in the form is correct. After filling in the data on the Integrate Device form, then click "Integrate".

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGKxY6zwCY0XYoUeyg8ej%2Fimage.png?alt=media&amp;token=677b94d8-9e8b-4758-9fe6-f2eeb9f8fdf6" alt=""><figcaption></figcaption></figure>

Make sure the data filled in the form is correct. After filling in the data on the Integrate Device form, then click "Integrate".

### 1.3. See Device Detail

On the usecase page, you can view data from particular devices that have been successfully integrated. To view data from a particular device, click the device that you have integrated to see more data information.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fe4v8srUfG7ODMf5YkAiA%2Fimage.png?alt=media&amp;token=4c93fa69-2318-4ec8-8a13-422713fee4bf" alt=""><figcaption></figcaption></figure>

The following is a detailed view of the device that has been opened.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3kIdnnbb3O4hG3jDRU9u%2Fimage.png?alt=media&amp;token=f282ecce-60dd-454c-ae6e-5de5455e0646" alt=""><figcaption></figcaption></figure>

## 2. Testing Payload

To ensure the Antares Insight service is working properly, make sure the payload sent by the user's device matches the format that has been determined in Antares Insight. You can then follow the steps below to use the Payload Decoder feature.

### 2.1. Choose Payload Decoder

On the left navigation bar, click the "Usecase" menu then select "Environment Monitoring". After opening the Temperature and Humidity Usecase page, click "Payload Decoder".

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FaoAPTrCUFgfST59txNgn%2Fimage.png?alt=media&amp;token=2ee109a9-0934-47c5-bf67-c272acf25de5" alt=""><figcaption></figcaption></figure>

A popup will appear as shown below, select the decoder you want to use.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F90ShFHuvagHR19rr15RP%2Fimage.png?alt=media&amp;token=8173d712-b32f-4e30-92ed-06819f16667a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
There are several decoders provided by Antares. You can customise the decoder selection according to your device type.
{% endhint %}

### 2.2. Input Data Payload

You can see an example payload based on the device recommendation on the following page.

{% content-ref url="/pages/rN3myjq04qviYrvIW5fh" %}
[Payload Example Environment Monitoring](/en/antares-insight-hub/usecase/environment-monitoring/payload-example-environment-monitoring)
{% endcontent-ref %}

Enter the payload for your device in the "Input Decoder" field. After entering the payload, click the "Submit" button.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FtWUyTWC65k9xIetQZWAb%2Fimage.png?alt=media&amp;token=047effe0-9438-4f74-8808-af79f0f843ce" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Payloads that have been customised to the format used in Antares will automatically appear in the "Decoder Results" column.
{% endhint %}

## 3. Setup Device Threshold

In this section you can set the threshold for **alert notification**. You can enter a **maximum of 3 data parameters** that you want to be used as **alert notifications**. You can also limit it to a **maximum of 3 threshold points**. For more details you can see it on the following page.

{% content-ref url="/pages/Glht8YYqJcrGux4Qem0m" %}
[Setup Device Threshold Environment Monitoring](/en/antares-insight-hub/usecase/environment-monitoring/setup-device-threshold-environment-monitoring)
{% endcontent-ref %}

## Manage Usecase

## 1. Edit Device Usecase

In this section you can edit usecase data details such as "Application Name", "Device Name", Decoder Type, Device **Label, Serial Number, Address** and **Map Location** that you previously filled in when filling out the integrate device form. On the Environment Monitoring Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FB4LCdaFgHhMNRTQFzARS%2Fimage.png?alt=media&amp;token=437095f8-cc34-4d0b-8ddd-90781bd5ce54" alt=""><figcaption></figcaption></figure>

On the selected device page click "Edit Details", then the Edit Integrate device popup form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzlA0owtT4Otmq8LMJlrS%2Fimage.png?alt=media&amp;token=85ac079d-d165-4c62-8a72-a48255746452" alt=""><figcaption></figcaption></figure>

You can rearrange the device usecase data as needed.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FnoZpWmc5iY6dR6tLpxfd%2Fimage.png?alt=media&amp;token=e5a1d258-7cbf-4ff2-a75f-4b0e0d09d01c" alt=""><figcaption></figcaption></figure>

## 2. Edit Device Environment Monitoring

In this section, you can edit the device in the application antares. You can change the subscription package, set LoRa, and view other data. On the Water Level Usecase page, select the device you want to edit as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FC6CG73gZXHByRJ4gZC8l%2Fimage.png?alt=media&amp;token=c2c0d3f9-3be4-46f0-941f-2b3e9a7bf468" alt=""><figcaption></figcaption></figure>

On the selected device page click "Config", then you will be directed to the device page that you want to configure.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FAvuqya6Pq28p8lqQaV9Z%2Fimage.png?alt=media&amp;token=28d3fe67-55a7-475b-8c77-8aee235993d3" alt=""><figcaption></figcaption></figure>

You can configure devices such as **"Set LoRa", "Webhook", "Subscription"**, and view other data details.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FxHs5O5mW0D5ipR2gh66A%2Fimage.png?alt=media&amp;token=98e1ca2c-8a7b-419e-8742-1cfbeef329ec" alt=""><figcaption></figcaption></figure>


# Prerequisites for Use of Environmental Monitoring

##

Before you create a Usecase, make sure you have fulfilled the following prerequisites:

### 1. Have an Antares Account

Make sure you have an antares account, if you don't have one then you can access the following page.

{% content-ref url="/pages/QMl8xUWdkjq1mDC60pwc" %}
[Account Registration](/en/getting-started/account-registration)
{% endcontent-ref %}

### 2. Creating Application and Device in Antares

Make sure you have created applications and devices on the Antares Platform. Here are the steps to create an application and device:

{% content-ref url="/pages/GoDrpZWdEHSjm8HJcPBT" %}
[Create App](/en/getting-started/create-app)
{% endcontent-ref %}

{% content-ref url="/pages/G07RPeX4vSQLhzFiJJPd" %}
[Add Devices to the Application](/en/getting-started/add-devices-to-the-application)
{% endcontent-ref %}

### 3. Have an access to Antares Insight

Make sure you have Free Trial Access to Antares Insight Hub, if you don't have it then you can access the following page.

{% content-ref url="/pages/ie0SfxjnTSUVzDvBtuB1" %}
[Request Free Trial](/en/antares-insight-hub/getting-started/request-free-trial)
{% endcontent-ref %}

### 4. Have a Power Meter Device as Recommended

There are several devices recommended by Antares to optimise the use of usecases. You can see some compatible power meter devices on the following page.

{% content-ref url="/pages/FnlkYDbz9JKmE5P7FKWg" %}
[Power Meter Device Recommendation](/en/antares-insight-hub/usecase/power-meter/power-meter-device-recommendation)
{% endcontent-ref %}

### 5. Knowing the Payload Example from used device

Make sure the device you are using is in accordance with the device recommended by Antares, then you can see the sample payload used.


# Environment Monitoring Device Recommendation


# Payload Example Environment Monitoring

**Payload Device Water Level**

To ensure the Antares Insight service works properly, make sure the payload sent by the user device is in accordance with the format that has been determined in Antares Insight. The following is an example of a payload on an Antares device that is in accordance with Antares Insight requirements based on **decoder type**:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FN3h14oDyt8OVgzHNGE51%2Fimage.png?alt=media&amp;token=a36bdfba-6f1f-4c3f-87bf-b206e3bd2907" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Environment Monitoring" %}

## 1. Example Payload Input&#x20;

\
Here is an example of the payload before passing through the Antares Insight decoder

```
{
  "counter": "7746",
  "sensor": {
    "air_temperature": "22.56",
    "air_humidity": "53.89"
  },
  "config": {
    "interval": "60"
  }
}
```

\
2\. Decoded Payload Output
--------------------------

\
Here is an example of the payload after passing through the Antares Insight decoder.

```
{
  "temperature": 22.56,
  "humidity": 53.89,
  "heatIndex": 24.88,
  "dewPoint": 12.75,
  "absoluteHum": 10.8,
  "saturationVap": 27.35,
  "counter": 7746,
  "interval": 60
}
```

{% endtab %}
{% endtabs %}


# Setup Device Threshold Environment Monitoring

## Device Threshold Environment Monitoring Setup Steps

### 1. Open Environment Monitoring Page

On the left navigation bar, click the usecase menu. Next, click the environment monitoring usecase page, then select the device you want to set the thershold for as shown below.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Foi2lPNcKVG6dhRivSczK%2Fimage.png?alt=media&amp;token=0a283547-a841-4d02-9173-6a9260e0fe82" alt=""><figcaption></figcaption></figure>

### 2. Set Threshold

On the device page click "Set Threshold", then the Set Threshold pop up form will appear.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FxfsYkBgKT5QMWTDPJSJ3%2Fimage.png?alt=media&amp;token=9d59f245-da6b-4cf6-a4e2-bbdac8bd0991" alt=""><figcaption></figcaption></figure>

A pop up will appear as shown below. Select the parameter you want to set the threshold for.

{% hint style="info" %}
You can only set thresholds for a maximum of 3 parameters
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPCOlvTFPSapLm0EneobN%2Fimage.png?alt=media&amp;token=e9289ff3-b510-4dd5-a528-bac7ffc023bb" alt=""><figcaption></figcaption></figure>

Complete the form by filling in the **parameters, minimum value, maximum value, threshold value**. Also label and change the colour for the upper and lower bounds of the threshold as shown below.

{% hint style="info" %}
You can add a maximum of 3 threshold points
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPRmhFWN8Qgs2pkI9iAd3%2Fimage.png?alt=media&amp;token=fc6cb7bb-7447-4c15-9015-ef4a7c5145eb" alt=""><figcaption></figcaption></figure>

If it is appropriate then you can click "Save" to save the threshold settings. If this process is successful, the result will look like the following image.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FdqJYb0b7oTBFOaFrxrwh%2Fimage.png?alt=media&amp;token=00002a56-8b18-47ea-8b41-f395b75e27d4" alt=""><figcaption></figcaption></figure>


# Settings

You can make settings in your Antares account, to optimise the features in Antares Insight. You can set up notification recipients to get access to alert notifications. You can also manage users and their roles. To make settings for your Antares account, please access the following page.

{% content-ref url="/pages/gAbJJsWuHOzo6l9afVEQ" %}
[Manage Alert Recipient (Telegram)](/en/antares-insight-hub/settings/manage-alert-recipient-telegram)
{% endcontent-ref %}

{% content-ref url="/pages/KYRp4mg8Qaz9ofjRpR2F" %}
[Manage User](/en/antares-insight-hub/settings/manage-user)
{% endcontent-ref %}

{% content-ref url="/pages/ACF9oxDwFbpA8aNIIusM" %}
[Roles](/en/antares-insight-hub/settings/roles)
{% endcontent-ref %}


# Manage Alert Recipient (Telegram)

## Prerequisites

Antares Insight Hub has an Alert Recipient feature that serves to send alert notifications if there are parameters that exceed the threshold value that has been configured on the registered device that you are using. Notifications will be sent via the Telegram application. If you have not configured the threshold you can follow these steps:

{% content-ref url="/pages/EWqPDLteuL2f0ygw62Ld" %}
[Setup Device Threshold Power Meter](/en/antares-insight-hub/usecase/power-meter/setup-device-threshold-power-meter)
{% endcontent-ref %}

{% content-ref url="/pages/JnDjiFUqv0TiPO9wAyPN" %}
[Setup Device Threshold Water Meter](/en/antares-insight-hub/usecase/water-meter/setup-device-threshold-water-meter)
{% endcontent-ref %}

{% content-ref url="/pages/3Kho7AHvi043yX9DhPqE" %}
[Setup Device Threshold Water Level](/en/antares-insight-hub/usecase/water-level/setup-device-threshold-water-level)
{% endcontent-ref %}

## Steps to Activate Telegram Alert Recipient

### 1.  Open Manage Alert Recipient Menu

On the left navigation bar, open the Settings menu then, click ‘Alert Recipients’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzYhAnhtko4K1ApkPU7UY%2Fimage.png?alt=media&amp;token=72e7bd39-45cc-43eb-a76f-7e041eadb71f" alt=""><figcaption></figcaption></figure>

### 2. Add contact

On the Notification page, click ‘Add Contact’ on the top right.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FvzDECU2RDgXTVhRgM4d7%2Fimage.png?alt=media&amp;token=87eaf4d3-7719-4fa4-90bd-1beeed5b34b2" alt=""><figcaption></figcaption></figure>

### 3. Fill the Add Notification Contact Form

After you click the ‘Add Contact’ button, a form will appear that you need to fill in. Enter the Notification Name and Contact Name that you will use for Alert Recipient in Telegram.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FX62mT3yaXq56pLKvcsyT%2Fimage.png?alt=media&amp;token=94dd2a23-d036-46dc-9e5f-00ee3540b0ca" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="99">No.</th><th>Data</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Notification Name</td><td>Label for notification</td></tr><tr><td>2.</td><td>Contact Name</td><td>Contact name of the notification recipient</td></tr><tr><td>3.</td><td>Channel Alert</td><td>The channel used to send the notification</td></tr></tbody></table>

After entering the Notification Name and Contact Name, click ‘Save’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FF37rARtn4stkkFVfZWYW%2Fimage.png?alt=media&amp;token=7a887056-48bd-4c98-a12e-da9550e4b188" alt=""><figcaption></figcaption></figure>

### 4. See and Copy Subscription URL

Next, click "Subscription URL"

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F4Bqzvf0WCXEEWsEEInL4%2Fimage.png?alt=media&amp;token=b8d7e5e4-821a-4122-8cef-a7f62221027a" alt=""><figcaption></figcaption></figure>

The display will change to the following image. Then, click ‘Copy Link’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FWMLpXD3PFNHYtKzkecsD%2Fimage.png?alt=media&amp;token=9aac9d72-974e-4450-bf3d-c4e92de161f6" alt=""><figcaption></figcaption></figure>

### 5. Access Subscription URL in Telegram

Open a new tab and paste the URL that you copied earlier.

You will see a display as in the following image. Make sure you have **logged in to your Telegram Web application**. Then, click ‘Open in Web’

You will be redirected to Antares Virtual Assistance's Telegram bot account

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F9KGOAu3wEN7PsP1Q8bQg%2Fimage.png?alt=media&amp;token=ffa86c04-158c-4298-a4fd-f4a786603383" alt=""><figcaption></figcaption></figure>

After opening the Telegram app, you will be in a chat room with Antares Virtual Assistance. Then, click ‘Start’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FQcN0RDVk0pj1TpuEBVO3%2Fimage.png?alt=media&amp;token=a08b1d3b-c69f-415d-8fd2-0359ef1fca7b" alt=""><figcaption></figcaption></figure>

After clicking ‘Start’, you will get an automated message as in the image below

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FL9D7qgJlBEQUHPTFtroI%2Fimage.png?alt=media&amp;token=5e5061f0-fabd-4710-97b5-914bcc226918" alt=""><figcaption></figcaption></figure>

Pastikan Anda mendapat respon “Akun Anda Berhasil Berlangganan”.

{% hint style="info" %}
Telegram accounts can only be registered once in one Antares account.

If you experience problems, please contact us at <support@antares.id>
{% endhint %}

### 6. Enabling Alert Recipients in Antares Insight

Please return to the Alert Recipients page in the Antares Insight Hub. Then click ‘Start’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FgGrO5KklF8Ct1VEQzsgR%2Fimage.png?alt=media&amp;token=06c0453b-34bd-44bd-a87c-fcf6207f7700" alt=""><figcaption></figcaption></figure>

If you have successfully subscribed, the display on the Alert Recipients page will be as shown below

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FBQbi3SEiHl3GImcrYGkW%2Fimage.png?alt=media&amp;token=45187dff-457e-409a-8d53-e8c75359799d" alt=""><figcaption></figcaption></figure>


# Manage User

End User is a feature of Antares Insight to share login access to view reports from user-owned devices to third parties. On the End User page, it is possible to view reports from the data of each device to the entire result of aggregated data carried out in Antares Insight. End Users only have access to view and cannot perform device management at all.

{% hint style="info" %}
Before adding End Users, make sure you have created Roles

[Roles](/en/antares-insight-hub/settings/roles)
{% endhint %}

## Manage User Steps

### 1.Open Manage User Menu

On the left navigation bar, open the Settings menu on the Antares Insight Hub, then click ‘Manage Users’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F4QytrVnzly6EMyUM74W6%2Fimage.png?alt=media&amp;token=6de6402a-c090-4dda-8256-245ef895193a" alt=""><figcaption></figcaption></figure>

### 2. Add End User

On the Manage User page, click ‘Add End User’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FQ7QMsn1Lum3AUYua07Oh%2Fimage.png?alt=media&amp;token=23cb00c9-088c-4111-9253-7a0dac99a23a" alt=""><figcaption></figcaption></figure>

### 3. Fill Add End User Form

After you click the ‘Add End User’ button, a form will appear that you need to fill in. Fill in some data needed to add an End User such as End User Name, Email, Password, Phone Number, and Roles.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FYJhxLXQ74Wt4oB6R2Arn%2Fimage.png?alt=media&amp;token=7ffc0d0f-a7a9-46a1-9864-96d14985367c" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="89">No.</th><th>Data</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>End User Name</td><td>The name you will use for the End User account</td></tr><tr><td>2.</td><td>Email</td><td>Email used for End User account</td></tr><tr><td>3.</td><td>Password</td><td>The password to be used for the End User account</td></tr><tr><td>4.</td><td>Nomor Telepon</td><td>Active phone number that will be used for End User account</td></tr><tr><td>5.</td><td>Roles</td><td>Roles that have been created in the Settings-Roles menu and will be assigned to End Users</td></tr></tbody></table>

After filling in the required data, click ‘Save’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FXTNCNZaeLS9hu5UFCoFD%2Fimage.png?alt=media&amp;token=e5dbaf1d-d706-4c3e-b32e-fab0f5492c7c" alt=""><figcaption></figcaption></figure>

### 4. See End User Credential

If you have successfully added an End User, a pop-up will appear providing access information for the End User login.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGIzDZ1BYNczFrjdbd7uw%2Fimage.png?alt=media&amp;token=9a22c13c-3b86-42a8-be4b-b306b8078066" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Make sure you remember and note down the parameters displayed on the pop-up, because if you forget the password, you will need to reset the password for the end user.
{% endhint %}

<table><thead><tr><th width="83">No.</th><th>Informasi</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Platform ID</td><td>ID of the Root account</td></tr><tr><td>2.</td><td>End User's Email</td><td>Email used by End User to Login Antares Insight</td></tr><tr><td>3.</td><td>End User's Password</td><td>The password used by the end user to log in to Antares Insight</td></tr></tbody></table>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F2kAXyVMER1SjwIOHBQHV%2Fimage.png?alt=media&amp;token=d6aadbd9-f9af-4888-959d-cd37f290be45" alt=""><figcaption></figcaption></figure>


# Roles

The Roles menu serves to determine what access will be given to End Users when accessing Antares Insight. With these Roles, it allows us to manage access in each usecase and Antares Insight menus. Access is only given to view devices, device data, analysis results, and aggregates of existing data. These Roles will only function when connected to the End User that will be created.

## Steps to Create Roles

### 1. Open Roles Menu

On the left navigation bar, open the Settings menu on the Antares Insight Hub, then click ‘Roles’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F5PV4f1kQoLprTlDxN9ye%2Fimage.png?alt=media&amp;token=d8a6aaf3-5f80-4eef-815a-b858ac1b71f9" alt=""><figcaption></figcaption></figure>

### 2. Add Roles

On the Roles page, click ‘Add Roles’

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F50SltYb3LQJ4XE6dkcjq%2Fimage.png?alt=media&amp;token=19fddc6b-1c56-4966-9ebc-562c63f59a09" alt=""><figcaption></figcaption></figure>

### 3. Fill in the Roles Form and Set Previllage

After you click the ‘Add Roles’ button, a form will appear that you need to fill in. Write the name for the access roles that will be given in the Roles Name column.

{% hint style="info" %}
You can define your own roles name and its previllages
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FFInV1Mnshwmyi2tLlvGo%2Fimage.png?alt=media&amp;token=291a8efc-0e91-40a6-9b22-c12ea1e311f2" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="95">No.</th><th width="215">Data</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Overview</td><td>Access to view the Overview menu</td></tr><tr><td>2.</td><td>Data Analytics</td><td>Access to view the Insight Hub menu (analysis results)</td></tr><tr><td>3.</td><td>Device SaaS Access</td><td>Access to view the Usecase menu (device details)</td></tr></tbody></table>

Please set the access to view Overview and Data Analytics and click ‘Apply’.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FMEfcMgWk4Tor9sQrrIUj%2Fimage.png?alt=media&amp;token=94c17dd6-d9ac-4bf7-a2ca-f3f8bba0b469" alt=""><figcaption></figcaption></figure>

If you have successfully created Roles, the Antares Insight Hub Settings-Roles page will appear as follows

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FNkcCvxElUlruMfll0uvn%2Fimage.png?alt=media&amp;token=eed8dd1c-a3c7-43f1-b4f0-84675fcf9288" alt=""><figcaption></figcaption></figure>


# Subscription and Payment

This documentation will explain how to subscribe to packages available on the **Platform** and **Connectivity** services. You can follow the procedure to purchase and use the packages on the following page.

{% hint style="info" %}
The Platform Package is a mandatory package so that you can use the IoT services contained in the Antares Platform, while the Connectivity Package is an **optional** package.
{% endhint %}

{% content-ref url="/pages/dqB93YDuxk4FNOqOlHMZ" %}
[Platform](/en/subscription-and-payment/platform)
{% endcontent-ref %}

{% content-ref url="/pages/NJgEcAOXMuwuPc1HmMGj" %}
[Connectivity](/en/subscription-and-payment/connectivity)
{% endcontent-ref %}

{% hint style="info" %}
Before selecting a subscription plan, make sure you have verified your phone number on the **Account** page of the Antares console.
{% endhint %}


# Platform

**ANTARES i**s an Internet of Things (IoT) trademark under PT Telkom Indonesia Tbk. **ANTARES** has two main pillars, namely IoT platform and IoT connectivity.

ANTARES Platform is a horizontal IoT platform that provides resources to support the development of IoT services. There are several Platform Subscription available that you can see on the [antares.id](https://antares.id/) page.

The procedure for purchasing and using the package can be followed on the following page.

{% content-ref url="/pages/P6Mif4i5FLv9doPmXwqa" %}
[How to Use Platform Packages](/en/subscription-and-payment/platform/how-to-use-platform-packages)
{% endcontent-ref %}

Subscription payments can be made through Antares Coins, Virtual Account (VA) Bank Mandiri, Permata, BRI, BNI, Credit Cards, and LinkAja. The procedure for purchasing and paying for the package can be followed through the following page.

{% content-ref url="/pages/0QfUPOnBC1nznjl2gkQA" %}
[How to Purchase a Platform Subscription](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription)
{% endcontent-ref %}

{% content-ref url="/pages/hcLesSf1HOGulTfwz2oc" %}
[Procedure for Renewing a Platform Subscription](/en/subscription-and-payment/platform/procedure-for-renewing-a-platform-subscription)
{% endcontent-ref %}


# How to Use Platform Packages

## Steps to Use the Package&#x20;

1. Log in to your Antares account and open the Antares console page
2. Click the **"Applications"** section and click **"Create App"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FPkk60OMXirLajoxrk4jc%2Fimage.png?alt=media&amp;token=d07eb936-f7d3-44ca-a7d0-c0a582ee295d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FKht91vk8VLcpr9eE46CY%2Fimage.png?alt=media&amp;token=cbb5609c-ba1b-4a43-a8aa-27b507c3b183" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Ft3V1gHlivQ7Hg54c8ms3%2Fimage.png?alt=media&amp;token=99dca326-4c1a-4fb4-9f3d-91aaf7513aea" alt=""><figcaption></figcaption></figure>

3. Next, add Device to the Application

On the **"Application"** page, you can directly click "Create Device" to add the device to the application.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FWFJvgTmCxJBuG5nSf1ma%2Fimage.png?alt=media&amp;token=a59f7274-9069-4aa0-9987-b4d053851626" alt=""><figcaption></figcaption></figure>

After you click **"Create Device"**, in the **"Select your package"** section you can immediately select the package you want to use. In this documentation, the package used is Anrares Free Trial.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FeBMZFDII8L7ud1IRMnxC%2Fimage.png?alt=media&amp;token=ce5d8e2f-b18c-4ae6-b583-8c01cc299f73" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FHdwe5KwiKiE0Rtwd8tAQ%2Fimage.png?alt=media&amp;token=2b047b31-c277-46d9-b2ff-9aa39c62e1a1" alt=""><figcaption></figcaption></figure>

4. Click **"Create Devices"**

If you have successfully added a device, the device that has been successfully created will be displayed on the **Applications** dashboard page.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F4OGUfxhdoHzYTEnQx4KI%2Fimage.png?alt=media&amp;token=16a4a629-d5dd-4e11-80aa-c0663bdf5681" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The procedure for creating an Application and adding a Device can be seen in full on the following page:

[Create App](/en/getting-started/create-app) \
[Add Devices to the Application](/en/getting-started/add-devices-to-the-application)
{% endhint %}


# How to Purchase a Platform Subscription

This documentation will explain the procedure for purchasing Platform packages provided by Antares.

{% hint style="info" %}
Before selecting a subscription plan, make sure you have verified your **phone number** on the **Account** page of the Antares console.
{% endhint %}

## Purchasing Steps:

1. Log in to your Antares account and open the Antares console page
2. Click on the Subscriptions section and click **"Buy Subscription"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F41vH9ruB4AalYlK0uWoK%2Fimage.png?alt=media&amp;token=d05d18e0-d6eb-42c6-98de-fd838901d6c3" alt=""><figcaption></figcaption></figure>

3. Click on the **"Platform"** option and select the duration of time you want to subscribe to the plan

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FypJv7dJCsVSEfPaUOD99%2Fimage.png?alt=media&amp;token=b6a1d2b7-9dde-49af-8f83-0ac32b47a53c" alt=""><figcaption></figcaption></figure>

4. Click "Buy Subscription"

Fill in the number of devices you wish to purchase, and give a name or label to the subscription plan you have chosen. After that, click **"add to cart"** to put the package you want to purchase into your basket.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Ff1WiJTZXMjcxv9QNafhr%2Fimage.png?alt=media&amp;token=e141ed68-61e8-4bff-9ef7-fd2ebdbf4245" alt=""><figcaption></figcaption></figure>

You are required to fill in the number of devices that you will purchase, and include a **"subscription name"** to make it easier for you to use the package.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FUVSe63K2CWsFkajbUdKJ%2Fimage.png?alt=media&amp;token=97b0910b-e980-45a7-836a-8c4660b30e94" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FKlxSA2Iq8A41MWZ9GWdY%2Fimage.png?alt=media&amp;token=850012b5-bd5b-4c4b-8f2f-35276c57b9b5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FTEv8HVtJLFGSq2EA3fvr%2Fimage.png?alt=media&amp;token=12dc2d93-d794-4bac-9c90-7e1183445576" alt=""><figcaption></figcaption></figure>

To proceed with the payment, you can directly click **"Directly Buy Subcsription"**

5. After putting the parcel in the basket, select the parcel to be paid for.

You can view the packages you are about to pay for via the basket at the top right of the Antares console page.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FJOxdceEmcRxLTiuwbJgP%2Fimage.png?alt=media&amp;token=d7edf00f-0c89-4387-80ea-275628dcd4e9" alt=""><figcaption></figcaption></figure>

6. Click **"Continue Order"**

You have the opportunity to get a discount. You can see the applicable promo in the **"Apply Promo"** section before proceeding with the payment.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FxNr0eoBZukZIHZQCcFQM%2Fimage.png?alt=media&amp;token=5abb6164-090e-4d90-9c10-f11d5b1d02a2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FCsEuBcbPK6zeiyT2htkN%2Fimage.png?alt=media&amp;token=fdc8530d-2b65-4838-8b03-bb90c00d9347" alt=""><figcaption></figcaption></figure>

7. Click **"Choose Payment Methods"** to select a payment method

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FYf7lCybLD7i2R5zRj3I8%2Fimage.png?alt=media&amp;token=0cc939ec-3c18-4b00-a59b-ab888455dd8f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fv1cWjdgfkzSU6BloGy8w%2Fimage.png?alt=media&amp;token=0837fc97-7622-49e4-9632-336564b22739" alt=""><figcaption></figcaption></figure>

**Payment Procedures can be seen on the following page:**

{% content-ref url="/pages/0QfUPOnBC1nznjl2gkQA" %}
[How to Purchase a Platform Subscription](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription)
{% endcontent-ref %}


# Payment Using Antares Coins

### Payment Procedure Using Credit Cards

1. Make sure you have topped up Antares Coins
2. On the payment page, click "Proceed Withdrawal with Antares Coin" to send an OTP code to your Antares-registered email

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3SEUQUg7Bv3lITqXHzms%2Fac%201.png?alt=media&amp;token=561a358d-c38f-4f8f-b486-96c683f9abc8" alt=""><figcaption></figcaption></figure>

3. Enter the OTP code sent to your email Click "Send Code" to verify the OTP code

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fe6ys6W1N0iOJbGqZugRw%2Fac%202.png?alt=media&amp;token=87e3607e-f23d-4c5f-88ed-9c531604cf55" alt=""><figcaption></figcaption></figure>

4. Transaction completed.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FJUbi8i6pTp6IkV7Yy7t4%2Fac%203.png?alt=media&amp;token=93570ecc-31a7-44e0-9308-0004bc6267a7" alt=""><figcaption></figcaption></figure>

**The procedure for top up Antares Coins can be seen on the following page:**

{% content-ref url="/pages/BEOEe6G7gNAr2GKZepFQ" %}
[Antares Coins](/en/subscription-and-payment/antares-coins)
{% endcontent-ref %}


# Payment Using Virtual Account

A virtual account is a banking tool or service that allows individuals or companies to receive payments from various sources, such as customers or clients, without having to provide an actual bank account number.

Here's a guide to paying for platform packages using the virtual account (VA) payment method:

{% content-ref url="/pages/QfZ26z1FXYHO6y1SVDI4" %}
[Mandiri Bank](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription/payment-using-virtual-account/mandiri-bank)
{% endcontent-ref %}

{% content-ref url="/pages/beMk95sci2vNvHNHI5xp" %}
[Permata Bank](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription/payment-using-virtual-account/permata-bank)
{% endcontent-ref %}

{% content-ref url="/pages/zKdf6AGYB4soBfO9NOWB" %}
[BRI Bank](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription/payment-using-virtual-account/bri-bank)
{% endcontent-ref %}

{% content-ref url="/pages/KRWsJjJJamNRc1FqqoUu" %}
[BNI Bank](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription/payment-using-virtual-account/bni-bank)
{% endcontent-ref %}


# Mandiri Bank

### 1. Virtual Account Payment Via ATM

1. Insert your ATM card and select "Bahasa Indonesia"
2. Enter your PIN and press "Ok"
3. Select "Payment", then choose "Multi Payment"
4. Enter the company code "88908" (88908 XENDIT) for closed amount VA or "88608" (88608 XENDIT) for open amount VA, then press "Ok"
5. Enter the Virtual Account Number 88908988586665460 (example) and press "Ok"
6. For open amount VA, enter the desired amount, then press "Ok"
7. Customer information will be displayed, select option number 1 corresponding to the payment amount and press "Yes"
8. Payment confirmation will appear, press "YES" to proceed
9. Save your transaction receipt
10. Your transaction is successful
11. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Open the Mandiri Internet Banking website at <https://ibank.bankmandiri.co.id>
2. Log in using your USER ID and PASSWORD
3. Go to the homepage, then select "Payments"
4. Select "Multi Payment"
5. Choose 88908 XENDIT (for closed VA) and 88608 XENDIT (for open VA) as the service provider
6. Enter the Virtual Account Number 88908988586665460 (example)
7. Then select "Continue"
8. If all details are correct, click "CONFIRM"
9. Enter your PIN / Challenge Code Token
10. After your payment transaction is completed, save the payment proof
11. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

### 3. Virtual Account Payment Via Livin Mandiri (Old Version)

1. Open the Mandiri Online app, enter your USERNAME and PASSWORD
2. Select "Pay"
3. Select "Multipayment"
4. Select 88908 XENDIT (for closed VA) and 88608 (for open VA) as the service provider
5. Enter your Virtual Account Number 88908988586665460 (example)
6. Then click "Continue"
7. Review and confirm your transaction details, then click "Confirm"
8. Complete the transaction by entering your MPIN
9. After your payment transaction is completed, save the payment proof
10. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

### 4. Virtual Account Payment Via Livin Mandiri (Old Version)

1. Open the Livin by Mandiri app, enter your PASSWORD or perform face verification
2. Select "Pay"
3. Search for "Xendit 88608" (for Open VA) or "Xendit 88908" (for Closed VA)
4. Select Xendit 88608 (for open VA) and 88908 (for closed VA) as the service provider
5. Enter your Virtual Account Number 88908988586665460 (example)
6. Enter the amount you want to pay (If VA is a closed VA, the amount will be automatically filled)
7. Review and confirm your transaction details, then click "Confirm"
8. Complete the transaction by entering your MPIN
9. After your payment transaction is completed, save the payment proof
10. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FAPO79xa0ROHJXnufWs1P%2Fimage.png?alt=media&amp;token=0e2e7e86-4525-47da-942e-9dcd3c9bd6bd" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Permata Bank

### 1. Virtual Account Payment Via ATM

1. Insert your Permata ATM card
2. Enter your PIN
3. Select "Other Transactions"
4. Select "Payments"
5. Select "Other Payments"
6. Select "Virtual Account"
7. Enter the Virtual Account Number 7293988549175775
8. Then select the debit account to be used
9. Confirm your transaction details
10. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Open the website <https://new.permatanet.com>
2. Enter your User ID and Password
3. Select "Bill Payments"
4. Select "Virtual Account"
5. Enter the Virtual Account Number 7293988549175775
6. Double-check your payment details
7. Enter the transaction authentication/token
8. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 3. Virtual Account Payment Via Mobile Banking

1. Open the Permata Mobile Internet app
2. Enter your User ID and Password
3. Select "Bill Payments"
4. Select "Virtual Account"
5. Enter your Virtual Account Number 7293988549175775
6. Enter the transaction authentication/token
7. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FTOFSHIq1SgxZiYKlQ2G2%2Fimage.png?alt=media&amp;token=caad152e-4fea-405a-9a31-ce250be1b64d" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# BRI Bank

### 1. Virtual Account Payment Via ATM

1. Insert your BNI card
2. Select your preferred language
3. Enter your ATM PIN
4. Select "Other Transactions"
5. Select "Payments"
6. Select "Other Payments"
7. Select "Briva"
8. Enter the Virtual Account Number 92001988572642231 and the desired amount to pay
9. Verify transaction data and press "YES"
10. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Type the URL <https://ib.bri.co.id/> in your browser, click "Log In"
2. Enter your User ID and Password
3. Click "Payments" and select "Briva"
4. Enter the Virtual Account Number 92001988572642231 and the desired amount to pay
5. Enter your password and then enter the internet banking mToken
6. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FnhobFkukYERbCwdlNoSe%2Fimage.png?alt=media&amp;token=7d4d67c6-6506-40e4-93ca-20e1fd9d7668" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# BNI Bank

### 1.  Virtual Account Payment Via ATM

1. Insert your BNI card
2. Select the language
3. Enter your ATM PIN
4. Choose 'Other Services' from the menu
5. Select 'Transfer'
6. Choose 'Savings Account'
7. Select 'To BNI Account'
8. Enter the virtual account number as indicated on the payment checkout
9. Enter the transfer amount
10. Confirm the transaction by pressing 'Yes,' and the transaction will be completed

### 2.  Virtual Account Payment Via Internet Banking

1. Type the URL <https://ibank.bni.co.id/> in your browser and click 'Login'
2. Enter your User ID and Password
3. Click on the 'Transfer' menu and then select 'Add Favorite Account.' Choose 'Between BNI Accounts.' If using a desktop, select the 'Transactions' menu, then 'Manage Destination Account,' and add a new destination account
4. Enter the name and virtual account number in the 'Account Number' field
5. Enter the Token Authentication Code
6. Click 'Continue,' and the payment will be completed

### 3.  Virtual Account Payment Via Mobile Banking

1. Open the BNI Mobile Banking app on your mobile phone
2. Enter your User ID and password
3. Select the 'Transfer' menu
4. Choose 'Between BNI Accounts' and then select 'Add New Account'
5. Enter the Debit Account number and the destination account number or virtual account number. Then click 'Next'
6. Confirm the transaction and enter your transaction password. Click 'Next,' and the payment will be completed

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FWAXGTHrytVz0NpWAN1KO%2Fimage.png?alt=media&amp;token=2c0a13a2-fbf7-4d16-807e-46ec7c370058" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Payment Using e-Wallet (LinkAja)

### Payment Procedure Using e-Wallet (LinkAja)

1. Log in to the LinkAja payment page

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FF89IKd34gRtyJaoVaY7i%2Flinkaja1.png?alt=media&amp;token=38c71b5e-7032-4eb1-a780-51aee2ae1f6f" alt=""><figcaption></figcaption></figure>

Click "Continue withdrawal LinkAja"

2. You will then be redirected to enter your mobile phone number and LinkAja PIN

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1CXczdcT0nd4a31VFiOJ%2Fimage.png?alt=media&amp;token=91725b4b-7eee-4451-bff0-14a1ed9dd1f9" alt=""><figcaption></figcaption></figure>

You will be given 5 minutes to complete the payment.

3. Click "Continue"
4. Enter the verification code (OTP) sent via SMS, then click "Process"
5. Transaction completed.

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F0UJXtmHsRXnhZOvAQl6j%2Flinkaja2.png?alt=media&amp;token=dc286ce9-b9be-4b9e-9cb9-f6195df499eb" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Payment Using Credit Cards (CC)

### How to Pay Using a Credit Card

1. After selecting the credit card payment method, continue the payment by clicking **"Continue Payment With CC"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FJh4PG22vGQDJ9h6IJoku%2Fcc%201.png?alt=media&amp;token=f158e3a9-60e3-4c26-8bea-cd39bfd2ce97" alt=""><figcaption></figcaption></figure>

2. You will be redirected to the next page. Enter Card Number, Full Name, Card Expiry Date, and cardholder's CVC

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3dLa6sEuC8iWiEcMO47t%2Fimage.png?alt=media&amp;token=9bbd663b-03de-4726-a1f4-0ea31911d914" alt=""><figcaption></figcaption></figure>

3. Click "Pay Now" after filling in the information
4. Enter the Authorisation Code (OTP) sent via the registered mobile number, then click OK.
5. Transaction completed.

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FvrJQImTGoa672RwH70XE%2Fcc%202.png?alt=media&amp;token=89ec0ef1-f9b6-47e6-9fb5-cba93a43f5eb" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Procedure for Renewing a Platform Subscription

There are several ways to view the status of your purchased package, namely:

1. Click on the "Overview" page on the Antares website

In the **"Subscription Management"** section, you can find out the status of your previously purchased plan. Click "See more subscription" for further information.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FLAroxsSqN1mSamoKa0CW%2Fimage.png?alt=media&amp;token=a5537060-0487-4aae-8bed-c692b55b58da" alt=""><figcaption></figcaption></figure>

Or click on the "Subscription" page on the sidebar of the Antares page.

On the **"Subscription"** page, you can directly purchase the package you need by clicking **"Buy Subscription"**. If you want to see the status of the packages you have previously purchased, you can view the information by clicking **"See All Subscriptions"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FAICJWtLKalv3patvXsWX%2Fimage.png?alt=media&amp;token=8f2536ce-ab0b-4991-b0fd-23e0f5f91788" alt=""><figcaption></figcaption></figure>

2. Click "See All Subscription"

You will arrive at the **"Subscription Management"** page. On the **"Subscription Management"** page you can see the status of each package you have purchased previously.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3f60J6iE0XBvEthApuMx%2Fimage.png?alt=media&amp;token=5aeef099-250f-4ff5-a7a1-c2cb901e5745" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fz5I1UUjh0zuhQCnj301k%2Fimage.png?alt=media&amp;token=90a05883-0582-46d5-bb38-23d502dd17c7" alt=""><figcaption></figcaption></figure>

**There are 6 (six) status of the Antares package, namely:**

| PACKAGES STATUS | DESCRIPTION                                                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Active          | Packages that are currently active and can still be used                                                                      |
| Grace Period    | Packages that have entered the grace period, but are still in use until the expiration date.                                  |
| Hibernate       | Packages that has passed the grace period and is temporarily freezed.                                                         |
| Suspended       | Pacthat has passed the **"hibernate"** period                                                                                 |
| Inactive        | Packages that have passed the **"suspended"** period. **"Free Trial"** packages will automatically enter the inactive period. |
| Cancelled       | Status of your cancelled plan before payment                                                                                  |

3. Select the plan you would like to renew

You can renew packages that are in **Grace Period**, **Hibernate**, and **Suspended** status.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FwH4MGTvhKjD78hwDBDn0%2Fimage.png?alt=media&amp;token=30212650-1d8a-4666-9813-066c05f63da4" alt=""><figcaption></figcaption></figure>

4. On the plan you want to renew, click "Active"

Once you click **"Active"**, the package you want to renew will be automatically added to the basket on the top right.

5. Once the parcel is in the basket, click **"Continue Order"**.

If there is an applicable promo, you can add the promo to get a price cut in the **"Apply Promo"** section. Next, click **"Continue Order"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FaEBxsfsfma0MEKkLF6FC%2Fimage.png?alt=media&amp;token=8333ee3d-0c8a-41cd-9cc1-863872d434f6" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
You can only extend packages that are in **Grace Period**, **Hibernate**, and **Suspended** status. If your package is in Inactive status, then you must do the package purchase process from the initial stage.
{% endhint %}

**You can see the Payment Procedure for the package you purchased or renewed on the following page:**

{% content-ref url="/pages/0QfUPOnBC1nznjl2gkQA" %}
[How to Purchase a Platform Subscription](/en/subscription-and-payment/platform/how-to-purchase-a-platform-subscription)
{% endcontent-ref %}


# Procedure for Changing Platform Subscription

If your service is no longer active and you need to change your service to active, you can take the steps to change your service. To change the package can be done on each device or on many devices that are in one application.&#x20;

There are 2 (two) ways to replace Platform Services, which are :&#x20;

**Switching Subscription on a Device**

1. Log in to your Antares account and go to the "Applications" page.

On the Applications page, select the application for which you want to change the subscription

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FYFRTlXpwnunHlMf6dn9a%2Fimage.png?alt=media&amp;token=4b833e44-caa0-4285-add6-6c152eba5a6c" alt=""><figcaption></figcaption></figure>

2. Click the device you want to change the subscription to

Click the "Subscription" button at the top right of the device page.&#x20;

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FXx2rGQTfocfR3qv4MrQm%2Fimage.png?alt=media&amp;token=f096222b-d58f-45f2-96e5-2d070bfeee93" alt=""><figcaption></figcaption></figure>

Then a pop up will appear as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fmuu6XRWFwPdjlY8JbOOx%2Fimage.png?alt=media&amp;token=1d09dc20-f527-4e7b-aaf2-864c63a7d20d" alt=""><figcaption></figcaption></figure>

If you subscribe to the LoRa service, then a pop up will appear as follows

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FsHP3rvCV1hYmRnHPSUt8%2Fimage.png?alt=media&amp;token=73b1ced9-c817-4113-a606-f05df8a86940" alt=""><figcaption></figcaption></figure>

3. Select the active subscription that your device will use in the field provided

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FcwQFUlt4jtJZumehnQrX%2Fimage.png?alt=media&amp;token=aea96d2e-e935-4f6d-bea3-cabfa236f371" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FEq3ta6TLRJNLOtPnkYmY%2Fimage.png?alt=media&amp;token=dd72f519-5da7-41e2-8781-7d54818a03cc" alt=""><figcaption></figcaption></figure>

4. After selecting the subscription, click "Apply"

Furthermore, the Platform Package will change automatically marked with the status "success update subscription device".

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FEP8af1LonJNqnIboEQUc%2Fimage.png?alt=media&amp;token=17753a1a-0117-487e-89b5-fd7814524a06" alt=""><figcaption></figcaption></figure>

**Switching Subscription on Multiple Devices in One App**

1. Log in to your Antares account and go to the **"Applications"** page.

Click the **"Subscription"** button

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fi2yldRrhJZCAgqc4IrOs%2Fimage.png?alt=media&amp;token=97547e79-bb9a-4f6e-803e-5e8387d1ec90" alt=""><figcaption></figcaption></figure>

The display will change to the following image:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fe685tMf9K7mxKucG51lV%2Fimage.png?alt=media&amp;token=c2f7d304-0fce-4450-8a7b-c1278466335f" alt=""><figcaption></figcaption></figure>

2. Click the **"Change Device Subscription"** button

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FJFdJkPzofcT1W3Ifafdv%2Fimage.png?alt=media&amp;token=35620ed8-16ed-4b24-9528-7d1829651ccc" alt=""><figcaption></figcaption></figure>

If the user does not have a service that does not meet the number of devices in the application, then no service appears.

Select the devices to be replaced via the checklist column provided on the right. To select all devices directly, you can fill in the **select all** checklist field.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FlUIhmcYssOLCiIkTefxl%2Fimage.png?alt=media&amp;token=e16a8550-79b5-4a5a-8b70-0de7714dc512" alt=""><figcaption></figcaption></figure>

3. Please select your preferred service in the **"Platform and Connectivity Subscription"** section

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FNLyRTGUSQBp58oT2pTiR%2Fimage.png?alt=media&amp;token=ad6d4278-1e1f-439a-9cf7-419d5994af4a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FDsq1HilTimETxi8Ldnn9%2Fimage.png?alt=media&amp;token=d6f0f9f4-a69f-4979-ad02-e6699c64f17f" alt=""><figcaption></figcaption></figure>

4. Click **"Confirm"**

Your subscription will be automatically replaced

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FeJpyqxTX2w6vVlt7n8bb%2Fimage.png?alt=media&amp;token=8ab1cfaf-ba83-408c-9bfb-e76edca40080" alt=""><figcaption></figcaption></figure>


# Connectivity

ANTARES is an Internet of Things (IoT) trademark under PT Telkom Indonesia Tbk. ANTARES has two main pillars, namely IoT platform and IoT connectivity.

Connectivity is an important aspect in the implementation of devices from the Internet of Things (IoT) so that they are connected to each other to achieve a certain goal. There are several Connectivity Packages available that you can see on the antares.id page.

The procedure for purchasing and using the package can be followed on the following page:

{% content-ref url="/pages/iNh1XiqWiST28P0eQfTa" %}
[How to Use Connectivity Packages](/en/subscription-and-payment/connectivity/how-to-use-connectivity-packages)
{% endcontent-ref %}

Subscription payments can be made through Antares Coins, Virtual Account (VA) Bank Mandiri, Permata, BRI, BNI, Credit Cards, and LinkAja. The procedure for purchasing and paying for the package can be followed through the following page:

{% content-ref url="/pages/NtaeamagCcEPOcfsvPC1" %}
[How to Purchase a Connectivity Subscription](/en/subscription-and-payment/connectivity/how-to-purchase-a-connectivity-subscription)
{% endcontent-ref %}

If you are interested in extending the package you have purchased, you can see the procedure for extending the package on the following page:

{% content-ref url="/pages/hcLesSf1HOGulTfwz2oc" %}
[Procedure for Renewing a Platform Subscription](/en/subscription-and-payment/platform/procedure-for-renewing-a-platform-subscription)
{% endcontent-ref %}


# How to Use Connectivity Packages

## Package Usage Steps

1. Log in to your Antares account and open the Antares console page
2. Click the **"Applications"** section and click **"Create an Application"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fl6IueHFc2VuTn4Bf5e85%2Fimage.png?alt=media&amp;token=b71e8685-ecf7-43c7-a0f1-9e91c35508c0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FutPEiHg6jWfgc74VaDJI%2Fimage.png?alt=media&amp;token=a28ca699-e362-4384-8fb7-aa1f9d3ad2be" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FvrwLh3rPwjYMEh13Lr0S%2Fimage.png?alt=media&amp;token=1b985e78-7a8f-484c-b865-99f2741e98db" alt=""><figcaption></figcaption></figure>

3. Next, add Device to Application

On the **"Application"** page, you can directly click "Create Device" to add the device to the application.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FCunAlj5Y9Gcayzeq10tF%2Fimage.png?alt=media&amp;token=8693463c-243e-409b-bd74-f7ebc458d713" alt=""><figcaption></figcaption></figure>

After you click **"Create Device"**, in the **"Select your package"** section you can immediately select the package you want to use. In this documentation, the package used is Antares Free Trial.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FMzn6xLBwSmopvjfm8HBF%2Fimage.png?alt=media&amp;token=e9b612e8-16a8-4a85-bc42-04cb011de7c7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FHFjm5221kkOcTuwuQW02%2Fimage.png?alt=media&amp;token=b0e3d4b6-fc62-47ed-a958-ec6679e6c5ad" alt=""><figcaption></figcaption></figure>

4. Click on **"Create Devices"**

If you have successfully added a device, the device that has been successfully created will be displayed on the **Application** dashboard page.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FgUTZ3NXIjUql73cH9mHy%2Fimage.png?alt=media&amp;token=8d90457a-b8af-44ae-b086-4a676208d414" alt=""><figcaption></figcaption></figure>

5. Click on the Device you have created and select **"Set LoRa"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FOdl1GMnAPZYWkIsyeobF%2Fimage.png?alt=media&amp;token=53245d43-6b0a-489e-b337-853cba8e9c09" alt=""><figcaption></figcaption></figure>

6. After clicking **"Set LoRa"**, select Lora Class - LoRa Activation Mode - OTAA Parameters

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F2QYlrMI5aYildw98xeTm%2Fimage.png?alt=media&amp;token=051bf0ec-9060-4d80-a3ce-5a0e9a223071" alt=""><figcaption></figcaption></figure>

After selecting Lora Class - LoRa Activation Mode - OTAA Parameters, select the subscription package in **"Select LoRa Subscription"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fbt1rTN3y56JtLOKcBIcN%2Fimage.png?alt=media&amp;token=3a47fa17-b3da-470f-ab51-96e069defe6d" alt=""><figcaption></figcaption></figure>

In the example image above, the package used is LoRa Connectivity Free Trial

7. Click **"Set Lora"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F6mBLPAdoMjvLV903ck2S%2Fimage.png?alt=media&amp;token=41df0ea8-8f0c-4d2d-aeba-6239b9100f47" alt=""><figcaption></figcaption></figure>

You have successfully used LoRa Subscription.

{% hint style="info" %}
The procedure for creating an Application and adding a Device can be seen in full on the following page:

[Create App](/en/getting-started/create-app) \
[Add Devices to the Application](/en/getting-started/add-devices-to-the-application)
{% endhint %}


# How to Purchase a Connectivity Subscription

This documentation will explain the procedure for purchasing Platform packages provided by Antares.

{% hint style="info" %}
Before selecting a subscription plan, make sure you have verified your **phone number** on the **Account** page of the Antares console.
{% endhint %}

## Purchasing Steps:

1. Log in to your Antares account and open the Antares console page
2. Click on the Subscriptions section and click **"Buy Subscription"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F6qmccLT8MEJ1PPOvj3Pa%2F1.png?alt=media&amp;token=13839f6f-1beb-48fe-b0af-a4ca7788cde0" alt=""><figcaption></figcaption></figure>

3. Click on the **"Connectivity"** option and select the type of connectivity and the subscription time.

There are two connectivity options, LoRa and NB-IoT. Then, there are time durations, which are yearly and monthly. You can customise the subscription time duration options to suit your needs.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FI84IRD2a89L3HRuFCJeV%2F2.png?alt=media&amp;token=d524670b-ea92-409a-91e4-beccb3aa41aa" alt=""><figcaption></figcaption></figure>

4. Click **"Buy Subscription"**

Fill in the number of devices you wish to purchase, and give a name or label to the subscription plan you have chosen. After that, click "add to cart" to put the package you want to purchase into your basket.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FDg3leHfV8p0lWtwwqvFE%2F3.png?alt=media&amp;token=8fc14dad-3f56-4a9e-9b84-1a54e681dc78" alt=""><figcaption></figcaption></figure>

You are required to fill in the number of devices that you will purchase, and include a **"subscription name"** to make it easier for you to use the package.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fv9zZtlRvCm6tEB1nrjbW%2F4.png?alt=media&amp;token=9c6c8a19-a964-4223-8b0d-2fa6b5002382" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F54zqLshSLRSzPEYsNQKb%2F5.png?alt=media&amp;token=fa50871f-ac76-4853-9da8-2bb6cb37a26e" alt=""><figcaption></figcaption></figure>

To proceed with the payment, you can directly click **"Directly Buy Subcsription"**

5. After putting the parcel in the basket, select the parcel to be paid for

You can view the packages you are about to pay for via the basket at the top right of the Antares console page.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FoyHRCupik3CWQkBZxQeU%2F6.png?alt=media&amp;token=6d569429-dd7a-4d41-9641-5cd658613ba1" alt=""><figcaption></figcaption></figure>

6. Click **"Continue Order"**

You have the opportunity to get a discount. You can see the applicable promo in the **"Apply Promo"** section before proceeding with the payment.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fh6EhW6UxKjy1rpPRLvVm%2F7.png?alt=media&amp;token=df32545b-e0c4-493e-bf11-e95a0f961667" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FMiHYNFf8Mj9iR6tjL1so%2Fimage.png?alt=media&amp;token=bac1fc62-4eef-42e5-832f-74b84fe4ff69" alt=""><figcaption></figcaption></figure>

7. Click **"Choose Payment Methods"** to select a payment method

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FHApefILW7fkv6SUaYWJU%2F8.png?alt=media&amp;token=d61fda53-5029-4079-85cd-dce414b73610" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FpKXhNoMUZYPrzRnIOZZX%2Fimage.png?alt=media&amp;token=078b63d3-79e2-40ad-b232-7ec330d2a12c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FeT9ZXJJvcJMlPAlSoRnq%2F9.png?alt=media&amp;token=a4f36990-1814-434f-8f7d-90a365c2b105" alt=""><figcaption></figcaption></figure>

**Payment Procedures** can be seen on the following page:


# Payment Using Antares Coins

### Payment Procedure Using Antares Coins

1. Make sure you have topped up Antares Coins
2. On the payment page, click "Proceed Withdrawal with Antares Coin" to send an OTP code to your Antares-registered email

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3SEUQUg7Bv3lITqXHzms%2Fac%201.png?alt=media&amp;token=561a358d-c38f-4f8f-b486-96c683f9abc8" alt=""><figcaption></figcaption></figure>

3. Enter the OTP code sent to your email Click "Send Code" to verify the OTP code

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fe6ys6W1N0iOJbGqZugRw%2Fac%202.png?alt=media&amp;token=87e3607e-f23d-4c5f-88ed-9c531604cf55" alt=""><figcaption></figcaption></figure>

4. Transaction completed.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FJUbi8i6pTp6IkV7Yy7t4%2Fac%203.png?alt=media&amp;token=93570ecc-31a7-44e0-9308-0004bc6267a7" alt=""><figcaption></figcaption></figure>

**The procedure for top up Antares Coins can be seen on the following page:**

{% content-ref url="/pages/BEOEe6G7gNAr2GKZepFQ" %}
[Antares Coins](/en/subscription-and-payment/antares-coins)
{% endcontent-ref %}


# Payment Using Virtual Account

A virtual account is a banking tool or service that allows individuals or companies to receive payments from various sources, such as customers or clients, without having to provide an actual bank account number.

Here's a guide to paying for platform packages using the virtual account (VA) payment method:

{% content-ref url="/pages/FIlCZPT5HAxKmVIeZqJm" %}
[Mandiri Bank](/en/subscription-and-payment/connectivity/how-to-purchase-a-connectivity-subscription/payment-using-virtual-account/mandiri-bank)
{% endcontent-ref %}

{% content-ref url="/pages/LffNcsGdfnrUmLymgEBB" %}
[Permata Bank](/en/subscription-and-payment/connectivity/how-to-purchase-a-connectivity-subscription/payment-using-virtual-account/permata-bank)
{% endcontent-ref %}

{% content-ref url="/pages/yJVuIAdF93DmERLZ2AWy" %}
[BRI Bank](/en/subscription-and-payment/connectivity/how-to-purchase-a-connectivity-subscription/payment-using-virtual-account/bri-bank)
{% endcontent-ref %}

{% content-ref url="/pages/8yjpml4yyU3WhkaBp5Do" %}
[BNI Bank](/en/subscription-and-payment/connectivity/how-to-purchase-a-connectivity-subscription/payment-using-virtual-account/bni-bank)
{% endcontent-ref %}


# Mandiri Bank

1. Open the Mandiri Online app, enter your USERNAME and PASSWORD
2. Select "Pay"
3. Select "Multipayment"
4. Select 88908 XENDIT (for closed VA) and 88608 (for open VA) as the service provider
5. Enter your Virtual Account Number 88908988586665460 (example)
6. Then click "Continue"
7. Review and confirm your transaction details, then click "Confirm"
8. Complete the transaction by entering your MPIN
9. After your payment transaction is completed, save the payment proof
10. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

### 4. Virtual Account Payment Via Livin Mandiri (Old Version)

1. Open the Livin by Mandiri app, enter your PASSWORD or perform face verification
2. Select "Pay"
3. Search for "Xendit 88608" (for Open VA) or "Xendit 88908" (for Closed VA)
4. Select Xendit 88608 (for open VA) and 88908 (for closed VA) as the service provider
5. Enter your Virtual Account Number 88908988586665460 (example)
6. Enter the amount you want to pay (If VA is a closed VA, the amount will be automatically filled)
7. Review and confirm your transaction details, then click "Confirm"
8. Complete the transaction by entering your MPIN
9. After your payment transaction is completed, save the payment proof
10. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FfOaermZ3v5vkiyMk8GjB%2Fimage.png?alt=media&amp;token=521a21a9-78de-472a-917e-06ec4cdd171c" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Permata Bank

### 1. Virtual Account Payment Via ATM

1. Insert your Permata ATM card
2. Enter your PIN
3. Select "Other Transactions"
4. Select "Payments"
5. Select "Other Payments"
6. Select "Virtual Account"
7. Enter the Virtual Account Number 7293988549175775
8. Then select the debit account to be used
9. Confirm your transaction details
10. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Open the website <https://new.permatanet.com>
2. Enter your User ID and Password
3. Select "Bill Payments"
4. Select "Virtual Account"
5. Enter the Virtual Account Number 7293988549175775
6. Double-check your payment details
7. Enter the transaction authentication/token
8. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 3. Virtual Account Payment Via Mobile Banking

1. Open the Permata Mobile Internet app
2. Enter your User ID and Password
3. Select "Bill Payments"
4. Select "Virtual Account"
5. Enter your Virtual Account Number 7293988549175775
6. Enter the transaction authentication/token
7. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1UR8T1gpI6huvuemezNy%2Fimage.png?alt=media&amp;token=f93655dd-7d6b-4e95-b333-8349065f38e2" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# BRI Bank

### 1. Virtual Account Payment Via ATM

1. Insert your BNI card
2. Select your preferred language
3. Enter your ATM PIN
4. Select "Other Transactions"
5. Select "Payments"
6. Select "Other Payments"
7. Select "Briva"
8. Enter the Virtual Account Number 92001988572642231 and the desired amount to pay
9. Verify transaction data and press "YES"
10. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Type the URL <https://ib.bri.co.id/> in your browser, click "Log In"
2. Enter your User ID and Password
3. Click "Payments" and select "Briva"
4. Enter the Virtual Account Number 92001988572642231 and the desired amount to pay
5. Enter your password and then enter the internet banking mToken
6. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FupHt3RcfN69ndqmIfr6z%2Fimage.png?alt=media&amp;token=0296d022-0d9e-42b8-93df-c598acaa2f0c" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# BNI Bank

1. Insert your BNI card
2. Select the language
3. Enter your ATM PIN
4. Choose 'Other Services' from the menu
5. Select 'Transfer'
6. Choose 'Savings Account'
7. Select 'To BNI Account'
8. Enter the virtual account number as indicated on the payment checkout
9. Enter the transfer amount
10. Confirm the transaction by pressing 'Yes,' and the transaction will be completed

### 2.  Virtual Account Payment Via Internet Banking

1. Type the URL <https://ibank.bni.co.id/> in your browser and click 'Login'
2. Enter your User ID and Password
3. Click on the 'Transfer' menu and then select 'Add Favorite Account.' Choose 'Between BNI Accounts.' If using a desktop, select the 'Transactions' menu, then 'Manage Destination Account,' and add a new destination account
4. Enter the name and virtual account number in the 'Account Number' field
5. Enter the Token Authentication Code
6. Click 'Continue,' and the payment will be completed

### 3.  Virtual Account Payment Via Mobile Banking

1. Open the BNI Mobile Banking app on your mobile phone
2. Enter your User ID and password
3. Select the 'Transfer' menu
4. Choose 'Between BNI Accounts' and then select 'Add New Account'
5. Enter the Debit Account number and the destination account number or virtual account number. Then click 'Next'
6. Confirm the transaction and enter your transaction password. Click 'Next,' and the payment will be completed

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F9h8Bq2taYWhJcjtRLy3H%2Fimage.png?alt=media&amp;token=96b0203b-f334-42fc-b88b-7fc10543bc34" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Payment Using e-Wallet (LinkAja)

### Payment Procedure Using e-Wallet (LinkAja)

1. Log in to the LinkAja payment page

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FF89IKd34gRtyJaoVaY7i%2Flinkaja1.png?alt=media&amp;token=38c71b5e-7032-4eb1-a780-51aee2ae1f6f" alt=""><figcaption></figcaption></figure>

Click "Continue withdrawal LinkAja"

2. You will then be redirected to enter your mobile phone number and LinkAja PIN

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1CXczdcT0nd4a31VFiOJ%2Fimage.png?alt=media&amp;token=91725b4b-7eee-4451-bff0-14a1ed9dd1f9" alt=""><figcaption></figcaption></figure>

You will be given 5 minutes to complete the payment.

3. Click "Continue"
4. Enter the verification code (OTP) sent via SMS, then click "Process"
5. Transaction completed.

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F0UJXtmHsRXnhZOvAQl6j%2Flinkaja2.png?alt=media&amp;token=dc286ce9-b9be-4b9e-9cb9-f6195df499eb" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Payment Using Credit Cards (CC)

### How to Pay Using a Credit Card

1. After selecting the credit card payment method, continue the payment by clicking **"Continue Payment With CC"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FHj7KvziFzBw2Apon7E39%2Fimage.png?alt=media&amp;token=d3168bcf-0db1-4e0d-8148-1ca0d97c6f43" alt=""><figcaption></figcaption></figure>

2. You will be redirected to the next page. Enter Card Number, Full Name, Card Expiry Date, and cardholder's CVC

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3dLa6sEuC8iWiEcMO47t%2Fimage.png?alt=media&amp;token=9bbd663b-03de-4726-a1f4-0ea31911d914" alt=""><figcaption></figcaption></figure>

3. Click "Pay Now" after filling in the information
4. Enter the Authorisation Code (OTP) sent via the registered mobile number, then click OK.
5. Transaction completed.

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fm66XpY08yeeFOYYekMfj%2Fimage.png?alt=media&amp;token=ca081d69-254e-4509-97e6-2502d1d0be3d" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Procedure for Renewing a Platform Subscription

There are several ways to view the status of your purchased package, namely:

1. Click on the "Overview" page on the Antares website

In the **"Subscription Management"** section, you can find out the status of your previously purchased plan. Click "See more subscription" for further information.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fy3h3UncZ3OjlmbJX2xcs%2Fimage.png?alt=media&amp;token=768dcf19-3e7b-44e7-8a57-d3807a26995e" alt=""><figcaption></figcaption></figure>

Or click on the "Subscription" page on the sidebar of the Antares page.

On the **"Subscription"** page, you can directly purchase the package you need by clicking **"Buy Subscription"**. If you want to see the status of the packages you have previously purchased, you can view the information by clicking **"See All Subscriptions"**.

2. Click "See All Subscription"

You will arrive at the **"Subscription Management"** page. On the **"Subscription Management"** page you can see the status of each package you have purchased previously.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F9d3MIW1orOokTswOk1VW%2Fimage.png?alt=media&amp;token=bd132df5-4d3b-4aa8-b082-30fc23c14702" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FWpdhdB2IIwv3QfXgG0K6%2Fimage.png?alt=media&amp;token=6a6e7c67-1091-4b70-b9ee-4d3a0b8c8a7b" alt=""><figcaption></figcaption></figure>

**There are 6 (six) status of the Antares package, namely:**

| PACKAGES STATUS | DESCRIPTION                                                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Active          | Packages that are currently active and can still be used                                                                      |
| Grace Period    | Packages that have entered the grace period, but are still in use until the expiration date.                                  |
| Hibernate       | Packages that has passed the grace period and is temporarily freezed.                                                         |
| Suspended       | Pacthat has passed the **"hibernate"** period                                                                                 |
| Inactive        | Packages that have passed the **"suspended"** period. **"Free Trial"** packages will automatically enter the inactive period. |
| Cancelled       | Status of your cancelled plan before payment                                                                                  |

3. Select the plan you would like to renew

You can renew packages that are in **Grace Period**, **Hibernate**, and **Suspended** status.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1xFIKtc5GtC1DE8LH2Np%2Fimage.png?alt=media&amp;token=bc589d5e-22c1-46ef-b47e-31993200c853" alt=""><figcaption></figcaption></figure>

4. On the plan you want to renew, click "Active"

Once you click **"Active"**, the package you want to renew will be automatically added to the basket on the top right.

5. Once the parcel is in the basket, click **"Continue Order"**.

If there is an applicable promo, you can add the promo to get a price cut in the **"Apply Promo"** section. Next, click **"Continue Order"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fb3qhyV7oUW2cwBdaUI5q%2Fimage.png?alt=media&amp;token=cd425a5b-c651-4110-9c3a-b48377f922af" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
You can only extend packages that are in **Grace Period**, **Hibernate**, and **Suspended** status. If your package is in Inactive status, then you must do the package purchase process from the initial stage.
{% endhint %}

**You can see the Payment Procedure for the package you purchased or renewed on the following page:**

{% content-ref url="/pages/NtaeamagCcEPOcfsvPC1" %}
[How to Purchase a Connectivity Subscription](/en/subscription-and-payment/connectivity/how-to-purchase-a-connectivity-subscription)
{% endcontent-ref %}


# Procedure for Changing Connectivity Subscription

If your service is no longer active and you need to change your service to active, you can take the steps to change your service. To change the package can be done on each device or on many devices that are in one application.&#x20;

There are 2 (two) ways to replace Platform Services, which are :&#x20;

**Switching Subscription on a Device**

1. Log in to your Antares account and go to the "Applications" page.

On the Applications page, select the application for which you want to change the subscription

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F43EdTyspBEE0IIbXoPdj%2Fimage.png?alt=media&amp;token=266be9aa-6461-451a-8157-2ec89c9616e1" alt=""><figcaption></figcaption></figure>

2. Click the device you want to change the subscription to

Click the "Subscription" button at the top right of the device page.&#x20;

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FSfjoorUbQrHnpfFoyVms%2Fimage.png?alt=media&amp;token=fc83dcdb-1067-4d27-9bf5-eeacf76ce9f0" alt=""><figcaption></figcaption></figure>

Then a pop up will appear as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FRh0GfP0rqsabybyTTJFp%2Fimage.png?alt=media&amp;token=1ea8e0a7-4077-4e05-bf17-f4f637dcdc16" alt=""><figcaption></figcaption></figure>

If you subscribe to the LoRa service, then a pop up will appear as follows

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FdWLBlCxBj3O96iLfpfsL%2Fimage.png?alt=media&amp;token=57ea6f84-c0da-43e3-8fca-63d4103c6570" alt=""><figcaption></figcaption></figure>

3. Select the active subscription that your device will use in the field provided

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fbk0n0EFs64OvHSwV0fEw%2Fimage.png?alt=media&amp;token=b8623eb3-fbb3-40f6-a2d5-29271bf10812" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FK6t7DxPhy1zjiBLo4wlH%2Fimage.png?alt=media&amp;token=d1b84fb7-9baa-4742-be6d-e962f511a089" alt=""><figcaption></figcaption></figure>

4. After selecting the subscription, click "Apply"

Furthermore, the Platform Package will change automatically marked with the status "success update subscription device".

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FS9Wf2FYwJk9GmXZUFZn8%2Fimage.png?alt=media&amp;token=fdbd4889-ab20-468c-96c8-70d2fb17c0e5" alt=""><figcaption></figcaption></figure>

**Switching Subscription on Multiple Devices in One App**

1. Log in to your Antares account and go to the **"Applications"** page.

Click the **"Subscription"** button

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FROyYTAZFQVlOxiJcy7hq%2Fimage.png?alt=media&amp;token=a0f06d86-5d90-4824-8ca6-75ed481b5d28" alt=""><figcaption></figcaption></figure>

The display will change to the following image:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Ftv2tyVVDvHMwXVOgQWQi%2Fimage.png?alt=media&amp;token=a4835c2b-4ba2-4c3f-ab49-4d293041fd41" alt=""><figcaption></figcaption></figure>

2. Click the **"Change Device Subscription"** button

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FaZExv2qxFWdTIZGwqH94%2Fimage.png?alt=media&amp;token=e2ccb594-a68f-485c-801f-9515810b6d61" alt=""><figcaption></figcaption></figure>

If the user does not have a service that does not meet the number of devices in the application, then no service appears.

Select the devices to be replaced via the checklist column provided on the right. To select all devices directly, you can fill in the **select all** checklist field.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FaGynmvOVEG3JveugJm30%2Fimage.png?alt=media&amp;token=5662708c-6455-4b69-ac76-d49ec8249f93" alt=""><figcaption></figcaption></figure>

3. Please select your preferred service in the **"Platform and Connectivity Subscription"** section

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FLedYcpC8Xxc0JC30Jdll%2Fimage.png?alt=media&amp;token=4617aefc-30ee-4f98-847a-2f7ca3c99f6e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F5KkQVej7B5v7TufdlALK%2Fimage.png?alt=media&amp;token=47b06798-57b7-43c5-a2d0-a5720841fe6e" alt=""><figcaption></figcaption></figure>

4. Click **"Confirm"**

Your subscription will be automatically replaced

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FBp7ogU3pLHovA6chszw6%2Fimage.png?alt=media&amp;token=b64cf9c2-b795-4f3a-98f9-37510de136e5" alt=""><figcaption></figcaption></figure>


# Antares Coins

Antares Coins is one of the features provided by Antares that serves as one of the payment methods.

Here are the steps to top up Antares Coins:

1. Log In and open the Antares console page, click **"Account"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FuxXEtQxxPAaYFZHWpwZ3%2Fimage.png?alt=media&amp;token=98698063-d125-4c01-99fc-66254658ce24" alt=""><figcaption></figcaption></figure>

2. On the Account page, click **"Activate Antares Coins"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FTywek3BmaO0xMZkzs79x%2Fimage.png?alt=media&amp;token=b5aada7d-bab7-4fa8-b394-74ca81aadc4f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure you activate your Antares Coins so you can use them.
{% endhint %}

3. After activating, click **"Top Up Antares Coins"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FWpjAIjPuI4QSCyhOVAsH%2Fimage.png?alt=media&amp;token=3b2de654-68eb-4e1c-8b01-4d30acf3ab97" alt=""><figcaption></figcaption></figure>

4. Select the top up amount and click **"Continue Top up Antares Coins"**

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FrQlG4YRKQHJEEhsvpHqJ%2Fimage.png?alt=media&amp;token=055b8aa4-f137-406a-9119-b6a01d46b429" alt=""><figcaption></figcaption></figure>

5. Choose a payment method

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FIDUZp2LhtR4t1kZs4hO9%2Fimage.png?alt=media&amp;token=50075977-381d-4fa7-b2b1-935c3bcc4567" alt=""><figcaption></figcaption></figure>

5. Proceed with the payment

You can view the payment procedure on the following page:


# Antares Coins Top Up Payment Procedures

This documentation will explain the payment procedure for Top Up Antares Coins. Payment procedures can be seen through the following page:

{% content-ref url="/pages/fsNSjGFXiJNMDafpNFwc" %}
[Payment Using Virtual Account](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-virtual-account)
{% endcontent-ref %}

{% content-ref url="/pages/gWu0ZbFrqHMdJ4aXEOrw" %}
[Payment Using e-Wallet (LinkAja)](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-e-wallet-linkaja)
{% endcontent-ref %}

{% content-ref url="/pages/ncwDYorwlSzgnBgY4V3T" %}
[Payment Using Credit Cards (CC)](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-credit-cards-cc)
{% endcontent-ref %}


# Payment Using Virtual Account

A virtual account is a banking tool or service that allows individuals or companies to receive payments from various sources, such as customers or clients, without having to provide an actual bank account number.

Here's a guide to paying for platform packages using the virtual account (VA) payment method:

{% content-ref url="/pages/05tOnhsrXZ3yaaMOjc36" %}
[Mandiri Bank](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-virtual-account/mandiri-bank)
{% endcontent-ref %}

{% content-ref url="/pages/5SX6l10Rge3gJkfAWwl1" %}
[Permata Bank](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-virtual-account/permata-bank)
{% endcontent-ref %}

{% content-ref url="/pages/gKddJ86rx51NGEVaGl82" %}
[BRI Bank](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-virtual-account/bri-bank)
{% endcontent-ref %}

{% content-ref url="/pages/EWgTAJyYbMwDZMMNtP5X" %}
[BNI Bank](/en/subscription-and-payment/antares-coins/antares-coins-top-up-payment-procedures/payment-using-virtual-account/bni-bank)
{% endcontent-ref %}


# Mandiri Bank

1. Open the Mandiri Internet Banking website at <https://ibank.bankmandiri.co.id>
2. Log in using your USER ID and PASSWORD
3. Go to the homepage, then select "Payments"
4. Select "Multi Payment"
5. Choose 88908 XENDIT (for closed VA) and 88608 XENDIT (for open VA) as the service provider
6. Enter the Virtual Account Number 88908988586665460 (example)
7. Then select "Continue"
8. If all details are correct, click "CONFIRM"
9. Enter your PIN / Challenge Code Token
10. After your payment transaction is completed, save the payment proof
11. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

### 3. Virtual Account Payment Via Livin Mandiri (Old Version)

1. Open the Mandiri Online app, enter your USERNAME and PASSWORD
2. Select "Pay"
3. Select "Multipayment"
4. Select 88908 XENDIT (for closed VA) and 88608 (for open VA) as the service provider
5. Enter your Virtual Account Number 88908988586665460 (example)
6. Then click "Continue"
7. Review and confirm your transaction details, then click "Confirm"
8. Complete the transaction by entering your MPIN
9. After your payment transaction is completed, save the payment proof
10. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

### 4. Virtual Account Payment Via Livin Mandiri (Old Version)

1. Open the Livin by Mandiri app, enter your PASSWORD or perform face verification
2. Select "Pay"
3. Search for "Xendit 88608" (for Open VA) or "Xendit 88908" (for Closed VA)
4. Select Xendit 88608 (for open VA) and 88908 (for closed VA) as the service provider
5. Enter your Virtual Account Number 88908988586665460 (example)
6. Enter the amount you want to pay (If VA is a closed VA, the amount will be automatically filled)
7. Review and confirm your transaction details, then click "Confirm"
8. Complete the transaction by entering your MPIN
9. After your payment transaction is completed, save the payment proof
10. This invoice will be updated automatically after your transaction is completed. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FRNKqojMpwlSvU5rV3N5c%2Fimage.png?alt=media&amp;token=166584eb-0457-4d38-9124-ff4529927f59" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Permata Bank

1. Insert your Permata ATM card
2. Enter your PIN
3. Select "Other Transactions"
4. Select "Payments"
5. Select "Other Payments"
6. Select "Virtual Account"
7. Enter the Virtual Account Number 7293988549175775
8. Then select the debit account to be used
9. Confirm your transaction details
10. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Open the website <https://new.permatanet.com>
2. Enter your User ID and Password
3. Select "Bill Payments"
4. Select "Virtual Account"
5. Enter the Virtual Account Number 7293988549175775
6. Double-check your payment details
7. Enter the transaction authentication/token
8. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 3. Virtual Account Payment Via Mobile Banking

1. Open the Permata Mobile Internet app
2. Enter your User ID and Password
3. Select "Bill Payments"
4. Select "Virtual Account"
5. Enter your Virtual Account Number 7293988549175775
6. Enter the transaction authentication/token
7. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FYHtjoQMXmJukhsg2AOxh%2Fimage.png?alt=media&amp;token=5ef0443e-1a58-4bc6-990f-8aee2bfdfaf1" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# BRI Bank

### Virtual Account Payment Via ATM

1. Insert your BNI card
2. Select your preferred language
3. Enter your ATM PIN
4. Select "Other Transactions"
5. Select "Payments"
6. Select "Other Payments"
7. Select "Briva"
8. Enter the Virtual Account Number 92001988572642231 and the desired amount to pay
9. Verify transaction data and press "YES"
10. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

### 2. Virtual Account Payment Via Internet Banking

1. Type the URL <https://ib.bri.co.id/> in your browser, click "Log In"
2. Enter your User ID and Password
3. Click "Payments" and select "Briva"
4. Enter the Virtual Account Number 92001988572642231 and the desired amount to pay
5. Enter your password and then enter the internet banking mToken
6. Your transaction is completed. After your transaction is completed, this invoice will be updated automatically. This process may take up to 5 minutes

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzZyQA2RzV0SWTPNIeFrQ%2Fimage.png?alt=media&amp;token=4a29582c-e750-4649-b499-45415e84f737" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# BNI Bank

### 1.  Virtual Account Payment Via ATM

1. Insert your BNI card
2. Select the language
3. Enter your ATM PIN
4. Choose 'Other Services' from the menu
5. Select 'Transfer'
6. Choose 'Savings Account'
7. Select 'To BNI Account'
8. Enter the virtual account number as indicated on the payment checkout
9. Enter the transfer amount
10. Confirm the transaction by pressing 'Yes,' and the transaction will be completed

### 2.  Virtual Account Payment Via Internet Banking

1. Type the URL <https://ibank.bni.co.id/> in your browser and click 'Login'
2. Enter your User ID and Password
3. Click on the 'Transfer' menu and then select 'Add Favorite Account.' Choose 'Between BNI Accounts.' If using a desktop, select the 'Transactions' menu, then 'Manage Destination Account,' and add a new destination account
4. Enter the name and virtual account number in the 'Account Number' field
5. Enter the Token Authentication Code
6. Click 'Continue,' and the payment will be completed

### 3.  Virtual Account Payment Via Mobile Banking

1. Open the BNI Mobile Banking app on your mobile phone
2. Enter your User ID and password
3. Select the 'Transfer' menu
4. Choose 'Between BNI Accounts' and then select 'Add New Account'
5. Enter the Debit Account number and the destination account number or virtual account number. Then click 'Next'
6. Confirm the transaction and enter your transaction password. Click 'Next,' and the payment will be completed

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F9VXvIihGz7zXTto5sRyJ%2Fimage.png?alt=media&amp;token=5edd9ee1-b2c4-4ea6-8262-c2d1bf9b12b6" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Payment Using e-Wallet (LinkAja)

### Payment Procedure Using e-Wallet (LinkAja)

1. Log in to the LinkAja payment page

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FF3zPEGEIzt8i4YpxpZsq%2Fimage.png?alt=media&amp;token=00fe3e49-f94b-4701-9be2-5e659991ba58" alt=""><figcaption></figcaption></figure>

Click "Continue withdrawal LinkAja"

2. You will then be redirected to enter your mobile phone number and LinkAja PIN

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1CXczdcT0nd4a31VFiOJ%2Fimage.png?alt=media&amp;token=91725b4b-7eee-4451-bff0-14a1ed9dd1f9" alt=""><figcaption></figcaption></figure>

You will be given 5 minutes to complete the payment.

3. Click "Continue"
4. Enter the verification code (OTP) sent via SMS, then click "Process"
5. Transaction completed.

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fd2qugfusSpMi601sytU4%2Fimage.png?alt=media&amp;token=a62054b7-2f61-4925-a95e-c48a95c98cf9" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Payment Using Credit Cards (CC)

### How to Pay Using a Credit Card

1. After selecting the credit card payment method, continue the payment by clicking **"Continue Payment With CC"**.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FD4lCvsNYTW2T34sejczT%2Fimage.png?alt=media&amp;token=003ee306-9b7c-496b-9f1a-a78e06fae168" alt=""><figcaption></figcaption></figure>

2. You will be redirected to the next page. Enter Card Number, Full Name, Card Expiry Date, and cardholder's CVC

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F3dLa6sEuC8iWiEcMO47t%2Fimage.png?alt=media&amp;token=9bbd663b-03de-4726-a1f4-0ea31911d914" alt=""><figcaption></figcaption></figure>

3. Click "Pay Now" after filling in the information
4. Enter the Authorisation Code (OTP) sent via the registered mobile number, then click OK.
5. Transaction completed.

You will get a " Awaiting Payment" notification on the email registered to your Antares account. When the transaction process is complete, the display on the Antares page will change as shown below:

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FOJ9jK4nqVLBdi2bCsVXh%2Fimage.png?alt=media&amp;token=d6426f34-b8ba-4173-aa47-9ca6fb8d86b9" alt=""><figcaption></figcaption></figure>

You will receive an invoice and a "Payment Successful" notification in your email.


# Code and library examples

Below is the SDK (Source Development Kit) for some IoT devices. If your device is not listed below, you can still use our service by using RESTful API. Are you a device maker? Want to collaborate with us? Want to make your device library available to our community? You can contact us at <support@antares.id>

{% content-ref url="/pages/aXmIpVLuIt8gFr0XUfi4" %}
[ESP8266 (Wi-Fi)](/en/code-and-library-examples/esp8266-wi-fi)
{% endcontent-ref %}

{% content-ref url="/pages/qYAm0J5CMf9qF23QdPmH" %}
[Arduino Uno](/en/code-and-library-examples/arduino-uno)
{% endcontent-ref %}

{% content-ref url="/pages/45GkDicKzSJncZJCNDHM" %}
[ESP32 (Wi-Fi)](/en/code-and-library-examples/esp32-wi-fi)
{% endcontent-ref %}

{% content-ref url="/pages/RiOlVQQ4F1Tg2dMcqwHD" %}
[Raspberry Pi](/en/code-and-library-examples/raspberry-pi)
{% endcontent-ref %}

{% content-ref url="/pages/45GkDicKzSJncZJCNDHM" %}
[ESP32 (Wi-Fi)](/en/code-and-library-examples/esp32-wi-fi)
{% endcontent-ref %}

{% content-ref url="/pages/hDVXUsreoMtSB8duetsj" %}
[NB-IoT](/en/code-and-library-examples/nb-iot)
{% endcontent-ref %}

{% content-ref url="/pages/iG5vxtsKDkYhPs05kW3s" %}
[Android](/en/code-and-library-examples/android)
{% endcontent-ref %}

{% content-ref url="/pages/8iwQJyy4wKCqg58c9xVG" %}
[MIT App Inventor](/en/code-and-library-examples/mit-app-inventor)
{% endcontent-ref %}

{% content-ref url="/pages/ElzS4FdY8vljvLBJlKWu" %}
[Node-RED](/en/code-and-library-examples/node-red)
{% endcontent-ref %}

{% content-ref url="/pages/jlUcuikwvtcM0X3XxtgG" %}
[Postman](/en/code-and-library-examples/postman)
{% endcontent-ref %}

{% content-ref url="/pages/zIOV2NOYiwQq8f9kEsH6" %}
[MQTT | Push data to Device](/en/code-and-library-examples/mqtt-or-push-data-to-device)
{% endcontent-ref %}

{% content-ref url="/pages/nr8Y2YgMG413YPr6B7Og" %}
[HTTP | Subscribe and Notify Mechanism](/en/code-and-library-examples/http-or-subscribe-and-notify-mechanism)
{% endcontent-ref %}

{% content-ref url="/pages/pZYVUJLaobht2FHyEaP6" %}
[PHP Library](/en/code-and-library-examples/php-library)
{% endcontent-ref %}

{% content-ref url="/pages/xERGXTsVoSrpWup3bgLe" %}
[MQTT | Subscribe LoRa Device](/en/code-and-library-examples/mqtt-or-subscribe-lora-device)
{% endcontent-ref %}

{% content-ref url="/pages/3UY5BYtBFdBhnZkMWRLb" %}
[LoRaWAN | Downlink Tutorial](/en/code-and-library-examples/lorawan-or-downlink-tutorial)
{% endcontent-ref %}

{% content-ref url="/pages/pf9Zi1uWYSWWmRwy77kO" %}
[LoRaWAN Device Register](/en/code-and-library-examples/lorawan-device-register)
{% endcontent-ref %}

{% content-ref url="/pages/JvgImHm4lxpzwIKcP0vW" %}
[GPS TrackerID](/en/code-and-library-examples/gps-trackerid)
{% endcontent-ref %}


# ESP8266 (Wi-Fi)

This documentation will explain how the ESP8266 can connect with the Antares platform. The ESP8266 can read data from several sensors and can send data to the Antares platform. This documentation uses **LOLIN(WEMOS) D1 R2** as the board. Before starting the documentation, make sure you fulfil the prerequisites on the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

After fulfilling the **General Prerequisites** you can select the protocol you want to use. There are two protocols namely **HTTP** and **MQTT** that can be used on **ESP8266** Wi-Fi. You can follow the documentation of each protocol on the following page.

{% content-ref url="/pages/epxwuElXbcfJsG4UKLid" %}
[ESP8266 (Wi-Fi) HTTP Protocol](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol)
{% endcontent-ref %}

{% content-ref url="/pages/2aWgRV4bSY2zMzfy5U4L" %}
[ESP8266 (Wi-Fi) MQTT Protocol](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-mqtt-protocol)
{% endcontent-ref %}

{% hint style="info" %}
If you still need further explanation about **MQTT** and **HTTP** protocols, please visit the following page.

[HTTP & MQTT Protocol](/en/code-and-library-examples/esp32-wi-fi/http-and-mqtt-protocol)
{% endhint %}


# General Prerequisites ESP8266 Wi-Fi

In this documentation, you use **Wi-Fi** connectivity with **HTTP** or **MQTT** protocol options for all available ESP8266 projects. The module used in this tutorial is the **LOLIN(WEMOS) D1 R2**.

Before you start, make sure you have fulfilled the following conditions:

1. Hardware **LOLIN (WEMOS) D1 R2**, this board is used as a device to send data to the Antares platform.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/qe8ahg3H2kGXE87mFWhM/Board8266-removebg-preview.png" alt=""><figcaption><p>Board picture of ESP 8266 WeMos D1R2</p></figcaption></figure>

2. USB Type B Cable.
3. Arduino IDE .This documentation uses **Arduino IDE version 2.1.0.**

{% hint style="info" %}
If you have not installed the Arduino IDE, you can follow these steps.

[Arduino IDE Installation](/en/getting-started/arduino-ide-installation)
{% endhint %}

4. ESP8266 board on Arduino. This documentation uses **ESP8266 by ESP8266 Community version 3.1.2.**

{% hint style="info" %}
If you have not installed the ESP32 Board, please follow these steps..

[ESP8266](/en/getting-started/installation-board-and-library/esp8266)
{% endhint %}

5. Antares account. With an Antares account you can access the Antares console and get an **access key**.

{% hint style="info" %}
If you don't have an Antares account, you can [register here](https://console.antares.id/register) by following the tutorial [Antares Account Registration](https://docs.antares.id/pendahuluan/registrasi-akun).
{% endhint %}

6. Have **Application and Device** in the Antares Console on your Account.

{% hint style="info" %}
To create an Application, you can follow [Create Application Tutorial](https://docs.antares.id/pendahuluan/buat-app) and to add devices you can follow [Create Device Tutorial](https://docs.antares.id/pendahuluan/tambah-device-ke-application).
{% endhint %}


# ESP8266 (Wi-Fi) HTTP Protocol

After fulfilling the **General Prerequisites** you can continue with some projects from the following pages.

{% content-ref url="/pages/UBZTNTJUtVzAMLgFYv2J" %}
[Sending Simple Data to Antares with HTTP Protocol](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/sending-simple-data-to-antares-with-http-protocol)
{% endcontent-ref %}

{% content-ref url="/pages/NPzlp4U7N87nOKQV8nXL" %}
[Retrieve the Last Data from Antares Server with HTTP Protocol](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/retrieve-the-last-data-from-antares-server-with-http-protocol)
{% endcontent-ref %}

If you are interested in further exploration with the **LOLIN(WEMOS) D1 R2**, you can follow some simple project documentation on the following page.

{% content-ref url="/pages/HNWUrdrVdqdwfushG34z" %}
[Simple Project ESP8266 HTTP Antares](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares)
{% endcontent-ref %}


# Sending Simple Data to Antares with HTTP Protocol

In this project you will be directed to send simple data from **ESP8266** to Antares IoT Platform using WiFi connectivity with HTTP protocol.

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > AntaresStoreData.**
{% endhint %}

Below is the AntaresStoreData sample programme code.

```cpp
/*
  This code will deploy data to your Antares project device with the following structure:
  (Note that nesting the JSON object can only be done up to 2 levels using this library)
  {
    "temperature": random-int,
    "humidity": random-int,
    "wind_speed": random-float,
    "rain_level": random-float,
    "location" : {
      "latitude": "static-string",
      "longitude": "static-string"
    }
  }
  For more information please visit https://antares.id/id/docs.html
*/

#include <AntaresESPHTTP.h> // Include the AntaresESP32HTTP library

#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "your-project-name"   // Antares project name
#define deviceName "your-project-name" // Name of the device 

AntaresESPHTTP antares(ACCESSKEY); // Initialize AntaresESP32HTTP with the access key

void setup() {
  Serial.begin(115200);      // Initialize serial communication
  antares.setDebug(true);    // Enable Antares library debug mode
  antares.wifiConnection(WIFISSID, PASSWORD);  // Connect to WiFi using provided SSID and password
}

void loop() {
    // Variables
  int temp = random(25,30) ;  //Create a random integer value for temperature
  int hum = random(75,90); // Create a random integer value for humidity
  float windsp = float(random(20, 30))/3.33; //Create a random float value for windspeed
  float rainlv = float(random(0, 20))/6.99; //Create a random float value for rainlevel
  String lat = "-6.8718189"; //Create a string value for latitude
  String lon = "107.5872477"; //Create a string value for longitude

  // Add variable data to storage buffer
  antares.add("temperature", temp); // Add temperature data to the Antares payload
  antares.add("humidity", hum); // Add humidity data to the Antares payload
  antares.add("wind_speed", windsp); // Add wind_speed data to the Antares payload
  antares.add("rain_level", rainlv); // Add rain_level data to the Antares payload
  antares.add("location", "latitude", lat); // Add location latitude data to the Antares payload
  antares.add("location", "longitude", lon); // Add location longitude data to the Antares payload

  // Send from buffer to Antares
  antares.send(projectName, deviceName); // Send  data to Antares
  delay(10000); // Transfer data for every 10 seconds
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName,** and **\*deviceName**. Adjust to the parameters in the Antares console.

```arduino
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "your-project-name"   // Antares project name
#define deviceName "your-project-name"   // Name of the device 
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FcKXHKaoueE8ASMhbdvhG%2Fimage.png?alt=media&amp;token=b07f7a66-1e4c-4647-a430-11bdd4969db4" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/IccnByKtfKghUhvV7eO2/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The \***PASSWORD** parameter is obtained from the **WiFi** password you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName** and **\*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F8ggYvHas84qM9071lvOM%2Fimage.png?alt=media&amp;token=3f9608d5-aa24-40e8-8d14-ec806b133f07" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FkA95bh4X0pdlAEbgrwGn%2Fimage.png?alt=media&amp;token=7f7b037f-e8cc-40f4-9dee-48d219125dcf" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager**. If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/xUKyOeMuK8drk0M0EfVy/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/fjFJ86mIQkPBPuLbWiVy/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Hs2M4CG7h8wv9jMqFyfV/Icon%20Verify%20dan%20Compile.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **Compile** the programme to find out whether there are errors or not.\
**The Arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as **Flash the programme** to the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/K9dEBGSP3AWBH8YpfNFx/Upload%20Berhasil%20Halaman%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/QpgTmiQlx7jWRAtXU89Z/Icon%20Serial%20Monitor%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between the **programme code** and the **serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/jORWkv9VWkDuLuN4UAkp/Serial%20Monitor%20Kirim%20Data%20HTTP.jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5.** Check Data in Antares

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fq4IMou3XRpju4GOBU2ir%2Fimage.png?alt=media&amp;token=e92454f8-24d5-4469-b27a-a24a777ba7bc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FqYNsdr840DGEzKjBTFY4%2Fimage.png?alt=media&amp;token=afbd72e9-bd07-43d8-8bd8-5487bb570bea" alt=""><figcaption><p>Console Page Image When Data Successfully Received</p></figcaption></figure>

{% hint style="info" %}
The data sent from **ESP8266** with HTTP protocol is in the form of temperature, humidity, wind\_level, rain\_level, and location variables containing latitude and longitude.
{% endhint %}


# Retrieve the Last Data from Antares Server with HTTP Protocol

In this project you will be directed to retrieve data from **Antares IoT Platform** to **ESP8266** using WiFi connectivity with HTTP protocol.

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > GetLatestData.**
{% endhint %}

Here is the GetLatestData example programme code.

```cpp
/*
  This code will fetch the latest data from your antares project device.
  Your Antares project device must have a structure like this:
  (Note that nesting the JSON object can only be done up to 2 levels using this library)
  {
    "temperature": some-integer,
    "humidity": some-integer,
    "wind_speed": some-float,
    "rain_level": some-float,
    "location" : {
      "latitude": "static-string",
      "longitude": "static-string"
    }
  }
  For more information please visit https://antares.id/id/docs.html
*/

#include <AntaresESPHTTP.h>  // Include the AntaresESP32HTTP library

#define ACCESSKEY "your-access-key"    // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid"      // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password"  // Replace with your Wi-Fi password

#define projectName "your-project-name"  // Antares project name
#define deviceName "your-project-name"   // Name of the device

AntaresESPHTTP antares(ACCESSKEY);  // Initialize AntaresESP32HTTP with the access key

void setup() {
  Serial.begin(115200);                        // Initialize serial communication
  antares.setDebug(true);                      // Enable Antares library debug mode
  antares.wifiConnection(WIFISSID, PASSWORD);  // Connect to WiFi using provided SSID and password
}

void loop() {
  // Get the latest data from your Antares device
  antares.get(projectName, deviceName);

  // Check if we're actually getting data
  if (antares.getSuccess()) {
    int temp = antares.getInt("temperature");
    int hum = antares.getInt("humidity");
    float windsp = antares.getFloat("wind_speed");
    float rainlv = antares.getFloat("rain_level");
    String lat = antares.getString("location", "latitude");
    String lon = antares.getString("location", "longitude");

    Serial.println("Temperature: " + String(temp));
    Serial.println("Humidity: " + String(hum));
    Serial.println("Wind speed: " + String(windsp));
    Serial.println("Rain level: " + String(rainlv));
    Serial.println("Latitude: " + lat);
    Serial.println("Longitude: " + lon);
  }
  delay(5000);
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName,** and **\*deviceName**. Adjust to the parameters in the Antares console.

```arduino
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "your-project-name"   // Antares project name
#define deviceName "your-project-name"   // Name of the device 
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FUCywASgx3rQKDZ79WfRl%2Fimage.png?alt=media&amp;token=fc5139e9-c34a-4416-a1cf-34aee55a8edd" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Ky3aEajdOPUj687IIebC/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi** password you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName** and **\*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FoTcQoKXZE03ZjJCENZwN%2Fimage.png?alt=media&amp;token=b8ed489f-c32d-4846-9718-7e4486a1c24f" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FFE335SSXTnzDLZGAKiq3%2Fimage.png?alt=media&amp;token=7c79d771-2821-47fe-9921-62a9048a8555" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager**. If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/kmzZ7iNSZIQ5WlQm7mTd/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/f1WcdnmNlZn70WP0XK0f/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/9rTOriGYGOsfjiyP5v3W/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure></div>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **Compile** the programme to find out whether there are errors or not. \
**The Arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as Flash the programme to the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/MS5vcyowKVQynLHdPk3c/Upload%20Berhasil%20Halaman%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/uv741f5FtMXfFQEEZjU9/Icon%20Serial%20Monitor%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between the **programme code** and the **serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/4syl6EYlJM8iFWlErayx/Get%20Data%20(1).jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5.** Check Data in Serial Monitor

After uploading the programme successfully, then open the Serial Monitor page and see if the data has been successfully retrieved.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/2yep0MRcWASrrc6ydLG6/Serial%20Monitor%20Ketika%20Data%20Berhasil%20Diambil.jpeg" alt=""><figcaption><p>Serial Monitor Page Image when the data is successfully retrieved.</p></figcaption></figure>

The form of the data retrieved by the ESP8266 will be JSON like the following format.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F2TPwAufyJYN2ssFlr2Zi%2Fimage.png?alt=media&amp;token=62c986dc-a2b6-4268-9f33-0af344e979fa" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fssd7ucaygAG7MuTlGpXI%2Fimage.png?alt=media&amp;token=511213fa-5ebd-43d0-9098-03ce7f4d14a6" alt=""><figcaption><p>Console Page Image When Data Successfully Received</p></figcaption></figure>

{% hint style="info" %}
Data retrieved from the **Antares IOT Platform** is taken using the **ESP8266** Board with the HTTP protocol in the form of temperature, humidity, wind\_level, rain\_level, and location variables containing latitude and longitude.
{% endhint %}


# Simple Project ESP8266 HTTP Antares

Here are some examples of simple projects using **LOLIN (WEMOS) D1 R2** using **Wi-Fi** connectivity with **HTTP** protocol. If you are interested, you can follow some projects on the following page.

{% content-ref url="/pages/MkChaGLcBaWWFtt27koo" %}
[Periodic Post DHT 11 Data](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares/periodic-post-dht-11-data)
{% endcontent-ref %}

{% content-ref url="/pages/fpGzcStWipsVtHQQmqga" %}
[Post DHT 11 Data with Push Button](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares/post-dht-11-data-with-push-button)
{% endcontent-ref %}

{% content-ref url="/pages/eDJxxWmVP9h3NQTb7Hgd" %}
[Post DHT 11 data and Display on OLED](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares/post-dht-11-data-and-display-on-oled)
{% endcontent-ref %}

{% content-ref url="/pages/vI0YrX8uOFSGZoDfQpik" %}
[Get Data displayed on OLED](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares/get-data-displayed-on-oled)
{% endcontent-ref %}

{% content-ref url="/pages/2v1COTAv1BA0bxdLuDyX" %}
[Post and Get DHT 11 Data displayed on OLED](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares/post-and-get-dht-11-data-displayed-on-oled)
{% endcontent-ref %}

{% content-ref url="/pages/pJYqsiqPFaAQENTujz6f" %}
[Controlling Relays and LEDs Through Get Commands](/en/code-and-library-examples/esp8266-wi-fi/esp8266-wi-fi-http-protocol/simple-project-esp8266-http-antares/controlling-relays-and-leds-through-get-commands)
{% endcontent-ref %}


# Periodic Post DHT 11 Data

In this project, you will use the **Antares Shield Workshop** on the **ESP8266** module. In this **Antares Shield Workshop**, there are temperature, humidity (DHT11), relay, LED and push button sensors. You will monitor the temperature and humidity according to the specified interval period. The results of the data sent by the sensor can be monitored through the Antares console.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/x39o1IWakBn0VznilQEN/wemosd1r2%20+antaresshield.jpeg" alt=""><figcaption><p>Picture of WEMOSD1R2 Attached to Antares Shield</p></figcaption></figure>

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Shield Workshop Antares
2. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

3. DHT11 Library. This documentation uses **DHT11 Sensor Library version 1.4.4.**

{% hint style="info" %}
If you have not installed the **DHT11 Sensor Library version 1.4.4.** you can follow the steps in the following link.

[DHT11 Sensor Library](/en/getting-started/arduino-library-installation/dht11-sensor-library)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > ESP8266-Simple-Project > POST\_DATA\_DHT11.**
{% endhint %}

Below is the programme code of the **POST\_DATA\_DHT11** example.

```cpp
#include <AntaresESPHTTP.h> // Include the AntaresESP8266HTTP library for connecting to the Antares platform
#include "DHT.h"           // Library initiation for DHT11 sensor
#define DHTPIN D1          // Create a variable DHTPIN, pointing to pin D1
#define DHTTYPE DHT11      // Specify the DHT type to be DHT11

#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"  // Replace with the Antares application name that was created
#define deviceName "YOUR-DEVICE-NAME"        // Replace with the Antares device name that was created

const unsigned long interval = 10000;  // 10 s interval to send message
unsigned long previousMillis = 0;      // will store last time message sent


AntaresESPHTTP antares(ACCESSKEY);  // Create an object for interacting with Antares
DHT dht(DHTPIN, DHTTYPE);           // Create an object for the DHT11 sensor

void setup() {
  Serial.begin(115200);                        // Initialize serial communication with baudrate 115200
  antares.setDebug(true);                      // Turn on debugging. Set to "false" if you don't want messages to appear on the serial monitor
  antares.wifiConnection(WIFISSID, PASSWORD);  // Attempt to connect to Wi-Fi
  dht.begin();                                 // Initialize the DHT11 sensor
}

void loop() {

  if (millis() - previousMillis > interval) {
    previousMillis = millis();

    float hum = dht.readHumidity();      // Read the humidity value from the DHT11 sensor
    float temp = dht.readTemperature();  // Read the temperature value from the DHT11 sensor
    if (isnan(hum) || isnan(temp)) {     // Check if there's an error reading the sensor
      Serial.println("Failed to read DHT sensor!");
      return;
    }
    Serial.println("Temperature: " + (String)temp + " *C");  // Print the temperature in Celsius
    Serial.println("Humidity: " + (String)hum + " %");       // Print the humidity as a percentage

    // Add the temperature and humidity data to the storage buffer
    antares.add("temperature", temp);
    antares.add("humidity", hum);

    // Send the data from the storage buffer to Antares
    antares.send(projectName, deviceName);
  }
}
```

### **3.**&#x53;et Wi-Fi Credential and Antares Credential in Program Code&#x20;

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName**, and **\*deviceName**. Adjust to the parameters in the Antares console.

```arduino
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "your-project-name"   // Antares project name
#define deviceName "your-project-name"   // Name of the device
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FRJu66rHiunjI5lIGS1FH%2Fimage.png?alt=media&amp;token=06c019b1-b620-488d-b98a-cf66edd349db" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/tj4SqboHk21eQopnNlMV/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi password** you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName** and **\*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FFpgfuWzbbUX0z7SzPVbW%2Fimage.png?alt=media&amp;token=33c15f19-07e0-4db3-adf9-6dd22f52aca1" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fb0tHlF3iUbyLCxSBgrjP%2Fimage.png?alt=media&amp;token=7228fd50-27e0-4119-bd03-960ff32a8f04" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager**. If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).<br>
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/H95odJATxb7L8A0iNpSy/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/jA2YG7iGgzI0DmdwzXJf/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/LnjsaB83aeH9Gbji7eiU/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **compile** the programme to find out whether there are errors or not.&#x20;

**The Arrow** icon on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as **Flash the programme** to the target board.<br>
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/o0CopRdueGvALxLjzZNg/Halaman%20Arduino%20IDE%20Setelah%20Upload%20Berhasil.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/J00ylqTuJifbjSCJeWhk/Icon%20Serial%20Monitor%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the serial baud rate is not the same between t**he programme code** and **the serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Tlwelre237cjfmnK2dP9/Serial%20Monitor%20POST%20DHT11.jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5.** Check Data in Antares&#x20;

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FF3eXYSoBHO3PDYZmj7dH%2Fimage.png?alt=media&amp;token=4248d5d1-b8df-4243-83c3-b8baf81d7242" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FAqAyj5ogbN2UzCxFniZw%2Fimage.png?alt=media&amp;token=f87c1ef1-5aa8-482d-b36f-6faa045f730a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Data sent from **ESP8266** with HTTP protocol in the form of temperature and humidity variables.
{% endhint %}


# Post DHT 11 Data with Push Button

In this project, you will use the **Antares Shield Workshop** on the **ESP8266** module. In this **Antares Shield Workshop**, there are temperature, humidity (DHT11), relay, LED and push button sensors. You will monitor the temperature and humidity with a push button as a trigger sender.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/o6XfAiaHoq7i5zrafATQ/wemosd1r2%20+antaresshield.jpeg" alt=""><figcaption><p>Picture of WEMOSD1R2 Attached to Antares Shield</p></figcaption></figure>

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Shield Workshop Antares
2. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

3. DHT11 Library. This documentation uses **DHT11 Sensor Library version 1.4.4.**

{% hint style="info" %}
If you have not installed the DHT11 Sensor Library version 1.4.4. you can follow the steps in the following link.

[DHT11 Sensor Library](/en/getting-started/arduino-library-installation/dht11-sensor-library)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > ESP8266-Simple-Project > POST\_DATA\_DHT11\_PUSHBUTTON.**
{% endhint %}

Here is the programme code of the example **POST\_DATA\_DHT11\_PUSHBUTTON**

```cpp
#include <AntaresESPHTTP.h>  // Include the AntaresESP2866HTTP library for connecting to the Antares platform
#include "DHT.h"             // Include the DHT sensor library

#define DHTPIN D1      // Define the pin number for the DHT sensor (connected to pin D1)
#define DHTTYPE DHT11  // Define the DHT sensor type as DHT11

#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"  // Replace with the Antares application name that was created
#define deviceName "YOUR-DEVICE-NAME"        // Replace with the Antares device name that was created

AntaresESPHTTP antares(ACCESSKEY);  // Create an AntaresESP2866HTTP object to interact with Antares
DHT dht(DHTPIN, DHTTYPE);           // Create a DHT object for the DHT sensor

#define pushButtonPin A0  // Define the pin number for the push button (connected to pin 32)
#define ledPin D2         // Define the pin number for the LED (connected to pin 12)

bool ledState = false;         // Variable to store the state of the LED (ON or OFF)
bool lastButtonState = false;  // Variable to store the previous state of the push button

void setup() {
  Serial.begin(115200);    // Initialize serial communication with baudrate 115200
  antares.setDebug(true);  // Enable debug mode for AntaresESP32HTTP (messages will be displayed in the serial monitor)

  // Reset WiFi cache before connecting
  WiFi.disconnect();

  antares.wifiConnection(WIFISSID, PASSWORD);  // Connect to Wi-Fi with the specified SSID and password
  dht.begin();                                 // Initialize the DHT sensor

  pinMode(pushButtonPin, INPUT);  // Set the push button pin as input with internal pull-up resistor
  pinMode(ledPin, OUTPUT);        // Set the LED pin as output
  digitalWrite(ledPin, LOW);      // Turn off the LED initially
}

void loop() {
  // Read the current state of the push button
  int analogValue = analogRead(A0);
  bool currentButtonState = (analogValue < 512);  // Adjust the threshold as needed

  // Check if the button state has changed (button press detected)
  if (currentButtonState != lastButtonState && currentButtonState == LOW) {
    Serial.println("The button is pressed");

    // Toggle state of the LED (ON to OFF or OFF to ON)
    ledState = !ledState;
    digitalWrite(ledPin, ledState);

    // Read temperature and humidity from the DHT sensor
    float hum = dht.readHumidity();
    float temp = dht.readTemperature();

    // Check if the sensor reading is valid
    if (isnan(hum) || isnan(temp)) {
      Serial.println("Failed to read DHT sensor!");
      return;
    }

    // Print temperature and humidity values to the serial monitor
    Serial.println("Temperature: " + (String)temp + " *C");
    Serial.println("Humidity: " + (String)hum + " %");

    // Add temperature and humidity data to the Antares storage buffer
    antares.add("temperature", temp);
    antares.add("humidity", hum);

    // Send the data from the storage buffer to Antares
    antares.send(projectName, deviceName);

    // Add some delay to avoid multiple data sending due to button debouncing
    delay(1000);
  }

  // Update the last button state for the next iteration
  lastButtonState = currentButtonState;
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName,** and **\*deviceName**. Adjust to the parameters in the Antares console.

```cpp
#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"  // Replace with the Antares application name that was created
#define deviceName "YOUR-DEVICE-NAME"        // Replace with the Antares device name that was created
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FX67RygqohgwKEaIKSXAK%2Fimage.png?alt=media&amp;token=aa42451b-44c7-413c-bee2-ff61fd0bd25e" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/cFQiz9SqdaxrbPLOshZw/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi password** you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName** and **\*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FNglOCdpOEyfm2lYCvelV%2Fimage.png?alt=media&amp;token=ba5bf5e4-42e5-4efe-868b-8bb291aab849" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FbxPzN3LE6NAmTL43q0zN%2Fimage.png?alt=media&amp;token=5163678c-df69-47b4-be2c-57c3e83623ae" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect **ESP 8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, the check can be done via **Device Manager**. If your **ESP 8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/y3Gzw98QKejUJsM4bvuv/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & min**i. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/UxsOFPCiTXzkJzl7HOeN/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/hfOs6lH2flq2fSxiEMri/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **compile** the programme to find out if there are errors or not. \
**The arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **compile** the programme as well as flash the programme on the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/dn8hzyGaz0jhfvz2At7H/Halaman%20Arduino%20IDE%20Setelah%20Upload%20Berhasil.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/qhZf2zTKMQOpSMphjTLN/Icon%20Serial%20Monitor%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud** **rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between **the programme code** and **the serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/sweaSml3XD3OIy3WgwGe/Serial%20Monitor%20POST%20DHT11%20Pushbutton.jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5.** Check Data in Antares

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fz4x8ygbZ70J9YuQOK8Ln%2Fimage.png?alt=media&amp;token=c624f1f3-15cf-411f-a6ef-f1d113e70dd8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FbQVFb3nQliSzIJ5CsVSx%2Fimage.png?alt=media&amp;token=195eb38d-d320-4434-86c4-5d7fd0e83452" alt=""><figcaption><p>Console Page Image When Data Successfully Received</p></figcaption></figure>

{% hint style="info" %}
Data sent from **ESP8266** with HTTP protocol in the form of temperature and humidity variables.
{% endhint %}


# Post DHT 11 data and Display on OLED

In this project, you will use the **Antares Shield Workshop** on the **ESP8266** module. In this **Antares Shield Workshop**, there are temperature, humidity (DHT11), relay, LED and push button sensors. You will monitor the temperature and humidity according to the specified interval period. The results of the data sent by the sensor can be monitored through the Antares console and displayed on the OLED.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/BPQlxkt5a4nn2JPEMv89/BoardESP8266+SHIELD+OLED.jpeg" alt="" width="563"><figcaption><p>Image of WEMOS D1R2 Installed Antares Shield and OLED.</p></figcaption></figure>

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Shield Workshop Antares
2. I2C-based 0.96inch 128x64 pixel SSD1036 OLED module

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/1Xz1HJau5W3AKm8kG21I/OLED.jpeg" alt="" width="345"><figcaption><p>SSD1036 0.96inch OLED Module Picture</p></figcaption></figure>

3. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

4. DHT11 Library. This documentation uses **DHT11 Sensor Library version 1.4.4.**

{% hint style="info" %}
If you have not installed the **DHT11 Sensor Library version 1.4.4.** you can follow the steps in the following link.

[DHT11 Sensor Library](/en/getting-started/arduino-library-installation/dht11-sensor-library)
{% endhint %}

5. SSD1306 OLED Library. This documentation uses Adafruit SSD1306 by **Adafruit version 2.5.7.**

{% hint style="info" %}
If you have not installed the **Adafruit SSD1306 by Adafruit library version 2.5.7.** you can follow the steps in the following link.

[Adafruit SSD1306](/en/getting-started/arduino-library-installation/adafruit-ssd1306)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > ESP8266-Simple-Project > POST\_DATA\_DHT11\_OLED.**
{% endhint %}

Below is the programme code of the **POST\_DATA\_DHT11\_OLED** example.

```cpp
// Library initialization
#include <AntaresESPHTTP.h>    // Load AntaresESP8266HTTP library for connecting to the Antares platform
#include "DHT.h"               // Load DHT sensor library for reading temperature and humidity
#include <Adafruit_SSD1306.h>  // Load OLED display library

#define DHTPIN D1         // Define DHTPIN variable, pointing to pin D1
#define DHTTYPE DHT11     // Set DHT type to DHT11
#define SCREEN_WIDTH 128  // Define OLED screen width
#define SCREEN_HEIGHT 64  // Define OLED screen height

#define OLED_RESET -1        // Define OLED reset pin, set to -1 as it's not used
#define SCREEN_ADDRESS 0x3C  // Define OLED I2C address

#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"  // Replace with the Antares application name that was created
#define deviceName "YOUR-DEVICE-NAME"        // Replace with the Antares device name that was created

const unsigned long interval = 10000;  // 10 s interval to send message
unsigned long previousMillis = 0;      // will store last time message sent

AntaresESPHTTP antares(ACCESSKEY);                                         // Create an antares object for connecting to Antares
DHT dht(DHTPIN, DHTTYPE);                                                  // Create a dht object for the DHT sensor
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);  // Create a display object for the OLED screen

void setup() {
  Serial.begin(115200);    // Initialize serial communication with baudrate 115200
  antares.setDebug(true);  // Turn on debug mode. Set to "false" if you don't want messages to appear in the serial monitor

  // Reset WiFi cache before connecting
  WiFi.disconnect();

  antares.wifiConnection(WIFISSID, PASSWORD);  // Attempt to connect to Wi-Fi with the specified SSID and password
  dht.begin();                                 // Initialize the DHT sensor object

  if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
    Serial.println(F("SSD1306 allocation failed"));  // Check if the OLED is successfully initialized
    for (;;)
      ;
  }
  display.clearDisplay();                        // Clear the OLED display
  display.setTextColor(SSD1306_WHITE);           // Set text color to white
  display.setTextSize(1);                        // Set text size to 1
  display.setCursor(0, 0);                       // Set cursor position to (0, 0)
  display.println(F("Temperature & Humidity"));  // Display "Temperature & Humidity" text on the OLED
  display.display();                             // Show the text on the OLED
  delay(2000);                                   // Delay for 2 seconds
}

void loop() {

  // Check interval overflow
  if (millis() - previousMillis > interval) {
    previousMillis = millis();

    float hum = dht.readHumidity();                  // Read humidity value from the DHT sensor
    float temp = dht.readTemperature();              // Read temperature value from the DHT sensor
    if (isnan(hum) || isnan(temp)) {                 // Check if the sensor reading is invalid
      Serial.println("Failed to read DHT sensor!");  // If the reading is invalid, print an error message
      return;                                        // Exit the loop function and wait for the next cycle
    }
    display.clearDisplay();             // Clear the OLED display
    display.setTextSize(1);             // Set text size to 1
    display.setCursor(0, 0);            // Set cursor position to (0, 0)
    display.print(F("Temperature: "));  // Display "Temperature: " text on the OLED
    display.print(temp);                // Display temperature value on the OLED
    display.println(F(" C"));           // Display " C" (for Celsius) on the OLED
    display.print(F("Humidity: "));     // Display "Humidity: " text on the OLED
    display.print(hum);                 // Display humidity value on the OLED
    display.println(F(" %"));           // Display " %" (for percentage) on the OLED
    display.display();                  // Show the text on the OLED

    Serial.println("Temperature: " + (String)temp + " *C");  // Print temperature value to the serial monitor with "*C" format
    Serial.println("Humidity: " + (String)hum + " %");       // Print humidity value to the serial monitor with "%" format

    // Add variable data to the storage buffer in Antares
    antares.add("temperature", temp);
    antares.add("humidity", hum);

    // Send data from the storage buffer to Antares
    antares.send(projectName, deviceName);
  }
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code&#x20;

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName**, and **\*deviceName**. Adjust to the parameters in the Antares console.

```arduino
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "your-project-name"   // Antares project name
#define deviceName "your-project-name"   // Name of the device
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Ft4ekDU8ofT8QEoI48yo9%2Fimage.png?alt=media&amp;token=0e41dc09-7160-413d-95a6-851137b1f68b" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/ysWAsg68TS56k7y0NJwi/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi password** you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName** and **\*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FxX6hdUUpB37Ff2iCWylK%2Fimage.png?alt=media&amp;token=e125d13c-225c-418b-801f-f36011825daa" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FolIQ4voex94q6GEuLFdz%2Fimage.png?alt=media&amp;token=04d56a7e-9ee4-4be8-a641-9e57b6dc0138" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager.** If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/FDJRMOJ4m7Wn3Ul6U8o8/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/3cgYZ27m7x7Dn3QxcJ3T/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/uC0NayiYaMQdJdJPPnqe/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to C**ompile** the programme to find out whether there are errors or not. \
**The Arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as Flash the programme to the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/zX1KUwuxilL4ybU1opi5/Halaman%20Arduino%20IDE%20Setelah%20Upload%20Berhasil.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the serial monitor to debug the programme. The serial monitor icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/QfZ62daIwdeLmEpvBJiy/Icon%20Serial%20Monitor%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between **the programme code** and **the serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Pz0McZOeacUSjeYgRF0R/Serial%20Monitor%20POST%20DHT11%20OLED.jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5.** Check Data in Antares

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FL0RN45UeZxaRKANA2bqX%2Fimage.png?alt=media&amp;token=9839b038-cc18-4b86-985e-63c7ff0dd5e6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FcbavE4q7gFoLeuNMqmWx%2Fimage.png?alt=media&amp;token=4713210b-ff6f-44e4-ac2d-69527c9923a5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Data sent from ESP8266 with HTTP protocol in the form of temperature and humidity variables.
{% endhint %}

### 6. Output program&#x20;

DHT 11 data sent and displayed on the OLED display after connecting to Wi-Fi is shown in the figure below:

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/D3mhAWzYvCl8Nx8vo5p2/Output%20Program%20WEMOS%20D1R2%20Terpasang%20Antares%20Shield%20dan%20OLED.jpeg" alt=""><figcaption><p>DHT11 sensor results displayed on OLED</p></figcaption></figure>


# Get Data displayed on OLED

In this project, you will display data from **Antares IoT Platform** on **OLED** using **ESP8266** module. In this **Antares Shield Workshop**, there are temperature, humidity (DHT11), relay, LED, and push button sensors. You will send a message in the form of data displayed on the OLED display. The process of sending this data uses **POSTMAN Software** to send data to the **Antares IoT Platform**.<br>

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/D1NK8k9RuaplfpSTsNCD/BoardESP8266+SHIELD+OLED.jpeg" alt="" width="563"><figcaption><p>Picture of WEMOSD1R2 with OLED Display</p></figcaption></figure>

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Shield Workshop Antares
2. I2C-based 0.96inch 128x64 pixel SSD1036 OLED module

   <figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/dOTWe3N5YX0veFDL4qN0/OLED.jpeg" alt="" width="345"><figcaption><p>SSD1036 0.96inch OLED Module Picture</p></figcaption></figure>
3. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

4. OLED display library. This documentation uses Adafruit\_SSD1306 by **Adafruit version 2.5.7.**

{% hint style="info" %}
If you have not installed the **Adafruit SSD1306 by Adafruit library version 2.5.7.** you can follow the steps in the following link.

[Adafruit SSD1306](/en/getting-started/arduino-library-installation/adafruit-ssd1306)
{% endhint %}

5. Software Postman&#x20;

{% hint style="info" %}
If you have not installed **POSTMAN Software**, you can follow the steps in the following link.

[Postman Installation](/en/getting-started/software-installation/postman-installation)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > ESP8266-Simple-Project > GET\_DATA\_OLED.**
{% endhint %}

Here is the programme code of the **GET\_DATA\_OLED** example.

```cpp
#include <AntaresESPHTTP.h>     // Include the AntaresESP8266HTTP library for connecting to the Antares platform
#include <Adafruit_SSD1306.h>  // Include the OLED library

#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"  // Replace with the Antares application name that was created
#define deviceName "YOUR-DEVICE-NAME"        // Replace with the Antares device name that was created

const unsigned long interval = 10000;  // 10 s interval to send message
unsigned long previousMillis = 0;      // will store last time message sent

AntaresESPHTTP antares(ACCESSKEY);

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1  // Change this if your OLED module has a different reset pin

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);  // Create an OLED display object

void setup() {
  Serial.begin(115200);
  antares.setDebug(true);
  antares.wifiConnection(WIFISSID, PASSWORD);

  // Initialize the OLED display
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;)
      ;
  }

  // Clear the buffer and display the initial message
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.println("Hallo Test");
  display.display();
  delay(2000);  // Display the message for 2 seconds
}

void loop() {
  if (millis() - previousMillis > interval) {
    previousMillis = millis();

    // Get the latest data from your Antares device
    antares.get(projectName, deviceName);

    // Check if we're actually getting data
    if (antares.getSuccess()) {
      String test = antares.getString("Test");

      // Update the OLED display
      Serial.println("Received : " + test);
      display.clearDisplay();
      display.setTextSize(1);
      display.setTextColor(SSD1306_WHITE);
      display.setCursor(0, 0);
      display.println("Received:" + test);
      display.display();
    }
  }
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code&#x20;

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName**, and **\*deviceName**. Adjust to the parameters in the Antares console.

```arduino
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "your-project-name"   // Antares project name
#define deviceName "your-project-name"   // Name of the device
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FSaXUe9GN2yJdx1t9BF3B%2Fimage.png?alt=media&amp;token=ff62f282-4ba3-45e9-80da-c09f7d53f1e8" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/AqEoXjrNy6c0mw5JxqsL/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi password** you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName** and **\*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2F1vo0ri1NzVhWG4ruHWpu%2Fimage.png?alt=media&amp;token=fb878f06-c717-4803-98c5-e778ee77f251" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FYOCM4huACu7HMHRc6nf7%2Fimage.png?alt=media&amp;token=7f4fc9e7-ca55-4d05-8164-f77257bbe8b7" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager**. If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/al6ohBQ1SOQv1L9b6Evd/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/FRsaxLvbNpVH5LZhLZ9E/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/hooRP3DLOqxG8ZuFZfbU/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **Compile** the programme to find out whether there are errors or not. \
**The Arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as Flash the programme to the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/QCvFn8e5WMFPla0WpCF4/Halaman%20Arduino%20IDE%20Setelah%20Upload%20Berhasil.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/uLYgTfdfD0LeRt3BJAwe/Icon%20Serial%20Monitor%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between the **programme code** and the **serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/Fz4KxauO4Vgko6baRVsY/Serial%20Monitor%20GET%20Data%20OLED%20HTTP.jpeg" alt=""><figcaption></figcaption></figure>

### **5. Setup Software POSTMAN**

In this step you need POSTMAN software, you can input the **end-point, request header** and **request** body first by following the following format.

**End Point**&#x20;

<table data-header-hidden><thead><tr><th width="134.5"></th><th></th></tr></thead><tbody><tr><td><strong>Method</strong></td><td>POST</td></tr><tr><td><strong>URL</strong></td><td>https://platform.antares.id:8443/~/antares-cse/antares-id/<mark style="color:red;">your-application-name/your-device-name</mark></td></tr></tbody></table>

{% hint style="info" %}
Customise <mark style="color:red;">your-application-name</mark> and <mark style="color:red;">your-device-name</mark> to the names registered to your Antares account.
{% endhint %}

**Request Header**

<table data-header-hidden><thead><tr><th width="134.5"></th><th></th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Value</strong></td></tr><tr><td>X-M2M-Origin</td><td><mark style="color:red;">your-access-key</mark></td></tr><tr><td>Content-Type</td><td>application/json;ty=4</td></tr><tr><td>Accept</td><td>application/json</td></tr></tbody></table>

{% hint style="info" %}
Customise <mark style="color:red;">your-access-key</mark> with your Antares account access key.
{% endhint %}

The result will be as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7p87ee4RDHN5micRaC2h/POSTMAN%201.png" alt=""><figcaption><p>Image of end-point and header settings in POSTMAN software.</p></figcaption></figure>

Next, you need to input the request body by following the following format.

**Request Body**

```json
{
  "m2m:cin": {
    "con": "{\"key1\":\"integer-value\", \"key2\":\"string-value\", \"keyN\":\"valueN\"}"
  }
}
```

In the POSTMAN software, select the **Body** tab then select **raw** and enter the payload according to the request body you want to use as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/gCm9rHiAXIzQI32ZKM3I/POSTMAN2.png" alt=""><figcaption><p>Image of the contents of the payload request body in POSTMAN software.</p></figcaption></figure>

{% hint style="info" %}
Customise the contents of the "con" field according to the "key" and "value" you want to send.
{% endhint %}

### **6.** Sending POSTMAN Messages to the Antares Server

After the POSTMAN software setup is complete, it's time to send the POST command. The "Test" field is filled with the string "Hello 123" as the message to be sent via HTTP protocol to the Antares server.

```json
{
  "m2m:cin": {
    "con": "{\"Test\":\"Hallo 123\"}"
  }
}
```

If you have finished filling in the "Test" field, then press the **Send** button on the POSTMAN software. Looks like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7Pce8teuV02D0yFRdSqO/Gambar%20isi%20pesan%20pada%20software%20POSTMAN..jpeg" alt=""><figcaption><p>Image of the message content in POSTMAN software.</p></figcaption></figure>

If the HTTP request through POSTMAN software is successful, the POSTMAN software response section will appear as shown below

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/AUliNPlqmcooISIyyOhU/Gambar%20response%20hit%20API%20pada%20software%20POSTMAN..jpeg" alt=""><figcaption><p>Image of API hit response in POSTMAN software.</p></figcaption></figure>

### **7.** Check Data in Antares

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FzWQSUdGcOgRLlJrwskKy%2Fimage.png?alt=media&amp;token=9f869a7a-0420-4ca4-85b3-1456868841bd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FvoTkyXOrrC7MPekIZ396%2Fimage.png?alt=media&amp;token=cde9600b-423d-4434-9484-f28ee425ef01" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Data received by **ESP8266** with HTTP protocol in the form of Test variablet.
{% endhint %}

### 8. Output program&#x20;

Get data from the **Antares IoT Platform** and display it on the OLED display after connecting to Wi-Fi is shown in the figure below:

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/h69AKsCNnMZteNZsychI/OLED%20Halo123.jpeg" alt=""><figcaption><p>Get Data results displayed on OLED</p></figcaption></figure>


# Post and Get DHT 11 Data displayed on OLED

In this project, you will use the **Antares Shield Workshop** on the **ESP8266** module. In this **Antares Shield Workshop**, there are temperature, humidity (DHT11), relay, LED, and push button sensors. You will monitor the temperature and humidity with a specified interval period. The results of the data sent by the sensors can be monitored through the Antares console and displayed on the **OLED**. You can also send messages in the form of **string data** displayed on the **OLED** display. This data transmission process uses POSTMAN software to send data to the Antares IoT Platform.<br>

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/6iKmSgvL4LKRCAwlN6f3/BoardESP8266+SHIELD+OLED.jpeg" alt="" width="563"><figcaption><p>Image of WEMOS D1R2 Displaying DHT11 Data</p></figcaption></figure>

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Shield Workshop Antares
2. I2C-based 0.96inch 128x64 pixel SSD1036 OLED module

   <figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/yukHhJmqDEnF3wQNR3ty/OLED.jpeg" alt="" width="345"><figcaption><p>SSD1036 0.96inch OLED Module Picture</p></figcaption></figure>
3. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

4. &#x20;OLED display library. This documentation uses Adafruit\_SSD1306 by **Adafruit version 2.5.7.**

{% hint style="info" %}
If you have not installed the **Adafruit SSD1306 by Adafruit library version 2.5.7.** you can follow the steps in the following link.

[Adafruit SSD1306](/en/getting-started/arduino-library-installation/adafruit-ssd1306)
{% endhint %}

5. DHT11 Library. This documentation uses **DHT11 Sensor Library version 1.4.4.**

{% hint style="info" %}
If you have not installed the **DHT11 Sensor Library version 1.4.4**. you can follow the steps in the following link.

[DHT11 Sensor Library](/en/getting-started/arduino-library-installation/dht11-sensor-library)
{% endhint %}

6. POSTMAN SOFTWARE

{% hint style="info" %}
If you have not installed **POSTMAN Software**, you can follow the steps in the following link.

[Postman Installation](/en/getting-started/software-installation/postman-installation)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2.** Opening Sample Programme&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > ESP8266-Simple-Project > GET\_DATA\_OLED.**
{% endhint %}

Here is the programme code of the **GET\_DATA\_OLED** example.

```cpp
#include <AntaresESPHTTP.h>    // Include the AntaresESP8266HTTP library
#include <Adafruit_SSD1306.h>  // Include the Adafruit SSD1306 library
#include "DHT.h"               // Include the DHT sensor library

#define DHTPIN D1      // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11  // Type of DHT sensor (DHT11 in this case)

#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"     // Antares project name
#define deviceNameSensor "YOUR-DEVICE-NAME-1"   // Name of the device sending sensor data
#define deviceNamePostman "YOUR-DEVICE-NAME-2"  // Name of the device receiving data

AntaresESPHTTP antares(ACCESSKEY);  // Initialize AntaresESP8266HTTP with the access key
DHT dht(DHTPIN, DHTTYPE);           // Initialize DHT sensor object

#define SCREEN_WIDTH 128  // OLED screen width in pixels
#define SCREEN_HEIGHT 64  // OLED screen height in pixels
#define OLED_RESET -1     // Reset pin for the OLED (not used in this case)

const unsigned long interval = 5000;    // Interval to send sensor data (5 seconds)
const unsigned long interval2 = 10000;  // Interval to get data from Antares (10 seconds)
unsigned long previousMillis = 0;       // Store the last time sensor data was sent
unsigned long previousMillis2 = 0;      // Store the last time data was received from Antares

String testData;       // String to hold received data from Antares
String lastData = "";  // String to store last received data

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);  // Initialize OLED display object

bool showSensorData = true;  // Boolean to control display of sensor data

void setup() {
  Serial.begin(115200);                        // Initialize serial communication
  antares.setDebug(true);                      // Enable Antares library debug mode
  antares.wifiConnection(WIFISSID, PASSWORD);  // Connect to WiFi using provided SSID and password
  dht.begin();                                 // Initialize the DHT sensor

  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {  // Initialize the OLED display
    Serial.println(F("SSD1306 allocation failed"));
    for (;;)
      ;
  }

  display.clearDisplay();  // Clear the OLED display buffer
  display.display();       // Display the cleared buffer
}

void loop() {

  if (millis() - previousMillis > interval) {  // Check if it's time to send sensor data
    previousMillis = millis();                 // Update the last sent time

    float hum = dht.readHumidity();      // Read humidity from the DHT sensor
    float temp = dht.readTemperature();  // Read temperature from the DHT sensor
    if (isnan(hum) || isnan(temp)) {
      Serial.println("Failed to read DHT sensor!");  // Print an error message if sensor reading fails
      return;
    }
    antares.add("temperature", temp);                    // Add temperature data to the Antares payload
    antares.add("humidity", hum);                        // Add humidity data to the Antares payload
    antares.send(projectName, deviceNameSensor);         // Send sensor data to Antares
    display.clearDisplay();                              // Clear the OLED display buffer
    display.setTextSize(1);                              // Set text size on the display
    display.setTextColor(SSD1306_WHITE);                 // Set text color to white
    display.setCursor(0, 0);                             // Set cursor position on the display
    display.println("Temp: " + String(temp) + " *C");    // Display temperature
    display.println("Humidity: " + String(hum) + " %");  // Display humidity
    display.display();                                   // Display the updated buffer on the OLED
  }

  if (millis() - previousMillis2 > interval2) {  // Check if it's time to get data from Antares
    previousMillis2 = millis();                  // Update the last received time

    antares.get(projectName, deviceNamePostman);  // Get data from Antares

    if (antares.getSuccess()) {                   // Check if data retrieval was successful
      testData = antares.getString("Test Data");  // Get the "Test Data" field from the response

      if (lastData != testData)  // Check if the received data is different from the last one
      {
        lastData = testData;                           // Update the last received data
        Serial.println("Received Data: " + testData);  // Print received data to the serial monitor
        display.clearDisplay();                        // Clear the OLED display buffer
        display.setTextSize(1);                        // Set text size on the display
        display.setTextColor(SSD1306_WHITE);           // Set text color to white
        display.setCursor(0, 0);                       // Set cursor position on the display
        display.println("Received:");                  // Display "Received:"
        display.println(testData);                     // Display the received data
        display.display();                             // Display the updated buffer on the OLED
        delay(2000);                                   // Display received data for 2 seconds
      }
    }
  }
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName**, and **\*deviceName**. Adjust to the parameters in the Antares console.

{% hint style="info" %}
This project requires 2 devices, namely a device in Antares to receive data from DHT11 with the variable name deviceNameSensor and a device to receive data from POSTMAN with the variable name deviceNamePostman made in one application on the Antares console.
{% endhint %}

```cpp
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"     // Antares project name
#define deviceNameSensor "YOUR-DEVICE-NAME-1"   // Name of the device sending sensor data
#define deviceNamePostman "YOUR-DEVICE-NAME-2"  // Name of the device receiving data
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FOY1G0gpCFv9QxGHjoSJZ%2Fimage.png?alt=media&amp;token=6d672266-7b0f-4c32-9bfa-7c84d4a9fbc0" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/rbEUpQFGMxxAlsbhx80l/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi password** you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName, \*deviceNameSensor, \*deviceNamePostman** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account. This project requires two device names so you must create two new devices as shown below.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FGOxXv0CnPWoHxdkXvvdb%2Fimage.png?alt=media&amp;token=2ff3c443-094a-482a-b18a-2c11f855ec5e" alt=""><figcaption><p>Application Name and Device Name on the Antares page.</p></figcaption></figure>

### **4. Compile dan Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager**. If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/fcfcdEElfdAfcfnsotd3/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/3DGOyZL4YMBe2p0gfBEE/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7F0snCGF0w1VsDAHsEOf/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **Compile** the programme to find out whether there are errors or not.&#x20;

**The Arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as Flash the programme to the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/xJJW0O6EgD0yvDmkwf1N/Halaman%20Arduino%20IDE%20Setelah%20Upload%20Berhasil.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/E54RxnSDN15dXSK6ANie/Icon%20Serial%20Monitor%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between the **programme code** and the **serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/LQvVW6AIKpcSh7gj4yuB/Serial%20Monitor%20POST&amp;GET%20HTTP.jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5. Setup POSTMAN Software**

In this step you need POSTMAN software, you can input the **end-point, request header** and **request** body first by following the following format.

**End Point**&#x20;

<table data-header-hidden><thead><tr><th width="134.5"></th><th></th></tr></thead><tbody><tr><td><strong>Method</strong></td><td>POST</td></tr><tr><td><strong>URL</strong></td><td>https://platform.antares.id:8443/~/antares-cse/antares-id/<mark style="color:red;">your-application-name/your-device-name</mark></td></tr></tbody></table>

{% hint style="info" %}
Customise <mark style="color:red;">your-application-name</mark> and <mark style="color:red;">your-device-name</mark> to the names registered to your Antares account.
{% endhint %}

**Request Header**

<table data-header-hidden><thead><tr><th width="134.5"></th><th></th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Value</strong></td></tr><tr><td>X-M2M-Origin</td><td><mark style="color:red;">your-access-key</mark></td></tr><tr><td>Content-Type</td><td>application/json;ty=4</td></tr><tr><td>Accept</td><td>application/json</td></tr></tbody></table>

{% hint style="info" %}
Customise <mark style="color:red;">your-access-key</mark> with your Antares account access key.
{% endhint %}

The result will be as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7p87ee4RDHN5micRaC2h/POSTMAN%201.png" alt=""><figcaption><p>Image of end-point and header settings in POSTMAN software.</p></figcaption></figure>

Next, you need to input the request body by following the following format.

**Request Body**

```json
{
  "m2m:cin": {
    "con": "{\"key1\":\"integer-value\", \"key2\":\"string-value\", \"keyN\":\"valueN\"}"
  }
}
```

In the POSTMAN software, select the **Body** tab then select **raw** and enter the payload according to the request body you want to use as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/gCm9rHiAXIzQI32ZKM3I/POSTMAN2.png" alt=""><figcaption><p>Image of the contents of the payload request body in POSTMAN software.</p></figcaption></figure>

{% hint style="info" %}
Customise the contents of the "con" field according to the "key" and "value" you want to send.
{% endhint %}

### **6.** Sending POSTMAN Messages to the Antares Server

After the POSTMAN software setup is complete, it's time to send the POST command. The "Test Data" field is filled with the string "Hello TEST 123" as the message to be sent via HTTP protocol to the Antares server.

```json
{
  "m2m:cin": {
    "con": "{\"Test Data\":\"Hallo TEST 123\"}"
  }
}
```

If you have finished filling in the "Test Data" field, then press the **Send** button on the POSTMAN software. It looks like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/bLDk28P5rnq6R17QvvBq/Gambar%20isi%20pesan%20pada%20software%20POSTMAN.jpeg" alt=""><figcaption><p>Image of the message content in POSTMAN software.</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/jxDivnoxoEWbeYUyD3Cw/Gambar%20response%20hit%20API%20pada%20software%20POSTMAN..jpeg" alt=""><figcaption><p>Image of API hit response in POSTMAN software.</p></figcaption></figure>

### **7.** Check Data in Antares

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FOs4RhOOdaQhuk6DbaU6S%2Fimage.png?alt=media&amp;token=3e2ecd92-4f74-46cb-a1ac-36283444f368" alt=""><figcaption><p>Image of the Antares Console Page when data is successfully received from the DHT11 Sensor.</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FibonMS85vwQVCncbYyr1%2Fimage.png?alt=media&amp;token=c8be6602-27cb-4288-b006-d496e3cd7d6e" alt=""><figcaption><p>Image of the Antares Console Page when data is successfully received from POSTMAN.</p></figcaption></figure>

### 8. Output program&#x20;

Get data from the **Antares IoT Platform** and display it on the OLED display after connecting to Wi-Fi is shown in the figure below:

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/id39MMHcqlayj5kb44o2/WEMOS%20D1R2%20+%20OLED%20Menampilkan%20DHT11.jpeg" alt=""><figcaption><p>DHT11 sensor results displayed on OLED</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/FUkEZdbgwyBTDyyOsrUZ/OLED%20Hallo%20TEST%20123.jpeg" alt=""><figcaption><p>Get Postman results displayed on OLED</p></figcaption></figure>


# Controlling Relays and LEDs Through Get Commands

In this project, you will use the **Antares Shield Workshop** on the **ESP8266** module. In this **Antares Shield Workshop**, there are temperature, humidity (DHT11), relay, LED, and push button sensors. You will **Post Data** using **POSTMAN** software that contains commands to control the LEDs and relays. Then the **ESP8266** performs **Get Data** from the **Antares IoT Platform** which contains two command options, namely if the Relay input is 1 then the relay will turn on; Relay input is 0 then the relay will turn off; LED is 1 then the LED will turn on; LED input is 0 then the LED will turn off.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/wzmmSK55WfJeg9nTMXS0/BoardESP8266+SHIELD+OLED.jpeg" alt="" width="563"><figcaption><p>Picture of ESP8266 attached to Antares Shield</p></figcaption></figure>

## Prerequisites

The materials required follow the **General Prerequisites** on the previous page. If you have not prepared the requirements on that page, then you can visit the following page.

{% content-ref url="/pages/FfvYH4773vShlmvxo6Gj" %}
[General Prerequisites ESP8266 Wi-Fi](/en/code-and-library-examples/esp8266-wi-fi/general-prerequisites-esp8266-wi-fi)
{% endcontent-ref %}

The additional materials specific to this project are as follows.

1. Shield Workshop Antares
2. Antares ESP HTTP Library. This documentation uses the **Antares ESP HTTP library version 1.4.0.**

{% hint style="info" %}
If you have not installed **Antares ESP HTTP 1.4.0**, please follow these steps.

[Antares Wi-Fi HTTP](/en/getting-started/arduino-library-installation/antares-wi-fi-http)
{% endhint %}

3. POSTMAN Software&#x20;

{% hint style="info" %}
If you have not installed **POSTMAN Software**, you can follow the steps in the following link.

[Postman Installation](/en/getting-started/software-installation/postman-installation)
{% endhint %}

## Follow These Steps

### **1.** Launch the Arduino IDE application

### **2. Membuka Contoh Program**&#x20;

{% hint style="info" %}
You can open the programme code in the Arduino IDE via **File > Example > Antares ESP HTTP > ESP8266-Simple-Project > GET\_DATA\_RELAY\_LED.**&#x20;
{% endhint %}

Here is the programme code of the  **GET\_DATA\_RELAY\_LED** example.

```cpp
#include <AntaresESPHTTP.h>  // Include the AntaresESP8266HTTP library

#define ACCESSKEY "YOUR-ACCESS-KEY"    // Replace with your Antares account access key
#define WIFISSID "YOUR-WIFI-SSID"      // Replace with your Wi-Fi SSID
#define PASSWORD "YOUR-WIFI-PASSWORD"  // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"  // Antares project name
#define deviceName "YOUR-DEVICE-NAME"        // Name of the device receiving data from POSTMAN

AntaresESPHTTP antares(ACCESSKEY);  // Initialize AntaresESP8266HTTP with the access key

#define relayPin D6  // Digital pin for controlling the relay
#define ledPin D2    // Digital pin for controlling the LED

const unsigned long interval = 10000;  // 10 seconds interval to send message
unsigned long previousMillis = 0;      // Will store the last time a message was sent

void setup() {
  Serial.begin(115200);                        // Initialize serial communication
  antares.setDebug(true);                      // Enable Antares library debug mode
  antares.wifiConnection(WIFISSID, PASSWORD);  // Connect to WiFi using provided SSID and password

  pinMode(relayPin, OUTPUT);  // Set relay pin as output
  pinMode(ledPin, OUTPUT);    // Set LED pin as output
}

void loop() {

  if (millis() - previousMillis > interval) {  // Check if it's time to send a message
    previousMillis = millis();                 // Update the last sent time

    antares.get(projectName, deviceName);  // Get data from Antares

    if (antares.getSuccess()) {                       // Check if data retrieval was successful
      String dataValue = antares.getString("Relay");  // Get the value of "Relay" data field
      String ledValue = antares.getString("LED");     // Get the value of "LED" data field

      // Control relay based on received data
      if (dataValue == "1") {
        digitalWrite(relayPin, HIGH);  // Turn on the relay
      } else if (dataValue == "0") {
        digitalWrite(relayPin, LOW);  // Turn off the relay
      }

      // Control LED based on received data
      if (ledValue == "1") {
        digitalWrite(ledPin, HIGH);  // Turn on the LED
      } else if (ledValue == "0") {
        digitalWrite(ledPin, LOW);  // Turn off the LED
      }

      Serial.println("Received data - Relay: " + dataValue + " | LED: " + ledValue);
    }
  }
}
```

### **3.** Set WiFi Credential and Antares Credential in Program Code

Change the HTTP Protocol parameters in the following variables **\*ACCESSKEY, \*WIFISSID, \*PASSWORD, \*projectName**, and **\*deviceName**. Adjust to the parameters in the Antares console.

```cpp
#define ACCESSKEY "your-access-key" // Replace with your Antares account access key
#define WIFISSID "your-wifi-ssid" // Replace with your Wi-Fi SSID
#define PASSWORD "your-wifi-password" // Replace with your Wi-Fi password

#define projectName "YOUR-APPLICATION-NAME"     // Antares project name
#define deviceName "YOUR-DEVICE-NAME-"    // Name of the device receiving data from POSTMAN
```

{% hint style="info" %}
The **\*Access key** parameter is obtained from your Antares account page.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FZ5yM1lwupP5bKn5xPAYM%2Fimage.png?alt=media&amp;token=27629183-068c-4034-ad47-65d054cae580" alt=""><figcaption><p>Access Key Location on Antares Account Page</p></figcaption></figure>

{% hint style="info" %}
The **WIFISSID** parameter is obtained from the name of the **Wifi / Hotspot** that is currently being used by you. for example in the image below.
{% endhint %}

<div align="center" data-full-width="true"><figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/bAEcmOkmcUDBUIBx6ddw/WIFI%20SSID.jpeg" alt="" width="375"><figcaption><p>The WiFi SSID being used.</p></figcaption></figure></div>

{% hint style="info" %}
The **\*PASSWORD** parameter is obtained from the **WiFi password** you are currently using.
{% endhint %}

{% hint style="info" %}
The parameters **\*projectName, \*deviceName** are obtained from the **Application Name** and **Device Name** that have been created in the Antares account.
{% endhint %}

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FpCDlXW91wNbFOUSnRu8n%2Fimage.png?alt=media&amp;token=17b1b6fa-b16f-42fd-858a-9ec78123a3b0" alt=""><figcaption><p>Application Name Display</p></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2Fk51Qg3KUer8R2BYju3xQ%2Fimage.png?alt=media&amp;token=8532fd4b-ae34-44a6-9438-88a46f1f7b4e" alt=""><figcaption><p>Device Name Display</p></figcaption></figure>

### **4. Compile and Upload Program**

Connect the **ESP8266 WEMOS D1R2** with your computer and make sure the **Communication Port** is read.

{% hint style="info" %}
On Windows operating systems, checking can be done via **Device Manager**. If your **ESP8266 WEMOS D1R2** is read, the **USB-Serial CH340** appears with the port adjusting the port availability (in this case it reads **COM4**).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/26abmVvKzSWogDb4qo1C/Device%20Manager%20Windows.jpeg" alt=""><figcaption><p>Device Manager image on Windows.</p></figcaption></figure>

Set up the **ESP8266 WEMOS D1R2** board by clicking **Tools > Board > esp8266** in the Arduino IDE, then make sure the one used is **LOLIN (WEMOS) D1 R2 & mini**. Select the port according to the communication port that is read (in this case COM4). The result will look like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/oRzTLzJkUYH9jFFcxoC0/Menu%20Tools%20Arduino%20IDE.jpeg" alt="" width="563"><figcaption><p>Image of Tools Menu on Arduino IDE</p></figcaption></figure>

After all the setup is complete, upload the programme by pressing the arrow icon as shown below. Wait for the compile and upload process to finish.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/56l3rHVZc4jBd4pPBZEw/Icon%20Verify%20dan%20Upload%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Verify and Upload icons in the Arduino IDE.</p></figcaption></figure>

{% hint style="info" %}
**The Tick icon** on the Arduino IDE is just the verify process. Usually used to **Compile** the programme to find out whether there are errors or not.&#x20;

**The Arrow icon** on the Arduino IDE is the verify and upload process. Usually used to **Compile** the programme as well as Flash the programme to the target board.
{% endhint %}

If the programme upload is successful, it will look like the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/hqKxRuMW4Yxm2Zj3fKPQ/Halaman%20Arduino%20IDE%20Setelah%20Upload%20Berhasil.jpeg" alt=""><figcaption><p>Arduino IDE page image after successful upload.</p></figcaption></figure>

After uploading the programme, you can view the **serial monitor** to debug the programme. The **serial monitor** icon is shown in the following image.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/B4k1aFEeYrjwrDkAn4NI/Icon%20Serial%20Monitor%20pada%20Arduino%20IDE.jpeg" alt=""><figcaption><p>Image of the Serial Monitor Icon in the Arduino IDE.</p></figcaption></figure>

Set the **serial baud rate** to 115200 and select BothNL & CR. The result will look like the following image.

{% hint style="danger" %}
Make sure the **serial baud rate** matches the value defined in the programme code. If the **serial baud rate** is not the same between the **programme code** and the **serial monitor**, the ASCII characters will not be read properly.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/OVP9UHYol9XRizuMJkgc/Serial%20Monitor%20GET_RELAYLED_HTTP.jpeg" alt=""><figcaption><p>Serial Monitor Image</p></figcaption></figure>

### **5. Setup POSTMAN Software**

In this step you need POSTMAN software, you can input the **end-point, request header** and **request** body first by following the following format.

**End Point**&#x20;

<table data-header-hidden><thead><tr><th width="134.5"></th><th></th></tr></thead><tbody><tr><td><strong>Method</strong></td><td>POST</td></tr><tr><td><strong>URL</strong></td><td>https://platform.antares.id:8443/~/antares-cse/antares-id/<mark style="color:red;">your-application-name/your-device-name</mark></td></tr></tbody></table>

{% hint style="info" %}
Customise <mark style="color:red;">your-application-name</mark> and <mark style="color:red;">your-device-name</mark> to the names registered to your Antares account.
{% endhint %}

**Request Header**

<table data-header-hidden><thead><tr><th width="134.5"></th><th></th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Value</strong></td></tr><tr><td>X-M2M-Origin</td><td><mark style="color:red;">your-access-key</mark></td></tr><tr><td>Content-Type</td><td>application/json;ty=4</td></tr><tr><td>Accept</td><td>application/json</td></tr></tbody></table>

{% hint style="info" %}
Customise <mark style="color:red;">your-access-key</mark> with your Antares account access key.
{% endhint %}

The result will be as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/7p87ee4RDHN5micRaC2h/POSTMAN%201.png" alt=""><figcaption><p>Image of end-point and header settings in POSTMAN software.</p></figcaption></figure>

Next, you need to input the request body by following the following format.

**Request Body**

```json
{
  "m2m:cin": {
    "con": "{\"key1\":\"integer-value\", \"key2\":\"string-value\", \"keyN\":\"valueN\"}"
  }
}
```

In the POSTMAN software, select the **Body** tab then select **raw** and enter the payload according to the request body you want to use as shown below.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/gCm9rHiAXIzQI32ZKM3I/POSTMAN2.png" alt=""><figcaption><p>Image of the contents of the payload request body in POSTMAN software.</p></figcaption></figure>

{% hint style="info" %}
Customise the contents of the "con" field according to the "key" and "value" you want to send.
{% endhint %}

### **6.** Sending POSTMAN Messages to the Antares Server

After the POSTMAN software setup is complete, it's time to send the POST command. The "Relay" field is filled with the string "1" for **RELAY ON** or "0" for **RELAY OFF**. The "LED" field is filled with the string "1" for **LED ON** or "0" for **LED OFF**. The "Relay" and "LED" fields are command messages to control the Relay and LED that will be sent via HTTP protocol to the Antares server.

```json
{
  "m2m:cin": {
    "con": "{\"Relay\":\"0\", \"LED\":\"0\"}" 
  }
}
```

{% hint style="info" %}
Customise the contents of the "Relay" and "LED" fields according to the downlink command you want to send. Give a value of "1" or "0" to switch on or off.
{% endhint %}

If you have finished filling in the "Relay" and "LED" fields, then press the Send button on the POSTMAN software. Looks like the following picture.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/o3pVsnC0IB2yyOIBWDEs/Gambar%20isi%20pesan%20pada%20software%20POSTMAN..jpeg" alt=""><figcaption><p>Image of the message content in POSTMAN software.</p></figcaption></figure>

If the HTTP request through POSTMAN software is successful, the POSTMAN software response section will appear as shown below

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/aumZexqmnsTJHQuUtXRa/Gambar%20response%20hit%20API%20pada%20software%20POSTMAN..jpeg" alt=""><figcaption><p>Image of API hit response in POSTMAN software.</p></figcaption></figure>

### **7.** Check Data in Antares

After uploading the programme successfully, then open the device antares page and see if the data has been successfully sent.

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FvTyNO1av9abARRYXgbB4%2Fimage.png?alt=media&amp;token=9671f702-e190-4358-942a-42356601969d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3873791589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cujmJ5QHdJaAjH815aZ%2Fuploads%2FpBeyzeaak38f21zckD6Q%2Fimage.png?alt=media&amp;token=602c3603-ddc4-4018-be4e-564ae268ec12" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Data received by **ESP8266** with HTTP protocol in the form of Relay and LED variables.
{% endhint %}

### 8. Output program&#x20;

Get data from the **Antares IoT Platform** and drive the relay and switch on the LED.

<figure><img src="https://content.gitbook.com/content/7cujmJ5QHdJaAjH815aZ/blobs/9UBDbn9nNMFrh6i26Pm4/Relay%20ON%20LED%20ON.jpeg" alt=""><figcaption><p>Relay and LED ON Result</p></figcaption></figure>




---

[Next Page](/llms-full.txt/1)

