Telegram message

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Telegram message

Post 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?
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Telegram message

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Telegram message

Post 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.
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Telegram message

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Telegram message

Post 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.
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Telegram message

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 223
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Telegram message

Post by jacobsentertainment »

Thanks a lot Waltervl!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest