vesync-wsproxy icon indicating copy to clipboard operation
vesync-wsproxy copied to clipboard

Packet Capture of Etekcity Outlet Setup

Open walkention opened this issue 7 years ago • 5 comments

Hi! Great work on this project! I saw in the ReadMe that you were looking to get the packet data that's transmitted to the outlet during setup while the outlet is in AP mode. I got a capture of the data below:

Packet sent to plug: {"uri":"\/beginConfigRequest","wifiID":"myssid","wifiPassword":"mywifipassword","account":"[email protected]","wifiBssid":"aa:bb:cc:11:22:33","key":123456789,"serverIP":"104.200.30.164","ip":"","wifiGateway":"","wifiDNS":""}

  • The wifiBssid is the mac address of the wifi AP with myssid.
  • The account field is the email used for my etekcity account.
  • The key seems to be something that is related to my etekcity account but I'm not 100% sure.
  • The serverIP seems to be the server the plug talks to for requests. It resolves as a Linode-US machine that seems to be on par with the other requests that the VeSync app sends request to.

Packet reply from plug: %{"uri":"/beginConfigReply","err":"0"}

Hopefully this helps create a way to set up these devices without the need of the app. I'm going to grab your code and set it up and see if I can help modify it to include the ability to setup a device put into AP mode.

walkention avatar Dec 01 '17 04:12 walkention

Oops forgot to mention that the packet capture software I was using says it's a TCP transmission to 192.168.4.1 on port 41234. There is also an initial packet sent to the plug before the data above with just a hex e0.

walkention avatar Dec 01 '17 04:12 walkention

Did you get the proxy working? The OP is not responding to anything but I'd like to get it working if possible. I will try to use wireshark myself on my outlet next week while I'm on vacation.

TonyApuzzo avatar Dec 22 '17 19:12 TonyApuzzo

@TonyApuzzo I haven't set it up yet (the holidays have been distracting me). I hope over the break I can get something setup and try to add-on the additions for setting up the device to point to the local proxy. Ideally I would like to have it be stand-alone locally with no proxy, but that might take some doing. I'll keep you posted.

walkention avatar Dec 22 '17 20:12 walkention

I was trying to play around with this. I got it setup, i see activity from the device and the cloud in the console screen. I'm not sure how to interact with this to make it actually do anything?

Edit: Found how to interact, but I'm getting errors:

TypeError: Cannot read property 'length' of undefined
    at stringParam (/home/ben/smartthings/vesync-wsproxy-master/dist/server.js:127:18)
    at /home/ben/smartthings/vesync-wsproxy-master/dist/server.js:143:20
    at Layer.handle [as handle_request] (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/layer.js:95:5)
    at /home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/index.js:335:12)
    at next (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/router/index.js:275:10)
    at expressInit (/home/ben/smartthings/vesync-wsproxy-master/node_modules/express/lib/middleware/init.js:40:5)

blawson327 avatar Jan 11 '18 01:01 blawson327

Edit: Found how to interact, but I'm getting errors:

You need to specify the param id=<id-of-outlet>.

mcolyer avatar Feb 02 '18 06:02 mcolyer