Page 1 of 1

How to create & delete a file from dzvents?

Posted: Sunday 29 January 2017 15:07
by n1c0l45
Hi all,

I'm discovering DZvents and it's quite nice!
I'm using it to check my doors, but i would like to send a SMS (with gammu) if notification is needed.

I need 2 things:

1- create a tempory file with a defined text from the script (ex: door open since 5 min)
2- delete the tempory file created earlier after the code has been sent

Is it possible?

thanks

Re: How to create & delete a file from dzvents?

Posted: Tuesday 31 January 2017 0:00
by n1c0l45
Not possible to do that with Lua?

Re: How to create & delete a file from dzvents?

Posted: Tuesday 31 January 2017 6:49
by Egregius
If you don't find a solution in lua you could also use php. file_put_contents will create the file, unlink will delete it.

Re: How to create & delete a file from dzvents?

Posted: Tuesday 31 January 2017 8:34
by dannybloe
Well, Lua has methods to create files. Search google 'Lua create file' and you have loads of hits and examples :)