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

Error 401/Authentication Error #75

Open doryfakhry opened 4 years ago

doryfakhry commented 4 years ago

Hello there, Thank you for your efforts to accomplish this node. I have configured my device (WDYK model: ZJSB9-80 J) a smart circuit breaker that is working perfectly with EWELINK app. However when I define the device in node red I receive "authentication error" most of the time. I tried to switch it on through PowerStateOut node and I get a result as described below but the switch still OFF. { "status": "ok", "state": "on" } Any thoughts?

Thank you

doryfakhry commented 4 years ago

it seems that I cannot open 2 connections at the same time to the same account in order to control 2 different devices. any thoughts?

monkeypashion commented 4 years ago

Yes great node but I have encountered the same issue. I have two node-red servers - both servers running flows with this node. As soon as I deploy flows from one server, the nodes on the other server suffer from {"error":401,"msg":"Authentication error"}

ottoszika commented 4 years ago

Hello @doryfakhry and @timmyjp ,

Unfortunately multiple sessions are not allowed. This is why I implemented a single global connection. https://github.com/ottoszika/node-red-contrib-ewelink/issues/74#issuecomment-569368672

Thanks, Otto

monkeypashion commented 4 years ago

Hello @doryfakhry and @timmyjp ,

Unfortunately multiple sessions are not allowed. This is why I implemented a single global connection. #74 (comment)

Thanks, Otto

So it seems that two nodes on different node-red servers cannot share the same connection, but what about two nodes on the same node-red server - can these nodes always share same global connection? What about if they are on the same server but in different flows?

As a workaround I have created a second Ewelink account and shared the device to that account from the app - this seems to be OK.

Thanks

doryfakhry commented 4 years ago

@ottoszika I am only using one connection for all ewelink items at node red level. is it consedered a multiple session issue if I sign in to ewelink mobile app and node red at the same time?

thank you again dory