logo elektroda
logo elektroda
X
logo elektroda

Aoycocr U3 UK Smart Plug - BK7231T Convert to OpenBeken

digital-cipher 4329 4
ADVERTISEMENT
  • Hi all

    This is a quick post to document my journey in converting an Aoycocr U3 UK Smart Plug that has the BK7231T chip (not the old ESP8266)

    Aoycocr U3 UK Smart Plug - BK7231T Convert to OpenBeken

    After buying this smart plug from Amazon UK (https://www.amazon.co.uk/gp/product/B07S3ZN7T8/) and then finding the BK7231T inside, I was expecting an ESP8266 like all the other Aoycocr UK smart plugs I had brought in the past.

    (I used a rubber hammer on each side of the plug to release the sonic weld around the back case)

    I started my BK7231T learning journey, after reading some very helpful posts on here and openshwprojects/OpenBK7231T I programmed this chip using the Python script on Windows (I could not get Beken Writer V1.60 to complete the programming after trying for hours)

    https://github.com/OpenBekenIOT/hid_download_py

    My BK7231T module looked the same as this
    Aoycocr U3 UK Smart Plug - BK7231T Convert to OpenBeken

    The 3.3v, Gnd, RX and TX pins are marked on the back (3.3v and Gnd) and bottom (RX & TX) of the module

    Once programmed and after a bit of trial and error I got the relay, button and LED pins sorted

    My settings are
    Led_N = 1 1
    Relay = 7 1
    Btn = 8 1

    Im still working out the Home assistant settings, I will post any updates I find here

    Cool? Ranking DIY
    About Author
    digital-cipher
    Level 2  
    Offline 
    digital-cipher wrote 2 posts with rating 1. Live in city England. Been with us since 2017 year.
  • ADVERTISEMENT
  • #2 20226607
    p.kaczmarek2
    Moderator Smart Home
    digital-cipher wrote:
    I was expecting an ESP8266 like all the other Aoycocr UK smart plugs I had brought in the past.

    Oh no, yet another one migrated? Don't worry, I am here to help. OBK is under active development and, for example, our team member @iprak is adding Home Assistant discovery just as we speak (it's already working for simple devices and RGB/RGBCW bulbs, power metering sockets are up next!).

    Did you submit the device template to online database?
    https://github.com/OpenBekenIOT/webapp/blob/gh-pages/devices.json

    That's a strange module, WB3? Do I see correctly? I haven't seen that one yet.

    Thank you for the teardown. For the record, because links tends to expire after some time, I'll post here some screenshots from Amazon offer:
    Aoycocr U3 UK Smart Plug - BK7231T Convert to OpenBeken

    Wait wait wait a minute.. I just spotted something interesting, here:
    Aoycocr U3 UK Smart Plug - BK7231T Convert to OpenBeken
    I think that "Bluetooth" keyword here might be an indicator of ESP to BK swap, because ESP8266 has no BT a BK7231 has.

    Btw, do you have a firmware backup for further analysis by Tuya-cloudcutter team?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20226717
    digital-cipher
    Level 2  
    Hi p.kaczmarek2

    Yes I spent some hours researching this BK module, all the others I could see online had the antenna on the top but this one is on the side and on the board, some pins are marked up as spi.

    Yes that's a good spot for others, if the device says upgraded with Bluetooth then yes it's not an ESP8266 on board so it's got a good chance its a BK7231T or N

    I didn't take a backup of the original firmware as I'm unsure how to do this, but I followed the Python script instructions and it programmed the first time (after having tried Beken Writer V1.60 for too many hours :) )

    I have no idea about submitting the template to "https://github.com/OpenBekenIOT/webapp/blob/gh-pages/devices.json", I'm not a Git person, but from looking at the device.json page my device would be

    {
          "vendor": "Aoycocr",
          "name": "UK Smart Plug",
          "model": "U3",
          "chip": "BK7231T",
          "board": "WB3",
          "keywords": ["switch"],
          "pins": {
            "7": "Relay;1",
            "1": "LED_n;1",
            "8": "Button;1",
          },


    Getting the device into Home Assistant using the onboard HASSIO template generator was super easy, :)

    One thing that may help other newbies like me if there was a way to run a script on the device to help see which pins are used, such as the relay, button and LED.
    Something like, pulse each pin until you hear the relay click or see the led flash

    I just manually changed each pin until I found each entity
  • ADVERTISEMENT
  • #4 20228453
    p.kaczmarek2
    Moderator Smart Home
    That''s a good idea, I might look into that.

    I have submitted your device information to the global templates list. It should be available soon online. Thank you!
    Helpful post? Buy me a coffee.
ADVERTISEMENT