-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add doc to sys/panel endpoint #85
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ x-tagGroups: | |
- Time | ||
- Power | ||
- Locale | ||
- Panel | ||
- name: Debug | ||
tags: | ||
- Database | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,3 +93,49 @@ TimePatch: | |
disabled. | ||
tags: | ||
- Time | ||
PanelPath: | ||
get: | ||
$ref: ../sys/paths.yaml#/PanelGet | ||
patch: | ||
$ref: ../sys/paths.yaml#/PanelPatch | ||
PanelGet: | ||
responses: | ||
'200': | ||
description: Get Panel Info | ||
content: | ||
application/json: | ||
schema: | ||
$ref: schemas.yaml#/Panel | ||
properties: | ||
keypad_mode: | ||
summary: Get panel info | ||
description: | | ||
Get current panel information. | ||
|
||
**NOTE:** The endpoint `sys/panel` is available only for Smart by bond with ID | ||
starting with TW or KW (in-wall switches). | ||
tags: | ||
- Panel | ||
PanelPatch: | ||
responses: | ||
'200': | ||
description: Changed Panel Info | ||
content: | ||
application/json: | ||
schema: | ||
$ref: schemas.yaml#/Panel | ||
'400': | ||
$ref: ../common/responses.yaml#/BadRequest | ||
'500': | ||
$ref: ../common/responses.yaml#/InternalServerError | ||
summary: Patch panel info | ||
description: | | ||
Patch panel info, available fields: | ||
- `"keypad_mode"`: define in-wall switch mode of operation... | ||
- If `true` device operate as keypad, streaming out bond sync actions that | ||
controls another device. A new sidekick named bondid and same location is implicity | ||
created under sidekicks endpoint. After reboot `devices/1` is no longer available. | ||
- If set to `false` implicit delete the sidekick created and behave as a regular switch, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preferably this info goes in the description in the schema. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better here to have a paragraph description more of the why than the what & how. |
||
no more streaming messages. After reboot the `devicse/1` is available back again | ||
tags: | ||
- Panel |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,11 @@ Time: | |
`null` if unset. | ||
|
||
See: https://en.wikipedia.org/wiki/Maidenhead_Locator_System | ||
Panel: | ||
type: object | ||
properties: | ||
keypad_mode: | ||
example: true | ||
type: boolean | ||
decription: | | ||
If true set switch to keypad mode. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can add some more detail here on the true/false cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Added in v3.13)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an attempt at a paragraph for the
GET
endpoint. Nothing special needed forPATCH
. Ideally there would be a description for the endpoint as a whole but I don't see how to do it, so I've just put this kind of background in theGET
section. --- Alternatively it could go up in the preliminary chapters.The panel endpoint is used to adjust the behavior of the front-panel on certain Smart by Bond products. In particular, in-wall fan and light switch products can be set to "Keypad Mode" where key presses send BondSync messages (similar to a Sidekick keypad) rather than directly controlling the attached light or fan device. This is intended to be used in multiway switch configurations. To set up "3-way", enable Keypad Mode on the switch which does not directly control the device. The switch will then appear as a Sidekick and can be channel-linked to the main switch which does directly control the appliance.