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.
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);
[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.
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.
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 to use this API, don’t hesitate to contact me in Telegram @callmebot_com or by email at [email protected] Rember to Follow me on Twitter to get news about coming features, changes, invitations, etc.