Skip to content

Instantly share code, notes, and snippets.

@bradfa
Created December 9, 2025 14:27
Show Gist options
  • Select an option

  • Save bradfa/b965b028164e456350f9e273906596ba to your computer and use it in GitHub Desktop.

Select an option

Save bradfa/b965b028164e456350f9e273906596ba to your computer and use it in GitHub Desktop.
SynAccess NetBooter Legacy HTTP CGI API

SynAccess netBooter Legacy HTTP API Reference

This document describes the legacy HTTP CGI-based API used by older SynAccess netBooter PDU models such as the NP-0201DU. This API is different from the newer SynLink Smart PDU REST API.

Overview

  • Protocol: HTTP (HTTPS on DU models with port 443)
  • Authentication: HTTP Basic Auth
  • Default Credentials: admin / admin
  • Default IP: 192.168.1.100
  • Default Telnet Port: 23
  • Default HTTP Port: 80

HTTP API

Request Format

http://<ip>/cmd.cgi?<command> <arg1> <arg2> ...

Arguments are space-separated. URL encoding may be required for the space character (%20).

Authentication

Use HTTP Basic Authentication:

curl -u admin:admin "http://192.168.1.100/cmd.cgi?\$A5"

Or with explicit header:

curl -H "Authorization: Basic $(echo -n admin:admin | base64)" "http://192.168.1.100/cmd.cgi?\$A5"

Commands

Get Outlet Status ($A5)

Returns the current status of all outlets, current draw, and temperature.

Request:

GET /cmd.cgi?$A5

Response Format:

xxxx,cccc,cccc,tt

or

xxxx,cccc,tt

Where:

  • x = Outlet state bits (rightmost is outlet 1)
    • 1 = ON
    • 0 = OFF
  • c = AC current draw in amps
  • t = Temperature in Celsius

Example Response:

11,0.00,25

This indicates:

  • Outlet 1: ON (rightmost bit)
  • Outlet 2: ON
  • Current: 0.00 amps
  • Temperature: 25 C

Set Single Outlet ($A3)

Turn a specific outlet ON or OFF.

Request:

GET /cmd.cgi?$A3 <outlet> <state>

Arguments:

  • outlet - Outlet number (1-based)
  • state - 0 = OFF, 1 = ON

Examples:

# Turn outlet 1 OFF
curl -u admin:admin "http://192.168.1.100/cmd.cgi?\$A3%201%200"

# Turn outlet 2 ON
curl -u admin:admin "http://192.168.1.100/cmd.cgi?\$A3%202%201"

Reboot Outlet ($A4)

Power cycle a specific outlet (OFF then ON after configured delay).

Request:

GET /cmd.cgi?$A4 <outlet>

Arguments:

  • outlet - Outlet number (1-based)

Example:

# Reboot outlet 1
curl -u admin:admin "http://192.168.1.100/cmd.cgi?\$A4%201"

Set All Outlets ($A7)

Turn all outlets ON or OFF simultaneously.

Request:

GET /cmd.cgi?$A7 <state>

Arguments:

  • state - 0 = OFF, 1 = ON

Examples:

# Turn all outlets ON
curl -u admin:admin "http://192.168.1.100/cmd.cgi?\$A7%201"

# Turn all outlets OFF
curl -u admin:admin "http://192.168.1.100/cmd.cgi?\$A7%200"

Return Codes

Code Description
$A0 OK - Command executed successfully
$AF Action failed or unknown command

Telnet / Serial CLI

The same commands are available via Telnet (port 23) or serial connection (9600 8N1).

CLI Command Format

Commands use a different syntax over Telnet/Serial:

CLI Command Description
pshow Show outlet status
pset <n> <v> Set outlet n to state v (0=OFF, 1=ON)
ps <v> Set all outlets to state v
rb <n> Reboot outlet n
gpset <n> <v> Set outlet group n to state v
grb <n> Reboot outlet group n

Network Configuration CLI Commands

CLI Command Description
nwshow Display network settings (IP, gateway, MAC)
nwset Reset network interface
dhcp <x> Set DHCP mode (1) or Static mode (0)
ip <ip> <mask> Set static IP address and subnet mask
gw <gw> Set gateway IP
mac Display MAC address
web <v> Enable (1) or disable (0) web access
hp <port> Set HTTP port
tp <port> Set Telnet port
ver Show firmware version
sysshow Show system information
help Display help menu

Serial Connection Settings

Parameter Value
Baud Rate 9600
Data Bits 8
Parity None
Stop Bits 1
Flow Control XON/XOFF

Device Recovery

Enable DHCP Mode

Hold a pin in the "rst" hole while powering on the device.

Factory Reset

Hold a pin in the "rst" hole for 10+ seconds, then release. This resets all settings including user accounts but does not affect outlet power states.

Applicable Models

This legacy API applies to netBooter series PDUs including:

  • NP-0201DU (2-outlet)
  • NP-0801DU (8-outlet)
  • NP-1601DU (16-outlet)
  • Other NP-series models with similar firmware

Comparison with SynLink API

Feature Legacy API SynLink API
Endpoint /cmd.cgi?$Ax /api/outlets, /api/device, etc.
Format Custom text JSON
Auth HTTP Basic Bearer Token or Session
HTTPS DU models only (port 443) Standard

The synlink-py Python library requires the newer SynLink API and is not compatible with this legacy interface.

References

@bradfa
Copy link
Author

bradfa commented Dec 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment