GPIO

Helper for GPIO.

Links a GPIO input to an MQTT topic.

Parameters:
  • core (object) – Core instance.
  • cfgbase (str) – Configuration entry for this unit.
  • kwargs (dict) – Keyword arguments that will be merged into the config.

Required core units:

  • mqtt
  • gpio

Configuration:

  • topic (str) - Input topic.
  • pin (str) - Pin to connect
  • qos (int) - QoS for the publish, 0-2.
  • edge (str) - Level changes to publish to. May be “none”, “rising”, “falling” or “both”.
  • pull (str) - Enable internal pullup or pulldown.
    May be “none”, “up” or “down”.

Input topics:

  • topic (?) - The value of the GPIO pin.

Links a GPIO output to an MQTT topic.

Parameters:
  • core (object) – Core instance.
  • cfgbase (str) – Configuration entry for this unit.
  • kwargs (dict) – Keyword arguments that will be merged into the config.

Required core units:

  • mqtt
  • gpio

Configuration:

  • topic (str) - Output topic.
  • pin (str) - Pin to connect.
  • qos (int) - QoS for the publish, 0-2.

Output topics:

  • topic (?) - GPIO readout.