npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ospp/station-simulator

v0.1.2

Published

OSPP Station Simulator — TypeScript CLI for testing CSMS implementations

Readme

OSPP Station Simulator

TypeScript CLI tool that simulates physical car wash self-service stations for testing CSMS (Central Station Management System) implementations of the OSPP protocol.

Replaces the PHP station simulator with native MQTT 5.0 concurrency — each simulated station runs on Node.js event loop, exactly like real hardware.

Quick Start

npm install
npm run build

# Download sandbox mTLS certificates
npm run certs:sync

# Run a single scenario
npx simulator run --scenario scenarios/core/happy-boot.yaml --target sandbox

# Run a suite
npx simulator run --suite core --target sandbox

# Run all scenarios
npx simulator run --all --target sandbox

Scenarios

83 YAML-driven test scenarios across 7 categories:

| Suite | Scenarios | Coverage | |-------|-----------|----------| | core | 16 | Boot (all reasons), Heartbeat, StatusNotification, ConnectionLost, DataTransfer | | sessions | 13 | Full lifecycle, Start/Stop, Rejections, Timeout, Fault, MeterValues | | reservations | 6 | Reserve+Start, Cancel, Expire, Rejections | | device-management | 20 | Firmware, Diagnostics, Configuration, Reset, TriggerMessage, Maintenance | | security | 18 | SecurityEvents, Certificates, OfflinePass, TransactionEvent | | chaos | 7 | Disconnect, Slow responses, Malformed messages, Reconnect | | fleet | 3 | Parallel boot, Mixed workload, Meter flood |

Full inventory: scenarios/SCENARIOS.md

Targets

Configured in config/targets.yaml:

| Target | Description | |--------|-------------| | local | Local development (mqtt://localhost:1883) | | uat | UAT environment (mTLS) | | sandbox | OSPP conformance sandbox (mTLS + MQTT credentials) |

Override via --target flag or OSPP_TARGET env var.

CLI Reference

# Run scenarios
npx simulator run --scenario <path>     # Single scenario
npx simulator run --suite <name>        # All in scenarios/<name>/
npx simulator run --all                 # All scenarios
npx simulator run --all --parallel      # Parallel execution
npx simulator run --all --parallel --workers 5

# Target selection
npx simulator run --all --target sandbox
npx simulator run --all --station stn_00000005  # Force specific station

# Output formats
npx simulator run --all --output console         # Default, colored
npx simulator run --all --output junit --output-file results/run.xml
npx simulator run --all --output json --output-file results/run.json

Development

npm run build            # TypeScript compilation
npm test                 # Run vitest tests
npm run test:watch       # Watch mode
npm run lint:scenarios   # Validate all scenario YAML files
npm run certs:sync       # Download sandbox certificates

Architecture

  • ESM project"type": "module", NodeNext module resolution
  • SDK — All protocol types from @ospp/protocol (never redefined locally)
  • MQTT 5.0 — Two topics per station (to-server/to-station), action in envelope
  • Scenarios — YAML-driven with template variables and captured values
  • Linter — 5 checks: captured vars, message direction, enum values, wait_for completeness, payload schema
  • Parallel execution — Semaphore-based, station pool allocation for sandbox

Protocol Conformance

Tested against OSPP spec v0.2.5 (wire version 0.2.1). All 26 MQTT actions covered.

License

MIT