New Telegram Binding - Tester and Feedback welcome

Is it possible to send a silent message?
The Telegram API has an Option for this called disable_notification
Description:

2 Likes

This would be great!
However I think it is needed to change the code (the called URL for thisā€¦).
@ZzetT Iā€™m happy to look into this if you donā€™t want to.

1 Like

I do have the new telegram binding setup and everything seems working fine.

Now my problem when I do restart my pi3b on OH2.5.2, e.g. when changed some rules or items suddenly the telegram messages arenā€™t send any more, when restarting again it might work or not, this is strange and I cannot find an error.

I do activate the telegram send activity with a dummy switch, but as I said sometimes it is working next restart it isnā€™t.

Anyone having similar problems?

Itā€™s probably this.

I think I donā€™t understand, what can I do to get it stable running, the binding is the newest version.
Can I influence the behavior for the proper start of that binding or action?

Itā€™s not entirely clear to me the circumstances that will cause a binding to restart, but when it does restart, the actions will stop working. When this happens, the only solution Iā€™ve found is a restart of openHAB. I wish I had some better advice for you on how to prevent it.

I find this to be a REALLY annoying problem, because it usually happens silently. The only way I notice it is when I stop getting emails and telegrams. Unfortunately, since it needs to be fixed in openhab-core, it wonā€™t be resolved until OH3.

Yes, this is true I do have the same issue with emails sending getting stopped.
This is strange.

Something strange occured today - Iā€™ve upgraded to latest stable OH and wanted to switch from textual config to PaperUI-config.

The thing is ā€œonlineā€ and I can retrieve messages that Iā€™m writing in the corresponding chatID. But, anything that is ā€œoutboundā€ doesnā€™t work. Iā€™ve declared the exact same parameters as in my textual config, but no success.

For testing purposes I adapted my textual config and put the thingID OH has created for the thing - this works as intended.

Whatā€™s also ā€œstrangeā€ is that the PaperUI-config doesnā€™t seem to accept a ā€œNO socketā€ option as it always resets/defaults to SOCKS5 - I can avoid that via textual config of course.

Hello,
I have a question for a rule.
With the preview telegram action, I can send a telegram message when a item is over a precise numeric value using item.state > x .
With a new telegram binding donā€™t work.
What is the correct syntax for send a message when a numeric item is over a determinate value?
Thanks.

Please Post your rule here, because the only change is the syntax of telegram.Action

If item.state > x is still the same

Hi,
Thanks for the answer.

I have a sensor (myitem) and when the temperature is over x I would receive a telegram message.

With the telegram action I had:
When the myitem changed then if myitem.state > x Telegram send message, but with the new binding not work.

Only with numeric variable not work because with the ON / OFF variable work correctly.

Thanks.

Again: please post your rule here.

Without seeing your syntax nobody is able to help

I try with this rule, but donā€™t work:

rule ā€œNAME"
when
Item Sensor changed
then
if(Sensor.state > VALUE) {
val telegramActionā€¦.
telegramAction.sendTelegramā€¦.
}
end

Thanks.

Its only a part of your rule. How to check syntax if you donā€™t paste your rule. :roll_eyes:

Your item is which type?

Value written like 2 ? Or written like 2.0 or written like ā€ž2ā€œ ?

Because looks like you donā€™t want to show what you did in rule I only can give you the hint to check with loginfo if comparison works and your If gives a true or not.

I think you have some log entries too due to a type mismatch.

But unable to help anymore with cutted parts of rule.

Sorry.

Try if(Sensor.state as number > VALUE) {

Then Iā€˜m out. To heavy to guess what you written

Thanks for the suggestion, later I try.

I paste my syntax, but I write VALUE because I have 2 cases.
The first is a temperature sensor and I write 22.5 and the other case is a power consumption value and I write a integer value.
Both the Items are number type.
I didnā€™t check if I had error in the log file but after I will check.

Thanks.

I find the mistake, in the rules file I write Item Item (double) in a other rule, deleted the word ā€œItemā€ extra and all rules work correctly without your syntax.

Thanks.

That was the reason I wanted to see the original code :wink:

Another question, I test a rule when the Bot receive a message and work correctly.
How can I do for receive into the answer the state or the value of items?
Do you have an example for me? For example when I write Temperature openhab sent a temperature of the sensor.
Thanks.

Hi, I upgrade to 2.5.3 and install the official Telegram binding.
The sendTelegram seems work but I have the following warn message:

[ng.telegram.internal.TelegramHandler] - Telegram exception: GetUpdates failed with error_code 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running

With 2.4 and beta binding I never had.
Can you help understanding whatā€™s wrong?
Regards
Lorenzo