battery plugin example