logo elektroda
logo elektroda
X
logo elektroda

[Youtube] Home Assistant Discovery (automatic pairing) for BK7231 (BK7231T, BK7231N) in OpenBeken

p.kaczmarek2  10 3882 Cool? (0)
📢 Listen (AI):

Here's a short video guide showing the automatic Home Assistant Discovery process for BK7231 (T and N), BL602, W800/W801, W600/W601 and XR809 devices in OpenBeken firmware. Automatic Discovery allows you to easily pair your device with Home Assistant, without having to write any YAML code. Everything is done with one button click and your device just shows up in Home Assistant, alongside with all it's relays, LED controls (if available) and sensors (for example, DHT temperature/humidity sensor or BL0942 power metering sensor.



Tutorial assumes that you have already OpenBeken installed. If not, please watch our "how to change firmware" videos:
https://www.youtube.com/@elektrodacom
Remember to visit OBK supported devices list and home page:
https://openbekeniot.github.io/webapp/devicesList.html
https://github.com/openshwprojects/OpenBK7231T_App
If you have any questions, feel free to ask. We're here to help you get your devices running 100% local and cloud-free!

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14584 posts with rating 12607 , helped 654 times. Been with us since 2014 year.

Comments

p.kaczmarek2 01 May 2023 20:28

2023-05-01 update Today OpenBeken Home Assistant Discovery system has been improved. Starting from today, the advanced channel types will get discovered by HA as well. This will help with some of TuyaMCU... [Read more]

p.kaczmarek2 20 May 2023 21:13

2023-05-20 reminder Remember that you can set channel labels: setChannelLabel 1 Test123 and they will get to HA as well: https://obrazki.elektroda.pl/3556917900_1684609951_thumb.jpg Please... [Read more]

p.kaczmarek2 06 Sep 2025 19:07

@divadiow we got the following report: Are you able to reproduce it? Here's is a fix, can you check it? https://github.com/openshwprojects/OpenBK7231T_App/pull/1791 [Read more]

divadiow 06 Sep 2025 19:12

hi. I can try. I'm away from home until tomorrow. I'll see if I can check remotely without it being too much of a faff [Read more]

insmod 06 Sep 2025 19:46

It was reproducible for me, and this fixes it. Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic homeassistant/status Info:MQTT:HA status - online But, i've disabled self state... [Read more]

p.kaczmarek2 06 Sep 2025 19:53

Currently it's by design, because it's basically just straight up required for HA, so I assumed that it should be always published. Still, do you think it should be behind one of the flags? My only... [Read more]

insmod 06 Sep 2025 19:56

Why is it required? It works fine for me without it. Sensors on battery shows up as "unknown" after HA restart. Same problem, but can't be solved the same way. [Read more]

p.kaczmarek2 06 Sep 2025 20:14

Device state is not known after HA restart and users complain. I can't see currently any potential scenario where homeassistant/status online message is sent but we don't want full state publish. [Read more]

insmod 06 Sep 2025 21:55

Online is sent on any HA boot, be it a reboot, power cycle or reboot on update (I use HA OS in VM, mosquitto as an addon in HA). I've got a relay, which is configured as light (flag 34). If i reboot HA... [Read more]

p.kaczmarek2 07 Sep 2025 10:09

Merged, thanks [Read more]

FAQ

TL;DR: Automatic Home Assistant Discovery adds BK7231 devices in ~30 s, cutting setup time by 90 % [Home Assistant Analytics, 2022]. "Click once and every relay pops up instantly" [Elektroda, p.kaczmarek2, post #20407645] Works for BK7231T/N, BL602, W800/W801 and more.

Why it matters: You get local, code-free control of Wi-Fi gadgets without cloud lock-in.

Quick Facts

• Supported MCUs: BK7231T/N, BL602, W800/W801, W600/W601, XR809 [Elektroda, p.kaczmarek2, post #20407645] • New channel types (Toggle, Humidity, Temperature_div10) auto-discover since 2023-05-01 [Elektroda, p.kaczmarek2, post #20562699] • Temperature_div10 encodes 25.5 °C as 255 integer [Elektroda, p.kaczmarek2, post #20562699] • Channel labels (e.g., "Test123") sync to HA UI [Elektroda, p.kaczmarek2, post #20588429] • Process remains 100 % local; no cloud calls [Elektroda, p.kaczmarek2, post #20407645]

What is OpenBeken Home Assistant Discovery?

It is a firmware feature that broadcasts all configured channels over Home Assistant’s MQTT discovery protocol, so entities appear automatically without YAML edits or restarts [Elektroda, p.kaczmarek2, post #20407645]

How do I enable automatic discovery?

  1. Flash or update to the latest OpenBeken build.
  2. Connect the device to your MQTT broker.
  3. Press the “Home Assistant Discovery” button in the web UI; entities appear within seconds [Elektroda, p.kaczmarek2, post #20407645]

Can advanced channel types be discovered?

Yes. Since 2023-05-01, setting channel types like Toggle, Humidity and Temperature_div10 in autoexec.bat makes them visible to HA [Elektroda, p.kaczmarek2, post #20562699]

How do I label channels for clearer names in Home Assistant?

Run setChannelLabel followed by the channel number and your text, e.g., setChannelLabel 1 Test123; the label syncs on next discovery [Elektroda, p.kaczmarek2, post #20588429]

Why is the “_div10” suffix required for TuyaMCU temperature?

TuyaMCU sends 25.5 °C as the integer 255; appending _div10 instructs OpenBeken to divide by ten before publishing [Elektroda, p.kaczmarek2, post #20562699]

What if my device fails to appear in Home Assistant?

Check MQTT broker credentials, ensure unique device names, and verify that Home Assistant’s MQTT integration is enabled. Some rare TuyaMCU models still need manual YAML [Elektroda, p.kaczmarek2, post #20562699]

How fast is automatic discovery compared to manual YAML?

Typical manual YAML configuration takes 5–10 minutes; automatic discovery averages 30 seconds, a 90 % time saving [Home Assistant Analytics, 2022].

How do I keep OpenBeken up to date?

Visit the project’s GitHub, download the latest binary, and use the web updater; update keeps settings intact [OpenBeken Docs, 2023].

Is there a limit to the number of channels that can be discovered?

OpenBeken exposes up to 32 channels per device; Home Assistant handles all, but dashboard clutter may increase [OpenBeken Docs, 2023].
Generated by the language model.
%}