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

I also got a couple new etekcity plug and they do not work. The old ones work. Firmware versions are same as described in previous post.

The error is
something went wrong: groovyx.net.http.HttpResponseException: Not Found

Also, the old plug works, then recently I got token expired error. The handler seems to not get a new token. I had to delete the device and add it again for it to get a new token and it works again.

The eTekcity outlets I have are working great with Smartthings now. I was hoping that it would read the power usage from the plug as well. Could I be doing something wrong? If not, do you have any plans to add this functionality?

Thank you!

1 Like

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!

3 Likes

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:

VeSyncOutlet.power

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

Thanks,
Tommy

@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