Page 1 of 1

variable in commandArray['SendNotification']

Posted: Friday 27 April 2018 17:37
by Zodiac69
Hi All

I am trying to include the duration of a open door in my notification, but i have no idea how to make the either the string part of the notification.
I used "local OpenTime = tostring(OpenTime)" to convert my second counter to a string.

If anyone can point me in the right direction, it would be precipitated

Re: variable in commandArray['SendNotification']

Posted: Saturday 28 April 2018 0:03
by simonrg
Format from the wiki Events page is:

Code: Select all

commandArray['SendNotification']='subject#body#0'
So with your OpenTime variable you could say:

Code: Select all

commandArray['SendNotification']='Open Door#Door has been open for ‘..OpenTime..’Seconds#0'

Re: variable in commandArray['SendNotification']

Posted: Saturday 28 April 2018 11:36
by Zodiac69
Hi simonrg

Thank you for the pointer, i did look at the WiKi, but i misunderstood the example:
I had - commandArray['SendNotification']='DOMOTICZ-Garage door alert#The garage door has been open for more than ..OpenTime.. Minutes.'
instead of - commandArray['SendNotification']='DOMOTICZ-Garage door alert#The garage door has been open for more than '..OpenTime..' Minutes.'