Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hafidhh committed Nov 26, 2022
0 parents commit 591d83c
Show file tree
Hide file tree
Showing 14 changed files with 669 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Hafidh Hidayat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Callmebot ESP32 Library
CallMeBot Library for ESP32
## WhatsApps Massage
Follow the instruction on https://www.callmebot.com/blog/free-api-whatsapp-messages/ to get apiKey
## Facebook Message
Follow the instruction on https://www.callmebot.com/blog/free-api-facebook-messenger/ to get apiKey
## Telegram
### Telegram Call
You need to authorize CallMeBot to contact you using this [link](https://api2.callmebot.com/txt/login.php). Or alternatively, you can start the bot sending /start to @CallMeBot_txtbot.
### Telegram Message
You need to authorize CallMeBot to contact you using this [link](https://api2.callmebot.com/txt/login.php). Or alternatively, you can start the bot sending /start to @CallMeBot_txtbot.
### Telegram Group Message
Follow the instruction on https://www.callmebot.com/blog/telegram-group-messages-api-easy/ to get apiKey.


CallMeBot Website: https://www.callmebot.com/
36 changes: 36 additions & 0 deletions examples/Facebook_Message/Facebook_Message.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Example Facebook Message
// Github :
// https://github.com/hafidhh
// https://github.com/hafidhh/Callmebot-ESP32

#include <WiFi.h>
#include <Callmebot_ESP32.h>

const char* ssid = "your_ssid";
const char* password = "your_password";

// Note :
// apiKey : Follow instruction on https://www.callmebot.com/blog/free-api-facebook-messenger/
String apiKey = "your_apiKey";
String messsage = "your_text_message";

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

WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());

// Facebook Message
facebookMessage(apiKey, messsage);
}

void loop() {

}
38 changes: 38 additions & 0 deletions examples/Telegram_Call/Telegram_Call.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Example Telegram Call
// Github :
// https://github.com/hafidhh
// https://github.com/hafidhh/Callmebot-ESP32

#include <WiFi.h>
#include <Callmebot_ESP32.h>

const char* ssid = "your_ssid";
const char* password = "your_password";

// Note :
// username : @username or phonenumber (Indonesia +62, Example: "+62897461238")
// You need to authorize CallMeBot to contact you using this link : https://api2.callmebot.com/txt/login.php.
// Or alternatively, you can start the bot sending /start to @CallMeBot_txtbot.
String username = "@your_username/phonenumber";
String text = "your_text_message";

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

WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());

// Telegram Call
telegramCall(username, text);
}

void loop() {

}
36 changes: 36 additions & 0 deletions examples/Telegram_Group_Message/Telegram_Group_Message.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Example Telegram Group Message
// Github :
// https://github.com/hafidhh
// https://github.com/hafidhh/Callmebot-ESP32

#include <WiFi.h>
#include <Callmebot_ESP32.h>

const char* ssid = "your_ssid";
const char* password = "your_password";

// Note :
// apiKey : Follow instruction on https://www.callmebot.com/blog/telegram-group-messages-api-easy/
String apiKey = "@your_username/phonenumber";
String message = "your_text_message";

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

WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());

// Telegram Group Message
telegramGroup(apiKey, message);
}

void loop() {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Example Telegram Message Multi
// Github :
// https://github.com/hafidhh
// https://github.com/hafidhh/Callmebot-ESP32

#include <WiFi.h>
#include <Callmebot_ESP32.h>

const char* ssid = "your_ssid";
const char* password = "your_password";

// Note :
// username : @username or phonenumber (Indonesia +62, Example: "+62897461238")
// You need to authorize CallMeBot to contact you using this link : https://api2.callmebot.com/txt/login.php.
// Or alternatively, you can start the bot sending /start to @CallMeBot_txtbot.
String username1 = "@your_username1/phonenumber1";
String username2 = "@your_username2/phonenumber2";
String apiKey = "your_apiKey";
String messsage = "your_text_message";

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

WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());

//Telegram Message
String username = username1+"|"+username2;
telegramMessage(username, messsage);
}

void loop() {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Example Telegram Message
// Github :
// https://github.com/hafidhh
// https://github.com/hafidhh/Callmebot-ESP32

#include <WiFi.h>
#include <Callmebot_ESP32.h>

const char* ssid = "your_ssid";
const char* password = "your_password";

// Note :
// username : @username or phonenumber (Indonesia +62, Example: "+62897461238")
// You need to authorize CallMeBot to contact you using this link : https://api2.callmebot.com/txt/login.php.
// Or alternatively, you can start the bot sending /start to @CallMeBot_txtbot.
String username = "@your_username/phonenumber";
String apiKey = "your_apiKey";
String messsage = "your_text_message";

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

WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());

//Telegram Message
telegramMessage(username, messsage);
}

void loop() {

}
37 changes: 37 additions & 0 deletions examples/Whatsapp_Message/Whatsapp_Message.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Example Whatsapp Message
// Github :
// https://github.com/hafidhh
// https://github.com/hafidhh/Callmebot-ESP32

#include <WiFi.h>
#include <Callmebot_ESP32.h>

const char* ssid = "your_ssid";
const char* password = "your_password";
// Note :
// phoneNumber : Indonesia +62, Example: "+62897461238"
// apiKey : Follow instruction on https://www.callmebot.com/blog/free-api-whatsapp-messages/
String phoneNumber = "your_phonenumber";
String apiKey = "your_apiKey";
String messsage = "your_text_message";

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

WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());

// Whatsapp Message
whatsappMessage(phoneNumber, apiKey, messsage);
}

void loop() {

}
17 changes: 17 additions & 0 deletions keyword.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
###########################################
# Syntax Coloring Map For Callmebot-ESP8266
###########################################

###########################################
# Datatypes (KEYWORD1)
###########################################

###########################################
# Methods and Functions (KEYWORD2)
###########################################

whatsappMessage KEYWORD2
facebookMessage KEYWORD2
telegramMessage KEYWORD2
telegramGroup KEYWORD2
telegramCall KEYWORD2
17 changes: 17 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Callmebot ESP32",
"version": "1.0.0",
"keywords": "communication, REST, esp32, arduino",
"description": "Whatapp message, Telegram call, Telegram message, Telegram group message, Facebook message.",
"repository": {
"type": "git",
"url": "https://github.com/hafidhh/Callmebot_ESP8266"
},
"authors": [{
"name": "hafidhh",
"email": "hafidhhidayat@hotmail.com",
"maintainer": true
}],
"frameworks": ["arduino"],
"platforms": ["espressif32"]
}
9 changes: 9 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Callmebot ESP32
version=1.0.0
author=hafidhh
maintainer=hafidhh <hafidhhidayat@hotmail.com>
sentence=Callmebot library for ESP32
paragraph=Whatapp message, Telegram call, Telegram message, Telegram group message, Facebook message
category=Communication
url=https://github.com/hafidhh/Callmebot_ESP32
architectures=esp32
Loading

0 comments on commit 591d83c

Please sign in to comment.