Skip to content

Commit 17c5205

Browse files
authored
Update README.md
1 parent 5ee031e commit 17c5205

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,41 @@ export DEBUG_MODE=True
108108
./wallbox_monitor.py
109109
```
110110

111+
#### **External Logging Script Support**
112+
113+
You can configure an external script to be executed whenever the charging state changes. The script will receive a JSON payload containing session details.
114+
115+
1️⃣ Edit your 'wallbox_monitor.credo' file
116+
117+
Add the following line with the path to your external script:
118+
```
119+
EXTERNAL_LOG_SCRIPT = /path/to/your/log_script.sh
120+
```
121+
122+
2️⃣ Ensure your script is executable
123+
124+
```bash
125+
chmod +x /path/to/your/log_script.sh
126+
```
127+
128+
3️⃣ JSON Data Format Passed to the Script:
129+
130+
```json
131+
{
132+
"state": "charging",
133+
"start_time": "1739959209.48",
134+
"stored_power": 1.26,
135+
"total_energy_kWh": 20.0,
136+
"notified": 1,
137+
"repeat_check": 0
138+
}
139+
```
140+
141+
5️⃣ Run and Verify
142+
143+
Whenever the script detects a change in the charging state, it will execute log_script.sh, passing the charging data in JSON format.
144+
145+
111146
### **🛠 Troubleshooting**
112147

113148
#### Selenium Fails: “NoSuchDriverException”

0 commit comments

Comments
 (0)