Enable the "Power off if no charger is connected" setting on the Settings page, Miscellaneous settings section. It will turn off if it does not detect USB power and turn on if power comes back. If it does not turn off then check the device log to find out more information about what's happening (make sure you've enabled Advanced mode at the bottom right of the web interface to see the device log on the Status page).