AboutBlogContact

Binary Sensors

Digital inputs used in the controller, presented as a Binary sensor in Home Assistant. They send MQTT messages for pressed and released actions.

Web application configuration

Recommended configuration method.

Sample webui configuration

Binary sensors menu view

View allowing for a preview of defined binary inputs, a preview of assigned actions, and the addition of new binary inputs. Additionally, it allows for their export and import.

Basic Settings

Binary sensors menu view

Option NameDescription
Display NameThe name with which the input will be displayed in the controller's webui, MQTT, and HA.
boneIO InputSelection of the physical input of the controller.
Area/RoomSelection of the appropriate area.
Bounce timeDefines the time between subsequent action triggers.
Device ClassDefines the type of device the output will identify as in HA.
Show in Home AssistantAllows hiding the input in HA.
InvertedChecking this will "invert" the state of the sensor.
Initial sendChecking this will send the sensor state at application startup (useful in reed switch.)
Clear message after processingThe action property is cleared immediately after sending the message to force a change in the sensor state and allow for re-triggering of automations in Home Assistant.

Pressed Actions / Released Actions

Binary sensors menu view

Action type - Opens a list of defined actions (available here). Depending on the selected action type, the available options change. Their list is in the tables below.

Output Action:
Option NameDescription
OutputSelection of a specific output.
Output ActionType of action to perform, e.g., the most common "Toggle".
Cover Action:
Option NameDescription
CoverSelection of a specific cover/shutter.
Cover ActionType of action to perform, e.g., the most common "Toggle".
Cover Over Mqtt Action:
Option NameDescription
CoverSelection of a specific cover/shutter.
Cover ActionType of action to perform, e.g., the most common "Toggle".
boneIO IDID of the boneIO controller where we want to perform the action.
Cover ID (pin)ID of the chosen Cover.
Cover ActionType of action to perform, e.g., the most common "Toggle".
Mqtt Action:
Option NameDescription
MQTT TopicAddress of the MQTT topic.
MQTT MessageThe MQTT message that the action should execute.
For Output Over Mqtt action:
Option NameDescription
boneIO IDID of the boneIO controller where we want to perform the action.
Output ID (pin)ID of the chosen Output.
Output ActionType of action to perform, e.g., the most common "Toggle".
For Remote Output action:
Option NameDescription
Remote DeviceName of the remote device the action concerns.
Output IDID of the output the action concerns.
Output ActionType of action to perform, e.g., the most common "Toggle".
For Remote Cover action:
Option NameDescription
Remote DeviceName of the remote device the action concerns.
Cover IDID of the cover the action concerns.
Cover ActionType of action to perform, e.g., the most common "Toggle".

YAML Editor

Sample configuration

Sample configuration
    - name: IN_01
      boneio_input: IN_01
      actions:
        pressed:
          - action: output
            boneio_output: OUT_01

Configuration variables:

  • name Name of the input defined by us in MQTT and Home Assistant.

  • boneio_input (Optional, string, default) - Name of the boneIO controller input. Use underscore for spaces.

  • pin (Required, string) - GPIO pin ID on the Beaglebone board, e.g., P9_33.

  • actions (Optional, dictionary) - Dictionary of predefined actions ([pressed, released]).

  • clear_message (Optional, boolean, default: False) - Decides whether to send an empty message to MQTT after a pressed/released callback. Same as Zigbee2Mqtt does in button actions.

  • bounce_time (Optional, timeperiod, default: 120 ms) - Debounce time for GPIO before the callback. Use if the default value does not work for you. Setting it too high may interfere with "click" type events for the switch kind.

  • show_in_ha (Optional, boolean, default: True) - Send autodiscovery message to Home Assistant.

  • device_class (Optional, string, allowed_values: ['battery', 'battery_charging', 'carbon_monoxide', 'cold', 'connectivity', 'door', 'garage_door', 'gas', 'heat', 'light', 'lock', 'moisture', 'motion', 'moving', 'occupancy', 'opening', 'plug', 'power', 'presence', 'problem', 'running', 'safety', 'smoke', 'sound', 'tamper', 'vibration', 'window']) - Type of device to be visible in Home Assistant.

  • inverted (Optional, boolean, default: False) - Inverts the sensor input value displayed in MQTT.

  • initial_send (Optional, boolean, default: False) - If set to true, the initial status of the binary sensor will be sent to MQTT during application startup.

  • kind (Optional, string, default: switch, allowed_values: ['switch', 'sensor']) - Type of device to send to Home Assistant. This kind indicates which actions you can use.

Actions

  • pressed (Optional, list): List of actions to perform if the sensor is pressed.
  • released (Optional, list): List of actions to perform if the sensor is released.

Action variables for action list

  • action (Optional, string, default: output, allowed_values: ['mqtt', 'output', 'cover']) - Action type. 'Output' and 'cover' mean the command is sent directly to the output relay or cover. This mode does not require a network to function. 'Mqtt' means an additional action is sent to MQTT. For example, you can directly control a second boneIO!
  • pin (Optional, string) - Output pin ID where the action is to be performed. Use only with output or cover action types.
  • topic (Optional, string) - Topic to use if mqtt action is selected.
  • action_cover (Optional, string, allowed_values: ['toggle', 'open', 'close', 'stop', 'toggle_open', 'toggle_close']) - Action to perform for the cover action type. toggle cycles between open/close. toggle_open alternates between open/stop, toggle_close alternates between close/stop.
  • action_output (Optional, string, allowed_values: ['toggle', 'on', 'off']) - Action to perform for the output action type.
  • action_mqtt_msg (Optional, string) - Message to send to the MQTT topic if the action is mqtt.