Skip to content

About

PowerShell printer monitor dashboard project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Xerox Printer Monitor Dashboard

A PowerShell WinForms dashboard for monitoring Xerox AltaLink C8035T / C8055H printer status — toner levels, paper trays, and alerts — via the printer's embedded web server.

Features

  • CMYK toner level bars with color-coded indicators
  • Paper tray status showing fill levels, paper size, and type
  • Active alerts/warnings/faults with severity indicators
  • Multi-printer support via JSON configuration
  • Mock/offline mode for development and testing without live printers
  • Zero external dependencies — runs on stock Windows PowerShell 5.1

Quick Start (Windows)

1. Configure printers

Edit printers.json and update the Printers array with your actual printer IPs:

{
  "Settings": {
    "UseMockData": false
  },
  "Printers": [
    {
      "DisplayName": "My Printer",
      "IPAddress": "10.0.1.100",
      "Protocol": "auto",
      "CredentialMode": "none",
      "Enabled": true
    }
  ]
}

2. Launch the dashboard

Right-click Launch-PrinterMonitor.ps1 → Run with PowerShell

Or from a PowerShell prompt:

cd C:\Path\To\PrinterMonitor
.\Launch-PrinterMonitor.ps1

3. First launch

The dashboard automatically refreshes all configured printers on startup. After that, use the Refresh All or Refresh Selected buttons.

Mock Mode (Development/Testing)

To test without live printers, set UseMockData to true in printers.json (or use the -MockMode switch):

.\Launch-PrinterMonitor.ps1 -MockMode

Mock mode loads pre-built fixture files from the fixtures/ folder.

Console Mode

For headless testing (works on macOS/Linux with pwsh too):

.\Launch-PrinterMonitor.ps1 -NoGui

Running Tests

.\tests\Test-Parsers.ps1

This runs all parser and service layer tests against the fixture files.

Development on macOS/Linux

  1. Install PowerShell: brew install powershell (macOS) or see Microsoft docs
  2. Use console mode for testing: pwsh ./Launch-PrinterMonitor.ps1 -NoGui -MockMode
  3. Run tests: pwsh ./tests/Test-Parsers.ps1
  4. GUI requires Windows (WinForms is not available on macOS/Linux)

Configuration Reference

printers.json

Field Description
Settings.DefaultTimeoutSeconds HTTP request timeout (default: 10)
Settings.UseMockData true to use fixture files instead of live HTTP
Settings.LogLevel Debug, Info, Warning, Error
Settings.LogRetentionDays Auto-delete logs older than N days
Settings.MockFixturesPath Path to fixtures folder
Printers[].DisplayName Friendly name shown in the dashboard
Printers[].IPAddress Printer IP address or hostname
Printers[].Protocol http, https, or auto (try HTTPS first)
Printers[].CredentialMode none or basic
Printers[].MockFixtureFile Fixture filename for mock mode
Printers[].Enabled true/false to include/exclude from monitoring

How It Works

The dashboard fetches status data from Xerox printers' embedded web servers via HTTP/HTTPS. It probes multiple known endpoint paths and parses the response as XML (preferred) or HTML (fallback).

No SNMP is used. All data comes from the same web interface you see when browsing to the printer's IP in a web browser.

See docs/ARCHITECTURE.md for the full component diagram and endpoint strategy.

Switching to Live Mode

  1. Set UseMockData to false in printers.json
  2. Update printer IP addresses to match your network
  3. Ensure your workstation can reach the printers on port 80/443
  4. Launch the dashboard

If a printer requires authentication for status pages, set CredentialMode to basic and provide Username. You'll be prompted for credentials or can integrate with Windows Credential Manager.

Known Limitations

  • Parser accuracy depends on firmware version. The XML/HTML parsers are built from common Xerox AltaLink page structures. Different firmware versions may require parser adjustments.
  • GUI uses synchronous refresh with Application.DoEvents() for UI responsiveness. For very large printer fleets (20+), a background runspace approach would be better.
  • WinForms only on Windows. The GUI requires .NET Windows Forms (built into Windows). Use -NoGui mode on macOS/Linux.
  • No auto-refresh timer in v1. Refresh is manual (button click) after the initial startup refresh.
  • Credential storage is a placeholder. Production use should integrate with Windows Credential Manager or a secrets vault.

Requirements

  • Windows PowerShell 5.1 (built into Windows 10/11/Server 2016+)
  • Network access to printer IPs on port 80 and/or 443
  • No additional software installation required

Project Structure

PrinterMonitor/
├── Launch-PrinterMonitor.ps1    # Main launcher
├── printers.json                # Configuration
├── README.md                    # This file
├── src/
│   ├── Config.ps1               # Configuration loader
│   ├── Logger.ps1               # Logging utility
│   ├── PrinterModel.ps1         # Data model
│   ├── HttpFetcher.ps1          # HTTP fetch layer
│   ├── XmlParser.ps1            # XML parser
│   ├── HtmlParser.ps1           # HTML parser
│   ├── PrinterService.ps1       # Service orchestration
│   └── GUI.ps1                  # WinForms GUI
├── fixtures/                    # Mock test data
├── tests/                       # Test scripts
├── logs/                        # Runtime logs
└── docs/                        # Documentation

About

PowerShell printer monitor dashboard project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages