skydiver / ewelink-api

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

Can we use the eWeLink API without NodeJs ? #114

Open Orpair69 opened 3 years ago

Orpair69 commented 3 years ago

Hello,

I want to include a call to the EweLink API in an existing project but I don't use NodeJS. There is a way to call eweLink API without Node or not ? I use JS in my project but I dont know if we can include NodeJS project in simple JS code.

Best Regards,

AgentFire commented 3 years ago

I don't think we can. My quite the same question is hanging for like 2 months already, no answer. The chinese won't open their DIY API to the DYIers, lol.

jumpjack commented 3 years ago

any news? I did some tests with RequireJS library, but it looks like it could (probably) work only if we download all "require" dependencies of ewelink... or not? https://sebhastian.com/javascript-require-is-not-defined/

AgentFire commented 3 years ago

They just don't care.

jumpjack commented 3 years ago

I found a possible workaround, at least to study the API, then we'll see... There is an "inadvertently open ewelink system" online, accessible from a node.js sandbox here:

https://codesandbox.io/s/pbjzx?file=/src/index.js

I also found Browserify, which should convert from node.js to local javascript, but I have no idea about how to use it.... as you have to install node.js to run it, and I don't know node.js!

AgentFire commented 3 years ago

Just linking this to my issue #131,

AgentFire commented 2 years ago

They did it!

https://github.com/itead/Sonoff_Devices_DIY_Tools

Some guy's experience.

You can close the issue now :)

jumpjack commented 2 years ago

This is for direct access when you can directly access the wifi of the device, we need to access devices when far from home:

"Sonoff Devices DIY Tools is used for SONOFF Devices(Basic R3,RFR3 and Mini) control via LAN."