Page 1 of 1

Help with Sendnotification

Posted: Thursday 12 May 2016 21:50
by oliviers
Hello,
I need some assistance with "Sendnotification"

I'm trying the following very simple LUA script:

Code: Select all

--

print('this will end up in the domoticz log')

commandArray = {}
print(_VERSION)
commandArray[SendNotification]='subject#body#extraData#priority#sound'
return commandArray
The script executes, but the notification fails...
Here's what I fing in the log:

Code: Select all

 2016-05-12 21:44:18.173 LUA: this will end up in the domoticz log
2016-05-12 21:44:18.174 LUA: Lua 5.2
2016-05-12 21:44:18.174 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_version.lua: /home/pi/domoticz/scripts/lua/script_device_version.lua:7: table index is nil 
Why ? Any idea, anyone ?
Domoticz "last stable version" 3.4834
Thank you,
Olivies

Re: Help with Sendnotification

Posted: Thursday 12 May 2016 22:13
by trixwood
commandArray[SendNotification]

->

commandArray['SendNotification']

Re: Help with Sendnotification

Posted: Thursday 12 May 2016 22:33
by oliviers
Of course !!!
How could I not have seen this....
So obvious..
Thanks!