- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
5.9 KiB
UDM Pro Browser Automation Guide
Last Updated: 2026-01-14
Status: Active Documentation
Purpose: Configure static routes and other settings via browser automation when API is unavailable
Overview
This guide documents the browser automation solution for configuring UDM Pro settings that are not available via the API, such as:
- Static Routes
- Network/VLAN creation (if Private API fails)
- DHCP Reservations
- Port Profiles
Prerequisites
1. Install Playwright
cd /home/intlc/projects/proxmox
pnpm add -D -w playwright@latest
pnpm exec playwright install chromium
2. Account Requirements
IMPORTANT: The account used for browser automation must:
- ✅ Be a local admin account (not SSO/cloud account)
- ✅ Have 2FA disabled (browser automation cannot handle 2FA)
- ✅ Have full network management permissions
Current Status:
nsatoshi2007: ❌ Authentication fails (likely 2FA/SSO enabled)unifi_api: ⚠️ May work if 2FA is disabled
Solution: Create a dedicated local admin account for automation:
- Access UDM Pro web UI:
https://192.168.0.1 - Navigate to Settings → System Settings → Users
- Create new local admin account:
- Username:
automation(or your choice) - Password: (strong password)
- Role: Full Admin
- Important: Ensure it's local (not SSO)
- Important: Do NOT enable 2FA
- Username:
- Update
~/.env:UNIFI_USERNAME=automation UNIFI_PASSWORD="your-password"
Script: Configure Static Route
Location
scripts/unifi/configure-static-route-playwright.js
Usage
Dry Run (Test Mode)
cd /home/intlc/projects/proxmox
DRY_RUN=true HEADLESS=true node scripts/unifi/configure-static-route-playwright.js
Actual Configuration
cd /home/intlc/projects/proxmox
HEADLESS=true node scripts/unifi/configure-static-route-playwright.js
With Visible Browser (Debugging)
cd /home/intlc/projects/proxmox
HEADLESS=false node scripts/unifi/configure-static-route-playwright.js
Configuration
The script is configured to create a static route:
- Name: Route to VLAN 11
- Destination:
192.168.11.0/24 - Gateway:
192.168.11.1
To modify, edit the ROUTE_CONFIG object in the script.
Features
✅ Step-by-step navigation with verification
✅ Error handling and retry logic
✅ Screenshot capture for debugging (saved to scripts/unifi/screenshots/)
✅ Dry-run mode for testing
✅ Detailed logging at each step
✅ Multiple selector strategies for UI elements (handles UI changes)
Screenshots
Screenshots are automatically saved to scripts/unifi/screenshots/ with timestamps:
01-login-page.png- Initial login page02-credentials-filled.png- After filling credentials03-after-login.png- After successful login04-routing-page.png- Routing settings page05-static-routes-page.png- Static routes section06-before-add-button.png- Before clicking Add07-form-filled.png- After filling route form08-route-saved.png- After saving routeerror-state.png- If an error occurs
Troubleshooting
Authentication Fails (403 Error)
Symptoms:
- Login returns 403 Forbidden
- Script gets redirected back to login page
- Error: "Login failed - still on login page"
Causes:
- Account has 2FA enabled
- Account is SSO/cloud-only (not local)
- Wrong password
- Account is disabled or locked
Solutions:
- Create a new local admin account without 2FA (see Prerequisites)
- Verify password in
~/.env - Check account status in UDM Pro web UI
- Try logging in manually with the same credentials
Cannot Find Add Button
Symptoms:
- Script reaches static routes page
- Cannot find "Add" or "Create" button
- Error: "Could not find Add/Create button"
Causes:
- UI structure changed
- Not on the correct page
- Button has different text/selector
Solutions:
- Check screenshots in
scripts/unifi/screenshots/ - Run with
HEADLESS=falseto see what's happening - Manually verify the static routes page in browser
- Update selectors in script if UI changed
Navigation Fails
Symptoms:
- Cannot navigate to Settings or Routing page
- Gets redirected to login repeatedly
Causes:
- Authentication not properly established
- URL structure changed
- Session expired
Solutions:
- Verify login succeeded (check screenshots)
- Try manual navigation to verify URL structure
- Update navigation URLs in script if needed
Current Status
✅ Completed
- Playwright installed and configured
- Script created with comprehensive error handling
- Screenshot capture for debugging
- Dry-run mode for testing
- Multiple selector strategies
⚠️ Pending
- Authentication Issue: Current account (
nsatoshi2007) fails with 403- Action Required: Create local admin account without 2FA
- Alternative: Disable 2FA on existing account (if possible)
🔄 Next Steps
- Create local admin account for automation
- Update
~/.envwith new credentials - Test script in dry-run mode
- Run script to configure static route
- Verify route was created in UDM Pro web UI
Manual Alternative
If browser automation continues to have issues, you can manually configure the static route:
- Access UDM Pro:
https://192.168.0.1 - Navigate to: Settings → Routing & Firewall → Static Routes
- Click: Add (or Create)
- Fill in:
- Name: Route to VLAN 11
- Destination Network:
192.168.11.0/24 - Gateway:
192.168.11.1
- Click: Save
Related Documentation
- UDM_PRO_API_LIMITATIONS.md - API limitations
- UDM_PRO_ROUTING_API_LIMITATIONS.md - Routing API limitations
- UDM_PRO_AUTOMATION_COMPLETE_GUIDE.md - Automation and options
Last Updated: 2026-01-14