Skip to content

Latest commit

 

History

History
69 lines (42 loc) · 2.53 KB

File metadata and controls

69 lines (42 loc) · 2.53 KB

Introduction

This module serves as an example for module maintainers to implement their own modules outside reserved range of modules and does not serve any role in the production environment. For usage of this module, see the README.

Identification and supported devices

The module number/ID: 1000.

Devices

Device Name Device Type Device Roles Comment
button1 0 test Button driving a state of a dedicated LED
button1 10 test Button driving a state of a dedicated LED
button2 0 test2 Button driving a state of a dedicated LED

Messages

Status

Each device (button) expects a status message containing a single key pressed with a boolean value indicating whether the button is pressed.

Example

{
    "pressed": true
}

Status Error

Status errors are not defined for this module.

Command

Each device (button) expects a command message containing a single key lit_up with a boolean value indicating whether the LED should be lit up.

Example

{
    "lit_up": true
}

Details of supported devices

Button

Button is a simple button device which has one LED attached to it. As status, it sends JSON with key "pressed" indicating whether button is pressed. As command, it expects JSON with key "lit_up" indicating the desired state of internal LED.

See the state transition diagram below:

Button state diagram