logo elektroda
logo elektroda
X

eWeLink 3 Channel Relay - BL602 - Pin 20/Button 1 Activating on Restart

webapps 69 0
ADVERTISEMENT
  • #1 21732054
    webapps
    Level 1  
    There are not many versions of 3 channel WiFi relays, most are 2 or 4 channel, so I bought a few of these relay modules (AC 90-260V) from AliExpress to use with 3 speed pedestal fans and integrate them into Home Assistant. The plan was to use three channels to control the fan speed via a remote, while still allowing the fans original buttons to function.

    AC 90-260V/DC7-32V Pro eWelink APP 3channel


    eWeLink 3 Channel Relay - BL602 - Pin 20/Button 1 Activating on Restart

    eWeLink 3 Channel Relay - BL602 - Pin 20/Button 1 Activating on Restart

    I successfully flashed the BL602 chip on the SDV-002_V1.2 module - noting that a 10k ohm resistor is connected from VCC to the R2 on the module during the flashing process. The config is below:

    "pins": {
    "1": "WifiLED_n;0",
    "2": "Btn;3",
    "3": "Rel;3",
    "12": "Rel;1",
    "14": "Btn;2",
    "20": "Btn;1",
    "22": "Rel;2"
    }

    The eWeLink app supports both inching and latching, but only latching is needed because the relays (fan speeds) must remain mutually exclusive. To achieve the equivalent of independent latching, I added the following to autoexec.bat

    // --- Mutually exclusive channels ---
    addChangeHandler Channel1 == 1 backlog SetChannel 2 0; SetChannel 3 0
    addChangeHandler Channel2 == 1 backlog SetChannel 1 0; SetChannel 3 0
    addChangeHandler Channel3 == 1 backlog SetChannel 1 0; SetChannel 2 0

    I modified the fans original buttons by removing their latching mechanism - I opened the assembly and took out the push-rod and spring, so the buttons now act as momentary switches. This way, each button simply toggles the fan on or off at its respective speed.

    I connected the wires on the fan buttons to the small pads COM1, K1, K2, K3, seen on the bottom right corner on the back of the board. COM1 is connected to where the live wire would have been connected to on the button mechanism, Slow to K1, Medium to K2, Fast to K3. The only drawback is the Off button on the fan does nothing.

    The setup works great through Home assistant and manually toggling the fan buttons. However, there are a couple of issues with the relay/config that I could not properly resolve.

    When the relay restarts via the UI or is powered off and on, Pin 20, ie Button 1, always turns on/activates and the fan starts up . I'm not sure if this is what happens in the eWeLink app as I haven't tested it. The only way around this is to either not set Pin 20 as a button, which means button 1 can't be used, buttons 2 and 3 still work; or activate flag 41 ([BTN] Ignore all button events), disabling all buttons, but then the fan can't be turned on manually.

    I've tried different options/scripts like setting Pin 20 to Btn_ScriptOnly, setting the button to None and then Btn in autoexec.bat etc, but nothing seemed to work, Pin 20 always activated. The only workaround I found was to add this to autoexec.bat:

    backlog SetChannel 1 0; SetChannel 2 0; SetChannel 3 0

    This works but Pin 20 still activates on restart, and the relay is on for a fraction of a second before turning off. Also, none of the channels can be set to remember the last state.

    I'm not sure if this is what caused the issue, but 2 relays exhibited the same behavior. After a couple of days they could not be restarted from the OpenBeken UI as they would not power up. I could get them to power up occasionally if I disconnected and reconnected the mains power, but it seemed random. I could get the SDV-002_V1.2 module connected through the FDTI USB (after removing the relay from the fan, no connection to mains), but again it seemed to connect randomly. I'm not sure if the momentary on/off, caused by setting the channels to 0 on startup, somehow damaged either the SDV-002_V1.2 module or something on the main board, or if I inadvertently did something to damage the relays.

    I can't use these 2 relays now, and have wired up another relay which seems to be working. If it fails I may look into the Tuya 4 channel relays.

    AI: Which exact version and build of OpenBeken firmware did you flash onto the SDV-002_V1.2 modules?

    OpenBL602_1.18.200

    AI: Can you provide more details about how you are powering the relay modules in your fan setup—are you using the AC or DC input, and how is the wiring arranged between the relay, the fan, and the power source?

    The relay is AC 90-260V , so the relay input and fan both share the same live and neutral connection.

    Live is also connected to COM1, COM1 is looped to COM2 and COM3

    The wires for the 3 fan speeds are connected to the relay:
    NC1 - Slow
    NC2 - Medium
    NC3 - Fast

    The fans button wires are connected to the small pads COM1, K1, K2, K3:
    COM1 - Where the original Live connection was on the button mechanism
    K1 - Slow
    K2 - Medium
    K3 - Fast
  • ADVERTISEMENT
ADVERTISEMENT