Documentation for the Visonic/Tyco/JC PowerLink JSON‑RPC API. This repository defines the API using the OpenRPC specification and includes a minimal build script to aggregate per‑method JSON files into a single OpenRPC document.
- Modular OpenRPC method files under
./methodswith sharedinfo.json. - One‑command local build: generates
openrpc.build.jsonfrom the method files. - Optional live build during authoring via
nodemon(watchesmethods/andinfo.json). - GitHub Actions workflow that builds and publishes the generated
openrpc.build.jsonto thedistbranch.
- Node.js 20+ recommended
npm install
This command scans methods/ and produces openrpc.build.json at the repo root:
node generate.js
The console should print:
✅ Built openrpc.build.json
Continuously rebuild the spec whenever files change:
npm run dev
Watched files:
methods/*.jsoninfo.json
The build output is a single file: openrpc.build.json.
You can:
- Paste the spec into https://playground.open-rpc.org
On pushes to main, GitHub Actions will build and force‑push the latest openrpc.build.json to the dist branch. You can consume that raw file directly from GitHub (e.g., https://raw.githubusercontent.com/<OWNER>/<REPO>/dist/openrpc.build.json).
- Add a new method by creating a JSON file under
methods/(see existing files for structure:name,summary,description,params,result, andexamples). - Modify
info.jsonto change the title, version, or description for the whole document. - Run
node generate.js(ornpm run devto watch) to rebuild. The script will include every*.jsonfile inmethods/.
MIT License. See LICENSE file.