jimmywarting / wemo-client

JavaScript client library for controlling and subscribing to Wemo Devices
MIT License
132 stars 40 forks source link

How to get running on windows? #39

Closed EdTheC closed 8 years ago

EdTheC commented 8 years ago

I have all the tools, Visual Studio 2015, and node installed, but I just don't know how to proceed to get this so that I can start playing. Any and all help appreciated.

ghost commented 8 years ago

just run node examples/whatever-here.js and you fill find your way to the light

EdTheC commented 8 years ago

hmm, just sits there...nothing happens at all until I issue ctrl-break to quit. (only key that does anything).

I downloaded wemo-client-master and unzipped to a folder of that name. I opened the folder as a web site in VStudio and did the install wemo-client. I think its installed right because when I do npm install from the dos command line in the wemo-client-master folder it states "refusing to install wemo client as a dependency upon itself". So question 1 - is that right? Question 2 - why does't anything happen? According to the code I should get something to the console, including any errors.

TIA

timonreinhard commented 8 years ago
  1. Nope. To install the required dependencies just run npm install (without further arguments).
  2. Run node examples/index.js as it will display all found Wemo devices on the console. Make sure they are connected to the same network.
EdTheC commented 8 years ago

OK, now I am pushing my luck with your excellent help.... :-)

Got index.js working. Now here's what I want to do and just don't see how. I want to "ask" the wemo maker what the state of the sensor is. Based on the state, (and time of day), send a text message. You can probably guess this is a garage door opener scenario (it is). So after midnight I want to text myself that the door is open.

Everything I have found depends on the sensor changing state, but nothing on how to get that state anytime I want. It must be possible since the Wemo Android app reports sensor on/off when it starts up. They (belkin) were no help in telling me how to get that sensor state.

Thanks again in advance.

timonreinhard commented 8 years ago

examples/maker.js gives you the answer.