hi, i would like a rule on pulse counter
..when the Count value is> of a set threshold and remains for a set time ... sends a Telegram notification.
it would be possible ?
Thanks for your help
help rule
Moderators: grovkillen, Stuntteam, TD-er
Re: help rule
Something like this?
NB: I have not investigated how the Telegram API needs to be used, if the GET verb isn't sophisticated enough, you might meed to use the Generic HTTP Advanced controller.
Code: Select all
on Pulsecounter#Total do // Could also trigger on Count instead of Total
if %eventvalue%>100 // Change 100 to desired value
TimerSet,2,30 // Send Telegram message after 30 seconds, change duration as desired
else
TimerSet,2,0 // Stop timer
endif
endon
on Rules#Timer=2 do
SendToHTTP,url_for_telegram_api,443,'/address/and/other/stuff/with/telegram/message/total=[Pulsecounter#Total]'
endon
/Ton (PayPal.me)
-
- Normal user
- Posts: 30
- Joined: 10 May 2019, 15:39
- Location: italy
Re: help rule
use
https://api.telegram.org/botxxxxxxxx/se ... t_id=xxxxx
& text = xxxxx
for telegram notifications, but on espeasy it doesn't work
https://api.telegram.org/botxxxxxxxx/se ... t_id=xxxxx
& text = xxxxx
for telegram notifications, but on espeasy it doesn't work
Re: help rule
Do you have any log results from both ESPEasy and Telegram?
The link you provided complaints that field "description" is missing, so you probably need to adjust that.
The link you provided complaints that field "description" is missing, so you probably need to adjust that.
/Ton (PayPal.me)
Re: help rule
First of all, there's https in the url, so no chance to send it that waynovembre62 wrote: ↑03 Jan 2021, 09:54
https://api.telegram.org/botxxxxxxxx/se ... t_id=xxxxx
& text = xxxxx
Re: help rule
Yep the same for the sendtohttp call, which is using port 443 (HTTPS)
-
- Normal user
- Posts: 30
- Joined: 10 May 2019, 15:39
- Location: italy
Who is online
Users browsing this forum: No registered users and 67 guests