How to monitor & analyze your windows based system's battery?
Tags: opensource, showdev, javascript, news
Published: 2020-06-14 07:14:19

Have you ever wondered about your system's capabilities especially battery capacity, estimated life, recent usages, overall state, etc?

I did and so I started looking for solutions online and after being completely exhausted by no good product in the market to fulfill my needs. I decided to build a tool called, Powir.

So, [Powir](https://powir.slapbot.me/) is a Windows 10 based tool to monitor and analyze your system's power and battery usage.

It provides you with various information and statistics about the current and overall history of the power and battery usage of your system.

Powir is [100% free and completely open-source](https://github.com/SlapBot/powir/) for anyone to download/build and use. :)

Installation is as simple as running:
```
curl -L https://github.com/SlapBot/powir/releases/download/v1.0.2/powir.1.0.2.exe --output powir.exe
./powir
```

![](https://github.com/SlapBot/powir/raw/master/demos/gifs/powir-main.gif)

There were various reasons behind building this tool such as:

🔍 Complete lack of any such power/battery monitoring analyzing tool available in the market.
❌ Obscure documentation over how to find battery statuses on the Internet.
😖 Native solution requires running commands from terminal which outputs unclear and not satisfactory reports of the system.

Hence, I decided to work on this mini-project to help the needs of everyone whether developer or not to get a clear picture of their system's capabilities.

![](https://github.com/SlapBot/powir/raw/master/demos/processed-screenshots/system-information.png)

🏃‍♀️ 100% portable app with no installations required: download and run!
🧹 Provides you with a simple and clean UI to list your battery and system information.
🔋 Shows you the trend in battery capacity as well estimate life since the OS was installed.
🧾 Ability to export all the data via various formats: PDF (app), JSON (processed), HTML (original report)

![](https://powir.slapbot.me/assets/demos/processed-screenshots/actions.png)

Installation & Demo: https://www.youtube.com/watch?v=0nEu4neYHRM

---

If you're looking to build it from the source, inspect the app, or add new features - its extremely simple and you only have to follow few instructions as listed below:

### Prerequisites
- Git
- Node
- NPM

### Setup

- Clone the repository: `git clone https://github.com/SlapBot/powir.git`
- Cd into the directory: `cd powir` and run: `npm install`

### Build

- Run `npm run build` which will package the app at `dist/` folder.

### Usage

#### Electron App
- Run these two commands in two separate sessions when you are developing in order to use HMR (hot module reloading):
    - Run react server: `npm run react-start`
    - Run electron app: `npm run electron-start`
- All of the server code is located at: `public/server` directory.
- Entrypoint of the electron app is at`public/electron.js`.
- Everything related to rendering is done at: `src` directory.
- Any of the changes you make at src directory will reflect instantly in the app.
- Any of the changes made for server requires the app to be restarted using: `npm run electron-start`

#### Browser Window App
- Run `npm run lite-mode` which opens up a tab in your default browser again with HMR enabled.
- Entrypoint of the browser window app is at`public/browser.js`.
- Everything related to rendering is done at: `src` directory.
- Any of the changes you make at src directory will reflect instantly in the app.
- Any of the changes made for server requires the app to be restarted using: `npm run lite-mode`

---

💖 App is completely open source with all of the documentation available on Github at: https://github.com/SlapBot/powir/

🐤 Follow me on Twitter for more updates or any query: https://twitter.com/ugupta41

🚀 Relevant Product Hunt Launch: https://www.producthunt.com/posts/powir/

🥂 Hackernews Discussion: https://news.ycombinator.com/item?id=23515694