logo elektroda
logo elektroda
X
logo elektroda

ZN268131 WiFi Smart Switch that allows you to connect a bistable button

p.kaczmarek2 31206 49
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 20389189
    piratee
    Level 13  
    I no longer power everything from 230V CB2S is soldered to the shallow, so when checking I have to watch out for high voltage
  • ADVERTISEMENT
  • #32 20389196
    p.kaczmarek2
    Moderator Smart Home
    Remember that even if you disconnect 230V, the capacitors can hold some current and cause a painful shock.

    Depending on how well you are soldering, seriously soldering the LED with a resistor to the appropriate IO and mass (or VDD, if you prefer) with the correct polarization (because you know that the diode has an anode and a cathode) will tell you in a minute whether the IO data works or not.

    Unless you're doing something else wrong, e.g. you set IO somehow strangely .... but there's nothing to break here, P9 is P9 and that's it. P8 is P8. Etc. On the WWW configurator, we use normal IO naming, such as Tuya
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 20389219
    piratee
    Level 13  
    I know how a diode works. I can handle the soldering of the diodes as well. But I need to stretch out longer.
    Ps.
    Anyway, I'm not an electronics engineer, but I am an electrician :)
  • #34 20496080
    anthonythomas
    Level 9  
    I have bought some very similar switches in the AliExpress Choice Day sales.

    Used tuya-cloudcutter to flash OpenBK (didn't even setup in SmartLife app - just went straight to cloudcutter)
    > By manufacturer/device name
    > Aubess
    > 16A Mini Smart Switch
    > 1.2.1 - BK7231N / oem_bk7231n_control_switch
    OpenBK7231N_UG_1.15.597.bin

    Pin settings are possibly different to other versions - these work for my device.

    LED_n - 7 - ch1
    Rel - 8 - ch1
    Btn - 10 - ch1
    TglChanOnTgl - 26 - ch1

    Toggle tested with a simple switch.

    ZN268131 WiFi Smart Switch that allows you to connect a bistable button
    ZN268131 WiFi Smart Switch that allows you to connect a bistable button ZN268131 WiFi Smart Switch that allows you to connect a bistable button ZN268131 WiFi Smart Switch that allows you to connect a bistable button
  • #35 20496095
    p.kaczmarek2
    Moderator Smart Home
    Thanks, added as add Mini Smart Switch 16A 1 Gang Shunshun:
    https://openbekeniot.github.io/webapp/devicesList.html
    I wasn't been able to find any other marking or name on the photos you attached.
    Helpful post? Buy me a coffee.
  • #36 20496123
    anthonythomas
    Level 9  
    No problem.
    The AliExpress listing said "Graffiti" if you want to add that.
  • #37 20556965
    faires
    Level 2  
    Hello p.kaczmarek2

    What a great post!

    I got some ZN268131's from AliExpress and I have a very basic doubt that I kindly ask your help to clarify: is it really mandatory to connect L1 to live/single phase power and N1 to neutral because it is smart switch, or does ZN268131 works with L1 connected to neutral and N1 to power?

    This will make all the difference for me because in most of the applications I would like to use them power and neutral changes depending on the orientation plug is connected to the socket. If "polarity" is mandatory, they will need to be used in the wall, before the sockets...

    Thanks in advance for your attention to such a basic question, but if someome can give a reliable answer, definitely it will be you.

    Best Regards
    Fernando Aires
  • ADVERTISEMENT
  • #38 20557122
    p.kaczmarek2
    Moderator Smart Home
    Well, it will work with swapped L/N, but it is very strongly recommended to always connect L/N correctly. I don't know why would anyone want to change that. Doing your electric wiring incorrectly poses a serious shock risk.

    The power supply circuit used in this device does not provide a separation from mains, so if you swap L and N and start touching WB2S or anything other on the board (or attach DHT11 to board and then touch wire) you might get serious electric shock
    Helpful post? Buy me a coffee.
  • #39 20557156
    faires
    Level 2  
    Many thanks for your answer and advise.

    I understand, but the normal 2 pin/hole EU plug/socket connections for any electrical appliance can be done both ways (0 or 180°) and in a daily use there is no easy way of knowing, or ensuring, the right L/N connection is done.
    Moreover, for instance, in a plug in lamp (where I want to use the ZN's) normally the manual switch only breaks one wire, so we end up living with an high risk of shock and get used that the power might be there even if the lamp is turned off...
  • #40 20557167
    p.kaczmarek2
    Moderator Smart Home
    Well, it depends on your application, but we have to aware that in case of, let's say, changing the bulb of smart lamp when this lamp is turned off via App/Home Assistnat, there is a 50% chance of L getting exposed into that bulb internals.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #41 20557168
    anthonythomas
    Level 9  
    Maybe this device isn't suitable for your application.
    A smart socket may be more appropriate.

    These seem to be designed to be hard wired.
  • #42 20557212
    faires
    Level 2  
    Understood, fully agree.

    I educated my children to allways disconnect the plug or even switch off main switchboard when swapping a bulb...
  • #43 20633714
    marnypopis1
    Level 10  
    Hello. Flashing is one thing and it's described very nicely, there's a movie and I managed to cut off all my useful things that didn't go OTA from the cloud and work locally, but there is BUT. Can someone tell me how to enable this switch to act as a roller shutter switch. He's already combining in all possible ways. After uploading OpenBK7231N, I have a switch that works for me with Home Assistant after MQTT - I can turn it on on the 1st and 2nd relay and everything works, but how to make it impossible to turn on both at once, and how to set the operating time. I do not know.

    In Tasmota uploaded via OTA there is no problem with this because we use commands in Console and we can call something like this. In OpenBK, the interface is similar, but these commands no longer work. Can anyone help ?
  • #44 20633881
    p.kaczmarek2
    Moderator Smart Home
    Unfortunately, I do not have blinds, so I had no way to make a dedicated controller for them. I could buy them with a donation, and maybe I will soon, but for now we only have solutions developed by contributors:
    https://www.elektroda.pl/rtvforum/topic3972935.html
    https://www.elektroda.com/rtvforum/topic3972935.html (original version in English)
    Helpful post? Buy me a coffee.
  • #45 20894127
    omelchuk890
    Level 11  
    All the best and peace!
    I installed the switch module in the socket box, there’s a button on top, there’s a radio button next to the bed on 433 in Node-Red, from there via mqtt to the switch - everything is as intended and works great!
    But - I would like to add automatic shutdown after a fixed time, for example 15 minutes, by implementing this using a script in the switch, but there is no understanding of the correct spelling in this “language slang”.
    I ask for help in solving the problem, if you write comments on the created code, I will be very grateful!
  • #46 20968472
    StrangerIV
    Level 1  
    Hi all,
    just wrote your great firmware to my device. One hint: I have two usb-to-uart devices, so I connect my Aubess Power Monitor Switch 3,3V line to one of them, and Rx, Tx and Ground to another. So when I was asked to re-plug power, I did it on first usb-to-uart, and my data link stays intact on second.
    My device is slightly different. Here's some photo:
    Interior and casing of Aubess power monitor switch with a circuit board. Close-up of a printed circuit board of an electronic device with visible components such as capacitors and screw terminals. Close-up of a green PCB with electronic components and a cut trace at the top. Close-up of an electronic module with visible traces and components on a circuit board. Close-up of an electronic board with components, including capacitors and a module, with visible markings.
    On the second photo, at top of board, you can see cutted route. It is Rx1, cutted to avoid interference with other devices on board, in my case it is BL0542 power monitor.
  • #47 21363483
    kicius
    Level 12  
    Another very similar switch on sale AliExpress chip T34 (note altered pinout).

    Used BK7231 EASY Uart Flasher to flash OpenBK
    > By manufacturer/device name
    > DIY Smart Switch
    > 16A Mini Smart Switch
    > OpenBK7231N_QIO_1.17.812.bin

    Pin settings probably differ from other versions - these work on my device.

    LED_n - 6 - ch0
    Rel - 15 - ch0
    Btn - 24 - ch0
    TglChanOnTgl - 11 - ch0
    TglChanOnTgl - 14 - ch0

    A box labeled DIY Smart Switch lying on a wooden background. Mini smart switch with technical description on the casing. Close-up of a smart switch with BK7231 chip on a circuit board. Close-up of a switch circuit board showing electronic components. -.
  • #48 21364784
    Szyszkownik Kilkujadek
    Level 37  
    StrangerIV wrote:
    Aubess
    .
    Exactly these two Aubess relays failed at my place after a year of operation. The reason is a swollen 10V 470uF capacitor.
    Exceptional low quality.
  • #49 21364841
    p.kaczmarek2
    Moderator Smart Home
    @kicius if you want your template to appear in our list, then put it in JSON format copied from the Web App
    https://openbekeniot.github.io/webapp/devicesList.html
    @szszszkownikkilkujadek a known problem, here it was described in more detail:
    How to fix a smart device that crunches, squeaks and makes strange sounds? .
    And did they break on the original Tuya firmware or after changing it? In the OBK, PowerSave 1 should be enabled there.
    Helpful post? Buy me a coffee.
  • #50 21365170
    Szyszkownik Kilkujadek
    Level 37  
    p.kaczmarek2 wrote:
    Are they broken on the original Tuya firmware or after changing it?
    .
    Original, never touched.

Topic summary

The discussion revolves around the ZN268131 WiFi Smart Switch, which allows integration with bistable buttons for controlling devices. Users share experiences with the switch, including successful operation with Tuya firmware and issues encountered after flashing OpenBeken firmware. Problems such as incorrect voltage readings and boot failures when powered by mains are addressed, with suggestions for checking capacitors and power supply configurations. The conversation also covers the configuration of the switch for various applications, including roller shutter control and the importance of correct wiring to avoid electric shock risks. Users provide insights into pin configurations and troubleshooting techniques, emphasizing the need for proper connections and firmware settings.
Summary generated by the language model.
ADVERTISEMENT