Code Monkey home page Code Monkey logo

Comments (34)

jarlave avatar jarlave commented on June 7, 2024 2

I did this too after my comment here, just let home assistant manage your lights and use the websocket contrib, works perfectly

from node-red-contrib-huemagic.

danrspencer avatar danrspencer commented on June 7, 2024 1

Same issues here. Does anyone know if NodeRed ends up making separate requests for every node or if it makes a single requests every interval and parses it out?

Edit: So it looks like it makes a request for every node you add, which quickly adds up and starts to flood the bridge. I think a more sensible approach would be to just grab the entire state of the bridge via the root API call every interval and store it (assuming that sort of approach is possible with NodeRed)

from node-red-contrib-huemagic.

danrspencer avatar danrspencer commented on June 7, 2024 1

I own nine bulbs. This issue has existed since I started using these nodes. The issue has been closed without resolution before. What is going on? How can one expect to use a platform in this state? And before anyone decides to lecture me on contributing to the solution, my errors are already cited by several others. I want to know what the dev is doing about it to decide if HA is no longer a viable option for my lights.

If you're running NodeRED on top of Home Assistant I suggest you just use the new HA Websocket Contrib. If you're using Hassio the NR addon was updated today to use the websocket contrib as the default.

You can then let HA manage your lights and the websocket connection between NR and HA ensures everything is very fast. I moved to it a few weeks ago and everything has been substantially better / faster since. I no longer feel the need for a separate Hue contrib when running in parallel with HA (just as well since it looks like this project is dead).

from node-red-contrib-huemagic.

Foddy avatar Foddy commented on June 7, 2024 1

Fixed with v1.7.0

from node-red-contrib-huemagic.

vBiggles avatar vBiggles commented on June 7, 2024

from node-red-contrib-huemagic.

spoer78 avatar spoer78 commented on June 7, 2024

Hi there and thanks for your quick reply.

I checked that already and the temp and light sensor nodes aren't that chatty. A handful of messages a minute, at most. The motion sensor nodes do nothing till they detect motion. Then they flood the node with messages as long as it detects motion ... which is kinda the point, but its several messages a second.

Regarding performance, i am running node-red in docker with high-prio (cpu und ram) on a Synology DS918+ with 4-Core 1,5Ghz Celeron and 16GB Ram. I am more or less confident that at least the system performance isn't an issue (hopefully).

What i have seen is that even when i restart node-red the motion-nodes sometimes get connection errors, even when there is no motion. So i don't know if the motion-node-flooding is related, on the other hand, when node-red starts it fires up all the flows and has some load, so in the end it could all come together. BTW the light and temp nodes never have connection errors, at least till today (fingers crossed).

Regarding your tip with the throtteling. How would you accomplish that? Delay? Stoptimer?

Thank you and byebye,
S

from node-red-contrib-huemagic.

vBiggles avatar vBiggles commented on June 7, 2024

from node-red-contrib-huemagic.

stokni avatar stokni commented on June 7, 2024

having the same issue, when connecting more lights (3rd - 5th) in my case, getting connection errors.. non chatty sensors here.

from node-red-contrib-huemagic.

vBiggles avatar vBiggles commented on June 7, 2024

All, I've just updated my bridge to the latest firmware, and now the connection errors are appearing in my implementation. I've had to cut right back to the bare minimum motion sensors only and remove the temperature and light level sensor nodes as these were hitting a rate limit, or something on the bridge. Once I went down to about half the nodes I had before the connection errors started to go away. It seems like a new lower command limit on the bridge itself?

from node-red-contrib-huemagic.

lespatots avatar lespatots commented on June 7, 2024

I think my error #38 is another manifestation of a bridge problem too. The errors almost certainly started after a firmware update. The Hue Developer site has some people reporting problems for systems that used to work and now don't. The motion sensor is one item causing problems so I shall disable mine and see what changes.

from node-red-contrib-huemagic.

hunterbeach avatar hunterbeach commented on June 7, 2024

Having the same problem here. Have 12 lights and 3 of them initialize and then get connection errors.

from node-red-contrib-huemagic.

hanssep avatar hanssep commented on June 7, 2024

Same here. 17 lights, 2 switches. Connection errors on all Huemagic nodes. Sometimes they come back online when triggered but becoming slower and increasingly unreliable.

from node-red-contrib-huemagic.

vBiggles avatar vBiggles commented on June 7, 2024

from node-red-contrib-huemagic.

hanssep avatar hanssep commented on June 7, 2024

Seems to be related to the Hue switches? See below for the huemagic errors I captured.

2|node-red | 13 Mar 06:59:29 - [error] [hue-switch:Hue dimmer Kitchen] Error: Huejay: read ECONNRESET 2|node-red | 13 Mar 06:59:46 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: Request failed with status code 500 2|node-red | 13 Mar 06:59:47 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: socket hang up 2|node-red | 13 Mar 06:59:49 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: read ECONNRESET 2|node-red | 13 Mar 06:59:51 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: read ECONNRESET 2|node-red | 13 Mar 06:59:52 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: Request failed with status code 500 2|node-red | 13 Mar 06:59:54 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: Request failed with status code 500 2|node-red | 13 Mar 06:59:56 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: Request failed with status code 500 2|node-red | 13 Mar 06:59:57 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: read ECONNRESET 2|node-red | 13 Mar 06:59:59 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: read ECONNRESET 2|node-red | 13 Mar 07:00:00 - [error] [hue-switch:Hue dimmer master bedroom] Error: Huejay: read ECONNRESET 2|node-red | 13 Mar 07:00:00 - [error] [hue-switch:Hue dimmer Kitchen] Error: Huejay: read ECONNRESET

Detailed error here:

`failed to parse respose from http://192.168.0.215:80/description.xml

<title>500 Internal Server Error</title>

500 Internal Server Error


nginx

Error: Unexpected close tag
Line: 5
Column: 7
Char: >
at error (/root/.node-red/node_modules/sax/lib/sax.js:651:10)
at strictFail (/root/.node-red/node_modules/sax/lib/sax.js:677:7)
at closeTag (/root/.node-red/node_modules/sax/lib/sax.js:871:9)
at SAXParser.write (/root/.node-red/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/root/.node-red/node_modules/xml2js/lib/parser.js:322:31)
at Parser.parseString (/root/.node-red/node_modules/xml2js/lib/parser.js:5:59)
at Object.exports.parseString (/root/.node-red/node_modules/xml2js/lib/parser.js:354:19)
at Request._callback (/root/.node-red/node_modules/node-red-node-wemo/lib/wemo.js:125:16)
at Request.self.callback (/root/.node-red/node_modules/request/request.js:187:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (/root/.node-red/node_modules/request/request.js:1044:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/root/.node-red/node_modules/request/request.js:965:12)
at emitNone (events.js:111:20)
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: socket hang up
at createHangUpError (_http_client.js:331:15)
at Socket.socketOnEnd (_http_client.js:423:23)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 'ECONNRESET' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: socket hang up
at createHangUpError (_http_client.js:331:15)
at Socket.socketOnEnd (_http_client.js:423:23)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 'ECONNRESET' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: socket hang up
at createHangUpError (_http_client.js:331:15)
at Socket.socketOnEnd (_http_client.js:423:23)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 'ECONNRESET' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: socket hang up
at createHangUpError (_http_client.js:331:15)
at Socket.socketOnEnd (_http_client.js:423:23)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 'ECONNRESET' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: socket hang up
at createHangUpError (_http_client.js:331:15)
at Socket.socketOnEnd (_http_client.js:423:23)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9) code: 'ECONNRESET' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: read ECONNRESET
at _errnoException (util.js:1022:11)
at TCP.onread (net.js:628:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: read ECONNRESET
at _errnoException (util.js:1022:11)
at TCP.onread (net.js:628:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
Failed to GET info from http://192.168.0.215:80/description.xml
{ Error: read ECONNRESET
at _errnoException (util.js:1022:11)
at TCP.onread (net.js:628:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }`

But I can open the XML just fine...

<root xmlns="urn:schemas-upnp-org:device-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <URLBase>http://192.168.0.215:80/</URLBase> <device> <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType> <friendlyName>Philips Hue (192.168.0.215)</friendlyName> <manufacturer>Royal Philips Electronics</manufacturer> <manufacturerURL>http://www.philips.com</manufacturerURL> <modelDescription>Philips hue Personal Wireless Lighting</modelDescription> <modelName>Philips hue bridge 2015</modelName> <modelNumber>BSB002</modelNumber> <modelURL>http://www.meethue.com</modelURL> <serialNumber>XXXXXXXXXXX</serialNumber> <UDN>uuid:XXXXXXXXXXX</UDN> <presentationURL>index.html</presentationURL> <iconList> <icon> <mimetype>image/png</mimetype> <height>48</height> <width>48</width> <depth>24</depth> <url>hue_logo_0.png</url> </icon> </iconList> </device> </root>

from node-red-contrib-huemagic.

Tandriin avatar Tandriin commented on June 7, 2024

I've the same problem. My firmware is 1802201122.

I found workaround for my environment. I created multiple API Users on the bridge. Seems like the rate limit is per User not per IP. I've around 30 Lamps, 2 Dimmer Switches and 2 Motion Sensor. At the Moment i've around 10 devices per bridge user. that solved the errors for me at the moment.

from node-red-contrib-huemagic.

hanssep avatar hanssep commented on June 7, 2024

@theman00011 How do you add additional users? Via the Hue API?

from node-red-contrib-huemagic.

Tandriin avatar Tandriin commented on June 7, 2024

You can add a second or third bridge in node-red and create a new api user.

from node-red-contrib-huemagic.

hanssep avatar hanssep commented on June 7, 2024

Thanks @Tandriin Works so far. Hue devices have been available in node-red for an entire 24 hours, a record since the Hue update.

from node-red-contrib-huemagic.

Tandriin avatar Tandriin commented on June 7, 2024

YFI: I've an openHAB Instance running with the Hue Binding. The binding is using the api without problems.
I'm not that good in coding to find the differences. But maybe that helps if somebody who can code compares the code who querys the hue bridge api

from node-red-contrib-huemagic.

ozdeadmeat avatar ozdeadmeat commented on June 7, 2024

I will give the multiple user thing a go tonight and report back. Might be a way to mitigate the performance degradation for flows with large numbers of hue entities.

EDIT: Seems very hit and miss. The performance on small workflows aren't returning anywhere near the same amount of errors as before. but now I cant seem to get the lights in one of my work flows to work at all, no matter which user I use. """Error: Huejay: Request failed with status code 500"""

from node-red-contrib-huemagic.

ozdeadmeat avatar ozdeadmeat commented on June 7, 2024

The Bridge needed to be restarted, things seem stable with only 1 or 2 errors a day now. Not sure how reliable Huejay is when it comes to increasing the count of lights to over 50 and more than 20 sensors. That is my end state and frankly I am not even 50% of the way there and seeing performance issues. I wonder if it will be better when the zigbee 3.0 update comes out for the hue bridge.

from node-red-contrib-huemagic.

K-RAD avatar K-RAD commented on June 7, 2024

Any news on this? I have only like 14 lights set up (no scenes, no switch/tap yet) and even when they're all off I see a bunch of "Error: Huejay: read ECONNRESET"

from node-red-contrib-huemagic.

filoor avatar filoor commented on June 7, 2024

I'm facing the same problem
"Error: Huejay: socket hang up"

from node-red-contrib-huemagic.

jarlave avatar jarlave commented on June 7, 2024

Got that error now too after adding a few more bulbs.
Maybe it would help to make a global context (like the home assistant node does) and update this every few seconds so the other nodes take the current state from this global context instead of polling the bridge separately?

from node-red-contrib-huemagic.

jamieshaw avatar jamieshaw commented on June 7, 2024

👆🏻 Agreed. Global context would be much more useful; I'm polling 10 or so switches (seemingly at the same moment) and it's just flooding the bridge with requests.

from node-red-contrib-huemagic.

lespatots avatar lespatots commented on June 7, 2024

Without knowing more about your setup I'm maybe wrong but there is a theoretical limit of seven switches on each hue bridge as each switch apparantly now takes up 13 rules each from the 100 available? For that reason I have two bridges and I'm contemplating a third as I plan to use switches as Homekit input devices rather than only for Hue bulbs.

Of course multi-bridges makes Hue only setups very difficult as splitting lights/switches acrosss bridges causes logistic issues.

from node-red-contrib-huemagic.

jamieshaw avatar jamieshaw commented on June 7, 2024

No multi bridge here – although, I lied, the actual count is 8 dimmer switches not 10. I don't have issues outside of the contrib node.

from node-red-contrib-huemagic.

lespatots avatar lespatots commented on June 7, 2024

If the bridge was full apparantly it won't let you add more. Looking further I note that perhaps Philips increased the rule limit to 200 but be wary of the slow down. I also read that if you use a different app a switch may not tie up so many rules, so more research might temporarily provide a solution?

from node-red-contrib-huemagic.

stainlessray avatar stainlessray commented on June 7, 2024

I own nine bulbs. This issue has existed since I started using these nodes. The issue has been closed without resolution before. What is going on? How can one expect to use a platform in this state? And before anyone decides to lecture me on contributing to the solution, my errors are already cited by several others. I want to know what the dev is doing about it to decide if HA is no longer a viable option for my lights.

from node-red-contrib-huemagic.

stainlessray avatar stainlessray commented on June 7, 2024

The Bridge needed to be restarted, things seem stable with only 1 or 2 errors a day now. Not sure how reliable Huejay is when it comes to increasing the count of lights to over 50 and more than 20 sensors. That is my end state and frankly I am not even 50% of the way there and seeing performance issues. I wonder if it will be better when the zigbee 3.0 update comes out for the hue bridge.

I have 9 bulbs. 9 nodes. this error torpedoes my flows.

from node-red-contrib-huemagic.

stainlessray avatar stainlessray commented on June 7, 2024

Thanks for the replies. I will look into the websocket. +10 points for the community.

from node-red-contrib-huemagic.

jamieshaw avatar jamieshaw commented on June 7, 2024

The HA websocket is great for Home Assistant stuff; but doesn't include features such as sensor, switch and dimmer polling. I also find that Hue Magic's scene triggering/discovery is much more reliable that the activate_hue_scene service used by Home Assistant.

from node-red-contrib-huemagic.

jamieshaw avatar jamieshaw commented on June 7, 2024

Huh; and as I published this comment; it looks as though a new version to fix API limitations has been published – just waiting for NPM.

from node-red-contrib-huemagic.

ThomasPoett avatar ThomasPoett commented on June 7, 2024

Out off the blue, this started a couple of days with the newst version 2.0.x again.
I wasn't able fixing the light with this error.
a work around was: instead of a light node, i used a groups node.

but still having the issue, that i have nill and nothing response from any switch/motion sensor. and they are on a dedicate 2nd bridge.

from node-red-contrib-huemagic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.