skydiver / ewelink-api

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

CoolkIt: Announcement regarding the expiration of the APPID referenced in this project and the cessation of maintenance of the v1 interface, suggesting migration #219

Open ghost opened 11 months ago

ghost commented 11 months ago

Hi, Dear users of this project:

I am a technician at CoolKit, and our server has received a large number of requests from this project.

We have found that many users use the default personal APPID configuration parameters, and since this project is still using the v1 interface that has stopped maintenance, this will cause many problems.

To avoid potential interface security risks, we will phase out the v1 interface and make it completely unavailable in the future.

We have supported individual users to use eWeLink Developer Center for free: https://dev.ewelink.cc/ create an application and obtain your own APPID, which can be used continuously within a reasonable range.

And I have noticed that many users have reported that they cannot use certain features of this project because it has been out of maintenance for 3 years and can be used by everyone https://www.npmjs.com/package/ewelink-api-next,This library uses the v2 interface and has completed all open v2 interface encapsulation, providing local area network discovery, control, and support to achieve bidirectional communication with devices by establishing websocket connections, and receiving real-time reporting information from devices.

nareso commented 10 months ago

Hi carl

Thanks for the information.

We are facing a problem with my own APPID as https://github.com/skydiver/ewelink-api/issues/220#issuecomment-1676312471

Please tell us how to solve the error that appears when setDevice method.

ghost commented 10 months ago

This is an example of eWeLink OAuth2.0 login:https://github.com/coolkit-carl/eWeLinkOAuthLoginDemo

antonioGabrielGomes commented 10 months ago

@coolkit-carl This new library https://www.npmjs.com/package/ewelink-api-next its broken : Error [ERR_REQUIRE_ESM]: require() of ES Module!! ewelink-api-next/dist/utils/index.js

PhilETaylor commented 10 months ago

Did you miss this bit in the readme?

ScreenShot-2023-08-22-13 59 39

antonioGabrielGomes commented 10 months ago

Did you miss this bit in the readme?

ScreenShot-2023-08-22-13 59 39

I know that, but at the moment I can't use type module;

ghost commented 10 months ago

The 1.0.2 to be released supports CommonJS. I need some time for a complete test. If you are willing to try it out,

You can add https://github.com/coolkit-carl/ewelink-api-next/tree/main/dist These four files add https://github.com/coolkit-carl/ewelink-api-next/blob/main/package.json Copy this file to your node_modules, delete the content from the previous 'dist'.

image

Then you can use it, like this:

const eWeLink = require('ewelink-api-next').default

const client = new eWeLink.WebAPI({
    appId: 'xxx',
    appSecret: 'xxx',
    region: 'eu',
    logObj: eWeLink.createLogger('eu'),
  })

;(async () => {
  let response = await client.user.login({
    account: 'xxx',
    password: 'xxx',
    areaCode: '+1',
  })
  console.info(JSON.stringify(response))
})()
dreamDeveloper1203 commented 8 months ago

Hi, As a skilled back end developer, I have a rich experience in API development using node.js. I saw your job post in upwork. I wanna work with you. Please contact me. Thank you.