Orbi RBR750 — Automatic Daily Reboot

Orbi RBR750 — Automatic Daily Reboot

A reference for the working setup: a script on the Synology NAS that logs into the
Orbi, grabs a fresh security token, and triggers a reboot — run daily by DSM Task Scheduler.


How it works (the key insight)

The reboot is NOT a simple URL. This firmware uses a small handshake:

  1. Load Reboot_confirm.htm — this sets a session cookie and contains a one-time token.
  2. The reboot is actually a POST to newgui_adv_home.cgi?id=<token>not reboot_update.cgi,
    which is what tripped us up for a while.
  3. The POST body must contain buttonSelect=2 (this is the value the page's JavaScript fills in
    when you click "Yes").
  4. The token comes from the form's own action line on the reboot page:
    <form action="newgui_adv_home.cgi?id=...">. It is single-use, so the script must scrape a fresh
    one on every run.

If the firmware ever updates and the script stops working, re-capture the reboot request in the
browser's Developer Tools (Network tab) and check whether the URL, token source, or form field
have changed.


The working script

Saved at ~/orbi-reboot.sh on the NAS. Replace xxxxxxx with your real Orbi admin password.

#!/bin/bash
# Orbi RBR750 reboot script
ORBI_IP="192.168.1.1"
ORBI_USER="admin"
ORBI_PASS='xxxxxxx'
BASE_URL="http://$ORBI_IP"
COOKIE_JAR="/tmp/orbi-cookies.$"
PAGE="/tmp/orbi-reboot-page.$"
POST_OUT="/tmp/orbi-reboot-post.$"
LOG="$HOME/orbi-reboot.log"
cleanup() {
  rm -f "$COOKIE_JAR"
}
fail() {
  echo "$(date): ERROR - $1" >> "$LOG"
  echo "$(date): debug files: $PAGE $POST_OUT" >> "$LOG"
  exit 1
}
trap cleanup EXIT
AUTH_ARGS=(--anyauth -u "$ORBI_USER:$ORBI_PASS")
HTTP_CODE=$(curl -sS -L \
  "${AUTH_ARGS[@]}" \
  -c "$COOKIE_JAR" \
  -o "$PAGE" \
  -w "%{http_code}" \
  "$BASE_URL/Reboot_confirm.htm") || fail "could not load reboot page"
TOKEN=$(grep -oE 'newgui_adv_home\.cgi\?id=[A-Za-z0-9]+' "$PAGE" \
  | head -n1 \
  | sed 's/.*id=//')
[ -n "$TOKEN" ] || fail "could not get token. HTTP=$HTTP_CODE"
HTTP_CODE=$(curl -sS -L \
  "${AUTH_ARGS[@]}" \
  -b "$COOKIE_JAR" \
  -c "$COOKIE_JAR" \
  -o "$POST_OUT" \
  -w "%{http_code}" \
  -X POST "$BASE_URL/newgui_adv_home.cgi?id=$TOKEN" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Referer: $BASE_URL/Reboot_confirm.htm" \
  --data 'buttonHit=&buttonValue=&buttonSelect=2') || fail "reboot POST failed"
case "$HTTP_CODE" in
  200|302)
    echo "$(date): reboot command sent. HTTP=$HTTP_CODE token=${TOKEN:0:8}..." >> "$LOG"
    rm -f "$PAGE" "$POST_OUT"
    ;;
  *)
    fail "unexpected reboot POST HTTP=$HTTP_CODE"
    ;;
esac

Rebuilding from scratch (if ever needed)

Step 1 — Put the script on the NAS

SSH into the NAS, then create the file:

nano ~/orbi-reboot.sh

Paste the script above, set your real password, then save and exit
(Ctrl+O, Enter, Ctrl+X).

Step 2 — Make it executable

chmod +x ~/orbi-reboot.sh

Step 3 — Test it (this reboots the Orbi)

~/orbi-reboot.sh
cat ~/orbi-reboot.log

A line like reboot command sent. HTTP=200 ... plus a real Wi-Fi drop means success.

Step 4 — Schedule it daily (DSM Task Scheduler)

Control PanelTask SchedulerCreateScheduled TaskUser-defined script.


Maintenance notes

See Also