Pin Roles - openshwprojects/OpenBK7231T_App GitHub Wiki

You can set pin roles in "Configure Module" section or use one of predefined templates from "Quick config" subpage. For each pin, you also set corresponding channel value, which is an alias name used e.g. by MQTT. It is also needed for modules with multiple relays. If you have 3 relays and 3 buttons, you need to use channel values like 1, 2, and 3. Just enter '1' in the text field, etc. Current main pin roles:

  • Button

  • Button_n (as Button but pin logical value is inversed)

  • ButtonToggleAll - this button toggles all channels at once

  • ButtonToggleAll_n (as above but pin logical value is inversed)

  • DigitalInput - this is a simple digital input pin, it sets the linked channel to current logical value on it, just like digitalRead( ) from Arduino. This input has a internal pull up resistor.

  • DigitalInput_n (as above but inversed)

  • DigitalInput_NoPullUp - same as DigitalInput but with no programmable pull up resistor. This is used for, for example, XR809 water sensor and door sensor.

  • DigitalInput_NoPullUp_n (as above but inversed)

  • ToggleChannelOnToggle - this pin will toggle target channel when a value on this pin changes (with debouncing). you can connect simple two position switch here and swapping the switch will toggle target channel relay on or off

  • ADC (Analog to Digital converter) - converts voltage to channel value which is later published by MQTT and also can be used to trigger scriptable events

  • Relay

  • Relay_n (as Relay but pin logical value is inversed)

  • LED

  • LED_n (as Led but pin logical value is inversed)

  • PWM - pulse width modulation output for LED dimmers (with MQTT dimming support from Home Assistant)

  • WiFiLED - special LED to indicate WLan connection state. LED states are following: LED on = client mode successfully connected to your Router. Half a second blink - connecting to your router, please wait (or connection problem). Fast blink (200ms) - open access point mode. In safe mode (after failed boots), LED might not work.