logo elektroda
logo elektroda
X
logo elektroda

[Solved] Module with OpenBeken - relay clicks intermittently after firmware upload

Adam-T 162 9
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21311085
    Adam-T
    Level 41  
    Hello.
    And again I come to you for help.
    I have acquired the following module:
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    Module with OpenBeken - relay clicks intermittently after firmware upload .

    After uploading OpenBeken (all automatic, so to speak) everything is ok except for the relay, which clicks intermittently all the time - connects and disconnects itself. The relay can be switched on/off between its clicks either by pressing a button or via the web, but it still clicks.
    After reverting to the original firmware it works fine.
    This is how the flaher configured it:
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    What could be the reason for this behaviour?

    Adam

    I am sending his original batch as an attachment.
  • ADVERTISEMENT
  • Helpful post
    #2 21311097
    p.kaczmarek2
    Moderator Smart Home
    To start with, I suggest doing some separate tests to narrow down the source of the problem.
    1. set the pin from the relay to AlwaysHigh instead of Rel. Does the relay continue to "jump" or is it in the same state 100% of the time (probably closed)?
    2. set the relay pin to AlwaysLow instead of Rel. Does the relay continue to "jump" or have the same state 100% of the time (probably open)?
    3. remove the TglCHanOnToggle role (or change its channel to e.g. channel 5, as you don't use it, this will detach it from the relay). Does the relay continue to switch randomly? (Obviously, restore the Rel role to the relay for the duration of this test).
    4. are you using PowerSave? Enable PowerSave (e.g. enter PowerSave 1 in the startup command and perform a reboot) and write if the problem continues. PowerSave is needed with such devices because they have quite weak power supplies, otherwise you are waiting:
    How to fix a smart device that crunches, squeaks and makes strange noises? .
    Helpful post? Buy me a coffee.
  • #3 21311142
    Adam-T
    Level 41  
    I will start from the end:
    Ad4 so I create an autoexec and in it PowerSave 1 and startDriver BL0942. (clicked)
    Ad1 yes 100% of the time closed.
    Ad2 yes 100% of the time open.
    Ad3 I didn't manage to test because after the first 2 tests the relay calmed down.
    Now reboots or powering down and powering up the module again do not result in the relay clicking.
    Everything works as it should. I wonder what was the reason for this clicking?

    Thank you for your help.

    Adam
  • ADVERTISEMENT
  • Helpful post
    #4 21311183
    p.kaczmarek2
    Moderator Smart Home
    Well, the tests are inconclusive. There are two options.
    a) either a weak power supply is to blame - PowerSave 1 helped, Remember that PowerSave 1 will only work after a reboot.
    b) either TglChanOnToggle has interference, which has already been reported, and people have either fixed this in code or added a resistor to this pin. This is a bit problematic, because the OBK is one, and there are many devices and they have different designs, so TglChanOnToggle on one series of devices works better and on another it works worse
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 21311396
    Adam-T
    Level 41  
    As far as PowerSave is concerned - always after uploading openbeken when the module is still plugged into usb I run it and set everything up including creating an autoexec and in it the aforementioned PowerSave and startDriver. Then there are a few reboots of the module. After all this, I desolder the cables and connect after 230V to calibrate the measurements. And then the relay started clicking in this exemplar. I did this several times because I had uploaded different versions of openbeken and it always clicked tem relay and 100% PowerSave was on.
    As for TglChanOnToggle, as I'm still inexperienced I don't know what it's responsible for 😉 .

    By the way, let me ask another question about calibration. I have always measured the voltage with a meter at the beginning and set it with VoltageSet, then connected a 300 watt ordinary light bulb measuring the current and of course CurrentSet and PowerSet and the measurements were good including reactive power measurements, apparent power and the PF was equal to 1. In this module my PF has split and it is 0.99 and the reactive power is 16-17vars. In addition when the relay is switched off there are these readings:
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    How do you set this up?

    And another question this time about the Home Assistant - after restarting the HA I have all openbeken in this (unknown) state:
    Module with OpenBeken - relay clicks intermittently after firmware upload .
    Module with OpenBeken - relay clicks intermittently after firmware upload

    The measurements are displayed correctly and the status of the switch is unknown. Just switch it off/on in HA and it is already correct. Can something be done about this?

    Adam
  • Helpful post
    #6 21311501
    p.kaczmarek2
    Moderator Smart Home
    BL0942 sends us measurements and we can only receive them. Your problem has already been reported and the only solution we have come up with is a flag:
    
    38	[Power] Set power and current to zero if all relays are open
    
    .
    Do you have it enabled? Rather not?


    As for relay states, do you have it enabled to publish its state every minute or so?
    Helpful post? Buy me a coffee.
  • #7 21311622
    Adam-T
    Level 41  
    p.kaczmarek2 wrote:
    Rather not?
    .
    Already included, thank you.
    p.kaczmarek2 wrote:
    have you enabled it to publish its status every minute or so?
    .
    Unfortunately I don't know how to do/enable this :( .
  • ADVERTISEMENT
  • #8 21311745
    p.kaczmarek2
    Moderator Smart Home
    To check:
    1. type the command in the device:
    
    publishAll
    
    .
    this you have to execute in real time, NOT in autoexec.bat, but in the "execute command" or in the web app in the console.
    Wait, does it appear in HA status correctly?
    2. enable flag:
    2	[MQTT] Broadcast self state every N (def: 60) seconds (delay configurable by 'mqtt_broadcastInterval' and 'mqtt_broadcastItemsPerSec' commands)
    .
    Is the problem solved after this?
    Helpful post? Buy me a coffee.
  • #9 21311792
    Adam-T
    Level 41  
    p.kaczmarek2 wrote:
    does the status appear correctly in HA?
    .
    Yes, the status appears correct.
    p.kaczmarek2 wrote:
    Is the problem solved afterwards?
    .
    Yes, you are great. Thank you very much.

    Greetings
    Adam
  • #10 21314809
    Adam-T
    Level 41  
    Explanation in posts above 😉.

Topic summary

A user experienced intermittent relay clicking on a module after uploading OpenBeken firmware, while the relay functioned correctly with the original firmware. Diagnostic steps included setting the relay control pin to AlwaysHigh and AlwaysLow, which stabilized the relay state, and removing the TglChanOnToggle role, suspected to cause interference. Enabling PowerSave mode (PowerSave 1) was recommended to address potential weak power supply issues, as these devices often have limited power capacity. The relay clicking ceased after these adjustments and module reboots, though the exact cause remained uncertain. Additional discussion covered the use of BL0942 energy measurement driver and related flags, such as setting power and current to zero when all relays are open, and enabling MQTT state broadcasting to ensure correct status reporting. The TglChanOnToggle function was noted as a possible source of relay instability due to hardware design variations across devices. Overall, power supply stability and configuration of toggle channel roles are critical to preventing relay chatter in OpenBeken-flashed modules.
Summary generated by the language model.
ADVERTISEMENT