ewelink-api | eWeLink API for JavaScript | Runtime Evironment library
kandi X-RAY | ewelink-api Summary
kandi X-RAY | ewelink-api Summary
eWeLink API for JavaScript
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ewelink-api
ewelink-api Key Features
ewelink-api Examples and Code Snippets
Community Discussions
Trending Discussions on ewelink-api
QUESTION
I am experimenting with ewelink API, but I am totally new at node.js and I am proceeding by copy, past, try, fail,....
It also looks like not so many examples are available around, so I have to start from scratch, using as a basis just this basic script (which probably is online erroneously, given that it shows credentials in plain text...).
Here follows the complete script I prepared; I can login, I can retrieve the list of devices, but script fails on retrieving data of a specific device.
I experimented with this and this login method, but I cannot understand which one I should actually use.
My devices have standard firmware and configuration "out of the box", I just connected them to my wifi, and they work fine.
You can access my script using your ewelink credentials:
https://3u6vx.sse.codesandbox.io/index.html?user=xxx&pass=yyy&bypass=false
Or you can use the "default public" credentials:
...ANSWER
Answered 2021-Jun-28 at 19:30I have tested your code and made some changes to make it work.
It is not necessary to reconnect within the loop to get the device information.
Another problem is that you must use element.deviceid instead of element.id
QUESTION
I'm trying to use javascript for the first time and can't seem to get a script running correctly from a bash shell on the command line.
I want to make calls from bash on a server in the cloud to ewelink.cc (a home automation website via an API). The toolset to do this seems to be written in javascript. So I am trying to set it up from my script to open a garage door using the ewelink website.
My server in the cloud system is Ubuntu 18.04 LTS
...ANSWER
Answered 2020-Mar-01 at 23:39the ewelink.js script that I am running should be in the same directory as the ewelink-api directory. Is this correct?
This is incorrect. Because the string in the require()
call is not a path, it will use the ewelink-api
package from https://www.npmjs.com/, not any of your local packages. So it doesn't matter where you run the script from.
const ewelink = require('ewelink-api');
Like the error says, the await
keyword is only available within an async function. The async/await feature essentially allows you to write asynchronous code in a synchronous-looking fashion.
To make your code work, the simplest way is to encapsulate your code inside an asynchronous function and instantly run it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ewelink-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page