Notifications sending -2

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

Moderator: leecollings

Post Reply
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Notifications sending -2

Post 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
}
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Notifications sending -2

Post 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)
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: Notifications sending -2

Post by thorbj »

Great, that did the trick!
Thanks!
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest