After posting my first iteration of integrating Tankerkönig and Telegram into my openHAB system, @kugelsicha pointed out that I can use the Telegram query function.
I implemented that now, and wrote an additional blog post. Unfortunately the old posting is locked, and I can’t add the update there.
2 Likes
Hey Andreas,
Thanks for sharing this solution… I implemented this aswell…
Only one small suggestion regrading your rule rule “Telegram Bot receive tanken answer”
replace:
} else {
telegramAction.sendTelegram(Long::parseLong(telegramLastMessageChatId.state.toString), "Unknown option!")
}
with:
} else {
telegramAction.sendTelegramAnswer(Long::parseLong(TelegramBotChatId.state.toString), TelegramBotReplyId.state.toString, "unknown option!")
}
why?
I was thinking about that. However this is the part where the Rule catches any errors - and here is a reply which is not in the list of preset options. Most likely something went wrong.
So I don’t bother stopping the open Telegram quest, but throw a general error into the group.
Your mileage might vary…
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.