Detailed guide on how to flash the new Tuya Beken Chips with OpenBK7231T

Great project.
I almost lost hope with my new switches that use BK7231T. Switches are going offline too often with Local Tuya integration.

I have a few Gosund SW2 Dimmer switches. I installed OpenBK on one of these device, but I have no idea how to set up the configuration to make them work with OpenBK.

I also have a few SW5 Gosund switches. I didn’t try flashing them yet, but I have the same question. How to find hot to configure them.

Thanks,
Arcos

You can do trial and error but have a look at the devices listed in the Quick Setup. Then Google them and see if any of them are similar to your switches. Then try the quick setup as a starting point. Then change configs one at a time until you get the right config for your switch.

OpenBK is currently looking into building a javascript based database for configs which will allow you to add your new configs for others. Similar to Tasmota Blackader.

Seems to be in the Quick Setup already!

Hi,
Thanks for your effort!
I’m wondering what is the flasher tool doing in detail and why is it windos only?
cheers

I think it’s a Tuya tool. There are Python options too. Take a look at the project page on Github: openshwprojects/OpenBK7231T_App: Open source firmware (Tasmota replacement) for BK7231T, BK7231N, XR809 and BL602 (github.com)

I managed to get a Deta 3 Gang Switch (6903HA Series 2) flashed and up and running today. I’ve not yet hooked it up to HA via MQTT, I’ll do that tomorrow.

DETA 3-Gang 6903HA Series 2_small

Buttons, Relays, and WiFi status LED all configured after a bunch of head scratching and trial and error. I’ll add a pull request to the repo to get the device template added later. For now, these are the pinouts:

Relay 1: GPIO8
Relay 2: GPIO26
Relay 3: GPIO24
Button 1: GPIO14
Button 2: GPIO9
Button 3: GPIO10

WiFi LED (WifiLED_n): GPIO1
1 Like

Great work! The OpenBK7231T_App should generate the MQTT settings for Home Assistant for you. Then copy that and add it to your configuration.yaml. If you have MQTT setup with Home Assistant already this should be 1 minute work. Good luck!

Yep, got that working last night. Only thing was that the generated config had the switch states the wrong way around (on=off, off=on).

It’s working well so far. I only have it installed in a test rig that I built.

Next I’m going to have a go at flashing my Brilliant PIR sensor, as the electrician is coming in 6 days to wire that in.

@abdul2000
Will this be fixed in future release
I know i could change the payload for on/off to get proper status but if i restart HA, the status becomes unknown and i had to toggle the switches again to get the latest status.

1 Like

You’ll want to ask that question of @openshwprojects, they’re the creator.

1 Like

Have you figured anything about this SW2.

I’m currently working on finding out, but trial and error is long process if you don’t have any clue about right config not just pins.

Let me know if you figure out something, If I manage to make it to work, I will make PR for config for this device. I have looked at tasmota and teardown of the old esp based SW2, inside looks identical, so I might go with comparing pinout of the boards and see if that gets me anywhere

I think you should raise an issue on the project page https://github.com/openshwprojects/OpenBK7231T_App. @openshwprojects must’ve designed it this way for a reason or maybe just the way things done in his region. I solved it by just switching the on and off values in the switch. My config looks like this
image

1 Like

Yep, i did the same thing with the payload.
Just the status become unknown if i restart ha, probably will get fixed later

hmmm! I don’t have this issue. It might be your config or mqtt.

I’ve not had this issue either, across several HA restarts in the past day.

FYI, I’ve raised an issue in the Github project as it’s auto-generating a deprecated HA switch config: “Generate Home Assistant cfg” feature using deprecated configuration format · Issue #138 · openshwprojects/OpenBK7231T_App (github.com)

I don’t know why but I have already tried on different PCs and it always stays there…

Have you tried lowering the baud rate?

lower does not let me

I had same situation and problem was that something was connected to tx rx pins ok the board, identify tx rx on chip board and desolder them for flashing

I have checked the connections. I even changed RX and TX just in case it was wrong. Nothing does not even start to erase.
Today I went back to desoldering and soldering. Any… :frowning:

1 Like