Page 1 of 1

Notifications sending -2

Posted: Thursday 05 October 2017 23:40
by thorbj
Domoticz version 3.8153

Hi, I have an issue with notifications from dzVents.
In the following code I have added a domoticz.notify string. When executed the logg tells me the notification was sent successfully, but in Pushbullet and Telegram I only get a message containing "-2". What's causing this?

Code: Select all

return {
    active = true,
    on = {
        timer = {'at 23:00-06:00'},
    },
    execute = function(domoticz, device)
        -- your script logic goes here, something like this:

        if (domoticz.devices('AJ lampe').state == 'On') then
            domoticz.devices('AJ lampe').switchOff()
            domoticz.notify('Leselys AJ lampe slått av for natten.', domoticz.PRIORITY_LOW)
            domoticz.log('Leselys AJ lampe slått av for natten.')
        end
    end
}

Re: Notifications sending -2

Posted: Friday 06 October 2017 7:55
by BakSeeDaa
Wrong number of arguments to the notify function.

Have a look at this:

Code: Select all

domoticz.notify('Leselys', 'Leselys AJ lampe slått av for natten.', domoticz.PRIORITY_LOW)

Re: Notifications sending -2

Posted: Friday 06 October 2017 8:47
by thorbj
Great, that did the trick!
Thanks!