I’m trying it right now. I was using it with HomeAssistant but I see that it is much easier with OpenHab because I can use directly the SendHttpGetRequest Action instead of executing a shell wget command.
> [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'TestCall': An error occurred during the script execution: Couldn't invoke 'assignValueTo' for feature JvmVoid: (eProxyURI: anrufen.rules#|::0.2.0.2.0.1::0::/1
Same error in both versions??
And I don’t get a phone call when trying with the browser either.
Ups: I totally missunderstood the HowTo, you NEED and can use ONLY a registered phone number. That’s why I didn’t get all call.
And trying to get an ID results in no TelegramID found!
Works for me - great!
Just don’t hand it any figures such as the time or connection ID. It’ll properly read that out loud in English (“fourty-two gazillion …”).
Oh and it keeps repeating the message until you hang up - if anyone knows how to parametrize the API call to avoid that please let me know.
I got that error when I called the URLEncoder method but forgot to assign the result to a variable.
Of course, Telegram has to know the recipient. The call goes end-2-end to Telegram (not PSTN), so it has to be a valid telegram user ID.
Usually that is your mobile number but I guess it would probably also work with a registered user name.
See settings in your telegram app for your name to use as the recipient.
By default that’s your phone number in E.164 format +ccaaaaassssssss, cc=country code,aaaaa=area code, ssssssss=subscriber number
val urlmsg = URLEncoder::encode("Hello, dies ist ein telegram Test", 'UTF-8')
sendHttpGetRequest("http://api.callmebot.com/start.php?user=+49xxxxxxxxxxx&lang=de-DE-Standard-B&text=" + urlmsg)
Doublecheck your Telegram Settings (Privacy and Security).
Ensure that you can receive “Calls” and if you want to use your phone number, enable “Phone Number” in the same section. If you select “My Contacts”, ensure that you add the bot user to your contacts (@CallMeBot_API)