Slow telegram alerts

1,162 views
Skip to first unread message

Dolf Starreveld

unread,
Aug 12, 2022, 12:49:37 PM8/12/22
to Camect User Forum
A few days ago I started noticing my Telegram alerts were coming in upwards of 4-5 minutes after the event occurrence. Going with the theory of a slow bot, I resubscribed to a a new bot and all seemed well. Now, however, just two days later I am receiving alerts even as late as 10 minutes after the fact.

Is there any other known course or solution? Obviously resubscribing every few days is not an acceptable solution, and alerts coming in this late makes them fairly useless...

CamectChao

unread,
Aug 12, 2022, 7:25:49 PM8/12/22
to Camect User Forum, dolf.st...@gmail.com
This is caused by the number of alerts you are receiving and Telegram is limiting it. There is not much we can do here.
The alternative  is to use Camect native app. We have released the iOS version and android version is coming.


Latinum

unread,
Sep 12, 2022, 9:57:26 AM9/12/22
to Camect User Forum, CamectChao, dolf.st...@gmail.com
Is there a way to limit the number of alerts a camera send per X minutes. For instance: "As a user I would want my camera to send me one alert per 5 minutes per object detected".

You could also consider keeping track of an object's attributes / calculate similarity between subjequent objects to only show me alerts of "new" objects? This could prevent a single "object" from generating multiple alerts and causing this congestion / limit in Telegram.

Latinum

unread,
Sep 19, 2022, 9:53:19 AM9/19/22
to Camect User Forum, Latinum, CamectChao, dolf.st...@gmail.com
Any news on this? I used to get alerts almost in real time, now it can take several minutes for an alert to show up in Telegram.

Arup Mukherjee

unread,
Sep 19, 2022, 8:43:27 PM9/19/22
to Latinum, Camect User Forum, CamectChao
We can't do much about Telegram latency, but have you tried using the native app? 

You can also try switching Telegram bots (by redoing the Telegram linking process) and with any luck you'll get one that's doing better. This won't help, however, if the latency is because your own hub is generating a large number of alerts, i.e. more than Telegram is willing to take at full speed for a single user. 



--
You received this message because you are subscribed to the Google Groups "Camect User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@camect.com.
To view this discussion on the web visit https://groups.google.com/a/camect.com/d/msgid/forum/c481a703-de35-4526-8588-8ebde73d122dn%40camect.com.

Dolf Starreveld

unread,
Sep 19, 2022, 9:20:39 PM9/19/22
to Arup Mukherjee, Latinum, Camect User Forum, CamectChao
I’ve been experiencing this problem too. I did switch bots to try if it would make a difference. It appeared so, but after a few days things were equally bad. Alerts arrive out of sequence and sometimes up to 5 minutes late, kind of defeating the purpose.

The native app does work better in that regard, but requires one has a phone/watch handy at all times. I spend lots of time working on my iMac and want to see alerts there. Telegram allows that, the native app does not (unless you use Apple frameworks to make this code run on the Mac as well).

My alert frequency does not appear excessive. There are occasions where 3-5 alerts get generated in quick succession, but then often times there is nothing for 30 minutes or more. I am not familiar with Telegrams “sense” of “large number of alerts”, but I would certainly not qualify this as such.

Arup Mukherjee

unread,
Sep 19, 2022, 10:57:30 PM9/19/22
to Dolf Starreveld, Latinum, Camect User Forum, CamectChao
Latinum is on a bot that's under a fairly heavy load due to other users on it. Switching may help him. 

Dolf -- you're not on a bot that's obviously busy, but if you get several notifications in a burst, they can still get throttled. Do you know if that was the case for the one you said was delayed 5 minutes? 

Dolf Starreveld

unread,
Sep 19, 2022, 11:33:43 PM9/19/22
to Arup Mukherjee, Latinum, Camect User Forum, CamectChao
All, this has been happening for weeks now (across my bot switch), and I don’t remember the particular of the 5 minute situation.

1 have 2 cameras on each side of the garage/drive way and another two at the back corner of the house.

As far as bursts I can give some examples (that in my opinion show they are not burst, certainly not intense ones):
  • An alert about my wife’s car leaving the driveway, labelled 18:49:41, received 18:49:44 (3 s later)
  • An alert about my wife’s phone having left and switched out of HOME mode, labelled 18:59:03, received 18:59:10 (7 s later)
  • An alert about a bicycle in the street, labelled 19:01:51, received 19:02:03 (12 s later)
  • I arrive home in the car. This generated three alerts (in order received)
    • Car driving up on front of driveway, labelled 19:04:15 (Camect label) taken from Front Left Camera, received in Telegram 19:04:46 (30 s later)
    • Camect alerting me of transition to home status, labelled 19:04:44, received in Telegram 19:05:04 (20 s later)
    • Car backing into one of the two spots in the drive way, labelled 19:04:18 (Camect), from Front Right Camera, received in Telegram 19:05:16 (58 s later)
    • Me coming out of car, labelled 19:04:57 (Camect), from Front Left Camera, received in Telegram 19:05:53 (56 s later)
  • Notice order of events detected by Camect is not order of alerts received in Telegram
  • Notice inconsistent delays for various alerts (delays relative to event time)
    • First delay  s
    • 24 s to next event
    • Second delay 7s
    • 2m 48s to next event
    • Third delay 12s
    • 2m 12s to next event
    • Fourth delay 30s
    • 3 s to next event
    • Fifth delay 58 s
    • 26 s to next event
    • Sixth delay 20s
    • 39s to next event
    • Seventh delay is 56s

I make the following observations, state opinions:
  • The above sequence stretches over almost 15 minutes, with 7 events.
  • Given the intervals between events, I would not call this a burst. It is not dissimilar to generating 2-3 messages per minute, but only 3 or 4 at a time
  • Given the initial short delays, even after second and third alerts coming after a 24s and a 2m58s interval between events, it does not seem there would be a valid reason for throttling based on just my system’s behavior.
  • But then delays start going up to a minute (in this example, I’ve seen 2x and 3x worse at times)
  • Alerts are out of order? I could imagine this happening when more than one bot is involved, but with a single bot I (perhaps naively) expect in-order delivery. On the other hand, if that is not guaranteed, it is not really a problem. Only the delay is.

Arup Mukherjee

unread,
Sep 20, 2022, 3:10:29 AM9/20/22
to Dolf Starreveld, Latinum, Camect User Forum, CamectChao
Are those times of alerts that occurred on Monday, or was that a hypothetical example?

In-order delivery is not guaranteed. I assume it's preferable to get at least some alerts quickly rather have all alerts be delayed if it gets to the point that there is a backlog? 

The Telegram penalties on "large" messages are quite severe once you get to a point of something being throttled. At some point they started to make a distinction between large and small messages ... Our messages with the clips are about 200k vs much the shorter text-only messages that most use, so it does make some sense, although the penalties are IMO way more draconian than they should be. 

Roy

unread,
Sep 20, 2022, 9:52:53 AM9/20/22
to Camect User Forum, CamectArup, Roy, Camect User Forum, CamectChao, dolf.st...@gmail.com
Unsubscribing and Resubscribing to the alerts did speed things up significantly.

Thanks,

Roy

Dolf Starreveld

unread,
Sep 20, 2022, 2:02:12 PM9/20/22
to Arup Mukherjee, Latinum, Camect User Forum, CamectChao
These were real events/alerts from Monday Sep 19

I understand what they (Telegram) are doing, but agree if that is the reason, it is draconian. Out of order is not very important, but just wanted to note it.

Couple of ideas:
  • Could the size of the messages be reduced?
    • Host the clip elsewhere and just include the link?
      • No idea if the telegram client could still render it
      • If it cannot, perhaps include thumbnail and link
      • The other hosted clip would need to be subject to some expiration mechanism to keep your server and storage requirements under control
      • I would make this an option in the UI
    • Optionally produce a severely reduced size clip by reducing the frame rate
      • But then I looked at some of the clips I received and
        • They are generally 40K or less
        • They are already low frame rate
        • But you mention 200K so is the throttling still reasonable for these sizes?
  • Use another delivery app? Not sure what is out there that would not have these problems
  • Use catalyst or some other mechanism to provide native client on MacOS as well

Roy

unread,
Sep 21, 2022, 2:36:44 AM9/21/22
to Camect User Forum, dolf.st...@gmail.com, Roy, Camect User Forum, CamectChao, CamectArup
What about having an option to just show the detected object as a still frame, that could limit size quite a lot.

To be honest I am mostly interest in "what is detected" on "which camera" at "what time". If I want the details I can always click through to the app.

Cheers,

Roy
Reply all
Reply to author
Forward
0 new messages