I suspect I have the same problem as @FritzBox360, but with a normal DSL connection. After some time, Telegram no longer reacts to messages from outside.
-
New plugin for Telegram
-
@flop2006 does ist work if you restart/reload the telegram-receiver-device or pimatic?
-
@Flop2006 and @FritzBox360 I really am not sure what could be the cause. In general I would agree on your assessment the handshake or maintaining the session with the Telegram API server is failing (as you call it “a timeout”). Latency between systems tends to be the bigger problem albeit TCP/IP was actually invented to work around this.
I can review the 3rd party code on which pimatic-telegram relies to see if there is anything I could potentially optimize to alleviate your frustration a bit. However, the server (telegram API) side we cannot influence.
Interesting that (If I understand the scenario correctly) the plugin does send out messages to mobile devices, while it is unable to poll the message queue for incoming messages. Actually two different mechanisms are used here. So it may be worth to dive in and analyze the differences. Might take me some time as I am working on other projects at the same time currently.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@Dan - thanks for your reply! Yes, you are right. The plugin does send out messages to mobile devices, while it is unable to poll the message queue for incoming messages.
No need to hurry on this. It is just a strange behaiviour.
Could you explain the usage for “retryTimeout” in the telegram-receiver-settings? As, in my scenario, we do not have any traffic limitations (except of bandwidth) so the receiver can pool how often as possible. But it should not stop, if it is failing or having a timout. I can imagine, that it is stopping after a failure and does not retry.
-
@fritzbox360 retryTimeout only tells pimatic-telegram how long it should wait before attempting to reconnect to the API server after a failed connection attempt. Essentially it is a bit of choosing a value which allows for not being disconnected for too long and on the other hand not having the API server deciding you are harassing, if you catch my drift. Sometimes a disconnect may be harmless and accidental where a reconnect within 2 seconds may be successful. On the other hand on difficult internet connectivity or WAN disruption the path between systems may or may not be disrupted for a longer period.
I should really dive into the connectivity code to see if there is anything which can be done to differentiate between the cause of connection problems and throttling reattempts based on that, if possible at all. Will take time. @developer : Appreciate any input from someone with some experience in this area!
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
hello,
i cant bring the plugin to work properly.
everything works fine as sending messages etc.
but executing pimatic commands doesnt work…i used:
WHEN: telegram received "temp"
THEN: send text telegram to sender “&$dht22.temperature $dht22.humidity”but when i send temp to the bot it doesnt make anything…my useracc has admin permissions. any help?
-
Does it work after recreating the TelegramReceiverDevice -> open it, save it and then send “temp”.
-
@vincent-würzinger If @OrTiN 's suggestion does not work:
Could you enable debugging in both Pimatic and the Telegram plugin? The additional debug output may help us troubleshoot what is happening.@vincent-würzinger said
WHEN: telegram received "temp"
THEN: send text telegram to sender “&$dht22.temperature $dht22.humidity”but when i send temp to the bot it doesnt make anything…my useracc has admin permissions. any help?
Also I have not seen device attribute vars being preceded with an ampersand (&). Is this valid syntax?
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
i forgot to setup the telegramreceiverdevice. its working great. thanks.
-
@Dan I just discovered your plugin for the first time. What a great plugin and very useful!! A real value adding addon for Pimatic!
I was wondering if it’s also possible to markup the messages. At stackoverflow I read that this is possible for bots with the following setting:
Set the parse_mode to markdown and send bold
Set the parse_mode to html and send <b>bold<b>Is this a nice to have feature yet to be developed? Or have I missed a setting?
Thank you for your great work! -
@thijn-jacobs said in New plugin for Telegram:
I was wondering if it’s also possible to markup the messages.
Hello Thijn, Great to hear you enjoy the plugin!
I’ll make a quick update to allow for HTML in user-defined text in rule actions, e.g."send text telegram to <user> "<b>The house is on fire</b>"
Per the Telegram API docs:- Only <b>, <i>, <em>, <a>, <code> and <pre> are supported, for respectively bold, italic, emphasized, hyperlink, code block, and pre-formatted code block
- Tags must not be nested.
- All <, > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding
- HTML entities (< with <, > with > and & with &).
- All numerical HTML entities are supported.
- The API currently supports only the following named HTML entities: <, >, & and ".
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
Wow, that would be great!! Thank you very much for this super service!!
Please let us know when you’re ready… -
1.1.11 is now available, with support for HTML formatted text as described earlier.
As it is relatively complicated to safely parse long messages (needed to preserve HTML markup per chunk) and the maximum message size is now 4096 characters, I have decided to disable the chunking of messages to allow unlimited length for now: Meaning the maximum length for text messages is now 4096 chars.Enjoy!
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
Thanks a lot Dan!! I’m going to test tomorrow…
-
Thx for the update @Dan. I immediately change some rules where I was wishing the code-block format, but didn’t dare to ask about it…
-
@ortin said in New plugin for Telegram:
Thx for the update @Dan. I immediately change some rules where I was wishing the code-block format, but didn’t dare to ask about it…
ok ok, I’ve been told I can come across intimidating in real life, but I thought I was really friendly on the forum
Just kidding @OrTiN, dude you were one of the early adopters…you can always ask"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
-
it would be awesome to handle different Bots on one pimatic device. or is it somehow possible to let a specific message popup on my phone with a specific sound? for some events i need an alarm sound, for others the usual “ping” sound is enough (possible through botfather ai?)
-
@vincent-würzinger Hello Vincent, I have not seen options in the API allowing for custom notification sounds based on a message pattern. Implementing the ability to operate multiple bots requires associating the API token per-device, and then implementing a feature in the action provider so a user can define over which device (=specific bot) to send a message. On a mobile device you could then associate sounds per-bot. I’ll put this on the feature list, but currently I cannot give an estimate when this will be implemented.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
Hey Dan,
I haven’t use the TelegramReceiverDevice function for a long time. In the past, maybe you remember I had problems to get a response from the bot. Now I observed the same behavior in the last days as before. After pimatic restart or recreating the device it works for a while (approx. one day) after this it stops to response.I really have no idea, but from my knowledge the problem occurs the first time after the last functional update, where you’ve implemented the request of Zomer.
Can you please have a look to it. My config didn’t change since month regarding this function.