Topic - phantomreboot.cmd / dccmdr.cmd - Windows Command Scripts to control Devialet Phantom Systems power states
Halrad Research - Phantom Commander Scripts
What is it? : Windows command-line scripts to restart or power off multiple Devialet Phantom speakers simultaneously
Scenario: Managing multiple Devialet Phantom speakers in a home or professional setup can be tedious when you need to restart or power them off individually. These scripts allow you to control multiple Phantom speakers at once using simple command-line tools. The scripts use curl to send HTTP POST requests to the Phantom's REST API endpoints for power control.
The Phantom Commander scripts consist of two files:
- phantomreboot.cmd - A simple wrapper script with predefined IP addresses for quick reboot
- dccmdr.cmd - The main command script that handles the actual API calls
How to use:
- Save both scripts in the same directory
- Edit
phantomreboot.cmd
to include the IP addresses of your Phantom speakers - Ensure curl is installed on your Windows system (comes with Windows 10 1803+)
- Run from Command Prompt or PowerShell
Usage Examples:
# Restart specific speakers dccmdr.cmd -restart -ip 192.168.0.29 192.168.0.31 # Power off multiple speakers dccmdr.cmd -poweroff -ip 192.168.0.29 192.168.0.31 192.168.0.33 # Use the quick reboot script (with predefined IPs) phantomreboot.cmd
Example output:
[*] Sending restart to 192.168.0.29 ... [โ] Success on 192.168.0.29 [*] Sending restart to 192.168.0.31 ... [โ] Success on 192.168.0.31 [*] Sending restart to 192.168.0.33 ... [โ] Failed on 192.168.0.33
phantomreboot.cmd - Quick Reboot Script:
@echo off
pushd %~dp0
call dccmdr.cmd -restart -ip 192.168.0.29 192.168.0.31 192.168.0.33
popd
dccmdr.cmd - Main Command Script:
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
REM === Initialize variables ===
set ACTION=
set "IPS="
REM === Parse command-line arguments ===
:parse
if "%~1"=="" goto done
if /i "%~1"=="-restart" (
set ACTION=restart
) else if /i "%~1"=="-poweroff" (
set ACTION=powerOff
) else if /i "%~1"=="-ip" (
shift
goto iplist
)
shift
goto parse
:iplist
if "%~1"=="" goto done
if /i "%~1"=="-restart" goto parse
if /i "%~1"=="-poweroff" goto parse
if /i "%~1"=="-ip" goto parse
set "IPS=!IPS! %~1"
shift
goto iplist
:done
REM === Validate input ===
if "%ACTION%"=="" (
echo [!] Error: You must specify -restart or -poweroff
exit /b 1
)
if "%IPS%"=="" (
echo [!] Error: No IPs provided after -ip
exit /b 1
)
REM === Loop over each IP and send command ===
for %%I in (!IPS!) do (
echo.
echo [*] Sending %ACTION% to %%I ...
curl --fail --silent ^
-X POST "http://%%I/ipcontrol/v1/devices/current/%ACTION%" ^
-H "Content-Type: application/json" ^
-d "{}"
if errorlevel 1 (
echo [โ] Failed on %%I
) else (
echo [โ] Success on %%I
)
)
endlocal
Features:
- Control multiple Phantom speakers with a single command
- Support for both restart and power off operations
- Clear success/failure indicators for each speaker
- Flexible command-line interface
- Works with standard Windows curl (no additional software needed)
API Endpoints Used:
/ipcontrol/v1/devices/current/restart
- Restarts the Phantom speaker/ipcontrol/v1/devices/current/powerOff
- Powers off the Phantom speaker
Requirements:
- Windows 10 (1803 or later) or Windows 11
- curl command-line tool (included in modern Windows)
- Network access to your Phantom speakers
- Phantom speakers with REST API enabled
Troubleshooting:
- If curl is not found, install it or use Windows 10 1803+ which includes it by default
- Ensure your Phantom speakers are on the same network
- Check that the IP addresses are correct and the speakers are powered on
- Some Phantom models may have different API endpoints - check your model's documentation