Octofree

Octofree

Docker app from dopeytree's Repository

Overview

🐙 Octopus - Free Electric!!! ⚡️ Never miss Octopus free electricity again! Note Currently NO GUI check logs & discord for notifications Octofree monitors the Octopus Energy website for upcoming free electricity saving sessions and sends timely Discord notifications to remind you to take advantage of them. 💰 Saving sessions are free electric periods (usually 1-2hrs) frequent during strong winds. 📱 Sends you a Discord notification on your mobile when a session is scheduled. 📣 Reminds you again 5 minutes before the session starts. 🐰 Warns 3 minutes before the end.

Octofree - 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

logo

Screenshot

screenshot

Requirements

  • octopus energy customer + signed up to saving sessions
  • 24/7 powered - server | pc | mac | raspberry pi | etc
  • 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.env or set individual -e variables to provide your
    • DISCORD_WEBHOOK_URL, OUTPUT_DIR, and other options
    • If no settings.env file exists in your workspace, copy or create one from octofree/settings.env.template
  • Bind-mount a host folder to persist logs and state
    • Set OUTPUT_DIR=/data (or another mounted path) so the output/ files appear on the host

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.env locally, avoid rebuilding by supplying --env-file or -e variables at docker run time
  • Check logs and last-sent session inside the mounted folder (octofree.log, last_sent_session.txt) when debugging notifications
  • The build.sh script runs Trivy; if you don't have Trivy available you can skip it and use docker build directly

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=false to send only 1x notification per saving sessions
  • set to true to send > than 1x notification per current session
  • true currently only works during an active saving session
  • true sends time date, then 1min sends 5min delta, then end state
  • true allows 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 false for continuous hourly monitoring
SINGLE_RUN=false
SINGLE_RUN=true
Storage

Storage

Only required for unraid & docker

volumes:
      - /path/on/host/octofree-data:/data

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.

Open the Apps tab on your Unraid server Search Community Apps for Octofree Review the template variables and paths Click Install

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
    

Related apps

Details

Repository
ghcr.io/dopeytree/octofree:latest
Last Updated2026-07-15
First Seen2025-10-21

Runtime arguments

Network
bridge
Shell
/usr/local/bin/console-wrapper
Privileged
false

Template configuration

Discord Webhook URLVariable

Discord webhook URL for sending notifications. Create a webhook in your Discord server settings.

Target
DISCORD_WEBHOOK_URL
Output DirectoryPathrw

Directory for logs and session data.

Target
/data
Default
/mnt/user/appdata/octofree
Value
/mnt/user/appdata/octofree
Test ModeVariable

Enable test mode to send multiple notifications per session for testing. Default: false

Target
TEST_MODE
Default
false
Value
false
Single RunVariable

Run once and exit instead of looping continuously. Default: false

Target
SINGLE_RUN
Default
false
Value
false