logo elektroda
logo elektroda
X
logo elektroda

[WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU

stonacek 12780 48
ADVERTISEMENT
  • #31 21820945
    momo4
    Level 2  
    Posts: 3
    Thank you for your article; it served as inspiration and a guide for me. I have replaced the WiFi module with ESP8266 (12F) and have gone with Tasmota. I have put effort to make sure the main functions work exactly as expected. So far I have Tasmota UI showing the V/A/P (some are in wrong scaling) and able to control start/stop charge and current (A) value. Also MQTT is set and in Home Assistant I have built a minimalistic dashboard which shows same data and allows same control. Then, as extra, I have created a scheduler (very basic) that can set the charge start and stop time for the low tariff hours. Also, I have added a keep alive function that kicks in every so to not let the car go in deep sleep as it prevents charging after that.

    I will provide the Tasmota and HA configs once I consider they are finalized.

    Electric vehicle charging panel with schedule showing start and stop times
    EV charger control panel showing voltage, current, energy stats and a Stop button
  • ADVERTISEMENT
  • #32 21821571
    jaccovdwijgaart
    Level 3  
    Posts: 4
    >>21820945
    This is perfect! You are touching all the aspects of my current struggles with my Feyree charger.

    I was using Tuya Local to dynamically change the amps to follow the solar import, and also have the problem with my car going in sleep mode.

    I have to add that I have a 3-phase variant of the charger.

    Can't wait for your configs.
  • ADVERTISEMENT
  • #33 21821666
    stonacek
    Level 8  
    Posts: 23
    Help: 4
    Rate: 7
    Why wait? Just do it with OpenBeken - dynamically adjusting the charging amperes is exactly what the original post is about. You can even use OBK Berry scripts to manage the logic, if you don't want to use Home Assistant.
  • #34 21821826
    jaccovdwijgaart
    Level 3  
    Posts: 4
    >>21821666
    In my head, the ESP is better and very available around me. How is the Wi-Fi on the CB3S compared to the WB3R and ESP? Because that is another struggle I have, the reception is piss-poor even though it is near my access point.

    Oh, and keeping the car awake with OpenBeken, how can I do that? Sorry, I am new to all of this. I have flashed Tasmota to a switch years ago and that's all. I will try to source the CB3S.
  • #35 21821915
    stonacek
    Level 8  
    Posts: 23
    Help: 4
    Rate: 7
    >>21821826

    I don't have any problems with the wifi over 30+ meters on the beken chips, but I have enterprise APs, small mhz channel allocated for these devices, and virtually no competing noise.

    but openbeken runs on ESP varieties as well:

    https://github.com/openshwprojects/OpenBK7231T_App
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #37 21825357
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    @momo4 your readme looks suspicious, is it AI generated? It contains nonsense. I would suggest taking it down and doing a manual revision, before uploading it again.
    Screenshot of Tasmota flashing instructions for WBR3 module with red annotations.
    Tasmota runs on ESP, it does not support WBR3...
    Helpful post? Buy me a coffee.
  • #38 21825620
    momo4
    Level 2  
    Posts: 3
    >>21825357

    Hi P. and thanks for spotting those and for all your hard work on the non-ESP chips - yes it is AI-generated - and at the end... the idea of open source is - people can contribute and correct some things that others have overlooked - I have done the changes - but you could also submit a correction PR - it would be much more productive compared to the advice to take it down ;). It is provided as is and others are welcome to provide improvements. If I had kept it to myself and kept checking - it might have never gone out.
  • #39 21836282
    ruisjm1
    Level 3  
    Posts: 4
    Hi, can I remove Wi-Fi Tuya chip board and keep charger working in standalone, or it need have Tuya Wi-Fi module?
  • #40 21836362
    jaccovdwijgaart
    Level 3  
    Posts: 4
    It works just fine without the Wi-Fi chip using local controls.
  • #41 21836415
    ruisjm1
    Level 3  
    Posts: 4
    I will remove it to test it, because I want to install it in a place without Wi-Fi; I only want plug-and-charge, and keep the Tuya board for testing ESPHome in other chargers.
  • #42 21870840
    hojnikb
    Level 12  
    Posts: 45
    Rate: 2
    Was anyone able to write support for the 3-phase version of this charger?
  • #43 21875879
    jaccovdwijgaart
    Level 3  
    Posts: 4
    >>21870840

    Yes, I have a 11kw 16a 3 phase version of this charger.
    I have also added a relay between the CP Control Pilot cable to trick my car into a physical disconnect/connect to initiate charger. (which is needed for my specific car because it goes to sleep).
    My relay is on PIN24 and channel 26

    
    setflag 2 1
    setflag 10 1
    setflag 35 1
    setflag 37 1
    setflag 40 1
    setflag 51 1
    
    // tuyaMCU store RAW data in /cm?cmnd=Dp
    //setflag 46 1
    
    PowerSave 0
    
    startdriver ntp
    ntp_setServer 192.168.2.254
    ntp_timeZoneOfs 00:00
    
    startDriver TuyaMCU
    
    // always report paired (wifi symbol on screen)
    tuyaMcu_defWiFiState 4
    
    // feyree baud 9600
    tuyaMcu_setBaudRate 9600
    
    // 101 is device status enum
    setChannelType 1 ReadOnlyEnum
    setChannelLabel 1 Status
    setChannelEnum 1 "0:Not Connected [free]" "1:Connected [insert]" "2:Charging [free_fault]" "3:Waiting RFID [charging?]" "4:Plugged in and Waiting [paused]" "5:Stopped/Finished [end]" "6:Error Detected [fault]"
    linkTuyaMCUOutputToChannel 101 enum 1
    
    // 14 working mode enum 
    setChannelType 28 Enum
    setChannelLabel 28 "Working Mode"
    SetChannelEnum 28 "0:Charge" "1:Charge Percent" "2:Charge Energy" "3:Charge Schedule"
    linkTuyaMCUOutputToChannel 14 enum 28
    
    // 124 is charge button enum RW 
    setChannelType 24 Enum
    setChannelLabel 24 ChargeState
    SetChannelEnum 24 "0:Charge Now" "1:Stop Charging" "2:Ready for Command" "3:Waiting" "10:Not Ready" 255:Unknown
    linkTuyaMCUOutputToChannel 124 enum 24
    addEventHandler OnChannelChange 24 tuyaMcu_sendQueryState
    
    // 10 fault
    setChannelType 27 ReadOnlyEnum
    setChannelLabel 27 "Fault Events"
    SetChannelEnum 27 0:Normal 1:err_cp 2:err_temp 3:warn_a_uvp 4:warn_b_uvp 5:warn_c_uvp 6:err_a_ovp 7:err_b_ovp 8:err_c_ovp 9:err_ocp 10:err_10 11:err_11 12:err_esb 13:warn_for_sck 14:err_leak_sck 15:err_on
    linkTuyaMCUOutputToChannel 10 bitmap 27
    
    // 102 is volts phase1 /10 
    setChannelType 2 Voltage_div10
    setChannelLabel 2 voltsPh1
    linkTuyaMCUOutputToChannel 102 val 2
    
    // 103 is volts phase2 /10 
    setChannelType 3 Voltage_div10
    setChannelLabel 3 voltsPh2
    linkTuyaMCUOutputToChannel 103 val 3
    
    // 104 is volts phase3 /10 
    setChannelType 4 Voltage_div10
    setChannelLabel 4 voltsPh3
    linkTuyaMCUOutputToChannel 104 val 4
    
    // 105 is amps /10 phase1; to set A type for HA, use Current_div100 
    // would be way better with 'Current' type
    setChannelType 5 Current_div100
    setChannelLabel 5 ampsPh1
    linkTuyaMCUOutputToChannel 105 val 5 0 10
    
    // 106 is amps /10 phase2; to set A type for HA, use Current_div100 
    // would be way better with 'Current' type
    setChannelType 6 Current_div100
    setChannelLabel 6 ampsPh2
    linkTuyaMCUOutputToChannel 106 val 6 0 10
    
    // 107 is amps /10 phase3; to set A type for HA, use Current_div100 
    // would be way better with 'Current' type
    setChannelType 7 Current_div100
    setChannelLabel 7 ampsPh3
    linkTuyaMCUOutputToChannel 107 val 7 0 10
    
    // 109 is kW /10; HA expects watts, so use Power type and multiply by 100 with linkTuya
    setChannelType 9 Power
    setChannelLabel 9 power
    linkTuyaMCUOutputToChannel 109 val 9 0 100
    
    // 110 is temperature /10
    setChannelType 10 Temperature_div10
    setChannelLabel 10 temperature
    linkTuyaMCUOutputToChannel 110 val 10 
    
    // 112 is kWh /10; 
    // ideally we'd have EnergyTotal_kWh_div10 type
    setChannelType 12 EnergyTotal_kWh_div100
    setChannelLabel 12 "Consumption kWh"
    linkTuyaMCUOutputToChannel 112 val 12 0 10
    
    // 114 sets max charge amps when 113 is 16a
    setChannelType 14 TextField
    setChannelLabel 14 "Set Current for 16a"
    linkTuyaMCUOutputToChannel 114 val 14
    
    // 118 is delay time command
    // 119 is charge time command
    // 120 is run time STR, delay countdown timer
    // 121 is charge time STR
    // 122 is delay time STR
    // 123 is RFID boolean
    
    // 125 is charging amps definition
    setChannelType 25 ReadOnly
    setChannelLabel 25 "Charge Current" 
    linkTuyaMCUOutputToChannel 125 val 25
    
    // get the current state of all dpIds to ensure the values get filled in
    tuyaMcu_sendQueryState
    
    setChannelLabel 26 "CP Relay"
    
  • #44 21892883
    thueri01
    Level 3  
    Posts: 4
    Hello everyone,
    I have the 3-phase 11 kW charger.
    I would like to replace the WBR3 with a CB3S. I have already flashed OpenBeken onto the CB3S (in the removed state, not yet soldered in). I'm coming to the surface too.
    Do I have to flash something else onto it, or can I do the rest while it is soldered in?
    I still need some support. What are the next steps after the exchange?
    Where do the individual files have to be stored in Home Assistant?
    Thank you in advance for your help.

    thueri01
  • #45 21892970
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    OpenBeken already runs on WBR3, so why replace?



    There is nothing else to flash - TuyaMCU firmware stays unchanged. OBK can be updated via OTA, if that's needed.
    Can you provide WBR3 flash backup for analysis (before you pair it with your WiFi, as it may contain your ssid)?

    Well, next steps are configurating TuyaMCU and later HA. It should be relatively easy as long as Tuya didn't change dpIDs.... we have a list of them in first post of this topic.
    Helpful post? Buy me a coffee.
  • #46 21893166
    thueri01
    Level 3  
    Posts: 4
    >>21892970 >>21892970
    Maybe I didn't express myself correctly.
    I still soldered in the original WBR3. I would like to replace this with the CB3S. I have already flashed the CB3S with OpenBeken. It's already running on my network.
    I think you were trying to tell me that no additional software is needed on the CB3S.
    Correct?
    Further configuration takes place OTA or in Home Assistant.
    Correct?
  • #47 21893206
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    No futher physical actions are required on CB3S. You can later update it via OTA (via WiFi) if needed.
    Helpful post? Buy me a coffee.
  • #48 21895931
    thueri01
    Level 3  
    Posts: 4
    Hello,
    The next step is done: replacing the chips. I cut the PIN 3.
    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU
    The CB3S with open beken runs in the wallbox. It has a fixed IP address. I need in Home Assistant:
    for example, voltage of the 3 phases Tuya dpID 102-10. How do I get the values ​​displayed in Home Assistant?
    Which file has to go where in HA?
    I need an example, please.
    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU
    Where do you copy the autoexec.bat to?
    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU
    I can´t find this side:

    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU

    Added after 9 [hours] 50 [minutes]:

    Hello,
    I messed up. Now I've entered the autoexec.bat correctly. I found the right place:

    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU
    Now these values ​​are already being displayed in Open beken:

    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU
    Nothing is showing up in Home Assistant yet, but I'm sure I'll figure that out too.
  • #49 21896977
    thueri01
    Level 3  
    Posts: 4
    Success!

    First, I deleted the mqtt.yaml file. It's no longer needed.
    Then I deleted the device from the MQTT integration.
    Finally, I did the following in the config:

    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU
    Result:
    [WBR3] Feyree EV Charger teardown with adjustable charging via TuyaMCU

    @ stonacek
    Thank you so much for your great work!

Topic summary

✨ The discussion centers on the teardown and OpenBeken firmware integration of the Feyree Dynamic Load Balancing EVSE (Electric Vehicle Supply Equipment) with TuyaMCU control, specifically model F-OBZ2-AC-1P32, a 240V 32A single-phase charger purchased from an Aliexpress vendor. The device is easily opened and features a secondary current transformer (CT) clamp for input wiring monitoring. The main goal is to enable dynamic adjustment of charging current via MQTT or Home Assistant during active EV charging using OpenBeken. Current firmware supports integer channel types only; string data types for TuyaMCU channels are not yet implemented but may be considered for future updates. The device exposes certain data points (dpIDs), such as dpID 113 (DeviceMaxSetA), which is read-only and limits maximum supported current, preventing hardware current rating changes via software. Charging current can be adjusted dynamically between 6A and 32A, reflected by PWM modulation on the pilot signal per IEC 61851 standards. The pilot signal stops charging by lowering voltage and disconnecting relays, but no pause state exists. RFID functionality is limited and not fully accessible via TuyaMCU; monitoring specific dpIDs can track RFID events but lacks advanced features like identity or billing. Recent OpenBeken updates allow custom data point processing using the Berry scripting language, enhancing flexibility in handling TuyaMCU data. User experiences note immediate charging start behavior and relay switching sequences that may not optimally protect the vehicle. Overall, the Feyree EVSE with TuyaMCU and OpenBeken offers a cost-effective, modifiable charging solution with some firmware and hardware limitations regarding string data handling, maximum current configuration, and RFID integration.
Generated by the language model.

FAQ

TL;DR: Control a Feyree 32 A single‑phase EVSE via TuyaMCU/OpenBeken; "This can be done with OpenBeken." Safe flashing, dpIDs, MQTT/HA templates, and pilot behavior included. [Elektroda, stonacek, post #21289899]

Why it matters: DIYers and Home Assistant users can live-adjust charge current, automate start/stop, and avoid cloud lock‑in while staying safe.

Quick Facts

What hardware is inside this Feyree EVSE?

It’s a Feyree F‑OBZ2‑AC‑1P32, 240 V/32 A single‑phase EVSE. The logic board uses a GigaDevice GD32F303RCT6 microcontroller and an RN7302 metering chip. The enclosure opens with eight rubber‑sealed screws and contains a separate logic board and relay section. A secondary external CT clamp is present at the input end. The unit includes buttons and a TFT display on the logic controller side. These specifics help when mapping TuyaMCU dpIDs and understanding metering accuracy. [Elektroda, stonacek, post #21289899]

How do I open and power the logic board safely for flashing?

Open the case via eight sealed screws. Remove the logic board from mains and power it with an isolated bench supply at 3.3 V or 12 V via proper VDD headers. Avoid the convenient RX/TX header’s VDD, as it carries 12 V. Fully isolate USB and your laptop. “Do not attempt to tinker when plugged into mains.” These steps reduce shock risk and protect modules during serial capture or flashing. [Elektroda, stonacek, post #21289899]

How do I flash or swap the Tuya module (WBR3/CB3S)?

WBR3 flashing is now supported, but the process requires lifting the chip. Many users still swap to a CB3S pre‑flashed with OpenBeken, since it’s mostly pin‑compatible. Only six pins are used: GND, VCC, RX, TX, RST, EN. EN (pin 3) has 3.3 V; either use a module that tolerates it or cut the trace. The visible RX/TX/RST/GND header’s VDD is 12 V—do not use it. Isolate all equipment during work. [Elektroda, stonacek, post #21289899]

Which TuyaMCU dpIDs matter for control and telemetry?

Core dpIDs: 124 (ChargingOperation), 14 (work_mode), 18 (switch), 101 (DeviceState), 102–104 (Voltage/10), 105–107 (Current/10), 109 (kW/10), 110 (Temp/10), 112 (Session kWh/10), 113 (DeviceMaxSetA, read‑only), 114/115 (set current by capability), 118/119 (timers), 120–122 (timer strings), 123 (RFID). These cover start/stop, mode selection, currents, voltages, power, temperatures, energy, and status mapping for MQTT/HA. [Elektroda, stonacek, post #21289899]

What charging current range can I set, and does it stick?

Through the Tuya app, minimum is 8 A. Via TuyaMCU, some EVs accept as low as 6 A. You can change current dynamically during charging. After a 6 A session and replugging, the value can reset to 20 A. Values are integer steps, no floats. This behavior affects automations that persist current limits between sessions. [Elektroda, stonacek, post #21289899]

Can I change the device’s maximum supported current (DeviceMaxSetA)?

No. dpID 113 (DeviceMaxSetA) is read‑only and reflects hardware capability (e.g., 16 A, 32 A). Attempts to send a different enum don’t persist. You can set a higher charging current value, but the hardware likely enforces its limit. “Aside from the hardware clearly being scoped for the model … it doesn’t seem possible to do via TuyaMCU.” [Elektroda, stonacek, post #21506288]

Is the external CT clamp integrated into TuyaMCU data?

Captures suggest the external CT clamp for import/load balance is not integrated into TuyaMCU communications, despite data model references. Its app interaction is unclear. If you need load‑based throttling, manage amps via OpenBeken + MQTT and meter elsewhere. The author tracks EV power with an internal sensor and ignores the external CT. [Elektroda, stonacek, post #21289899]

How does the pilot signal behave on start/stop and during current changes?

The EVSE stops by pulling the pilot low to signal stop, then it opens the AC relay. The vehicle’s relays click before the charger’s relay when stopping. The charger remains at state B (vehicle detected), so issuing a new start command resumes charging. Current changes from 6–32 A adjust the pilot PWM dynamically during charging. [Elektroda, stonacek, post #21541705]

Any known edge cases with pilot timing or auto‑start?

One report: the unit starts charging immediately on plug‑in even if the car’s schedule disallows immediate charging, and the car stops it after ~10 seconds. Another: stopping on the EVSE cuts the three‑phase relay before the car stops, which is undesirable. These behaviors may affect session counting and vehicle wear. [Elektroda, kvogel, post #21541847]

Why don’t my string dpIDs (e.g., timers) show as text in OpenBeken?

OpenBeken channels are currently integers; TextField also sends integers. True string channels aren’t implemented. “Channels are currently integers, there is no string support yet.” You can still publish strings without channels using linkTuyaMCUOutputToChannel … MQTT, and DPs list should display strings, since it’s channel‑independent. [Elektroda, p.kaczmarek2, post #21292868]

Can I script custom dpID handling (like parsing strings) in OpenBeken?

Yes. Recent OpenBeken updates add Berry scripting for fully custom dpID processing. See the Berry guide and self tests for examples. Note that scripting can’t recover data never sent by TuyaMCU. Use Berry to transform, route, or combine dpIDs before MQTT/HTTP publishing for advanced automations. [Elektroda, p.kaczmarek2, post #21540509]

How do I control this charger from Home Assistant over MQTT?

Map OBK channels to dpIDs, then expose them as MQTT select/number entities. For example, map dpID 124 to a select (Charge/Stop/Ready) and dpID 14 to Working Mode. Map current to a number with 6–32 A range. Add an event handler to refresh after sending commands: OnChannelChange 24 tuyaMcu_sendQueryState. Then use HA templates to translate enums to labels. [Elektroda, stonacek, post #21600344]

What serial settings and scaling should I use in OpenBeken?

Set TuyaMCU baud rate to 9600. Map dpID 102 to Voltage_div10 and 105 to Current_div100 (multiply by 10 in link to get A). Map dpID 109 (kW/10) to Power and multiply by 100 to publish W. Map dpID 110 to Temperature_div10 and 112 to EnergyTotal_kWh_div100 with a ×10 multiplier in link. Query state after changes. [Elektroda, stonacek, post #21289899]

How do I start a charge if it seems stuck in “Ready”? (3‑step)

  1. Set work_mode (dpID 14) to charge_now (0) to override timers.
  2. Send Stop (1) on dpID 124 to end any stale session.
  3. Send Charge (0) on dpID 124; auto‑refresh using OnChannelChange 24 tuyaMcu_sendQueryState. [Elektroda, stonacek, post #21600344]

Is there a workaround to publish Tuya string values today?

Yes. Use linkTuyaMCUOutputToChannel 120 MQTT to publish strings directly, bypassing channels. You can also inspect raw DP values via /cm?cmnd=DP when TuyaMCU flag 46 is enabled. This helps surface strings like timers (e.g., “00:04:20”) in your MQTT broker for Home Assistant parsing. [Elektroda, stonacek, post #21292395]
Generated by the language model.
ADVERTISEMENT