Skip to content

An extension to maintain battery between selected percentages to optimize lifetime on Chromebooks

License

Notifications You must be signed in to change notification settings

allen-n/charge-control-chrome-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Charge Control Chrome Extension

Battery Info

Keep your lithium-ion battery healthy, easily

Description

An extension of battery-info-chrome-extension by radibit.

This extension extends the functionality of radibit's by allowing you to automatically turn a smart outlet on/off at certain charge percentages. This will let you optimize the lifespan of your li-ion batteries!

According to battery university, reducing the depth of discharge of your lithium ion battery from 100% to 10% can increase it's longevity by up to 25,000%!

The extension is using the Battery Status API.

Usage Requirements:

  • Smart Outlets: I'm using Smart Plug, Gosund Mini WiFi Outlet. But any smart plug that can interact with IFTT should work.
  • IFTT Webhooks: You'll need to create IFTT applets with webhook triggers. Get your webhook key by pressing the "Documentation" button on the top right of this page.
  • For setup, please refer to the wiki.

Features:

New Functionality:

  • Configurable options menu to set max charge level, min charge level, and webhook information to trigger charger on/off events
  • Options Menu
  • Turn charge controller on/off with slider (i.e. when you want to top off before unplugging for the day)
  • Controller On Img
  • Controller Off Img

Old functionality (from battery-info-chrome-extension):

  • Shows current battery charge level as a badge on the icon (updates on every two minutes)
  • Provides information about the remaining time / time until full charge (on icon click)
  • Indicates with an icon whether or not the laptop is connected to a power adapter

Detailed Usage Instructions

Copied from the wiki Note: As of the most recent update Gosund outlets have had their IFTT integration disabled, but any othe IFTT enabled outlet should still work

  1. Getting the smart outlets: I'm using Smart Plug, Gosund Mini WiFi Outlet. But any smart plug that can interact with IFTT should work. The rest of this walkthrough will assume you're using these outlets, but the steps should be easily transferrable if you aren't.
  2. Log in or create an IFTT account.
  3. Create your applet. You should see "If This then that on the screen.
  4. Click This and search for "webhooks". Click it, then click "receive web request". Then you'll want to give it a name, something like "outlet_off" will do. Just don't put blank spaces like " " in the name! Outlet Off Webhook Image
  5. Now select that. Select That Image
  6. Search for your smart outlet developer. For GoSund, search for "smart life".Smart Life Logo
  7. Log in with your GoSund account, and select the off event (you'll do "on" for the second event). On/Off Events Image
  8. Select the outlet you want to control from the menu, create the event, uncheck "Receive notifications when this applet runs, and click finish. Select Outlet Image
  9. Repeat steps 3-6, but this time naming the event something along the lines of "outlet_on" in step 4, and selecting the off event in step 5. You now have your two event names!
  10. Get your API key by clicking "documentation on this page. Documentation Page
  11. The string at the top of your page after "Your key is:" is your key, record it!
  12. Open the extension menu, click "options", and add the information as follows: webhook API key is the key from step 8, "Turn On" Event Name is the event name with "on" in it from the second time you did step 4, and "Turn Off" Event Name is the event name with "off" in it from the first time you did step 4. Options Menu Image
  13. Press save, and you're ready to roll! Test the outlet control by clicking "Test Turn On/Off", which should turn your outlet on and off. If everything is working, you're set to go.
  14. Don't forget to turn the extension off via the popup menu if you want to charge to 100% before a day out on the town :) On/Off Button Popup Image

About

An extension to maintain battery between selected percentages to optimize lifetime on Chromebooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published