Giter VIP home page Giter VIP logo

asynctelegram's Introduction

AsyncTelegram

This library is mainly inspired from https://github.com/shurillu/CTBot


Introduction

AsyncTelegram is an Arduino class for managing Telegram Bot on ESP8266 and ESP32 platform.

When you add the possibility to send a message from your IoT application to a Telegram Bot, this should be only an additional "features" and not the core of your firmware. Unfortunately, most of Telegram libraries, stucks your micro while communicating with the Telegram Server in order to read properly the response and parse it.

AsyncTelegram do this job in async way and not interfee with the rest of code especially on ESP32 where we can take advantage of dual core architecture and move the task on the free core (core 0). With the ESP8266 this is not possible, so sending/receive tasks are splitted in two different moments, avoiding close the server connection in the meantime (https handshaking could be very slow).

It relies on ArduinoJson v6 library so, in order to use a AsyncTelegram object, you need to install the ArduinoJson library first (you can use library manager).

You also need to install the ESP8266 Arduino Core and Library or the ESP32 Arduino Core and Library.

Don't you know Telegram bots and how to setup one? Check this.

  • this library work with ArduinoJson library V6.x _

Features

  • Send and receive non-blocking messages to Telegram bot
  • Send photo both from url and from local filesystem (SPIFFS, LittleFS, FFAT, SD etc etc )
  • Inline keyboards
  • Reply keyboards
  • Receive localization messages
  • Receive contacts messages
  • Http communication on ESP32 work on own task pinned to Core0

To do

  • Send documents

Supported boards

The library works with the ESP8266 and ESP32 chipset.

Simple and responsive usage

Take a look at the examples provided in the examples folder.

Reference

Here how to use the library.

  • 1.0.8 Now you can update ESP firmware with a Telegram message (thanks to Vladimir!). Added example and instructions
  • 1.0.7 Added example for take picture with ESP32-CAM board
  • 1.0.6 AsyncTelegram now can send also pictures
  • 1.0.5 Added possibility to forward a messege to a puclic channel (bot must be one of admins) or to a specific user
  • 1.0.4 Fixed ArduinoJson ARDUINOJSON_DECODE_UNICODE define
  • 1.0.3 Bug fixes
  • 1.0.2 Added method for update Telegram server fingerprint (with online service https://www.grc.com/fingerprints.htm )
  • 1.0.1 Now is possible assign a callback function for every "inline keyboard button"
  • 1.0.0 Initial version

asynctelegram's People

Contributors

cotestatnt avatar shurillu avatar vlw avatar gnalbandian avatar per1234 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.