I've made a script that sends me a message when the humidity in one of my rooms is too high.
The problem I'm having is that I'm now recieving a message every minute...
How do I manage to send me to only send 1 message? I will change the script so I get 1 when it's too high and one when its back ok..
Let script only send telegram message once
Moderator: leecollings
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Let script only send telegram message once
This would require some LUA/DzEvents scripting. I would either use an extra UserVariable or Persistent variable.
Then when the "Luchtvochtigheid" gets above 70, Check voor de value of the UserVariable and when it isn't 1, Send the Telegram message and set the UserVarible to 1.
When the "Luchtvochtigheid" gets below 70, reset the UserVariable back to 0, so the next time it gets above 70, the same process is triggered.
Jos
Then when the "Luchtvochtigheid" gets above 70, Check voor de value of the UserVariable and when it isn't 1, Send the Telegram message and set the UserVarible to 1.
When the "Luchtvochtigheid" gets below 70, reset the UserVariable back to 0, so the next time it gets above 70, the same process is triggered.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 2
- Joined: Monday 26 October 2020 10:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Let script only send telegram message once
Hello
Be careful if you are using the latest release there may be a bug with Telegram. Since I applied it, my Telegram messages no longer work and it's the same with the test button in the settings.
Serge
Be careful if you are using the latest release there may be a bug with Telegram. Since I applied it, my Telegram messages no longer work and it's the same with the test button in the settings.
Serge
-
- Posts: 2
- Joined: Monday 26 October 2020 10:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Let script only send telegram message once
Hello
Be careful if you are using the latest release there may be a bug with Telegram. Since I applied it, my Telegram messages no longer work and it's the same with the test button in the settings.
Serge
Be careful if you are using the latest release there may be a bug with Telegram. Since I applied it, my Telegram messages no longer work and it's the same with the test button in the settings.
Serge
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Let script only send telegram message once
@Sergio0348, Don't think reporting an issue is relevant to the question, as clearly Telegram is working for the OP, but which version are you using?
EDIT: Just tested the latest Beta and Telegram is working fine! Also the test button.
Jos
EDIT: Just tested the latest Beta and Telegram is working fine! Also the test button.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 15
- Joined: Friday 09 October 2020 9:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Let script only send telegram message once
So far so good!
Who is online
Users browsing this forum: No registered users and 0 guests