Files
OpenBK7231T_App/docs/ioRoles.md
divadiow 745d689a4e update docs (#1905)
* Update new_pins.h

* update docs
2025-12-18 00:20:25 +01:00

11 KiB

IO Pin Roles

Here is the latest, up to date IO Roles. This file was autogenerated by running 'node scripts/getcommands.js' in the repository. All descriptions were taken from code. Do not add anything here, as it will overwritten with next rebuild.

RoleName Description
None Default pin role; this pin does nothing.
Relay an active-high relay. This relay is closed when a logical 1 value is on linked channel
Relay_n (as Relay but pin logical value is inversed)
Button a typical button of Tuya device with active-low state (a button that connects IO pin to ground when pressed and also has a 10k or so pull up resistor)
Button_n as Button but pin logical value is inversed
LED an active-high LED. The internals of 'LED' are the same as of 'Relay'. Names are just separate to make it easier for users.
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). Remember to set related channel to correct color index, in the RGBCW order. For CW only lights, set only CW indices.
LED_WIFI 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.
LED_WIFI_n As LED_WIFI, but with inversed logic.
Button_ToggleAll this button toggles all channels at once
Button_ToggleAll_n Button_ToggleAll as, but inversed logic of button
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 DigitalInput as above, but inverted
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
DigitalInput_NoPup As DigitalInput, but without internal programmable pullup resistor. This is used for, for example, XR809 water sensor and door sensor.
DigitalInput_NoPup_n As DigitalInput_n, but without internal programmable pullup resistor
BL0937_SEL SEL pin for BL0937 energy measuring devices. Set all BL0937 pins to autostart BL0937 driver. Don't forget to calibrate it later.
BL0937_CF CF pin for BL0937 energy measuring devices. Set all BL0937 pins to autostart BL0937 driver. Don't forget to calibrate it later.
BL0937_CF1 CF1 pin for BL0937 energy measuring devices. Set all BL0937 pins to autostart BL0937 driver. Don't forget to calibrate it later.
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
SM2135_DAT SM2135 DAT pin for SM2135 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2135 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
SM2135_CLK SM2135 CLK pin for SM2135 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2135 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
BP5758D_DAT BP5758D DAT pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP5758D pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
BP5758D_CLK BP5758D CLK pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP5758D pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
BP1658CJ_DAT BP1658CJ DAT pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP1658CJ pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
BP1658CJ_CLK BP1658CJ CLK pin for BP5758D modified-I2C twowire LED driver, used in RGBCW lights. Set both required BP1658CJ pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
PWM_n as above, but percentage of duty is inversed. This might be useful for some special LED drivers that are using single PWM to choose between Cool white and Warm white (it also needs setting a special flag in General options)
IRRecv IR receiver for our IRLibrary port
IRSend IR sender for our IRLibrary port
Button_NextColor for RGB strip with buttons; sets next predefined color. For a LED strip that has separate POWER and COLOR buttons.
Button_NextColor_n As NextColor, but inversed button logic
Button_NextDimmer for RGB strip with buttons; when hold, adjusts the brightness
Button_NextDimmer_n As NextDimmer, but inversed button logic
AlwaysHigh always outputs 1
AlwaysLow always outputs 0
UCS1912_DIN WIP driver, write a post on Elektroda if you need it working
SM16703P_DIN WIP driver, write a post on Elektroda if you need it working
Button_NextTemperature Button that automatically allows you to control temperature of your LED device
Button_NextTemperature_n Like Button_NextTemperature, but inversed button logic
Button_ScriptOnly This button does nothing automatically, even the linked channel is not changed. Useful for scripts, but you can still also use any buttons for scripting.
Button_ScriptOnly_n Like Button_ScriptOnly, but inversed logic
DHT11 DHT11 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)
DHT12 DHT12 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)
DHT21 DHT21 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)
DHT22 DHT22 data line. You can have multiple DHT sensors on your device. Related driver is automatically started. Results are saved in related channels to pin with that role (when editing pins, you get two textboxes to set channel indexes)
CHT83XX_DAT DAT pin of CHT83XX. Setting this pin role and saving will reveal two fields next to it. Set first field to 1 and second to 2. Those are related channel numbers to store temperature and humidity.
CHT83XX_CLK CLK pin of CHT83XX sensor
SHT3X_DAT Humidity/temperature sensor DATA pin. Driver will autostart if both required pins are set. See SHT Sensor tutorial topic here, also see this sensor teardown
SHT3X_CLK Humidity/temperature sensor CLOCK pin. Driver will autostart if both required pins are set. See SHT Sensor tutorial topic here, also see this sensor teardown
SOFT_SDA Generic software SDA pin for our more advanced, scriptable I2C driver. This allows you to even connect a I2C display to OBK.
SOFT_SCL Generic software SCL pin for our more advanced, scriptable I2C driver.
SM2235_DAT It works for both SM2235 and SM2335. SM2235 DAT pin for SM2235 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2235 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
SM2235_CLK It works for both SM2235 and SM2335. SM2235 CLK pin for SM2235 modified-I2C twowire LED driver, used in RGBCW lights. Set both required SM2235 pins to autostart the related driver. Don't forget to Map the colors order later, so colors are not mixed.
BridgeForward Motor/Relay bridge driver control signal. FORWARD direction.
BridgeReverse Motor/Relay bridge driver control signal. REVERSE direction.
SmartButtonForLEDs A single button that does all control for LED. Click it toggle power, hold to adjust brightness, double click for next color, triple click for next temperature
SmartButtonForLEDs_n As SmartButtonForLEDs, but inverted
DoorSensorWithDeepSleep Setting this role will make DoorSensor driver autostart. DoorSensor will work like digital input, sending only its value on change. When there are no changes for some times, device will go into deep sleep to save battery. When a change occurs, device will wake up and report change. See a door sensor example here
DoorSensorWithDeepSleep_NoPup As DoorSensorWithDeepSleep, but no pullup resistor
BAT_ADC Like ADC, but for a Battery driver that does Battery measurement. See battery driver topic here
BAT_Relay Like Relay, but for a Battery driver that does Battery measurement. See battery driver topic here
TM1637_DIO TM1637 LED display driver DIO pin. Setting all required TM1637 pins will autostart related driver
TM1637_CLK TM1637 LED display driver CLK pin. Setting all required TM1637 pins will autostart related driver
BL0937_SEL_n Inverted SEL alternative for BL0937. Choose only one, either SEL or SEL_n. SEL_n may be needed in rare cases.
DoorSensorWithDeepSleep_pd As DoorSensorWithDeepSleep, but with pulldown resistor
SGP_CLK SGP Quality Sensor Clock line. will autostart related driver
SGP_DAT SGP Quality Sensor Data line. will autostart related driver
ADC_Button Single ADC with multiple buttons connected.d
GN6932_CLK GN6932 LED Display Driver - Clock pi
GN6932_DAT GN6932 LED Display Driver - Data pin
GN6932_STB GN6932 LED Display Driver - STB pin (Latch Enable)
TM1638_CLK TM1638 8x7 Segment Display - Clock pin
TM1638_DAT TM1638 8x7 Segment Display - data pin
TM1638_STB TM1638 8x7 Segment Display - STB pin
BAT_Relay_n Like BAT_Relay, but inversed. See battery driver topic here
KP18058_CLK KP18058 LED linear constant current dimming chip with I2C interface - CLK pin
KP18058_DAT KP18058 LED linear constant current dimming chip with I2C interface - DATA pin
DS1820_IO vers simple OneWire Temp sensor DS1820
PWM_ScriptOnly
PWM_ScriptOnly_n
Counter_f
Counter_r
IRRecv_nPup IRRecv without pull-up
StripState This is an output pin which has current led_enableAll value
StripState_n This is an output pin which has negation of current led_enableAll value
HLW8112_SCSN SCSN pin for HLW8112 SPI energy measuring devices.
RCRecv 433MHz RC receiver input (uses internal pull-up).
RCRecv_nPup 433MHz RC receiver input without internal pull-up.
Total_Options Current total number of available IOR roles