FAQ
TL;DR: Tuya PM01_A002 (BK7231N + HLW8112) can work on OpenBeken; some stock units show a 1:5 power-reading ratio — “all power values are reported in a ratio 1:5.” [Elektroda, kaleidoscopeit, post #21608745]
Why it matters: This FAQ helps you flash, enable the HLW8112 SPI driver, set pins, and fix no‑reading issues fast — ideal for DIYers migrating Tuya meters to OpenBeken.
Quick Facts
- HLW8112 connects via SPI directly to the CBU/BK7231N module (not TuyaMCU), so you need a native driver. [Elektroda, kaleidoscopeit, post #21608745]
- CS pin uses P9 (SCSN) on this board variant, not the usual P15. [Elektroda, kaleidoscopeit, post #21608745]
- Driver is disabled in public builds; enable it in obk_config.h or flash a driver‑enabled image. [Elektroda, p.kaczmarek2, post #21707538]
- Community builds report voltage, frequency, current A/B, power A/B, energy (import/export), PF, and HA discovery. [Elektroda, maxters007, post #21694008]
- Known behavior: stock firmware may report power values at a 1:5 ratio until replaced or calibrated. [Elektroda, kaleidoscopeit, post #21608745]
Is there a working OpenBeken firmware for Tuya PM01_A002 (HLW8112, BK7231N)?
Yes. Users report success with HLW8112-enabled OpenBK builds (e.g., OpenBK7231N_1.18.206_hlw8112.rbl) on PM01_A002‑like devices. [Elektroda, dweimena, post #21736669]
Why do I get “Driver HLW8112SPI is not known in this build”?
Because public builds don’t ship the HLW8112 driver enabled. Rebuild with ENABLE_DRIVER_HLW8112SPI in obk_config.h or flash a driver‑enabled image. “You need to enable it in obk_config.h.” [Elektroda, p.kaczmarek2, post #21707538]
Which pins do I set for HLW8112 on this Tuya board?
Set chip‑select SCSN to P9. Example template used: P9=HLW_8112_SCSN; P24=WifiLED_n; P26=Btn. Then start the driver. [Elektroda, maxters007, post #21694008]
How do I flash an .rbl if my GUI flasher rejects it?
Flash a stock OpenBK QIO image first with your GUI tool, then perform OTA to the .rbl from the OpenBeken Web UI. [Elektroda, p.kaczmarek2, post #21723306]
Where do I download official OpenBeken releases?
Use the Releases section of the OpenBK7231T_App repository; pick BK7231N builds that match your target. [Elektroda, p.kaczmarek2, post #21723280]
How can I test quickly with a driver‑enabled build?
Flash a community HLW8112-enabled artifact (e.g., hlw8112_6ae422624810). Users confirmed it starts and shows data. [Elektroda, kdm6389, post #21707769]
HLW8112 roles or commands fail as “Invalid command.” What does that mean?
Your firmware lacks the HLW8112 role/driver, so role or startDriver calls fail. Flash a build with the driver enabled. [Elektroda, p.kaczmarek2, post #21707538]
Does enabling HLW8112 break BL0937/BL0942 drivers?
A tester confirmed BL0937 still starts and reads normally on the HLW8112 branch. [Elektroda, divadiow, post #21703742]
How do I set up HLW8112 on OpenBeken (quick 3‑step)?
- Flash an HLW8112-enabled build (or rebuild with ENABLE_DRIVER_HLW8112SPI).
- Set P9 to HLW_8112_SCSN; add LED/Button pins if needed.
- Run: startDriver HLW8112SPI, then verify voltage/current/power A/B. [Elektroda, maxters007, post #21694008]
What about A/B channels and Home Assistant discovery?
Community code exposes voltage, frequency, current A/B, power A/B, import/export energy, PF, plus Home Assistant discovery. [Elektroda, maxters007, post #21694008]
Can I calibrate voltage and power (e.g., VoltageSet)?
A user on OpenBK7231N_1.18.206_hlw8112 reported VoltageSet didn’t work. Expect limited on‑device calibration until added. [Elektroda, dweimena, post #21736669]
I still see a 1:5 power reading ratio—what’s going on?
That behavior was observed on stock Tuya firmware. Switching to a working HLW8112 OpenBeken build removes the mismatch. [Elektroda, kaleidoscopeit, post #21608745]
What MQTT/command path should I use from Home Assistant?
One tester used a HA button to publish to /command/dev_name/, and reported HA discovery support in the driver. [Elektroda, maxters007, post #21694008]
Any flashing pitfalls (edge cases)?
One device required overwriting the bootloader to boot correctly; after that, it worked but couldn’t be reflashed the usual way. [Elektroda, feiltom, post #21733747]
Will heavy testing harm the device?
The author warned early builds might write flash often; test briefly to avoid potential flash wear until finalized. [Elektroda, maxters007, post #21694008]