Thursday, November 1, 2018

Etekcity WiFi Smart Plug

Test Etekcity WiFi Smart Plug, Voltson Mini Outlet with Energy Monitoring (2-Pack), No Hub Required, ETL Listed, White, Works with Alexa, Google Home and IFTTT

So far have not found an API to allow Homeseer to talk to them directly though you can easier connect them via IFTTTNote however I found I needed to reconnect IFTTT to Etekcity at least once so far to get things working again even though no errors seemed to be reported anywhere in the chain. So a heartbeat system might be in order.

Update: 

I did find this sample code for control via Python you might find useful for creating a plugin or bridge. There is no documentation I could find for this API and the examples people have posted seems to vary some but I was able to use it to create a Homeseer VB script documented at the end of this post. While still cloud based it is working as I write (update) this while the IFTTT still appears to be broken over 2 weeks past my original post.

Create Homeseer device

First you will want to create a virtual device in Homeseer. Since this maker supports state change triggers for off. on, online and offline make it dimmable 

and with and status values like this.

Link through IFTTT

Note it might take IFTTT a few minutes to pick up changes so best if create your virtual devices all up front then wait a bit for proceeding.

As with all such IFTTT linkages you will want at least and off and on IFTTT applet for each direction. In this case we will also want a 5th applet to send offline notices back to Homeseer.

First to control the plug when the Homeseer device changes create and applet like this

To go back the other way create on like this

Note about the time I started writing this the IFTTT Etekcity linkage seems to have quit working. Checking back a week later it is still not working.


The hidden API way

As mentioned above I found a very few posts claiming "direct control" (still through Vesync servers) of the plugs. Many refer to hosts and ports that seem to be incorrect or no longer active. But I did get this sample code for control via Python to work.

While you can install python and required modules then modify the scripts to be called from Homeseer events (I did this as a test) you lose logging and remote editing options so I did the work of converting it to VB. vesync.vb us pretty much standalone but I keep all my logins in a seperate file to make sharing easier.

To leverage the above objects in GUIs I created on and off events triggered state change of the matching virtual object (see above). They should look something like this

Lastly add a reset event

Then you can add a rest event to tie it all together. Note since this controls the virtuals and the virtuals trigger controls this works with the IFTTT, API call method or both. My reset events look like this.

Note for triggers I'm using MyMonitor to set Homeseer virtuals based on state info from Blue Iris. You could also use the Blue Iris Plug-In by Highpeak Software plugin. I have multiple Blue Iris servers though and the Highpeak plugin only supports one. Also MyMonitor can run on a seperate PC which can be helpful if load or number of plugins is an issue. Plus of course MyMonitor lets you monitor about anything accessible from the network and it is open source / free to use.

5 comments:

  1. I even have been getting a lot of helpful and informative material in your web site.locksmith Atlanta GA

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. 192.168 49.1

    ReplyDelete
  4. Among one of the finest pieces on the web, awakening in its specificity.
    Hardwood Design Centre

    ReplyDelete
  5. remarkable write-taking place, i am a great disagreement in commenting as regards blogs to counsel the weblog writers realize that theyve impinge on ahead some thing profitable to the sector large web!.. control4

    ReplyDelete