logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] OpenBeken 1.18.297 - how to configure GPIO8 short and long button clicks?

pvswie01 54 1
ADVERTISEMENT
  • Request for GPIO8 button configuration details

    #1 21941603
    pvswie01
    Level 1  
    Posts: 1
    I installed a very recent OpenBeken (1.18.297) on a new device with a BK7231N.

    The device supports an external switch or a momentary push button. I use the button.
    I am unable to get the button to work. In fact, I am unable to get any response from the button.
    Details of the switch/button:
    Pin 13 of the Tuya module seems to be GPIO8, default voltage 2.9 V, when the button is pressed: 30 mV.
    I tried many things with the help of ChatGPT and Google AI, but nothing works.
    Question: Which settings & autoexec content do I need to realize the below:
    - short click: On (Set channel 4 to 128), Off (Set channel 4 to 0)
    - long click: Max intensity (Set channel 4 to 255)

    Kind regards,
    pvswie01
    AI: What is the exact brand/model of the device, or can you share the current OpenBeken template / GPIO configuration page for this device?
    My device is not branded. It looks just like the unbranded device on this page: https://devices.esphome.io/devices/oxt-1ch-dimmer/
    AI: Can you post your current autoexec.bat content and the GPIO8 role/settings you tried, including whether you used Button, Btn, Btn_n, input pull-up, etc.?
    At this moment, it makes no sense to include config and autoexec.bat details since the device does not work.
  • ADVERTISEMENT
  • #2 21941617
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14721
    Help: 659
    Rate: 12805
    Here are samples for events that you can use:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Try to use Btn_ScriptOnly to avoid firing default click events as well.
    Make sure that childlock flag is disabled.
    Also, what do you mean by "off"?
    Helpful post? Buy me a coffee.
ADVERTISEMENT