ottoszika / node-red-contrib-ewelink

NodeRED nodes for eWeLink smart devices
https://ottoszika.github.io/node-red-contrib-ewelink
MIT License
48 stars 28 forks source link

Updating ewelink-api to 3.1.1 #104

Closed jmc265 closed 3 years ago

jmc265 commented 3 years ago

As per the issues https://github.com/ottoszika/node-red-contrib-ewelink/issues/102 and https://github.com/ottoszika/node-red-contrib-ewelink/issues/101 the dependency on ewelink-api needs to be upgraded because of the issues in the source repo here https://github.com/skydiver/ewelink-api/issues/115

This represents a change of 2 major versions for this library. The only breaking change I came across was the fact that the connection object no longer has a login() method. That is why I have made a code change in this library. However, I have only tested this with the power-state-write node as it is the only one that I use in my setup.

rawen554 commented 3 years ago

@ottoszika Check pls, need this so much!

jmc265 commented 3 years ago

I have added a new commit which changes the way we use API. It seems to make it more reliable.

rawen554 commented 3 years ago

@jmc265 hey, maybe you can tell me, how can I use your build in NodeRED? PS: upload in tgz directly into NodeRED throws empty log error, for some reason...

JPOLgit commented 3 years ago

same for me @rawen554... really need this fixed! @jmc265 please explain how to use your build - would be so helpful until @ottoszika does the necessary...

meshall555 commented 3 years ago

im have the same problem as the guys above. someone HELP please @ottoszika @jmc265

maciejgaik commented 3 years ago

After changes of @jmc265 I can connect with ewelink account, but I have debug message "TypeError: Cannot read property 'apply' of undefined" when I try write state to my device.

meshall555 commented 3 years ago

same issue as @maciejgaik

kaitootiak commented 3 years ago

Hi @ottoszika and @jmc265 , the node red "power state" node of my S26 ewelink plug send a error message: "RequestError: Error: getaddrinfo ENOTFOUND la la:443" and it is not possible to operate the S26 from node red.

jmc265 commented 3 years ago

Humm I am not sure about the apply of undefined. And also I have been using my code changes for a few days and they don't seem stable. Some times the plugs will turn on and off fine, and then other times I am getting Authentication errors.... I think there is something larger wrong here with ewelink.

MLDMoritz commented 3 years ago

Authentication errors appeared from time to time even without your changes. That's nothing new.

masterg99 commented 3 years ago

Could you accept the pull request so we can get at it? Ill then test as many nodes / calls as I can. Thanks!

kaitootiak commented 3 years ago

I am a rookie !!! Tell me how to accept the pull request and I will do it

1101101011011110 commented 3 years ago

Updated to node-red-contrib-ewelink 2.0.0 and power state change now works fine. (I had to reboot a couple of times and reset the login credeintial). Thanks!

kaitootiak commented 3 years ago

Updated version tested and it works on a S26 plug. Thanks to all the guys involved in this development !!!!

JPOLgit commented 3 years ago

Wonderful - thank you all very much!