A library to simplify the process of getting and storing data to Antares IoT Platform through HTTP on ESP8266.

Antares ESP8266 HTTP

This is the documentation for Antares ESP8266 library.

This library is meant to simplify the process of retrieving and deploying data to Antares IoT Platform's REST API using ESP8266 with Arduino framework.

This library has been tested with Arduino ESP8266 version 2.5.0.

For dependencies, this library uses bblanchon's ArduinoJson v5 and is already included in the bundle.

For more information regarding the platform itself, please visit Antares' official website.

Installation

Arduino IDE

  1. Install ESP8266 Core for Arduino. For more information please refer to the ESP8266 Core for Arduino's installation manual
  2. Download the latest release and add this library into Arduino IDE (Sketch > Include Library > Add .ZIP Library...)

Examples

Please note that AntaresStoreSecure and AntaresGetLatestSecure are preferred than AntaresStoreData and AntaresGetLatestSecure because they use HTTPS (port 8443) rather than HTTP (port 8080).

  • AntaresCreateDevice - Deploy a device into a project
  • AntaresGetAllData - Fetch all data stored in a project device
  • AntaresGetAllDevice - Fetch all devices recorded in a project
  • AntaresGetLatestData - Fetch the latest data stored in a project device
  • AntaresGetLatestSecure - Fetch the latest data stored in a project device through HTTPS
  • AntaresStoreData - Deploy data into a project device
  • AntaresStoreSecure - Deploy data into a project device through HTTPS

API Reference

Class AntaresESP8266HTTP

All methods and properties need to be insantiated in order to use them.

Constructor

  • AntaresESP8266HTTP(String ACCESSKEY) The constructor of class AntaresESP8266HTTP. Put your Antares account access key as the parameter. The access key should be an Arduino String datatype.

Connect to WiFi (Secure)

  • void wifiConnection(String projectName, String deviceName)
    Connect to WiFi with SNTP matching in order to match with antares' CA Certificate for HTTPS connection (port 8443 in Antares).

Connect to WiFi (Non-secure)

  • void wifiConnectionNonSecure(String projectName, String deviceName)
    Connect to WiFi without SNTP matching. Use this if you don't want to use HTTP (port 8080 in Antares) instead of HTTPS.

Get Latest Data

  • void getNonSecure(String projectName, String deviceName)
    (Not recommended) Fetch the latest data from your Antares project device through HTTP port 8080 (non-secure).
    The data will be stored in the jsonGetString property of class AntaresESP8266HTTP

  • void get(String projectName, String deviceName)
    (Recommended) Fetch the latest data from your Antares project device through HTTPS port 8443 (secure).
    The data will be stored in the jsonGetString property of class AntaresESP8266HTTP

  • void getSuccess()
    Check if the latest data is successfully received.

  • String getString(String key) or String getString(String key, String key2)
    Get String data by accessing the JSON key from jsonGetString.

  • int getInt(String key) or int getInt(String key, String key2)
    Get int data by accessing the JSON key from jsonGetString.

  • float getFloat(String key) or float getFloat(String key, String key2)
    Get float data by accessing the JSON key from jsonGetString.

  • double getDouble(String key) or double getDouble(String key, String key2)
    Get double data by accessing the JSON key from jsonGetString.

Store Data

  • void add(String key, value) or void add(String key, String key2, value)
    Insert a JSON key-value data to the property jsonString of class AntaresESP8266HTTP. The value parameter is overloaded. The supported data types for the value parameter are:

    • String
    • int
    • float
    • double
  • void sendNonSecure(String projectName, String deviceName)
    (Not recommended) Send the data stored in jsonString property of class AntaresESP8266HTTP through HTTP port 8080 (non-secure).

  • void send(String projectName, String deviceName)
    (Recommended) Send the data stored in jsonString property of class AntaresESP8266HTTP through HTTPS port 8443 (secure).

Create Device

  • String createDevice(String projectName, String deviceName)
    (Non-secure) Create a device in your Antares project.

Get All Data ID

  • String retrieveAllData(String projectName, String deviceName, int limit=0)
    (Non-secure) Get all data ID in your Antares project. Specify the limit parameter if you want to limit the amount of data ID.

Get All Device ID

  • String retrieveAllDevice(String projectName, int limit=0)
    (Non-secure) Get all device ID in your Antares project. Specify the limit parameter if you want to limit the amount of device ID.

Powered by Telkom Indonesia

Similar Resources

This is a simple Arduino build that is capable of shiny hunting legendaries in 4th generation pokemon games through soft resetting.

This is a simple Arduino build that is capable of shiny hunting legendaries in 4th generation pokemon games through soft resetting.

This is a simple Arduino build that is capable of shiny hunting legendaries in 4th generation pokemon games through soft resetting.

May 6, 2022

Anto client library for ESP8266-Arduino

Anto client library for ESP8266-Arduino ESP8266-AntoIO provides common and easy way to connect your ESP8266 to Anto.io IoT platform service. Stable ve

Dec 1, 2021

Library for auto Light Emitting Diode (LED) control based on the timer function of the ESP8266

Library for auto Light Emitting Diode (LED) control based on the timer function of the ESP8266. The purpose is to have LED running for their own without the need to to such things like blinking on your own.

Jan 18, 2022

ESP8266 examples and toolchain setup

README These apps accomplish the following: -- ESP8266-EVB-blinkLED : Blink by green LED on ESP8266-EVB -- arduino_style : -- esphttpd : Advanced web-

Oct 22, 2022

Simple web interface builder for esp8266 and ESP32

Simple web interface builder for esp8266 and ESP32

GyverPortal Простой конструктор веб интерфейса для esp8266 и ESP32 Простой конструктор - делаем страницы без знаний HTML и CSS Библиотека является обё

Jan 8, 2023

Connecting an ESP8266 to a Google Calendar service to turn an useless "On Air" sign into a smart meeting indicator

Connecting an ESP8266 to a Google Calendar service to turn an useless

ESP8266-GoogleCalendar Intro I had an useless "On Air" sign hanging around my home, and I thought it would be cool to connect it to my Google Calendar

Jan 20, 2022

ESP8266 MQTT Sharp-fu-y30 air purifier controller

ESP8266 MQTT Sharp-fu-y30 air purifier controller

ESP8266 MQTT Sharp-fu-y30 air purifier controller Disclaimer Note: if you decide to do those changes to your air purifier, you take all the responsibi

Dec 6, 2022

Arduino HTTP Client library

ArduinoHttpClient ArduinoHttpClient is a library to make it easier to interact with web servers from Arduino. Derived from Adrian McEwen's HttpClient

Jan 6, 2023

High level HTTP Request Library that gives a javascript fetch like API.

Fetch for Arduino fetch is a high level HTTP Request Library that gives you a javascript fetch like API. ResponseOptions options; options.method = "PO

Dec 28, 2022
Comments
  • Version 1.3.3 Error AntaresESP8266HTTP.cpp

    Version 1.3.3 Error AntaresESP8266HTTP.cpp

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp: In member function 'void AntaresESP8266HTTP::get(String, String)':

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:202:23: error: 'class BearSSL::WiFiClientSecure' has no member named 'setCACert_P'

    202 | bool res = client.setCACert_P(caCert, caCertLen);

      |                       ^~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:222:16: error: 'class BearSSL::WiFiClientSecure' has no member named 'verifyCertChain'

    222 | if (client.verifyCertChain(_serverNoHttp)) {

      |                ^~~~~~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp: In member function 'String AntaresESP8266HTTP::getRaw(String, String)':

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:274:23: error: 'class BearSSL::WiFiClientSecure' has no member named 'setCACert_P'

    274 | bool res = client.setCACert_P(caCert, caCertLen);

      |                       ^~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:294:16: error: 'class BearSSL::WiFiClientSecure' has no member named 'verifyCertChain'

    294 | if (client.verifyCertChain(_serverNoHttp)) {

      |                ^~~~~~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp: In member function 'void AntaresESP8266HTTP::send(String, String)':

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:439:23: error: 'class BearSSL::WiFiClientSecure' has no member named 'setCACert_P'

    439 | bool res = client.setCACert_P(caCert, caCertLen);

      |                       ^~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:459:16: error: 'class BearSSL::WiFiClientSecure' has no member named 'verifyCertChain'

    459 | if (client.verifyCertChain(_serverNoHttp)) {

      |                ^~~~~~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp: In member function 'void AntaresESP8266HTTP::sendRaw(String, String, String)':

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:512:23: error: 'class BearSSL::WiFiClientSecure' has no member named 'setCACert_P'

    512 | bool res = client.setCACert_P(caCert, caCertLen);

      |                       ^~~~~~~~~~~
    

    C:\Users\ADMIN\Documents\Arduino\libraries\antares-esp8266-http-master\src\AntaresESP8266HTTP.cpp:532:16: error: 'class BearSSL::WiFiClientSecure' has no member named 'verifyCertChain'

    532 | if (client.verifyCertChain(_serverNoHttp)) {

      |                ^~~~~~~~~~~~~~~
    

    exit status 1

Arduino TopLevel Client for aliyun IoT Platform

运行于 arduino 的 阿里云 IoT 接入 SDK,在底层连接的基础上增加数据回调绑定、发送数据和事件等 api 的封装,免去自己解析数据的痛苦

Dec 13, 2022
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485

ABB Aurora protocol You can refer the complete documentation on my site ABB Aurora PV inverter library for Arduino, esp8266 and esp32 I create this li

Nov 22, 2022
ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT Cloud

ArduinoIoTCloud What? The ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT

Dec 16, 2022
The Approximate Library is a WiFi Arduino library for building proximate interactions between your Internet of Things and the ESP8266 or ESP32
The Approximate Library is a WiFi Arduino library for building proximate interactions between your Internet of Things and the ESP8266 or ESP32

The Approximate Library The Approximate library is a WiFi Arduino Library for building proximate interactions between your Internet of Things and the

Dec 7, 2022
AlmaviosLitMqtt allows an easy connection(IoT) to cloud providers

AlmaviosLitMqtt A simple arduino library provisioning a client to connect with Cloud Providers, via MQTT. It is looking for agnostic connection. This

Nov 20, 2020
Server side minimalistic HTTP protocol implementation for the Arduino platform.

ArduinoHttpServer Server side minimalistic Object Oriented HTTP protocol implementation for the Arduino platform. ArduinoHttpServer is a simple HTTP r

Oct 17, 2022
Arduino library for sending email and SMS from nothing but the ESP8266!
Arduino library for sending email and SMS from nothing but the ESP8266!

Did you know your ESP8266 could send Email and SMS without any special hardware or paid services like Twilio? With AlertMe, your ESP8266 project can:

Feb 24, 2022
Library for ESP32 and ESP8266 to work with the Fernando K app

App Fernando K This library is meant to work with the Fernando K app https://play.google.com/store/apps/details?id=com.appfernandok https://apps.apple

Aug 5, 2020
A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)
A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)

Arduino Websockets A library for writing modern websockets applications with Arduino (see prerequisites for supported platforms). This project is base

Dec 26, 2022
This Arduino IDE for ArduCAM ESP8266 UNO Board with Integrated ArduCAM Library and Examples
This Arduino IDE for ArduCAM ESP8266 UNO Board with Integrated ArduCAM Library and Examples

ArduCAM_ESP8266_UNO Please use josn board manager script from http://www.arducam.com/downloads/ESP8266_UNO/package_ArduCAM_index.json to download ESP8

Jan 7, 2023