Skip to content

Add /v2/transformer endpoint for PLC transformer#112

Draft
chrismerck wants to merge 15 commits intomasterfrom
merck/plc
Draft

Add /v2/transformer endpoint for PLC transformer#112
chrismerck wants to merge 15 commits intomasterfrom
merck/plc

Conversation

@chrismerck
Copy link
Contributor

Summary

Adds comprehensive REST API endpoint for PLC transformer control supporting both smart addressable fixtures and legacy relay-switched taps.

Key Features

  • Device ID Scheme: PLC fixtures (1-60), Legacy taps (1001-1003)
  • Tap Configuration: Configure each of 3 taps as legacy or PLC mode
  • Current Monitoring: Real-time current sensing with yellow/red thresholds
  • Fault Detection: Overload detection with graduated fault levels
  • Commissioning Workflow: Safe commissioning mode with auto-detection
  • Auto-Detection: Automatic fixture capability detection

API Endpoints

GET /v2/transformer

Returns transformer status including:

  • Tap mode configuration
  • PLC fixture count
  • Current draw and limits
  • Fault status
  • Commissioning state
  • Auto-detection results

PATCH /v2/transformer

Update configuration:

  • Tap modes
  • Current limits
  • Commissioning mode
  • Trigger auto-detection

DELETE /v2/transformer

Reset to factory defaults

Files Changed

  • transformer/schemas.yaml - Transformer schema definition
  • transformer/paths.yaml - Endpoint definitions
  • local/paths.yaml - Register transformer endpoint
  • local.yaml - Add Transformer tag group

Testing Notes

This is API documentation only. Firmware implementation required for full functionality.

🤖 Generated with Claude Code

Introduces comprehensive REST API for smart PLC transformer supporting:
- 60 PLC addressable fixtures (device IDs 1-60)
- 3 legacy taps (device IDs 1001-1003)
- Tap mode configuration (legacy/plc)
- Current monitoring and fault detection
- Commissioning workflow with auto-detection
- Safety interlocks during commissioning

New endpoints:
- GET /v2/transformer - Read transformer status
- PATCH /v2/transformer - Update configuration
- DELETE /v2/transformer - Reset to defaults

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

1 similar comment
@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

@OlibraBot
Copy link

The rendered doc is at: https://bond-api-docs.s3.amazonaws.com/merck-plc-local.html

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants