Page 1 of 1
DzVents notify subsystem Telegram not working
Posted: Monday 12 November 2018 13:58
by delcara
Version: 4.10197
Build Hash: 90c95998
Compile Date: 2018-11-11 15:33:34
dzVents Version: 2.4.7
When I try to only sent notifications to Telegram it's not working, I receive notifications on all configured services. (Email, pushover, telegram etc..)
The code below is working for pushover:
Code: Select all
dz.notify("Domoticz", "test", dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, "" , dz.NSS_PUSHOVER)
When I replace dz.NSS_PUSHOVER whith dz.NSS_TELEGRAM I receive notifications on all services. Maybe it's a stupid simple thing but I can't seem to get it working. Is the syntax different for Telegram?
This is not working:
Code: Select all
dz.notify("Domoticz", "test", dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, "" , dz.NSS_TELEGRAM)
Re: DzVents notify subsystem Telegram not working
Posted: Monday 12 November 2018 14:23
by waaren
delcara wrote: ↑Monday 12 November 2018 13:58
When I try to only sent notifications to Telegram it's not working, I receive notifications on all configured services. (Email, pushover, telegram etc..)
This is not working:
Code: Select all
dz.notify("Domoticz", "test", dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, "" , dz.NSS_TELEGRAM)
Please have a look
here as Telegram is not implemented in dzVents yet
Re: DzVents notify subsystem Telegram not working
Posted: Monday 12 November 2018 14:45
by delcara
Thnx, noted. Will try with this function in global_data till telegram support comes to DzVents.
Re: DzVents notify subsystem Telegram not working [Solved]
Posted: Monday 12 November 2018 15:38
by waaren
delcara wrote: ↑Monday 12 November 2018 14:45
Thnx, noted. Will try with this function in global_data till telegram support comes to DzVents.
Did a little bit of research and this code does also work on my system
Code: Select all
dz.notify("Domoticz", "test", dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, "" , "telegram")
One other option is to add this line
to domoticz/dzVents/runtime/Domoticz.lua (right after the line ['NSS_PUSHSAFER'] = 'pushsafer',) but then you have to repeat this every time when you update domoticz to a new version until @dannybloe, or someone else with enough knowledge of the GIT procedures, adds this to the version on GIT.
Re: DzVents notify subsystem Telegram not working
Posted: Monday 12 November 2018 18:51
by Joep123
I use
https://api.telegram.org/bot6488742271: ... t=#MESSAGE in Custom HTTP/Action. Works perfect for Telegram notifications (Of course I changed the Chat ID and API).
Re: DzVents notify subsystem Telegram not working
Posted: Monday 12 November 2018 19:05
by waaren
@Joep123, that is more or less the same approach as in the post I included in my original reply and that indeed works flawless. My preference for the dz.notify method I described in my later response is because you don't have to include the api-key and chat-id in your script.
Re: DzVents notify subsystem Telegram not working
Posted: Tuesday 13 November 2018 7:41
by delcara
waaren wrote: ↑Monday 12 November 2018 15:38
delcara wrote: ↑Monday 12 November 2018 14:45
Thnx, noted. Will try with this function in global_data till telegram support comes to DzVents.
Did a little bit of research and this code does also work on my system
Code: Select all
dz.notify("Domoticz", "test", dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, "" , "telegram")
One other option is to add this line
to domoticz/dzVents/runtime/Domoticz.lua (right after the line ['NSS_PUSHSAFER'] = 'pushsafer',) but then you have to repeat this every time when you update domoticz to a new version until @dannybloe, or someone else with enough knowledge of the GIT procedures, adds this to the version on GIT.
Thnx! I see you have already created a pull request.

Implemented it and works fine. Will repeat this until every update until it is added to a beta release.
Re: DzVents notify subsystem Telegram not working
Posted: Wednesday 14 November 2018 11:34
by waaren
delcara wrote: ↑Tuesday 13 November 2018 7:41
I see you have already created a pull request.

Implemented it and works fine. Will repeat this until every update until it is added to a beta release.
PR is merged. Telegram can be used natively from domoticz version 4.10200 (dzVents 2.4.8) onwards.
Re: DzVents notify subsystem Telegram not working
Posted: Wednesday 21 November 2018 17:37
by delcara
Updated domoticz and using it natively now!