Skip to content

Add device reboot support - #312

Open
Voodoo2man wants to merge 1 commit into
Apollon77:masterfrom
Voodoo2man:feature/reboot-device
Open

Voodoo2man wants to merge 1 commit into
Apollon77:masterfrom
Voodoo2man:feature/reboot-device

Conversation

@Voodoo2man

Copy link
Copy Markdown

What does this PR do?

Adds a rebootDevice method for Alexa devices that advertise the ALEXA_DEVICE_REBOOT capability.

The method uses Amazon's device reboot endpoint with the required bearer token, Alexa app user-agent, and device serial/type payload. Empty successful responses are handled as success, while failed responses include the HTTP status.

Testing

  • Node.js syntax check
  • Mocked request and error-path checks
  • Tested with an Echo device through the companion ioBroker.alexa2 test branch

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Response handling, token validation, and the declared input type can produce incorrect behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds device reboot support using Alexa’s bearer-authenticated API.

Changes:

  • Adds rebootDevice.
  • Improves empty-response error messages.
  • Exposes reboot support in TypeScript declarations.
File summaries
File Description
alexa-remote.js Implements reboot requests and response handling.
alexa-remote.d.ts Declares the reboot API.
Review details
  • Files reviewed: 1/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread alexa-remote.js Resolved
Comment thread alexa-remote.js Resolved
@Voodoo2man
Voodoo2man force-pushed the feature/reboot-device branch from 3682740 to f202b78 Compare September 9, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation is consistent with existing request patterns and handles expected success and failure paths.

Review details
  • Files reviewed: 1/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants