OpenBeken update - Tasmota/Esphome/etc replacement for BK7231T, BK7231N, XR809 and BL602 platforms - TuyaMCU dimmer and fan support, basic Tasmota Device Groups support, save&restore (power on state) support

Hello again, I would like to present my OpenBeken progress update.

OpenBeken is alternative firmware for IoT devices that allows you to cut from cloud and connect easily to other systems like Home Assistant, soon Domoticz, etc.

I have added much more features according to user requests, including:

1. TuyaMCU support for smart dimmers and fans. For more info, please refer to those guides:

https://www.elektroda.com/rtvforum/topic3898502.html

https://www.elektroda.com/rtvforum/topic3895301.html

2. Tasmota Device Groups supports.

Current version supports only inputs, you can configure it at Config → Device Groups.

It should be self-explanatory, no guide needed here. Consult Tasmota manual to know what are Tasmota Device Groups.

3. Save and restore

From now on, you can set initial value for a channel (including PWM values), and you can also have device remember value after power loss.

Go to Config->Start values to see, no guide needed here.

4. I have also added many new input and output types, including the “toggle channel value on input value toggle” pin, which can be used to control smart relay with old bistable switch:

https://www.elektroda.com/rtvforum/topic3895572.html

5. I have also added BL0937 support (BL0942 was already done some time ago), it works the same as BL0942, along with Calibration process, for more information see this guide:

https://www.elektroda.com/rtvforum/topic3887748.html

6. Bugfixes

many small bugfixes has been added, too many to list here.

Much more features and Realtek platform support is coming soon, eg. the I2C LED driver. For more information, consult main progress update topic here:

https://www.elektroda.com/rtvforum/topic3866123.html

Repo with daily builds:

Do you have any devices that you’d like to have compatible with my project? Send me a message on Elektroda, I will do my best to add requested features to my SDK soon.

7 Likes

Just FYI I cannot load the elektroda pages bc of a certificate error. Why not just leave everything on github? I suspect you would be more traction. Cool project though! Thanks

Thanks for the links. It’s great to see the community working on support for the newer modules.

Hi!

:mechanical_arm: :mechanical_arm: :mechanical_arm:THANKS A LOT!!! :muscle: :muscle: :muscle:

Just to follow up that I bought this one: https://www.aliexpress.com/item/1005001280755098.html?spm=a2g0o.order_list.0.0.107a1802p6jZek

Aaaaand, since link will most probably expire after some time, I’m talking about this one:

As you can see, I bought it with 6 gangs, but it’s actually consist of 2 devices with 3 gangs per each device:

I can confirm that I had success to flash it with OpenBK7231N_QIO_1.12.0.bin and configured relays and buttons properly (yup, it is BK7231N written on chip, I had a hard time to read it :joy:).
Windows isn’t my brighter side, so after one unsuccessful try, I flashed it from Debian Bullseye with:

sudo su
cd ~/
git clone https://github.com/OpenBekenIOT/hid_download_py.git
cd hid_download_py
wget https://github.com/openshwprojects/OpenBK7231T_App/releases/download/1.12.0/OpenBK7231N_QIO_1.12.0.bin
apt install python3-hid python3-serial python3-tqdm
python3 setup.py install --user
ls -al /dev/ttyUSB*
python3 uartprogram /root/hid_download_py/OpenBK7231N_QIO_1.12.0.bin --unprotect -d /dev/ttyUSB0 -w --startaddr 0x0

Of course, I followed the guide from here and here regarding of “how to put device in flash mode”, i.e. shorten the GND with CEN, when “Getting Bus” line appear.

I’m very glad I didn’t screwed device, and even more glad that I had success to configure it’s relays and buttons, after looooot trial and errors. Below is my configuration:

Rel1 - P17
Rel2 - P26
Rel3 - P24
Btn1 - P6
Btn2 - P7
Btn3 - P8

Will repeat same this for another half, i.e. for another 3 gang device, and no, I didn’t added this to HA yet, but I believe it will work via MQTT, why wouldn’t.

Question:

Does anybody knows to point me how to configure WiFi LED properly? I mean, I’m not sure do I need it at all, but it would be nice to have it if possible. I already tried to put WiFiLED in every possible P* with channel 1, but didn’t noticed any change.

Thank you very much upfront!

Try WifiLED_n instead.

I just went through this same process for a 3 gang light switch yesterday, and that’s what got the WiFi LED to work properly.

One thing that I noticed yesterday when integrating my 3-gang switch into HA using MQTT that the switch state was reversed. IE. on=off, off=on.

This is what the HA config generator provided:

switch:
  - platform: mqtt
    name: "familyroom-lightswitch 1"
    state_topic: "familyroom-lightswitch/1/get"
    command_topic: "familyroom-lightswitch/1/set"
    qos: 1
    payload_on: 0
    payload_off: 1
    retain: true
    availability_topic: "familyroom-lightswitch/connected"
  - platform: mqtt
    name: "familyroom-lightswitch 2"
    state_topic: "familyroom-lightswitch/2/get"
    command_topic: "familyroom-lightswitch/2/set"
    qos: 1
    payload_on: 0
    payload_off: 1
    retain: true
    availability_topic: "familyroom-lightswitch/connected"
  - platform: mqtt
    name: "familyroom-lightswitch 3"
    state_topic: "familyroom-lightswitch/3/get"
    command_topic: "familyroom-lightswitch/3/set"
    qos: 1
    payload_on: 0
    payload_off: 1
    retain: true
    availability_topic: "familyroom-lightswitch/connected"

See how payload_on is set to 0?

I switched them around in my configuration.yaml, and now they reflect properly in HA:
2022-07-27 08_50_54-Logbook – Home Assistant and 7 more pages - Personal - Microsoft​ Edge

Thanks for the hint, will try it definitely tomorrow. This is something what came in my mind, but I was lazy and tired to continue with trial and error today.

I’m late to the party on this but flashed the firmware to some chips I’d removed and replaced with an esp quite impressed

I’ll be looking to flash a water/flood sensor shortly that has a XR809 Tuya chip.
Donated already as I think this is a real game changing project like Tasmota was.

As this is also meant as an esphome replacement (as mentioned in the title), have you given any thought to supporting the esphome/HA-api and supporting something like the .yaml-config esphome currently uses? Both would be great to have.

High praise. Really a great firmware for the Tuya devices. Only the Homeassistant Discovery does not work for me. No big deal, maybe it’s my Homeassistant.

Note: Currently, discovery is only implemented for light and relay entities.

This is written on the github page.
You didn’t mention your device.
Perhaps discovery is not implemented for your device.

1 Like

Hey, what kind of device? Please report to our Repository Issues tracker, we will look into that.

We’re doing daily updates and bugfixes, the development is very quick these days. Lot’s of good progress.

Remember to check out our new Support Devices List page:
https://openbekeniot.github.io/webapp/devicesList.html
and submit new teardowns if you can! Thanks.

2 Likes