First of all, I would like to thank WifiSafe for providing a Vera Controller to test the CallMeBot API integration in this great device.
The integration is pretty simple through a LUA Script. Just follow these step by step instructions to receive Telegram Phone Calls from the Vera's Scenes. The bot will make the Telegram Phone call and when you answer, it way say the message that you want in your language.
1) Create or Edit a Scene from the Vera Dashboard
2) Go to the Step 3 (called "Finish the scene") and Add a Luup Code below the Section called "Also, Execute the following Luup Code".
3) Insert the following code in the TextBox
local Message = "..." local User = "..." local Language = "..." local Repeat = "..." luup.inet.wget('http://api2.callmebot.com/start.php?source=vera&user=' .. User .. '&text=' .. Message .. '&lang=' .. Language .. '&rpt=' .. Repeat,5);
Where:
[Message]: Is the message that you want the bot to speak. Use the symbol "_" instead of spaces.
[User]: Is your Telegram Username or phone number including the country code (without spaces). Important!: You need to authorize CallMeBot to contact you here. This is required to avoid spam.
[Language]: Is the Language that you want the bot to speak. Check here the list of available languages (use column "Voice Name" to specify the voice and language desired). Please note that only the Standard voices are supported. (do not use the Premium Wavenet ones).
[Repeat]: Is to determine how many times you want the Bot to repeat the message. 0 will loop forever, 1 will say the message only once and then end the call. 2 will say the message twice.
Example
local Message = "This_is_Vera_calling_you_to_test_the_Telegram_phone_calls_through_CallMeBot"
local User = "@username"
local Language = "en-US-Standard-B"
local Repeat = "2"
luup.inet.wget('http://api2.callmebot.com/start.php?source=vera&user=' .. User .. '&text=' .. Message .. '&lang=' .. Language .. '&rpt=' .. Repeat,5);
That's it! Just give a few seconds to Vera to save the Scene and then you can enjoy it.
Reactor Plug-In
If you want to use the API with the Reactor plug-in, and thanks to @TimNGO who is a guru in Vera, you can check the instructions posted in this post.
Dedicated Telegram Bot for you and your Business
You can have your own dedicated bot to make the phone calls.
These are the benefits of having your own bot:
- Your own Telegram Username, Bio and Picture (Logo).
- No delays. You will have your own queue.
- Calls can be longer than 30 seconds
- You can call to anybody without having the recipient to go through the authentication process. (Spam is not allowed)
- Unlimited number of calls to unlimited recipients.
The cost of a dedicated instance is $15 per month. No setup fee if paid annually.
If you are interested, please contact me at [email protected]
Thank you!
Problems?
If you have problems, like not receiving the Call on Telegram, or not receiving the WhatsApp messages, try to test the CallMeBot API using your Web Browser:
- Telegram Phone Calls using Web Browser: here
- Telegram Text Messages using Web Browsers: here
- WhatsApp Text Messages using Web Browser: here
You might get some errors on the screen that will help you to identify the problem. (Ex: Calls disabled in the Telegram Security Settings, WhatsApp not activated, etc.)
If you still have problems using the API, don’t hesitate to contact me in Telegram @callmebot_com or by email at [email protected]. Remember to Follow me on Twitter to get news about coming features, changes, invitations, etc.