razorRun / node-red-contrib-smartlifeair

Allow you to integrate any[almost] tuya, smart life supported devices to node-red. However, you will have to enrol these devices via Smart life air mobile app. https://www.smartlife.nz/smartlife-labs
https://roshan.digital/
13 stars 1 forks source link

No reponse from nodes #23

Closed cymplecy closed 3 years ago

cymplecy commented 3 years ago

I'm not getting any reponse from nodes in Node-RED and I'm getting this error showing in the Node-RED terminal window

7 Jan 12:27:58 - [warn] [device-node:bad2954b.08cbf8] User Authenticated as si.mplecy@googlemail.com
7 Jan 12:27:58 - [warn] [device-node:d4cc3bc9.607a48] User Authenticated as si.mplecy@googlemail.com
7 Jan 12:27:58 - [warn] [device-node:GU10] User Authenticated as si.mplecy@googlemail.com
7 Jan 12:27:58 - [warn] [device-node:GU10] User Authenticated as si.mplecy@googlemail.com
7 Jan 12:27:58 - [warn] [device-node:Calex Plug] User Authenticated as si.mplecy@googlemail.com
7 Jan 12:27:58 - [warn] [device-node:Wickes Socket / Reading Lamp] User Authenticated as si.mplecy@googlemail.com
[2021-01-07T12:28:49.179Z]  @firebase/database: FIREBASE WARNING: set at /devices/11021823807d3a03b074/commands failed: permission_denied
(node:22164) UnhandledPromiseRejectionWarning: Error: PERMISSION_DENIED: Permission denied
    at C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:12880:33
    at exceptionGuard (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:698:9)
    at Repo.callOnCompleteCallback (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:12870:13)
    at C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:12683:19
    at C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:11900:17
    at PersistentConnection.onDataMessage_ (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:11930:17)
    at Connection.onDataMessage_ (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:11247:14)
    at Connection.onPrimaryMessageReceived_ (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:11241:18)
    at WebSocketConnection.onMessage (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:11142:27)
    at WebSocketConnection.appendFrame_ (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:10728:18)
    at WebSocketConnection.handleIncomingFrame (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:10779:22)
    at Client.mySock.onmessage (C:\Users\Simon\.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:10674:19)
    at Client.dispatchEvent (C:\Users\Simon\.node-red\node_modules\@firebase\database\node_modules\faye-websocket\lib\faye\websocket\api\event_target.js:24:30)
    at Client._receiveMessage (C:\Users\Simon\.node-red\node_modules\@firebase\database\node_modules\faye-websocket\lib\faye\websocket\api.js:152:10)
    at Client.<anonymous> (C:\Users\Simon\.node-red\node_modules\@firebase\database\node_modules\faye-websocket\lib\faye\websocket\api.js:36:49)
    at Client.emit (events.js:203:15)
    at Client.<anonymous> (C:\Users\Simon\.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:454:14)
    at pipe (C:\Users\Simon\.node-red\node_modules\websocket-extensions\lib\pipeline\index.js:37:40)
    at Pipeline._loop (C:\Users\Simon\.node-red\node_modules\websocket-extensions\lib\pipeline\index.js:44:3)
    at Pipeline.processIncomingMessage (C:\Users\Simon\.node-red\node_modules\websocket-extensions\lib\pipeline\index.js:13:8)
    at Extensions.processIncomingMessage (C:\Users\Simon\.node-red\node_modules\websocket-extensions\lib\websocket_extensions.js:133:20)
    at Client._emitMessage (C:\Users\Simon\.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:445:22)
    at Client._emitFrame (C:\Users\Simon\.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:405:19)
    at Client.parse (C:\Users\Simon\.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:141:18)
    at Client.parse (C:\Users\Simon\.node-red\node_modules\websocket-driver\lib\websocket\driver\client.js:62:58)
    at IO.write (C:\Users\Simon\.node-red\node_modules\websocket-driver\lib\websocket\streams.js:80:16)
    at TLSSocket.ondata (_stream_readable.js:709:20)
    at TLSSocket.emit (events.js:198:13)
(node:22164) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:22164) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
razorRun commented 3 years ago

Can you try restarting the node-red?

There is an issue if your pi or pc takes a bit too long to get an internet connection. Till I add this you might have to set up a corn job to restart node-red after few mins

cheers

On Fri, Jan 8, 2021 at 1:33 AM Simon Walters notifications@github.com wrote:

I'm not getting any reponse from nodes in Node-RED and I'm getting this error showing in the Node-RED terminal window

7 Jan 12:27:58 - [warn] [device-node:bad2954b.08cbf8] User Authenticated as si.mplecy@googlemail.com 7 Jan 12:27:58 - [warn] [device-node:d4cc3bc9.607a48] User Authenticated as si.mplecy@googlemail.com 7 Jan 12:27:58 - [warn] [device-node:GU10] User Authenticated as si.mplecy@googlemail.com 7 Jan 12:27:58 - [warn] [device-node:GU10] User Authenticated as si.mplecy@googlemail.com 7 Jan 12:27:58 - [warn] [device-node:Calex Plug] User Authenticated as si.mplecy@googlemail.com 7 Jan 12:27:58 - [warn] [device-node:Wickes Socket / Reading Lamp] User Authenticated as si.mplecy@googlemail.com [2021-01-07T12:28:49.179Z] @firebase/database: FIREBASE WARNING: set at /devices/11021823807d3a03b074/commands failed: permission_denied (node:22164) UnhandledPromiseRejectionWarning: Error: PERMISSION_DENIED: Permission denied at C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:12880:33 at exceptionGuard (C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:698:9) at Repo.callOnCompleteCallback (C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:12870:13) at C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:12683:19 at C:\Users\Simon.node-red\nodemodules\@firebase\database\dist\index.node.cjs.js:11900:17 at PersistentConnection.onDataMessage (C:\Users\Simon.node-red\nodemodules\@firebase\database\dist\index.node.cjs.js:11930:17) at Connection.onDataMessage (C:\Users\Simon.node-red\nodemodules\@firebase\database\dist\index.node.cjs.js:11247:14) at Connection.onPrimaryMessageReceived (C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:11241:18) at WebSocketConnection.onMessage (C:\Users\Simon.node-red\nodemodules\@firebase\database\dist\index.node.cjs.js:11142:27) at WebSocketConnection.appendFrame (C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:10728:18) at WebSocketConnection.handleIncomingFrame (C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:10779:22) at Client.mySock.onmessage (C:\Users\Simon.node-red\node_modules\@firebase\database\dist\index.node.cjs.js:10674:19) at Client.dispatchEvent (C:\Users\Simon.node-red\node_modules\@firebase\database\node_modules\faye-websocket\lib\faye\websocket\api\event_target.js:24:30) at Client._receiveMessage (C:\Users\Simon.node-red\node_modules\@firebase\database\node_modules\faye-websocket\lib\faye\websocket\api.js:152:10) at Client. (C:\Users\Simon.node-red\node_modules\@firebase\database\node_modules\faye-websocket\lib\faye\websocket\api.js:36:49) at Client.emit (events.js:203:15) at Client. (C:\Users\Simon.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:454:14) at pipe (C:\Users\Simon.node-red\node_modules\websocket-extensions\lib\pipeline\index.js:37:40) at Pipeline._loop (C:\Users\Simon.node-red\node_modules\websocket-extensions\lib\pipeline\index.js:44:3) at Pipeline.processIncomingMessage (C:\Users\Simon.node-red\node_modules\websocket-extensions\lib\pipeline\index.js:13:8) at Extensions.processIncomingMessage (C:\Users\Simon.node-red\node_modules\websocket-extensions\lib\websocket_extensions.js:133:20) at Client._emitMessage (C:\Users\Simon.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:445:22) at Client._emitFrame (C:\Users\Simon.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:405:19) at Client.parse (C:\Users\Simon.node-red\node_modules\websocket-driver\lib\websocket\driver\hybi.js:141:18) at Client.parse (C:\Users\Simon.node-red\node_modules\websocket-driver\lib\websocket\driver\client.js:62:58) at IO.write (C:\Users\Simon.node-red\node_modules\websocket-driver\lib\websocket\streams.js:80:16) at TLSSocket.ondata (_stream_readable.js:709:20) at TLSSocket.emit (events.js:198:13) (node:22164) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:22164) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EGQYL362AJMV2Z36I3SYWSY5ANCNFSM4VY5NMQA .

cymplecy commented 3 years ago

I had previously restarted Node-RED several times but this time I restarted it and went and made breakfast And when I came back and tried it - it worked BTW I'm running this Node-RED on my main windows machine and I start it manually from a command prompt

razorRun commented 3 years ago

I just added an Authentication retry method, Can you please test this and let me know how it goes?