# Telegram gives false alarms

**URL:** <https://discourse.nodered.org/t/telegram-gives-false-alarms/60551>\
**Category:** General\
**Created:** [30 March 2022 15:23 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551 "2022-03-30T15:23:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [30 March 2022 15:23 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/1 "2022-03-30T15:23:37Z")

</div>

I have multiple alarms which are send to telegram in my phone.  
They have been working nicely but roughly one month ago I started to get false alarms.  
I don't know where to start troubleshooting?

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [30 March 2022 15:35 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/2 "2022-03-30T15:35:02Z")

</div>

You will need to provide a lot more information. Can you post part of the flow ?

What are the alarms, how do these trigger to telegram?

It's more likely an issue with the alarm side of things than a telegram problem.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 March 2022 15:43 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/3 "2022-03-30T15:43:32Z")

</div>

Add debug nodes to the flow to see what is causing them. If they are too rare to catch in the browser then set the Debug nodes to output to the Console and the text will get logged to the node red log, so you can look back after the event and see where they came from.

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [30 March 2022 15:52 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/4 "2022-03-30T15:52:13Z")

</div>

I have sensor (ruuvitag) is in fridge door and when temperature is over 12 celsius degrees, it send message to telegram

Here is part of flow.  
[{"id":"bfa66ba369fb31a2","type":"switch","z":"6ac4c280.adde7c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"11","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1210,"y":1080,"wires":[["7d87e39c9616d927","bbf07bf72a564a0d"]]},{"id":"034205c1528902a8","type":"debug","z":"6ac4c280.adde7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1450,"y":1100,"wires":},{"id":"ce23ce5fde01a28c","type":"function","z":"6ac4c280.adde7c","name":"Tee tellu viesti","func":"msg.payload = {}\nmsg.payload.chatId = 313467008\nmsg.payload.type = "message"\nmsg.payload.content = "Jääkaapin ovi jäänyt auki"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":1420,"y":1160,"wires":[["d170fc9fb35fd4e9","bbf07bf72a564a0d"]]},{"id":"bbf07bf72a564a0d","type":"debug","z":"6ac4c280.adde7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":1040,"wires":},{"id":"7d87e39c9616d927","type":"delay","z":"6ac4c280.adde7c","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1230,"y":1140,"wires":[["034205c1528902a8","ce23ce5fde01a28c"]]},{"id":"65b88f42f8e8630d","type":"debug","z":"6ac4c280.adde7c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":1020,"wires":}]

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [30 March 2022 15:56 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/5 "2022-03-30T15:56:34Z")

</div>

When posting code you need to click the preformatted text icon \</\> and then paste the code.

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [30 March 2022 16:00 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/6 "2022-03-30T16:00:02Z")

</div>

\</\> [{"id":"bfa66ba369fb31a2","type":"switch","z":"6ac4c280.adde7c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"11","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1210,"y":1080,"wires":[["7d87e39c9616d927","bbf07bf72a564a0d"]]},{"id":"034205c1528902a8","type":"debug","z":"6ac4c280.adde7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1450,"y":1100,"wires":},{"id":"ce23ce5fde01a28c","type":"function","z":"6ac4c280.adde7c","name":"Tee tellu viesti","func":"msg.payload = {}\nmsg.payload.chatId = 313467008\nmsg.payload.type = "message"\nmsg.payload.content = "Jääkaapin ovi jäänyt auki"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":1420,"y":1160,"wires":[["d170fc9fb35fd4e9","bbf07bf72a564a0d"]]},{"id":"bbf07bf72a564a0d","type":"debug","z":"6ac4c280.adde7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1410,"y":1040,"wires":},{"id":"7d87e39c9616d927","type":"delay","z":"6ac4c280.adde7c","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1230,"y":1140,"wires":[["034205c1528902a8","ce23ce5fde01a28c"]]},{"id":"65b88f42f8e8630d","type":"debug","z":"6ac4c280.adde7c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":1020,"wires":}]

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [30 March 2022 16:08 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/7 "2022-03-30T16:08:59Z")

</div>

You actually need to click on that icon on the tool bar above where you are typing 😉

As that sensor is bluetooth I assume you are using some custom nodes to get the messages.

You need to see what messages you are getting from them, as @Colin said put a debug node after the bluetooth node. Its possible that the false alarms are caused by communication issues or low battery warnings etc.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [30 March 2022 16:09 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/8 "2022-03-30T16:09:52Z")

</div>

You may find it better to create a boolean to use to filter if the message is above the target temp. Then you would only get messages when the boolean changed  
e.g.

```auto
[{"id":"2318c14a.40be8e","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":70,"y":2100,"wires":[["7ca626ff.2e90b8"]]},{"id":"7ca626ff.2e90b8","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"pass_change","pt":"msg","to":"$$.payload > 11 ? true : false","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":2160,"wires":[["7eda4b6f.5defdc"]]},{"id":"a7306afd.cf622","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":70,"y":2180,"wires":[["7ca626ff.2e90b8"]]},{"id":"7eda4b6f.5defdc","type":"rbe","z":"bf9e1e33.030598","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"pass_change","x":490,"y":2160,"wires":[["bfa66ba369fb31a2"]]},{"id":"eda5a105.767418","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":70,"y":2140,"wires":[["7ca626ff.2e90b8"]]},{"id":"8f12cc3e.7de6f8","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"25","payloadType":"num","x":70,"y":2220,"wires":[["7ca626ff.2e90b8"]]},{"id":"bfa66ba369fb31a2","type":"switch","z":"bf9e1e33.030598","name":"","property":"pass_change","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":620,"y":2160,"wires":[["ce23ce5fde01a28c"],["92640cf9.6f2a4"]]},{"id":"ce23ce5fde01a28c","type":"function","z":"bf9e1e33.030598","name":"Tee tellu viesti","func":"msg.payload = {}\nmsg.payload.chatId = 313467008\nmsg.payload.type = \"message\"\nmsg.payload.content = \"Jääkaapin ovi jäänyt auki \"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":310,"y":2280,"wires":[["034205c1528902a8"]]},{"id":"92640cf9.6f2a4","type":"debug","z":"bf9e1e33.030598","name":"below","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":2240,"wires":[]},{"id":"034205c1528902a8","type":"debug","z":"bf9e1e33.030598","name":"above","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":500,"y":2280,"wires":[]}]

```

The delay in your flow only stops the message for an hour, then next incoming message above 11 fires message again, or it is sending subsequent messages that have come in straight after the initial message . The delay node delays all messages, it does not rate limit in delay mode.

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [31 March 2022 05:17 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/9 "2022-03-31T05:17:17Z")

</div>

Thanks, found that too, looked telegram messages and they came exaclty by one one hour sequence

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 April 2022 05:17 UTC](https://discourse.nodered.org/t/telegram-gives-false-alarms/60551/10 "2022-04-14T05:17:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
