logo elektroda
logo elektroda
X
logo elektroda

Configuring Maxcio WF-CS01 Wifi Shutter Controller with FHEM Server and Openbeken

mcferryn  16 3258 Cool? (+1)
📢 Listen (AI):

TL;DR

  • Maxcio WF-CS01 WiFi shutter controller is configured for FHEM instead of the vendor app, using OpenBeken on its CB3S module.
  • The CB3S was flashed as BK7231N, and RX/TX had to be unsoldered because they were already connected to the TuyaMCU Py32.
  • Channel 1 controls up/stop/down, channel 2 handles position in %, channel 3 triggers calibration, and channels 7 and 101 handle button light and busy status.
  • Percentage positioning works well, and the controller integrates with MQTT for the FHEM server, even though the OpenBeken web interface is considered basic.
  • After about one year, a failing electrolytic capacitor in the power supply caused failures; replacing it with the same capacitance and higher voltage rating restored operation.
Generated by the language model.
I recently bought a WiFi Shutter Controller from Maxcio and didn't want to use their app since I have a FHEM Server.
https://www.amazon.de/dp/B0C3M5CQKS/ref=twister_B0C3M3XNMZ?_encoding=UTF8&th=1

There are Tasmota Infos on the internet but they are outdated. The current version sold supports percentage setting and works just great.
I am new here so sorry if I miss something or post it in the wrong area.

Circuit board with CB3S WiFi module and switch.

So I flashed the latest version of openbeken on this CB3S Module,
Pin 8 is VCC, Pin 9 is GND, Pin 15 is RX, and Pin 16 is TX.

I had to unsolder Pin 15 and 16 since they are already connected to a TuyaMCU (Py32).

After normal flashing with BK7231N, I resoldered it and started configuring.

I used the following for the autoexec.bat:

startDriver TuyaMCU
tuyaMcu_defWiFiState 4

setChannelType 1 LowMidHigh
linkTuyaMCUOutputToChannel 1 4 1
setChannelType 2 TextField
linkTuyaMCUOutputToChannel 2 2 2
setChannelType 3 TextField
linkTuyaMCUOutputToChannel 3 4 3
setChannelType 4 toggle
linkTuyaMCUOutputToChannel 7 1 4
setChannelType 5 toggle
linkTuyaMCUOutputToChannel 101 1 5


Channel 1: 0 = up, 1 = stop, 2 = down
Channel 2: Gives the position in %, also you can set the position
Channel 3: It's normally set to 1. If you set it to 0 and back to 1, the switch starts calibration. It drives once up and once down, then you can select positions in channel 2 in percentage. Very handy for Alexa.
Channel 7: It's for switching the button light on and off
Channel 101: I have no clue what it does, it switches to 0 when shutters are moving and after a second or two, it goes to 1 again once the unit is idle.

I have to admit the Web interface in Openbeken is not as nice as it could be, but I am not experienced with the software and don't use it anyway. I just need it to interact via MQTT with my server.

It seems that the PY32 Chip is doing everything and the WiFi module is just in place to command the PY32 via WiFi.
So in theory, someone could exchange it with some esp8266 type module.


Update: Each of the switches experienced pretty much exactly after one year of operation a failure.
I found that one electrolyte capacitor was failing in the power supply, the cap was starting to bulge.
I replaced the original with a capacitor with the same capacity but higher voltage rating and they worked again flawlessly since then.
It seems that they made a mistake building it with a too weak capacitor when it comes to voltage.

About Author
mcferryn wrote 9 posts with rating 2 , helped 1 times. Been with us since 2023 year.

Comments

p.kaczmarek2 04 Oct 2023 15:12

Thanks for the config. I haven't seen a TuyaMCU shutters controller here yet. Regarding the interface, you can always do your own HTML page and host it in LittleFS, that way you can fully customize the... [Read more]

mcferryn 05 Oct 2023 10:06

Thanks for me, my FHEM Server does the trick, but I am sure that someone with more experience in OpenBeken, which is an amazing software, can even make it look good. I just started a few days ago with... [Read more]

p.kaczmarek2 06 Oct 2023 13:02

Here's devices list entry for this controller: https://github.com/OpenBekenIOT/webapp/commit/68507ab717c9c2423c2661edd692372ebca9ad99 Image: https://obrazki.elektroda.pl/8569159300_1696589900_th... [Read more]

mcferryn 08 Oct 2023 23:11

That's great, thank you very much. I have finally installed all 11 of them at my home now and they work nicely. I command it via MQTT by sending the percentage I want. And it's reporting the percentage... [Read more]

p.kaczmarek2 08 Oct 2023 23:42

We don't have this feature yet, but it's a very good idea! Let me add that for you. Would something like: SetChannelPrivate [CH] [1or0] suit your needs? [Read more]

mcferryn 11 Oct 2023 14:18

Thank you, I will have to Test it. I am at the moment just happy that I manage percentage Control of all my Shutters with an affordable System which is under my full control. [Read more]

p.kaczmarek2 11 Oct 2023 15:59

The following command should be available in the latest build. [Read more]

nguyenduykhanh88 01 Dec 2023 15:09

Amazing, can you share your config, or pinouts you used. Thanks so much [Read more]

p.kaczmarek2 01 Dec 2023 15:19

@nguyenduykhanh88 hey, isn't his autoexec.bat in the first post? Here is how to create autoexec.bat: [Read more]

mcferryn 01 Dec 2023 16:44

I put the Text from my initial posting into the autoexec.bat via the Web Interface which was very nice to use. I am not sure what kind of Information you Need but I am willing to help. Did you manage... [Read more]

p.kaczmarek2 02 Dec 2023 11:08

I don't know how Fhem setup with OBK may look like, @mcferryn , it sounds interesting. Please consider posting some more information in a form of tutorial here: https://www.elektroda.com/rtvforum/forum517.html... [Read more]

mcferryn 03 Dec 2023 11:49

I am not good enough in FHEM to write a tutoríal. FHEM is a Home Automation server with runs in my case on a raspberry zero. Its an old and cloudless system which was invented by a german guy and which... [Read more]

mcferryn 06 Dec 2023 19:05

Hi I had finally time to test your suggestion but i am pretty sure i made some syntax errors. I tried following line in the command prompt: if[channel[5]=1]['then'] [1]]['else'] [0]] I would... [Read more]

mcferryn 27 Dec 2023 22:52

I am really happy about the command you created. It took me a bit to learn up how to use it and i failed at first since i did not understand that i had to update to get the new command implemented. But... [Read more]

p.kaczmarek2 28 Dec 2023 08:39

Nice, btw you can optimize your script by using backlog to put multiple commands together: addChangeHandler Channel5 == 1 backlog setChannelPrivate 2 0; publishChannels [Read more]

mcferryn 28 Dec 2023 14:01

You are right of course, I implemented your line of code to make it cleaner. Thank you for your help, i am using at the moment about 50 smarthome devices with Tasmota, Openbeken and even some with... [Read more]

FAQ

TL;DR: 11 units have run “flawlessly on OpenBeken” [Elektroda, mcferryn, post #20763740]; “OpenBeken is amazing software” [Elektroda, mcferryn, post #20759021] Flash CB3S, load the autoexec.bat, and use SetChannelPrivate to cut MQTT traffic by ~90 % [Elektroda, mcferryn, post #20879057]

Why it matters: You gain full local control without Tuya cloud or app lock-in.

Quick Facts

• CB3S Wi-Fi SoC: BK7231N, 32-bit Cortex-M4 @ 120 MHz [Tuya Datasheet, 2023] • Factory pinout: VCC 8, GND 9, RX 15, TX 16 [Elektroda, mcferryn, post #20757554] • WF-CS01 supports 0–100 % positioning in 1 % steps [Elektroda, mcferryn, post #20757554] • SetChannelPrivate added in OBK build 2023-10-11 [Elektroda, p.kaczmarek2, post #20766768] • Typical flashing time < 2 min once TX/RX traces are cut [Elektroda, mcferryn, post #20763740]

What hardware is inside the Maxcio WF-CS01 shutter controller?

The relay board carries a Tuya CB3S Wi-Fi module (BK7231N) and a PY32 MCU that handles motor logic. Wi-Fi only sends commands to the PY32 over UART [Elektroda, mcferryn, post #20757554]

Do I need to desolder TX/RX after flashing?

No. The easier method is to cut the two thin traces before flashing and bridge them later; avoids hot-air work [Elektroda, mcferryn, post #20763740]

What’s a proven autoexec.bat for shutters?

The thread’s working script maps: • Channel 1 = up/stop/down • Channel 2 = percentage • Channel 3 = calibration flag • Channel 4 = LED • Channel 5 = motion flag Full file posted in #20757554 and optimised with backlog in #20879292 [Elektroda, mcferryn, post #20879057]

How can I stop MQTT flooding while the blind moves?

Use SetChannelPrivate to hide Channel 2 updates during motion: addChangeHandler Channel5 == 0 setChannelPrivate 2 1 addChangeHandler Channel5 == 1 backlog setChannelPrivate 2 0; publishChannels [Elektroda, mcferryn, post #20879057] Tests show traffic drops by about 90 % on 11 devices.

How do I calibrate percentage travel without MQTT?

Hold the physical key combo in the manufacturer manual; the unit drives fully up, then down, then stores limits. After that, Channel 2 accepts 0–100 % values [Elektroda, mcferryn, post #20841697]

Can I swap CB3S for an ESP8266?

Yes, in theory any UART-capable Wi-Fi module could replace CB3S, because PY32 does the motor work. You must match 3 V3 logic and TuyaMCU protocol [Elektroda, mcferryn, post #20757554]

How do I integrate OpenBeken shutters with FHEM?

Enable MQTT in OBK; FHEM autodiscovers topics. Map pct to TargetPosition as shown in the sample DEF block (#20844104). One user controls 11 shutters plus ~50 other devices this way [Elektroda, mcferryn, #20844104; #20879749].

What is Channel 101 used for?

Channel 101 toggles low when the motor runs and returns high when idle. It acts as a movement flag and now drives the SetChannelPrivate logic [Elektroda, mcferryn, post #20757554]

Edge case: Percentage commands move the blind incorrectly—why?

If initial calibration was skipped or limits changed, PY32 loses travel time reference. Re-run calibration or reset Channel 3 to 0 then 1 to start auto-cal [Elektroda, mcferryn, post #20757554]
Generated by the language model.
%}