⚡ PowerSwitch

Automated Power Supplier Switching Made Simple

Manage and Automate Your Utility Provider switching

PowerSwitch is a NestJS-based application for managing and automating PApower and PAgas rate switching

Why?

In Pennsylvania, consumers have the power to choose their electricity and natural gas suppliers. By switching to a different provider, you can often find better rates and save 💰 💰 💰 .
Unfortunately, managing this system is cumbersome and time-consuming. Providers often have term limits on their rates and will often increase the rate for existing customers. PowerSwitch helps with this process, helping you save money by always being on the best available rate. and alerting you if a rate is found.

Aren't there other alternatives?

Yes, there are other alternatives like Arbor but they are a for-profit enterprise that gets money for referrals. This requires 2 things:

With Power Switch, The data is yours to control. And you can be sure you are getting the best possible rate, because its directly from the Utility Website

Features

🌐

Web Interface

Built-in frontend for easy management

⚙️

Configurable

Environment-based configuration for flexibility

🐳

Docker Ready

Full Docker support for easy deployment

🔔

Alerts via Email

When new rates are found, it will alert you via email

Quick Start

🐳 Using Docker (Recommended)

The easiest way to get started:

docker pull ghcr.io/nfons/powerswitch/powerswitch:latest
docker run -p 8080:8080 powerswitch

Access the application at http://localhost:8080

📦 From Source

Prerequisites: Node.js (v16+), npm

# Clone the repository
git clone git@github.com:nfons/PowerSwitch.git
cd PowerSwitch

# Install dependencies
npm install

# Configure environment
cp sample.env .env

# Run the application
npm run start:dev

Documentation

Configuration

Edit the .env file to customize your setup with your own `[values]` (or rename sample.env to .env)

DB_TABLE=[DB TABLE NAME]
CRON_TIME=[any valid cron, i.e * * * * *]
API_TYPE=[either 'web' or 'csv' defaults to web if left empty]
GAS_URL=[either csv url or web url. see Config option section for more info]
ELECTRIC_URL=[either csv url or web url. see Config option section for more info
GMAIL_USER=gmail email address
GMAIL_PASS= Gmail app password. NOT your gmail password. see config section for more info
TO_EMAIL= Alternative address to send emails to
                

Configuration Options

Visit Configuration Options for detailed information on setting up your system.

Technology Stack

  • Framework: NestJS
  • Language: TypeScript
  • Database: SQLite with TypeORM
  • Scheduling: Node-cron
  • Testing: Jest

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the GNU General Public License v3.0.

See the LICENSE.md file for details.