Hoping someone can assist me in getting the rest of the functionality working on a Tuya based motion switch.
Link to yaml I’m trying to get working. I grabbed everything from a config I found on Reddit, but only relay (datapoint 1) and turning white LED off (datapoint 15) is working). Motion doesn’t work for on or off. Here is what the Tuya module advertises:
Yep, got it working. It would appear some of the settings don’t do anything, and I can’t get the motion switch to only turn on when dark (althought I didn’t test that on the Tuya firmware either).
To flash with ltchiptool:
Connect GND to RST, GND and CEN
Connect TX to RX, RX to TX
Connect 3.3v to 3.3.v
You might need to touch CEN to GND and hold it or just touch it once after it boots.
Use this as a template (you can download it locally and customize):
Thanks. I have a number of the old version but none of the one’s that use Tuya. How did you find what functions the data points did? Am concerned about flashing these and not have a workable switch. From what I can tell, without have correct code the switch doesn’t even work. Not like the old ones where a button was wired to activate the relay. Is this what you are finding?
Someone from the OpenBeken project scraped the info from the Tuya API. The manual button works without issues. The PIR sensor works with my YAML without changing any settings. You can customize after that. They are solid for me now.
Thanks for the update. For now, I think I’ll stay with “Local Tuya”. Which I saw was going to be integrated into HA Core. Very easy to setup and works without any cloud connection.
Hi
Finally trying to convert my MFA05F switch to Esphome. Can you please provide the locations of what pin you used. Really don’t want to screw this up. I’ve attached pics of the MFA05F board to hopefully make it easier for you. Thanks.
Has anyone found other motion switches that can be converted to Esphome?
I did this like 9 months ago ( CBU pinout CBU - LibreTiny ). …
3.3v>3.3v
GND>GND+RST
TX>RX
RX>TX
Highly recommend probes and a stand to hit the pins on the CBU.
Start flash from LTchiptool (or whatever flasher you are using) and touch CEN>GND and leave it until done. You will not see any output during this.
You can’t really ruin it unless you mess up 3.3v+GND.
Hi all, i am having the same issue here, I cannot flash it. I connected GND, 3.3v, TX and RX on the connector to a USB to TTL dongle. I see the board starts because the LEDs are lighting up and changing when I press the button.
I tried to flash it with either RST+GND (on the side of the board) continuously connected or just touch it but it will not take it.
Just for clarification I connected RX from the dongle to TX on the board and TX from dongle to RX on the board; I also tried RX-RX TX-TX and no difference. I see the TX LED on the dongle lights up but RX does not.
I see CEN pin referenced in a number of places but I cannot find which one it is. I thought CEN is RST but I might be wrong.
Any help would be appreciated.
Roy
I can’t seem to get it to connect. Using CBU pin 13 gnd, 14 3.3v, 15 tx, 16 rx, 18 CEN and RST on board. Am touching CEN but nothing connects. Can you see what I’m missing? Many thanks. And yes, this one needs pin holders. What a pain. Just wish there were other options for motion switches.
Thank you for the tip Roy, it worked like a charm once I start hitting the RX/TX on the CBU. Now I have Bekken running and I was wondering if anybody managed to have the sensors and LEDs separated from the relay and shown in hass, I would like to control them separately.
The LEDs you can set (but it’s controlled by the Tuya MCU). Sadly the sensors are controlled by the Tuya MCU and are not exposed. You would need to do some serious surgery to move them to open pins on the Beken chip and cut out the Tuya MCU.