Page 1 of 1

Notification domoticz app event

Posted: Friday 23 March 2018 13:25
by roetenbergr
It is possible to send a notifcation to the domoticz app through a script? I tried DZVents, LUA and Blocky, nothing seems to work

Re: Notification domoticz app event

Posted: Friday 23 March 2018 21:47
by waaren
roetenbergr wrote: Friday 23 March 2018 13:25 It is possible to send a notifcation to the domoticz app through a script? I tried DZVents, LUA and Blocky, nothing seems to work
Can you please elaborate a little bit more what you try to achieve here and with what version of domoticz / dzVents / OS ?

Re: Notification domoticz app event

Posted: Sunday 25 March 2018 16:08
by roetenbergr
Well i'm trying to send a message to the domoticz app itself with an script. So not through pushover or whatever, The native domoticz app.

Re: Notification domoticz app event

Posted: Sunday 25 March 2018 16:08
by roetenbergr
Based on raspberry pi, beta version of domoticz.

Re: Notification domoticz app event

Posted: Monday 26 March 2018 11:04
by DewGew
Domoticz app is using gcm for notifications. This might work in dzVents: domoticz.notify(subject, message, priority, sound, extra, subsystem)
change 'subsystem' to gcm. I havn't tryed this yet. :D

Code: Select all

domoticz.notify('Your sub', 'Your text', domoticz.PRIORITY_NORMAL, domoticz.NSS_GOOGLE_CLOUD_MESSAGING)

Re: Notification domoticz app event

Posted: Monday 26 March 2018 14:58
by roetenbergr
Yeah it's working! Thanks!

Re: Notification domoticz app event

Posted: Monday 04 May 2020 12:27
by veerboot007
I was wondering how you did this. Im olso looking for notifications in de native domoticz app. For example: if the doorbell rings i want to receive a notification in the app...

Could you help me out with sharing the "code" in dzVents..?

Domoticz version 2020-2 on raspberry 3b and Iphone app.

Re: Notification domoticz app event

Posted: Monday 04 May 2020 12:59
by waaren
veerboot007 wrote: Monday 04 May 2020 12:27 I was wondering how you did this. Im olso looking for notifications in de native domoticz app. For example: if the doorbell rings i want to receive a notification in the app...

Could you help me out with sharing the "code" in dzVents..?

Domoticz version 2020-2 on raspberry 3b and Iphone app.
No idea if Cloud messaging also works with an Iphone but the script could look (in it's most simple form) like below

Code: Select all

return 
{
    on = 
    {
        devices = 
        { 
            'Bel',
        },
    },

    execute = function(dz, item)
        if item.active then 
            dz.notify('Bel', 'Someone at the door', dz.PRIORITY_NORMAL,nil,nil,dz.NSS_FIREBASE_CLOUD_MESSAGING)
        end    
    end
}