You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor
* Update dockerfile and use switch threshold
* Add webserver
* Add timestamp to pre-start message
* Cancel run if consumption data is 0
* Refresh jwt token correctly
* Fix running multiple scheduled runs in a day
* Log config updates from web ui
* Add basic auth to webserver
* Update README
* Log threshold and improve message
* bot_orchestrator.py: Fix call to accept_new_agreement (#131)
* config.html: Associate labels to inputs (#130)
* Make port configurable
* config.yaml: Add ingress configuration (#132)
* Improve some messages
* update user agent
---------
Co-authored-by: Sam Reed <sam@reedyboy.net>
Copy file name to clipboardExpand all lines: README.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,23 @@ I created this because I've been a long-time Agile customer who got tired of the
9
9
10
10
I personally have this running automatically every day at 11 PM inside a Raspberry Pi Docker container, but you can run it wherever you want. It sends notifications and updates to a variety of services via [Apprise](https://github.com/caronc/apprise), but that's not required for it to work.
11
11
12
+
## Web Dashboard
13
+
14
+
After starting the bot you can access the web dashboard on `localhost:5050`
15
+
16
+
- Make changes to your config through the dashboard without needing to restart
17
+
- Access and read logs
18
+
- See graph of savings (coming soon)
19
+
12
20
## How to Use
13
21
14
22
### Requirements
15
-
- An Octopus Energy Account
23
+
- An Octopus Energy Account
16
24
- In case you don't have one, we both get £50 for using my referral: https://share.octopus.energy/coral-lake-50
17
25
- Get your API key [here](https://octopus.energy/dashboard/new/accounts/personal-details/api-access)
18
26
- A smart meter
19
27
- Be on a supported Octopus Smart Tariff (see tariffs below)
20
-
- An Octopus Home Mini for real-time usage (**Important**). Get one for free [here](https://octopus.energy/blog/octopus-home-mini/).
28
+
- An Octopus Home Mini for real-time usage (**Important**). Request one from Octopus Energy for free [here](https://octopus.energy/blog/octopus-home-mini/).
3.Schedule this to run once a day with a CRON job or Docker. I recommend running it at 11 PM to leave yourself an hour as a safety margin in case Octopus takes a while to generate your new agreement.
48
+
3.Run `main.py`. I recommend scheduling it to run it at 11 PM in order to leave yourself an hour as a safety margin in case Octopus takes a while to generate your new agreement.
41
49
42
50
### Running using Docker
43
51
Docker run command:
44
52
```
45
53
docker run -d \
46
54
--name MinMaxOctopusBot \
55
+
-p 5001:5001 \
56
+
-v ./logs:/app/logs \
47
57
-e ACC_NUMBER="<your_account_number>" \
48
58
-e API_KEY="<your_api_key>" \
49
59
-e EXECUTION_TIME="23:00" \
@@ -54,7 +64,8 @@ docker run -d \
54
64
-e TARIFFS=go,agile,flexible \
55
65
-e TZ=Europe/London \
56
66
-e BATCH_NOTIFICATIONS=false \
57
-
--restart unless-stopped \
67
+
-e WEB_USERNAME="<whatever_you_want>" \
68
+
-e WEB_PASSWORD="<whatever_you_want>" \
58
69
eelmafia/octopus-minmax-bot
59
70
```
60
71
or use the docker-compose.yaml **Don't forget to add your environment variables**
@@ -66,13 +77,18 @@ Note : Remove the --restart unless line if you set the ONE_OFF variable or it wi
|`ACC_NUMBER`| Your Octopus Energy account number. |
68
79
|`API_KEY`| API token for accessing your Octopus Energy account. |
69
-
|`TARIFFS`| A list of tariffs to compare against. Default is go,agile,flexible |
80
+
|`TARIFFS`| A list of tariffs to compare against. Default is go,agile,flexible |
70
81
|`EXECUTION_TIME`| (Optional) The time (HH:MM) when the script should execute. Default is `23:00` (11 PM). |
71
82
|`SWITCH_THRESHOLD`| A value (in pence) which the saving must be before the switch occurs. Default is `2` (2p). |
72
83
|`NOTIFICATION_URLS`| (Optional) A comma-separated list of [Apprise](https://github.com/caronc/apprise) notification URLs for sending logs and updates. See [Apprise documentation](https://github.com/caronc/apprise/wiki) for URL formats. |
73
84
|`ONE_OFF`| (Optional) A flag for you to simply trigger an immediate execution instead of starting scheduling. |
74
-
|`DRY_RUN`| (optional) A flag to compare but not switch tariffs. |
75
-
|`BATCH_NOTIFICATIONS`| (optional) A flag to send messages in one batch rather than individually. |
85
+
|`DRY_RUN`| (Optional) A flag to compare but not switch tariffs. |
86
+
|`BATCH_NOTIFICATIONS`| (Optional) A flag to send messages in one batch rather than individually. |
87
+
| `WEB_USERNAME` | (Optional) Defaults to `admin`. Auth for the web dashboard.
88
+
| `WEB_PASSWORD` | (Optional) Defaults to `admin`. Auth for the web dashboard.
89
+
| `WEB_PORT` | (Optional) Defaults to `5050`.
90
+
91
+
*Reminder: Change the password to something else other than default. It's not meant to be secure, it's just there to stop others on your network from accessing the dashboard and your API key. If they have access to your compose/config files you're already cooked.*
0 commit comments