Here's a utility I wrote to do an erase without pressing the button.
due-reset
See the readme for the explanation.