I’m looking for a wall outlet that has a USB port integrated that I can control via HA. This is the best option I’ve found, or the older MOE’s smart outlet without USB-C.
As a backup plan I guess I could use the Alexa media integration and send custom strings like “turn on USB on MOES switch” from HA, but that’s a workaround I’d rather avoid.
You buy one and take it apart, and either find an ESP8* / ESP32 or replace the microprocessor module with an ESP8* / ESP32 and create your own franken-device.
Basically, if a search engine can’t find details of an integration or hardware of a device - it’s a closed system!
With Matter and Thread around the corner, and Zigbee/ Z-Wave/ BTLE/ HomeKit/ WLAN available now, I’d suggest voting with your wallet for open, local, private devices!
This unit came across my radar not long ago at the github site of the smart folks that are working on tuya-cloudcutter.
Based on testing that was done there, I bought one to experiment with. At USD 23, it is a pretty reasonable price point for the functions it offers. Note, no power monitoring functions. I have used some other devices from Moes in the past and found there quality to be very good.
To the nut of your question, I was able to use the cloud cutter tool on a Raspberry Pi 4 to both disconnect the unit from the Tuya cloud and make it totally local control via tools like the python tinytuya code (note I did not actually control the device using this route, but the hack created the keys and I have no reason to think you would not have good success via this local route, tinytuya is some very good work).
Second, I was able to use the cloud cutter tool to flash the OpenBeken release 1.15.694
image “OpenBK7231N_UG_1.15.694.bin” to the unit. Note, this device has the BK7231N MCU, a CB2S according to the info on the cloud cutter data linked below.
After flashing the device with this OpenBeken firmware, I was able to get it on to my IOT Wifi and configure the basic relay function for the 4 relays and control them via web and MQTT. The pinout map I found for the relays is shown below :
Of course, I got side tracked, so I did not yet get to figuring out the mapping for the two buttons on the device. They do appear to be independent of any of the relays. Also, there appear to be some very small LED’s that can be controlled. As you can see from the picture below, if you have much of the AC and/or USB plugs in use, it is a pretty tight fit to get your pinkies in there to press the two very small buttons.
This is a brief test so far, so I am not able to talk about any reliability or stability. It should be noted that putting a wifi device in a electrical box that is often low to the ground can yield some low connection qualities, so test before you go all in. Also, as I said above, I have had good success with some other Moes devices, mostly Zigbee however.
In terms of physical size, as with all of these ‘smart’ plugs, it is a big hunk of plastic that you are going to have to cram into your electrical box along with the wires. I don’t have any quantitive numbers, however it might be a little narrower than some others I have explored. However, depth wise, with is often the most constraining dimension, it seems about the same as others I have explored. This stuff has made me a Wago connector fan BTW!
There does seem to be some of the usual USB power limits that is the nightmare of USB charging now, so do check to see if your USB power requirements can be met by this device (from the Amazon page) :
“USB/ Type-C Output: 5V/2.1A(Max). If both usb and Tpye-c ports are used at the same time, the max output power of total is 10W, and fast charging is not supported.”
I am assuming that since I was able to get the openBeken firmware working, so I think you should have equal success with the LibraTuya espHome clone firmware. I will not get into the debate about which way to go : LocalTuya, Tasmota clone, or espHome clone. I tried all three, however have used the openBeken Tasmota clone for most of my Tuya hacks (about 15 device of various kinds so far). Due to the fact you are guessing (aka reverse engineering) the Tuya DPID functions if they have not been done as yet, I find the openBeken Tasmota interface easier to iterated when working to figure out the input and output of these Tuya devices. But that is me, I know others are very successful with the LibraTuya route. This recent video is a good guide whichever way you go. Good hunting, hacking these Tuya devices is an interesting time waster :
Tuya CloudCutter & ESPHome Libretuya How To Guide for Beken Chips | No soldering!
Add support for Moe’s WK-US2-TC Smart wall socket with usbc #352
Hi, ordered WK-US2-TC to flash OpenBeken OTA.
when trying to flash, I noticed the Cloudcutter template is based on firmware 1.1.8.
however checking my device firmware with the Smartlife app gives 1.1.17.
I have tried both the provided option (1.1.8) and using " By firmware version and name" (with 1.1.17) but was unsuccessful.
It does not appear I took a screenshot of the Tuya app and captured what it said was the Tuya firmware version when I used Cloudcutter on this device. I am pretty sure based on my notes on the Cloudcutter steps that is was 1.1.8 as I described. I do note that it took a couple tries to get Cloudcutter to be successful. I would try the 1.1.8 flash several time, it does take some time and iteration with some of these device to get to success. That said, if Moes has put a newer version of firmware on this product since I did my jailbreak back a year ago, you might be out of luck with the software only Cloudcutter path and will need to see if you can open the device and flash via a physical connection to the MCU’s serial port.