All apps · 0 apps
Octofree
Docker app from dopeytree's Repository
Overview
Readme
View on GitHubOctofree - is here to serve
- 🐙 Octopus - Free Electric!!! ⚡APP — 10:45
- 🕰️ 12-2pm, Saturday 4th October
- 📣 T- 5mins to Delta!
- 🐰 End State
Never miss Octopus free electricity again!
💰 saving sessions are free electric periods (usually 1-2hrs) frequent during strong winds
- 👩💻 48 hours prior Octopus Energy send an email to the account holder
- ❌ we then forget to act, missing out on free energy
- ✅ hence octofree will ping your mobile!
🧠 the script scans https://octopus.energy/free-electricity/
- 📆 extracts the next saving session date & time
- 📱 sends you a discord webhook notification on your mobile
- 📣 reminds you again 5mins before saving session starts
- 🐰 warns 3mins before the end state

Screenshot

Requirements
- octopus energy customer + signed up to saving sessions
- 24/7 powered - server | pc | mac | raspberry pi | etc
- internet access
- python3
- discord webhook [server]
- discord [mobile device]
Installation
Virtual Environment
Virtual Environment
Preferred method is docker but you can also run in a Python virtual environment located a .venv folder
- create the virtual environment:
python3 -m venv .venv
- activate the virtual environment (macOS/Linux):
source .venv/bin/activate
- set settings in settings.env
- run the script
python3 octofree/octofree.py
Unraid Server
Unraid Server
- add CONTAINER
- repo url:
ghcr.io/dopeytree/octofree:latest
- advanced --> icon url:
https://github.com/dopeytree/octofree/blob/61e16adea141812f674ca91d86ab697ac02e0c91/logo_octofree.png?raw=true
add VARIABLE -> discord:
key=
DISCORD_WEBHOOK_URL
value=enter_your_discord_server_webhook
add VARIABLE -> test mode:
key=
TEST_MODE
value=
false
add VARIABLE -> loop:
key=
SINGLE_RUN
value=
false
add PATH:
container path=
/data
host path=
/mnt/user/appdata/octofree
APPLY settings
Docker
Docker
- Official published image on GitHub Container Registry :
docker pull ghcr.io/dopeytree/octofree:latest
Run the published image (recommended):
docker run --rm \
--env-file ./octofree/settings.env \
-v /path/on/host/octofree-data:/data \
ghcr.io/dopeytree/octofree:latest
Notes:
- Use
--env-file ./octofree/settings.envor set individual-evariables to provide yourDISCORD_WEBHOOK_URL,OUTPUT_DIR, and other options- If no
settings.envfile exists in your workspace, copy or create one fromoctofree/settings.env.template
- Bind-mount a host folder to persist logs and state
- Set
OUTPUT_DIR=/data(or another mounted path) so theoutput/files appear on the host
- Set
Optional quick local build:
# Build locally (if you need to modify code or prefer a local image)
docker build -t octofree ./octofree
# Run the locally built image
docker run --rm --env-file ./octofree/settings.env -v /path/on/host/octofree-data:/data octofree
If you want the helper script and vulnerability scan, run the included ./octofree/build.sh (it builds the image and runs a Trivy scan).
Example docker-compose.yml (recommended for long-running deployments):
version: '3.8'
services:
octofree:
image: ghcr.io/dopeytree/octofree:latest
environment:
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
- OUTPUT_DIR=/data
- SINGLE_RUN=false
- TEST_MODE=false
volumes:
- /path/on/host/octofree-data:/data
restart: unless-stopped
Docker Tips & troubleshooting
- If you change
settings.envlocally, avoid rebuilding by supplying--env-fileor-evariables atdocker runtime - Check logs and last-sent session inside the mounted folder (
octofree.log,last_sent_session.txt) when debugging notifications - The
build.shscript runs Trivy; if you don't have Trivy available you can skip it and usedocker builddirectly
Settings
see settings.env
Discord Webhook Notification
Discord Webhook Notification
- [required for notifications]
- load or create a server in discord
- create a new channel called 'octofree'
- click the cogs to get the settings then find the webhooks button
- create a new webhook & copy the url
- set your discord webhook URL in
settings.env
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
Test Mode
Test Mode
- allows multiple notifcation testing when 1x is live
- DEFAULT=
falseto send only 1x notification per saving sessions - set to
trueto send > than 1x notification per current session truecurrently only works during an active saving sessiontruesends time date, then 1min sends 5min delta, then end statetrueallows testing of discord on mobile etc
TEST_MODE=false
TEST_MODE=true
Single Run
Single Run
- to loop or not
- true = runs the script once & exits (instead of looping every hour)
- DEFAULT=false
- set to
falsefor continuous hourly monitoring
SINGLE_RUN=false
SINGLE_RUN=true
Logs
See console for octofree.log
- Check your setup for the exact path to the storage ouput folder
output/octofree.log- main log file for all activity and errors
output/last_sent_session.txt- tracks the last session for which a notification was sent
Media gallery
Install Octofree on Unraid in a few clicks.
Find Octofree in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Requirements
*** Requires Discord webhook. ***
Monitors Octopus Energy free electricity sessions and sends notifications via Discord. For support, visit the forum: https://forums.unraid.net/topic/194221-support-dopeytree-docker-templates/ or GitHub issues: https://github.com/dopeytree/octofree/issues
Categories
Related apps
Explore more like this
Explore allLinks
Details
ghcr.io/dopeytree/octofree:latestRuntime arguments
- Network
bridge- Shell
/usr/local/bin/console-wrapper- Privileged
- false
Template configuration
Discord webhook URL for sending notifications. Create a webhook in your Discord server settings.
- Target
- DISCORD_WEBHOOK_URL
Directory for logs and session data.
- Target
- /data
- Default
- /mnt/user/appdata/octofree
- Value
- /mnt/user/appdata/octofree
Enable test mode to send multiple notifications per session for testing. Default: false
- Target
- TEST_MODE
- Default
- false
- Value
- false
Run once and exit instead of looping continuously. Default: false
- Target
- SINGLE_RUN
- Default
- false
- Value
- false