[RELEASE] Etekcity Vesync Smart In-Wall Wifi Light Switch API and Device Handlers

Just installed the DTH for the outlets. They are working great. The outlets have a “Resistive Load” of 8A and are three years old, but have the latest firmware. Thanks for creating the DTH, now I can stop relying on the Alexa to Vesync integration, which worked, but not as well as the ST.

1 Like

Thanks deccher. I’m currently working on a smart app that let’s you easily add VeSync (etekcity) devices. I did figure out the API for other devices that aren’t working (mentioned above, like the 15A plugs, and switches). So I’m working on that at the same time.

When I do that, yes, I want to output the power usage to the device handler as well. It’s output in a strange format (maybe hex?) so I wasn’t able to figure out how to display it accurately in the first go-round. Thanks for using the driver!

It shouldn’t matter if you are on the same network or not. It looks up the device name exactly as it’s stored in VeSync, and should work anywhere the VeSync app works. However, until I implement V2, I think only the small round, 8amp plugs are supported.

I got it that same day. Thank you. Works great.

Wow… Much Thanks @nic_kline!! I purchased 6 of these plugs long before I started down the SmartThings path and this device handle code was a big time saver for me. Thanks for all you have done. I look forward to seeing what you do with V2.

@bullfrogskin especially:

OK I think I got support for the higher amperage etekcity outlets to work (10A and 15A). These aren’t round, but are wider rectangles, and sometimes have a nightlight on them. It’s the same functionality (just on/off and refreshing status manually). It’s a completely different API from the little round ones, so I created a separate handler for these called etekcity plug high amp.

So, for round plugs, you need to set them up as etekcity-plug
For bigger plugs, you need to set them up as etekcity-plug-high-amp

You can add the code from my repo linked below, or if you already connected my repo, just go “update from repo” in device handlers, select mine, and you should see the new handler type. Setup instructions are the same as before. Also @projectskydroid can you try the in-wall switch? I tried to support it as well but I don’t have one to test.

Works perfectly. Thank you!

1 Like

Thank, @nic_kline! Sorry for the delay with my feedback. I obviously haven’t been on the community pages for a while. The new handler does indeed work with my 10A round plugs. Now I can install the four that have been gathering dust. Thanks again!

1 Like

@nic_kline I set up my first custom SmartThings device handlers for my three Etekcity Vesync 15A Outlets (bought prior to owning a SmartThings Hub) and using your repository code has worked wonderfully! Thanks for taking the time to write and share the code for these devices. Much appreciated!


Just making sure, but still not integration for the wall switches?

@nic_kline Have you looked at including the power usage into SmartThings? I played with the API via command line and it works:


I looked at a couple of the templates for other outlets but couldn’t figure it out.


@tommygun1981: Could you point me toward some examples of power usage monitoring? I’m a programmer who is interested in trying to implement this, but I’ve never tried to write a SmartThings device integration and a cursory attempt at finding examples yielded little results.

In Groovy IDE, Device Handler, From Example. Aeon Outlet and SmartPower Outlet both reference “PowerMeter” in capabilities.

Oh man the ability to monitor energy would be AWESOME for this as I could use it for washer machine to know when done and alert!

Hey @nic_kline. Sorry for the delay on this. To many other projects the last few months and hadn’t had a chance to look at this thread. I just gave the etekcity-plug-high-amp handler a test and it does indeed work with the in-wall light switches perfectly. Great work and thank you!

Sorry, I’m a bit new.

I have two existing Etekcity plugs that were added many months ago. I also have a new one I’d like to add “fresh.”

I successfully added the device handler through the IDE, but I’m not sure what to do next? I see mentions of opening an “app” after the device handler is added — which app? The VeSync app? SmartThings?

Confused but learning! :slight_smile:

In the IDE go to devices and add a new device with the type set to the etek handler, all from the IDE.

Then when you go to that light switch in your smartthings app you can set it up with your VeSync details.

1 Like

Thank you! And in the handful of minutes between my post and your reply, I did manage to stumble across those settings. After a “re-connection” of the Alexa third-party service in the Vesync app, VOILA!

Now the virtual switch (am I using that terminology right?) in SmartThings properly controls the first of the two “old” wifi outlets I have.

Trouble is, I can’t get the same procedure to work for the second “old” one.

And I do still have a new / “fresh” one that I haven’t set up at all yet…

Anything I might be missing in getting the virtual switch in SmartThings to function the second outlet?

You will need to add a virtual switch for each outlet you have. And set them up independently. So you need to add 2 or maybe 3 virtual switches it sounds like. Name them all unique and set them up independently.

Hey @nic_kline, thanks so much! I went in and added each individually, like you said, and made sure all settings were the same.

All is working well now! :smiley:

I believe what happened is that I saw the original Etekcity device handler and had published it. Then I saw the updated handler and published that one (the 10 A / high current one).

Methinks the two which were working were using the latter handler, and — before I went back and readded them — the other was using the former handler.

Living & learning indeed! Thanks for being willing to help.

1 Like