logo elektroda
logo elektroda
X
logo elektroda

[Solved] OpenBeken CB3S Chip: Random Relay Toggling on 1 Gang Smart Wifi Switch with AC Power

jtauscher87 1101 6
ADVERTISEMENT
  • #1 20486398
    jtauscher87
    Level 5  
    Hello everyone,

    I have a simple 1 gang smart wifi switch with CB3S chip, flashed it, very easy! Nice! Thanks for that!
    I found the right pin config etc, but I have a problem with the AC (classic) switch recognition. It works fine while driving the smart switch with 5Volts and then grounding the "AC switch pin (P8)". I can go with "button" or TglOnChnTgl. Works both just fine. But if I power the whole system with AC, the relay just toggles randomly. I kind of think the 0V recognition is too sensitive. It works with the original firmware just fine, no random toggles there.

    Any thoughts?

    OpenBeken CB3S Chip: Random Relay Toggling on 1 Gang Smart Wifi Switch with AC Power
  • ADVERTISEMENT
  • #2 20486512
    p.kaczmarek2
    Moderator Smart Home
    Hey, can you temporary set dInput role and see if it dInput readings are stable? If no, then try dInput_noPullUp and try again?

    The TglOnChnTgl assumes internal pull up is on, maybe your device requires something like TglOnChnTgl but without pull up... I may add this role in code for you soon, depending if that's what's needed.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20487178
    jtauscher87
    Level 5  
    Hello,

    so I couldn't succeed with any of these settings and I did further measurements:
    - If AC switch is pressed I read AC(!) 2,4V.
    - If not pressed its 0V AC(!).
    In DC its always 1,3V (no pullup) or always 3V with pullup. No matter switch is pressed or not.

    I have never seen this way of recognizing AC switches before. I think shelly does it the "DC way"?

    Edit: Just found this for tasmota - does OpenBK have an equivalent thing?

    OpenBeken CB3S Chip: Random Relay Toggling on 1 Gang Smart Wifi Switch with AC Power

    Edit2: I had the wrong pin for AC Switch recognition. I will correct it in the picture above, its actually P8 ( P7 if you have 2 Gang I assume). So it seems to work with Btn_n just fine (3V AC). Thanks!
  • ADVERTISEMENT
  • #4 20489233
    p.kaczmarek2
    Moderator Smart Home
    Hmm... I am not aware about that Tasmota settings. Thanks for bringing it to my attention. I will investigate it.

    Still, it sounds like the issue is resolved? So the cause of random switching was just a pin configuration error?
    Helpful post? Buy me a coffee.
  • #5 20489297
    jtauscher87
    Level 5  
    Yes. With the correct pin it works.
  • ADVERTISEMENT
  • #6 20765740
    dipish
    Level 7  

    >>20489233

    Just for people who will pick this device further, I will leave here JSON, wires, a backup of native firmware.

    Wiring: 3.3v to center pin VDO.
    TX, RX, CEN and GND to CB3S without desoldering.

    Code: Text
    Log in, to see the code


    Commands:
    Code: Bash
    Log in, to see the code


    JSON:
    Code: JSON
    Log in, to see the code


    Backup TUYA readResult...-45-08.zip Download (997.18 kB)
  • #7 20875382
    jtauscher87
    Level 5  
    dInput_n works for this device

Topic summary

The discussion revolves around a 1 gang smart WiFi switch utilizing the CB3S chip, where the user encountered random relay toggling when powered by AC. Initially, the switch functioned correctly with 5V but exhibited erratic behavior under AC power. After troubleshooting, including testing various pin configurations and voltage readings, it was determined that the issue stemmed from an incorrect pin assignment for AC switch recognition. Once the correct pin (P8) was identified, the switch operated as intended without random toggles. Additional technical details regarding wiring and device configuration were shared for future reference.
Summary generated by the language model.
ADVERTISEMENT