Closed ckhmer1 closed 3 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/credentials/credentials.js | 7 | 8 | 87.5% | ||
src/utils/ewelink-connect.js | 5 | 7 | 71.43% | ||
<!-- | Total: | 12 | 15 | 80.0% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/utils/ewelink-connect.js | 2 | 78.0% | ||
<!-- | Total: | 2 | --> |
Totals | |
---|---|
Change from base Build 84: | -7.0% |
Covered Lines: | 106 |
Relevant Lines: | 113 |
Hi, with this patch, all nodes use just one getCredentials() call, to avoid too much connection to the server. This should fix issue 99.
I hope You want to merge it.
Thanks Claudio
Hello @ckhmer1,
Since this commit was not merged into ottoszika:master I've downloaded Your files manually and replaced the "original" ones in proper directories. After restarting node-red service I was getting an error causing all flows to stop:
Flows stopped due to missing node types.
ewelink-event-listener
ewelink-devices
ewelink-power-state-write
ewelink-power-state-read
At the same time palette said:
SyntaxError: Identifier 'deviceId' has already been declared (line:1)
I'm a Node.js n00b but I made it work by commenting out line 54 of your src/utils/ewelink-connect.js file:
was and crashed: const deviceId = config.deviceId ? config.deviceId.trim() : '';
should be: // const deviceId = config.deviceId ? config.deviceId.trim() : '';
or deleted.
I guessed you missed that one while creating a pull request, hence a double-declaration :-)
Anyway: your solution works perfect - all ewelink nodes logged-in after restart without a connection error! Thank you!
Hi, thanks.
Hi, I'm wondering why my patch is not yet merged. Are there some problems?
Thanks Claudio
Hi, with this patch, all nodes use just one getCredentials() call, to avoid too much connection to the server. This should fix issue 99.
I hope You want to merge it.
Thanks Claudio