-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yeelight causing node-red to crash #4
Comments
Could you please test 1.0.4 version in several cases:
I can't test it on hardware tight now :( |
Having the same issue with crashing the node red. The problem is present when bulb is offline- so it should be easy to reproduce. Marcin |
@BugsonPL |
@PTS93 shall I bump and upload newer package to npmjs? |
@Gromina ah yes that'd be great |
Still not stable: _> May 17 08:11:23 openHABianPi Node-RED[9142]: Yeelight error { Error: read ECONNRESET |
Same problem here - December 2019. |
I have the same problem. The node works well if the light is on. If it is not on the network node-red crashes. Could you please look into it? I'd reall yappreciate it. Thanks a lot in advance. Have a nice day. |
Just so you all know, I used this node to connect to my yeelights but since it's still buggy, so I moved to creating my own solution. It's pretty simple and not that difficult to do a custom solution by listening to bulb's broadcast messages to identify them in the network and start sending commands. |
+1 for this issue, as it is happening to me at the moment. If the yeelight bulb is switched off or just offline for some reason Node Red continually reboots and you can't log in to fix the problem before it reboots (if you are not at home to switch the bub back on). Node Red reboots without running the yeelight node, it's on initialisation of the yeelight node, which I presume tries to create a connection to the bulb. I do not know Javascript, but it looks like you need to add a try/catch in the setupConnection function as well, and if that fails to be set up, retry from time to time to set it up again (at least handle the case where yeelight is off). |
Would you consider posting your node configuration to control it? |
Ok, so my workaround was to use a TCPIP client to do the same thing as the yeelight nodes. The problem is I couldn't find a version of the yeelight node that stays working or that doesn't cause the service to reboot all the time. If this is a problem for you, try this node red code: |
@murray Thanks for posting your code. I am getting unexpected token error when I try to import. I am currently using node-red-contrib-yeelight-compat-hue which is doing the job so far. |
|
Sorry for the wrong code formatting - I tested that the above imports properly. In terms of node-red-contrib-yeelight-compat-hue, for some reason the globe would only accept commands sometimes, almost as if there were multiple threads trying to ping it with commands at the same time. I wrestled for half a day until I decided it was simpler to use a TCP/IP client. The above example has two entry points, one to flash once, another to flash twice. You could get a lot more elaborate with your commands by reading the Yeelight API spec. I liked the Yeelight 2 so much I bought another. If only it could be configured to not communicate over the cloud at all, and restrict to local network only ;) |
@murraybrandon Interesting you had some problems with sending commands. I did find a problem when using the node red dashboard to set values. The slider would send multiple messages in a short space of time and this caused it to stop responding for a short while. I solved this by just adding in a trigger node to limit the messages. Thanks for the code - I have imported and will have a study. |
My Node-Red crashed also, because the Yeelights have been offline.
Edit: I see, this bug has been already fixed. Thanks a lot! |
Hi. @murray (me) is not part of this project.
…________________________________
From: grumpazoid <[email protected]>
Sent: Sunday, March 15, 2020 6:38:34 AM
To: Gromina/node-red-contrib-yeelight <[email protected]>
Cc: Ryan Murray <[email protected]>; Mention <[email protected]>
Subject: Re: [Gromina/node-red-contrib-yeelight] Yeelight causing node-red to crash (#4)
@murray<https://github.com/murray> Thanks for posting your code. I am getting unexpected token error when I try to import.
I am currently using node-red-contrib-yeelight-compat-hue which is doing the job so far.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABVFEAY4QPGBZF5QIIN3JP3RHSV2VANCNFSM4EHFSNKQ>.
|
Having the same issue, Node red completely crashes when a YEE light is offline. (nov 2020) |
I hope the recently released version 1.0.7 fixes this issue, I will try out later |
@afrixx , I installed the new version and it seems it does work. An exception is thrown but node red does not crash |
Yes, I made the same observation.
|
I (@murray) am not part of this project. Stop emailing me.
…________________________________
From: afrixx <[email protected]>
Sent: Saturday, November 21, 2020 10:10:00 AM
To: Gromina/node-red-contrib-yeelight <[email protected]>
Cc: Ryan Murray <[email protected]>; Mention <[email protected]>
Subject: Re: [Gromina/node-red-contrib-yeelight] Yeelight causing node-red to crash (#4)
@afrixx<https://github.com/afrixx> , I installed the new version and it seems it does work. An exception is thrown but node red does not crash
Yes, I made the same observation.
There is still a warning:
Nov 21 15:30:47 ccu3-webui daemon.err node-red: (node:3408) UnhandledPromiseRejectionWarning: Error: Network timeout, Yeelight not response
Nov 21 15:30:47 ccu3-webui daemon.err node-red: at Timeout._onTimeout (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-yeelight/node_modules/yeelight2/index.js:230:29)
Nov 21 15:30:47 ccu3-webui daemon.err node-red: at ontimeout (timers.js:436:11)
Nov 21 15:30:47 ccu3-webui daemon.err node-red: at tryOnTimeout (timers.js:300:5)
Nov 21 15:30:47 ccu3-webui daemon.err node-red: at listOnTimeout (timers.js:263:5)
Nov 21 15:30:47 ccu3-webui daemon.err node-red: at Timer.processTimers (timers.js:223:10)
Nov 21 15:30:47 ccu3-webui daemon.err node-red: (node:3408) 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: 135)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABVFEA7X4C3YQNCQ37YKGD3SQ7J4RANCNFSM4EHFSNKQ>.
|
@murray you have subscribed yourself to this issue, the only way to not receive e-mails from it is to unsubscribe from it. No one has mentioned you directly. |
I was mentioned on Mar 15 by grumpazoid. But I will unsubscribe. Thanks. |
Hi
Thanks for a convenient node to control yeelight.
Seems like the node is not handling connection errors properly and causing node-red to crash.
Once I removed yeelight, everything worked fine.
The problem can be seen below where it fails to connect yeelight bulb on the given IP address:
I also posted it on node-red pages assuming that it was a bug with it- but it's not.
Is there a future release planned to address this issue?
regards
-Waqas
The text was updated successfully, but these errors were encountered: