{"id":24953884,"url":"https://github.com/bjoerrrn/EV-Charging-Monitor-for-Raspberry-Pi","last_synced_at":"2025-10-18T02:30:27.539Z","repository":{"id":275412151,"uuid":"926004632","full_name":"bjoerrrn/shellrecharge-wallbox-monitor","owner":"bjoerrrn","description":"A Python script for monitoring a local wallbox charging station from NewMotion / Shell Recharge and sending notifications via Discord.","archived":false,"fork":false,"pushed_at":"2025-02-02T10:27:35.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T11:18:52.657Z","etag":null,"topics":["charging-station","discord-notifications","linux","monitoring","newmotion","raspberry-pi","shellrecharge","wallbox"],"latest_commit_sha":null,"homepage":"https://discordapp.com/users/371404709262786561","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bjoerrrn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-02-02T10:02:40.000Z","updated_at":"2025-02-02T10:28:49.000Z","dependencies_parsed_at":"2025-02-02T11:18:54.010Z","dependency_job_id":"4f6cf6bd-31a8-454c-8536-9adfc6cece27","html_url":"https://github.com/bjoerrrn/shellrecharge-wallbox-monitor","commit_stats":null,"previous_names":["bjoerrrn/shellrecharge-wallbox-monitor"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoerrrn%2Fshellrecharge-wallbox-monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoerrrn%2Fshellrecharge-wallbox-monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoerrrn%2Fshellrecharge-wallbox-monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoerrrn%2Fshellrecharge-wallbox-monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjoerrrn","download_url":"https://codeload.github.com/bjoerrrn/shellrecharge-wallbox-monitor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236887959,"owners_count":19220439,"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":["charging-station","discord-notifications","linux","monitoring","newmotion","raspberry-pi","shellrecharge","wallbox"],"created_at":"2025-02-03T04:16:28.312Z","updated_at":"2025-10-18T02:30:27.528Z","avatar_url":"https://github.com/bjoerrrn.png","language":"Python","funding_links":["https://www.buymeacoffee.com/bjoerrrn","https://github.com/sponsors/bjoerrrn"],"categories":[],"sub_categories":[],"readme":"![stars](https://img.shields.io/github/stars/bjoerrrn/shellrecharge-wallbox-monitor) ![last_commit](https://img.shields.io/github/last-commit/bjoerrrn/shellrecharge-wallbox-monitor) ![License](https://img.shields.io/badge/License-GPL_3.0-blue.svg) [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black)](https://www.buymeacoffee.com/bjoerrrn)\n\n# EV Charging Monitor for Raspberry Pi\n\n**A Python script for monitoring a local wallbox charging station and sending notifications via Discord, ntfy, or Pushover.**  \n\nCurrently supported wallboxes: \n* NewMotion / Shell Recharge [tested with Business Pro 2.1]\n\nIf you want to support addind new EV Chargers, [read here](https://github.com/bjoerrrn/EV-Charging-Monitor-for-Raspberry-Pi/blob/main/CONTRIBUTING.md#-adding-support-for-new-wallbox-models) how to. \n\n## Features\n- Reads charging rate and consumed energy from a web-based wallbox interface.\n- Uses **Selenium** to extract data dynamically.\n- Supported notification channels: Discord, ntfy, Pushover\n- Sends notifications when charging starts, stops, and after 5 minutes: charging rate.\n- Sends a notification after charging stopped or interrupted, summarizing consumed energy and time.\n- If a fixed price per kWh is configured, the energy consumed between cable connected/disconnected will be summarized in Euro.\n- Sends a notification when the cable was connected or disconnected. Also handles short-time unavailabilities of the status page to avoid false-positives.\n- Typically, wallboxes sometimes consume energy as long as a cable is connected. **Prevents false positives** by only detecting charging rates above **1.0 kW**.\n\n## Setup \u0026 Installation  \n\n### **1️⃣ Install Dependencies**\nOn a **Raspberry Pi**, run:  \n```bash\nsudo apt update\nsudo apt install -y chromium-browser chromium-chromedriver\nsudo apt install -y python3-requests python3-selenium python3-bs4 python3-urllib3\n```\n\n### **2️⃣ Clone This Repository**\n```bash\ngit clone https://github.com/bjoerrrn/wallbox-monitoring.git\ncd wallbox-monitoring/\n```\n\n### **3️⃣ Configure Your Script**\n\nwallbox_monitor.credo: This file contains sensitive credentials, hence the .credo extension. \n\nOpen wallbox_monitor.credo and set:\n-\tWallbox URL: Change\n```\nWALLBOX_URL = http://\u003cyour-local-wallbox-ip\u003e:12800/user/user.html\n```\n\n-\tDiscord Webhook: Replace\n```\nDISCORD_WEBHOOK_URL = \u003cyour-discord-webhook-url\u003e\n```\n\n- and/or ntfy:\n```\nNTFY_TOPIC = \u003cyour_ntfy_topic\u003e\n```\n\n- and/or Pushover:\n```\nPUSHOVER_USER_KEY = \u003cyour_pushover_user_key\u003e\nPUSHOVER_API_TOKEN = \u003cyour_pushover_api_token\u003e\n```\n\n### **4️⃣ Run the Script**\n\nManual Execution\n```bash\npython3 wallbox_monitor.py\n```\n\nRun Every Minute with Crontab\n```bash\ncrontab -e\n```\n\nAdd the following line at the bottom:\n```bash\n* * * * * /usr/bin/python3 /home/pi/wallbox-monitor/wallbox_monitor.py\n```\nReplace /home/pi/wallbox-monitor/ with your actual script path.\n\nSave and exit.\n\n### **📡 Expected Output**\n\n📢 Notifications\n\n```\n🔌 02.02.25, 09:50: Cable connected.\n⚡ 02.02.25, 22:20: charging started.\n⏳ charging power: 3.55 kW\n🔋 02.02.25, 23:30: charging stopped.\n🔍 consumed: 3.75 kWh of 15.92 kWh in 01:10 h\n🔌 02.02.25, 23:50: Cable disconnected.\n💶 total: 15.92 kWh = 5.57 €\n```\n\n### **📝 Logging**\n\nCheck logs in:\n```bash\ncat /home/pi/wallbox-monitor/wallbox_monitor.log\n```\n\nIf you want to show additional debug output in wallbox_monitor.log, add `DEBUG_MODE=True` in crontab:\n```bash\n* * * * * DEBUG_MODE=True /usr/bin/python3 /home/pi/wallbox-monitor/wallbox_monitor.py\n```\n\n.. or in your shell to debug manually:\n```bash\nexport DEBUG_MODE=True\n./wallbox_monitor.py\n```\n\n#### **External Logging Script Support**\n\nYou can configure an external script to be executed whenever the charging state changes. The script will receive a JSON payload containing session details.\n\n1️⃣ Edit your 'wallbox_monitor.credo' file\n\nAdd the following line with the path to your external script:\n```\nEXTERNAL_LOG_SCRIPT = /path/to/your/log_script.sh\n```\n\n2️⃣ Ensure your script is executable\n\n```bash\nchmod +x /path/to/your/log_script.sh\n```\n\n3️⃣ JSON Data Format Passed to the Script:\n\n```json\n{\n    \"state\": \"charging\",\n    \"start_time\": \"1739959209.48\",\n    \"stored_power\": 1.26,\n    \"total_energy_kWh\": 20.0,\n    \"notified\": 1,\n    \"repeat_check\": 0\n}\n```\n\n5️⃣ Run and Verify\n\nWhenever the script detects a change in the charging state, it will execute log_script.sh, passing the charging data in JSON format.\n\n\n### **🛠 Troubleshooting**\n\n#### Selenium Fails: “NoSuchDriverException”\n\nTry reinstalling chromedriver:\n```bash\nsudo apt install --reinstall chromium-chromedriver\n```\n\n#### Charging or Consumed Energy Not Detected\n\nRun debug script:\n```bash\npython3 test_consumed_debug.py\n```\n\n\n### **🤝 Contributing**\n\nFeel free to open issues or pull requests to improve the script! 🚀\n\nif you want to contact me directly, feel free to do so via discord: https://discordapp.com/users/371404709262786561\n\n### ❤️ Support the Project\n\nThis project is open-source and maintained in my free time. If you find this script useful and would like to support its further development, bug fixes, and the addition of new wallbox models, any contribution is greatly appreciated!\n\nYou can support the project via:\n\n* **[GitHub Sponsors](https://github.com/sponsors/bjoerrrn)**\n* **[Buy Me a Coffee](https://www.buymeacoffee.com/bjoerrrn)**\n\nYour support helps cover development costs and motivates me to keep improving the Wallbox Monitor. Thank you!\n\n### **📜 License**\n\nThis project is open-source under the [GPL-3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoerrrn%2FEV-Charging-Monitor-for-Raspberry-Pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjoerrrn%2FEV-Charging-Monitor-for-Raspberry-Pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoerrrn%2FEV-Charging-Monitor-for-Raspberry-Pi/lists"}