25.03.2020, 07:16
Put it into a separate script and remove everything after "-- doorbird APP" from Common functions. Since there's script.disable(_SCRIPTNAME) at the end of the doorbird script it means that is should run only once and then it will automatically disable itself.
Further explanation: Common functions is a library which is loaded by every script. In your case all event scripts are delayed for at least 5 seconds because you have os.sleep(5) is Common functions. You also have a code that writes HTML to a file. Since this code is executed for every script you can quickly degrade internal SD card this way.
Further explanation: Common functions is a library which is loaded by every script. In your case all event scripts are delayed for at least 5 seconds because you have os.sleep(5) is Common functions. You also have a code that writes HTML to a file. Since this code is executed for every script you can quickly degrade internal SD card this way.