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 version

0.7.3

Quick start

https://antoiot.gitbooks.io/th-doc/content/index.html

Port

Make sure that your network or firewall are allowed to connect following port

  • HTTP: 80
  • MQTT: 1883

Installation

  • Download and install virtual COM port for hardware connection

For NodeMCU version 0.9 http://www.electrodragon.com/w/CH341 For NodeMCU Version 1.0 https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx

  • Download and install Arduino IDE 1.6.9 or above from https://www.arduino.cc/en/Main/Software
  • After installation completed, open Arduino IDE and click Preferences
  • Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json in Additional Board Manager URLs
  • Install ES8266 main library by go to Tools > Boards Manager. Search for esp8266 and click install
  • Download this library from and extract your file into folder Documents\Arduino\Libraries
  • Register and login to https://www.anto.io and start build your IoT project
  • Have fun & Share!

Quick start usage example - Control 3 LED

#include <AntoIO.h>

const char *ssid = "your access point SSID";
const char *pass = "access point password";
const char *user = "your username";
const char *token = "your token";
const char *thing = "your thing";

// initialize AntoIO instance
AntoIO anto(user, token, thing);

int value = 0;

void setup() {
  Serial.begin(115200);
  delay(10);

  Serial.println();
  Serial.println();
  Serial.print("Anto library version: ");
  Serial.println(anto.getVersion());


  Serial.print("\nTrying to connect ");
  Serial.print(ssid);
  Serial.println("...");

  anto.begin(ssid, pass, messageReceived);
  Serial.println("\nConnected Anto done");

  //Subscript Channels
  anto.sub("LED1");
  anto.sub("LED2");
  anto.sub("LED3");

  //Port output
  pinMode(D1,OUTPUT);
  pinMode(D2,OUTPUT);
  pinMode(D3,OUTPUT);
}

void loop() {
  anto.mqtt.loop();
}


// a callback function for arriving data.
void messageReceived(String thing, String channel, String payload) {

    Serial.print("Recieved: ");
    Serial.print(thing);
    Serial.print("/");
    Serial.print(channel);
    Serial.print("-> ");
    Serial.println(payload);

    if(channel.equals("LED1")){
        value = payload.toInt();
        if(value == 1){
            digitalWrite(D1,HIGH);
        }
        else{
            digitalWrite(D1,LOW);
        }

    }
    else if(channel.equals("LED2")){
        value = payload.toInt();
        if(value == 1){
            digitalWrite(D2,HIGH);
        }
        else{
            digitalWrite(D2,LOW);
        }
    }
    else if(channel.equals("LED3")){
        value = payload.toInt();
        if(value == 1){
            digitalWrite(D3,HIGH);
        }
        else{
            digitalWrite(D3,LOW);
        }
    }
}
TODO
  • Fix AntoMQTT::messageHandler() after reconnected from AntoIO::mqtt.loop()
  • Other callback functions (OnPublished, OnDisconnected, OnConnected)
  • Request via HTTPS
  • Increase speed of keep-alive message
  • Timer interrupt and remove AntoMQTT::loop()
Owner
Anto.io Internet of Things platform
One Stop Solution Internet of Things Platform for Professional
Anto.io Internet of Things platform
Similar Resources

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

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

Arduino library for making an IHC in or output module using an Arduino

Introduction This is an Arduino library for making an IHC in or output module using an Arduino. (IHC controller is a home automation controller made b

Mar 26, 2020

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

Arduino TopLevel Client for aliyun IoT Platform

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

Dec 13, 2022

MQTT client for Arduino

ArduinoMqtt About MQTT Client library for Arduino based on the Eclipse Paho project. This library bundles the C/C++ MQTTPacket library of the Eclipse

Nov 11, 2022

Arduino client for the Serial To TCP Bridge Protocol PC side service

Arduino Serial to TCP Bridge Client Arduino client for the Serial To TCP Bridge Protocol gateway service. Open a TCP connection to a server from the A

Apr 12, 2022

Websocket client for Arduino, with fast data send

Websocket client for Arduino, with fast data send This is a simple library that implements a Websocket client running on an Arduino. Rationale For our

Aug 4, 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
Comments
  • Use correct field separator in keywords.txt

    Use correct field separator in keywords.txt

    Each field of keywords.txt is separated by a single true tab. Leading spaces on a keyword identifier causes it to not be recognized by the Arduino IDE. On Arduino IDE 1.6.5 and newer an unrecognized keyword identifier causes the default editor.function.style highlighting to be used (as with KEYWORD2, KEYWORD3, LITERAL2).

    Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords

  • Move example sketches to appropriately named folders

    Move example sketches to appropriately named folders

    The Arduino IDE requires the sketch folder name to match the filename of the primary sketch file. This change causes the example sketch to be accessible via the Arduino IDE's File > Examples > LIBRARYNAME menu after the library is installed.

    Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#library-examples

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
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
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
Arduino Arduino library for the CloudStorage server project. The library provides easy access to server-stored values and operations.

Arduino-CloudStorage Arduino/ESP8266 library that allows you to easly store and retreive data from a remote (cloud) storage in a key/value fashion. Cl

Jan 30, 2022
Arduino client library for websocket based communication with archer panels.

ArduinoArcherPanelClient Arduino client library for websocket based communication with archer panels. Archer Cloud panels provide you an easy and fast

May 18, 2018
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
OAuth 1.0 client library for Arduino

Arduino_OAuth Library for Arduino OAuth 1.0 client library for Arduino. This library depends on ArduinoHttpClient and ArduinoBearSSL. License Copyrigh

Dec 13, 2022
A library to simplify the process of getting and storing data to Antares IoT Platform through HTTP on ESP8266.
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

Jul 2, 2021
A library to simplify the process of subscribing and publishing data to Antares IoT Platform through MQTT on ESP8266.
A library to simplify the process of subscribing and publishing data to Antares IoT Platform through MQTT on ESP8266.

Antares ESP8266 MQTT A Library to simplify the process of MQTT publication and subscription to Antares IoT Platform using ESP8266. This library works

Mar 9, 2022