I did all the config, got the http token, the chat id, i changed the openhab.cnf but when i try so sendTelegram i get an error that Bot is not defined. But i did config all 3 lines per Bot .
I added my bot name where bot1 was and added token and id. But i still get that error everytime and i have no idea why, can someone help? Do you need some more info?
@watou the error is Bot myBotName not defiend, but i added the bot config into the cfg file. The Jar is installed, i use runtime and addon version 1.8.
Is the bot name free to choose or must it be the botname in telegram? At the moment i tried both, just to know for myself.
From CFG FIle
telegram:bots=skycryerBot
telegram:skycryerBot.chatId=xxxxxxx
telegram:skycryerBot.token=xxxxxxx
My Rule
rule "Send telegram with Fixed Message"
when
Item telegramTest received command
then
sendTelegram(âskycryerBotâ,âitem Foo changedâ)
end
hello, i have same problem 2016-01-28 12:24:43.574 [ERROR] [o.a.telegram.internal.Telegram] - Bot âopenhabâ not defined, action skipped . Did you solve that , please help)) THANKS
Hi Walter I check and I donât have any space at the end of the token. and I still are getting the error. I know that the token and chat id is working. The only place where you configure the telegram in OH2 is on conf\services is this right?
I got another question concerning telegram.
If i want to publish a formatted number item (from an openhab number item, not a constant like in the example)
Example: sendTelegram("bot1", "item Foo changed to %s and number is %.1f", Foo.state.toString, 23.56)
My action: sendTelegram("bot1", "Power consumption: %s kWh", Consumption_Total.state.toString)
This prints the number item with all digits.
(3.77905712000000004735511538456194102764129638671875 for exampleâŠ)
But I want to format the output as %.2f.