Page 1 of 1

Telegram message

Posted: Thursday 04 November 2021 18:43
by jacobsentertainment
Sorry to ask here, I tried finding some info on using telegram for notification only but all I try is giving me a telegram message and a mail message, I only want a telegram message not a mail message.
Can somebody tell me a small line how to only get a notification by telegram?

Re: Telegram message

Posted: Thursday 04 November 2021 19:32
by waltervl
I suppose you have activated telegram notifications according https://www.domoticz.com/wiki/Telegram_notification

Then you can send a notification from dzVents with NSS_TELEGRAM as option in the notify statement.
See also the wiki on .notify function https://www.domoticz.com/wiki/DzVents:_ ... terface.29

Re: Telegram message

Posted: Thursday 04 November 2021 20:06
by jacobsentertainment
Hi Waltervl,

I have the telegram functioning in my system this works brilliant, only thing is when I use the notification it also sends me next to a message in telegram also the same in the mail. I want the notification to be only in telegram and searching trough the forum didn't give me the results I hoped for and from the wiki I couldn't make any sense.
If I use

Code: Select all

domoticz.notify("Sauna","Temperatuur is nu "..Temp.."°", domoticz.NSS_TELEGRAM)
or

Code: Select all

domoticz.notify("Sauna","Temperatuur is nu "..Temp.."°", "telegram")
The result is the same, telegram and mail notification.

Re: Telegram message

Posted: Friday 05 November 2021 18:13
by waltervl
Here is a topic with some examples. Perhaps needs some extra arguments like sound etc.
https://domoticz.com/forum/viewtopic.php?t=25676

Re: Telegram message

Posted: Friday 05 November 2021 20:31
by jacobsentertainment
Thanks for the info, I got it working,

Code: Select all

domoticz.notify("Domoticz", "testing telegram", domoticz.PRIORITY_NORMAL,domoticz.SOUND_DEFAULT, "" , "telegram")
I'm just a toolpusher not a programmer and try to figure out what is doing what in the script,
Just a couple of questions if you don't mind. What is "Domoticz" and , "" , good for in this line? I don't see any of this back in the log or in the output result.

Re: Telegram message

Posted: Friday 05 November 2021 20:51
by waltervl
Syntax according wiki is:
.notify(subject, message [,priority][,sound][,extra][,subsystem].[,delay]
Domoticz should be the subject (for email) and likely be ignored for telegram. The "" is the empty value for extra.

Re: Telegram message

Posted: Friday 05 November 2021 21:04
by jacobsentertainment
Thanks a lot Waltervl!