{"id":27944707,"url":"https://github.com/nilicule/energy-usage","last_synced_at":"2026-02-10T05:34:51.170Z","repository":{"id":291068279,"uuid":"976478218","full_name":"nilicule/energy-usage","owner":"nilicule","description":"A Python web application that displays home energy data using the NET2GRID API. The application authenticates users and shows real-time power data that refreshes every 10 seconds.","archived":false,"fork":false,"pushed_at":"2025-05-02T08:24:42.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T08:26:03.554Z","etag":null,"topics":["api","energy","energy-consumption","energy-monitor","net2grid"],"latest_commit_sha":null,"homepage":"https://n2g.dev/energy-usage","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilicule.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-02T07:12:27.000Z","updated_at":"2025-05-02T08:24:46.000Z","dependencies_parsed_at":"2025-05-02T08:26:31.239Z","dependency_job_id":"dc6a1467-eb15-40e4-ad8a-b374da6bc4de","html_url":"https://github.com/nilicule/energy-usage","commit_stats":null,"previous_names":["nilicule/energy-usage"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilicule%2Fenergy-usage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilicule%2Fenergy-usage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilicule%2Fenergy-usage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilicule%2Fenergy-usage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilicule","download_url":"https://codeload.github.com/nilicule/energy-usage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882817,"owners_count":21819153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","energy","energy-consumption","energy-monitor","net2grid"],"created_at":"2025-05-07T12:54:07.805Z","updated_at":"2026-02-10T05:34:45.271Z","avatar_url":"https://github.com/nilicule.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Energy Usage Web Application\n\nA Python web application that displays instantaneous power usage data. The application authenticates users and shows real-time power data that refreshes every 10 seconds.\n\n## Features\n\n- User authentication using the NET2GRID Customer Engagement API\n- Display of instantaneous power data for electricity and gas\n- Auto-refresh of power data every 10 seconds\n- Responsive design for desktop and mobile devices\n- Docker containerization for easy deployment\n\n## Prerequisites\n\n- Docker and Docker Compose\n- NET2GRID API credentials (client_id and client_secret)\n\n## Setup\n\n1. Clone this repository:\n   ```\n   git clone \u003crepository-url\u003e\n   cd energyUsage\n   ```\n\n2. Create a `.env` file in the project root with your API credentials:\n   ```\n   # API Configuration\n   CLIENT_ID=your_client_id\n   CLIENT_SECRET=your_client_secret\n   API_BASE_URL=https://api.n2g-ynni.net\n\n   # Flask Configuration\n   SECRET_KEY=your_secret_key_for_flask_sessions\n   PORT=5000\n   ```\n\n   Replace `your_client_id`, `your_client_secret`, and `your_secret_key_for_flask_sessions` with your actual values.\n\n## Running the Application\n\n### Using Docker\n\n1. Build the Docker image:\n   ```\n   docker build -t energy-usage-app .\n   ```\n\n2. Run the container:\n   ```\n   docker run -p 5000:5000 --env-file .env energy-usage-app\n   ```\n\n3. Access the application at http://localhost:5000\n\n### Without Docker\n\n1. Install dependencies:\n   ```\n   pip install pip-tools\n   pip-compile pyproject.toml --output-file=requirements.txt\n   pip install -r requirements.txt\n   ```\n\n2. Run the application:\n   ```\n   python app.py\n   ```\n\n3. Access the application at http://localhost:5000\n\n## Usage\n\n1. Open the application in your web browser\n2. Log in with your NET2GRID credentials\n3. View your instantaneous power data on the dashboard\n4. The data will automatically refresh every 10 seconds\n\n## Project Structure\n\n```\nenergyUsage/\n├── app.py                 # Main Flask application\n├── templates/             # HTML templates\n│   ├── login.html         # Login page\n│   └── dashboard.html     # Dashboard page\n├── static/                # Static files\n│   └── css/\n│       └── style.css      # CSS styles\n├── .env                   # Environment variables\n├── pyproject.toml         # Project dependencies\n├── Dockerfile             # Docker configuration\n└── .dockerignore          # Docker ignore file\n```\n\n## API Documentation\n\nThe application uses the NET2GRID Customer Engagement API. The OpenAPI specification can be found in the `docs/` directory.\n\n## License\n\n[MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilicule%2Fenergy-usage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilicule%2Fenergy-usage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilicule%2Fenergy-usage/lists"}