skydiver / ewelink-api

eWeLink API for JavaScript
https://www.npmjs.com/package/ewelink-api
MIT License
265 stars 109 forks source link

web socket question #92

Closed bwp91 closed 3 years ago

bwp91 commented 4 years ago

Hi, Quick question. Perhaps the answer won’t be so quick!

Is it possible to use this package to send a request via the websocket (instead of the http app) for example to switch on/off a device.

Thanks

skydiver commented 4 years ago

Hey @thepotterfamily

Sure, you need to follow these instructions: https://github.com/skydiver/ewelink-api/blob/master/docs/available-methods/openwebsocket.md

Once socket connection is opened, you can send custom requests.