travissinnott / outlet

A reverse-engineered WebSocket server for controlling Wifi smart outlets
MIT License
15 stars 2 forks source link

Usage #1

Open hunterbeach opened 6 years ago

hunterbeach commented 6 years ago

How exactly is this meant to be used? I am trying to control some of these plugs and saw their reply to the server and that brought be here, but the README doesn't specify how this should be used. What is the purpose of the server? Does it take the place of their servers? What is an example of how to use this?

travissinnott commented 6 years ago

It's very much a work-in-progress. The websocket server is a replacement for their servers. Once you have the outlets connecting to your instance of the websocket server, you can control them as you wish.

My intention with this is to create a simple interface for detecting and controlling the outlets. It's not quite there yet. Take a look at index.js for an idea of where things are going. I'd love some help if you want to collaborate.

hunterbeach commented 6 years ago

I attempted to have them connect to the websocket instance but couldn't get them to connect. I tried to redirect server2.vesync.com to the instance and also a AWS URL that I saw the outlets sending their response to, to no avail. I would definitely help with it, but I only know the very basics of JS, most of my projects I do in Python. I think I get an idea of what the program is doing, I just can't get the outlets to connect to it.

hunterbeach commented 6 years ago

I finally got one to connect, even though I didn't change anything. So now I have one connected, I just have to figure out how to control them. I see the functions in outlet.js but I'm not too sure how to best access them.

mcolyer commented 6 years ago

@travissinnott have you seen https://github.com/itsnotlupus/vesync-wsproxy ?