There is no way to selectively delete portions of the datalog. You can delete the entire log and it will rebuild from the present time. There is an API to delete the log files. Each time it is invoked, the designated log is deleted and the IoTaWatt restarts. To delete all of your history, issue the following commands from your browser, being sure to do it in the order specified and waiting for the device to reboot after each. You will receive the response “ok” each time the command is run.
iotawatt.local/command?deletelog=current
iotawatt.local/command?deletelog=history
After you delete the current log, the system will create a new current log beginning at the time of restart. Your history log will remain intact with all of the accumulated history to date. You will notice no difference in running the local graph unless you request resolution of less than 60 seconds.
You can delete the history log anytime after that - up to about a year later. When the system restarts, it will build a new history log from the data in your current log, so history before the current log was created will be gone.
Be careful with these commands. There’s no undelete.