Will this MOES wall outlet with USB and USB-C control work with HA?

Hello, I was wondering if someone can help me determine if I could integrate this with HA either by flashing firmware or with a HACS integration or something? It seems like older MOES devices used Tuya or Zigbee but this one doesn’t. The outlet: “MOES Smart USB Wall Outlet with Type-C & Type-A Ports, 2.4GHz Wi-Fi in-Wall Plug Socket Receptacle 15Amp Work with Alexa Google Assistant, Remote Individual Control,Save Energy, No Hub Required

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.

Hi,
There’s only three ways to know:

  1. The manufacturer tells you (or they are just white labelling something like Tuya, and it’s obvious)
  2. Someone else has taken a device apart and searches show a h/w or s/w hack e.g.
    https://blakadder.com/
    Peripherals - Tasmota
    https://hacs.xyz/
  3. 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!

If this helps, :heart: this post!

Welcome!!!

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 :

P26 top ac socket 
P8 bottom ac socket
P6 USB A socket
P7 USB C socket

	"device_configuration": {
		"bt1_lv": 0,
		"bt1_pin": 11,
		"bt2_lv": 0,
		"bt2_pin": 24,
		"bt_type": 0,
		"ch_cddpid1": 9,
		"ch_cddpid2": 10,
		"ch_cddpid3": 11,
		"ch_cddpid4": 12,
		"ch_dpid1": 1,
		"ch_dpid2": 2,
		"ch_dpid3": 3,
		"ch_dpid4": 4,
		"ch_num": 4,
		"crc": 117,
		"ffc_select": 0,
		"jv": "1.0.2",
		"module": "CB2S",
		"net_trig": 2,
		"netled1_lv": 0,
		"netled1_pin": 10,
		"netled_reuse": 0,
		"netn_led": 0,
		"nety_led": 0,
		"reset_t": 5,
		"rl1_lv": 1,
		"rl1_pin": 26,
		"rl2_lv": 1,
		"rl2_pin": 8,
		"rl3_lv": 1,
		"rl3_pin": 6,
		"rl4_lv": 1,
		"rl4_pin": 7,
		"total_stat": 2
	}

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 :wink: :

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

2 Likes

Here’s my configuration for libretuya esphome for this device:

1 Like

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.

see log here: https://www.elektroda.com/rtvforum/topic3977240.html

Can you confirm which firmware was on your device and if you have any advice to troubleshoot/fix the issue?

Thank you!

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.

Good hunting!

Thanks for the feedback,

fixed by flashing via USB2UART/soldering:

https://www.elektroda.com/rtvforum/topic4057805.html

tested/working on WK-US2-TC and KS-604S

1 Like