Node Red Issues

Just wondering if this is just me or if anyone has any ideas. I’ve just started looking into NodeRed for a few things, and I can get the event monitor to work without an issue but when I try to use “in openhab2”, 95% of the time the itemList doesn’t allow me to select anything, and the few times that I have got it to work(just by trying over and over), I eventually get this :

17 Apr 14:25:20 - [info] Started flows
17 Apr 14:25:29 - [red] Uncaught Exception:
17 Apr 14:25:29 - SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/data/node_modules/node-red-contrib-openhab2/77-openhab2.js:126:26)
    at Request.self.callback (/data/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/data/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/data/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
npm ERR! errno 1
npm ERR! node-red-docker@1.0.0 start: `node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"`
npm ERR! Exit status 1

Which then obviously causes NodeRed to crash and just restart over and over until at some point things level out and it starts working.

Not being able to add nodes reliably is obviously a problem though. It takes probably a dozen tries to be able to get one added.

Now, I am running the latest snapshot, so that might be a contributing factor, though I think it’s odd that it does sporadically work.

Any ideas? Thanks,

Can you tell us what hardware you’re running on?

I’ve got an ODroid C2 and a UX4 running NodeRed and openHAB2 happily.

Everything is running on an IBM x3550M5 server(I don’t think that specs would be required, but it’s fairly overqualified for the job). NodeRed is in a docker container, OH is on the host(Ubuntu). Load on the machine is sitting about 2-5%, so it’s certainly not that. And the machine has about 196G of ram, so that’s not a concern in the least.

I actually get errors in the console for NodeRed, so I know that something is going on there. If I “inspect” the nodered page, I do see the request for the Items, as well as the response but it never(or almost never) fills in the drop down box. It seems as though NodeRed crashes with the above before it gets to fill in the drop down for the ItemName.

It seems as though this has something to do with the amount of items that I have that is causing some sort of problem. I have multiple OH instances running and selecting items on some of the others ones works without issues. I’ve noticed that it’s calling

Which returns the JSON list of items on OH. For every instance other than my main one, this works. For my main one, the returned list is truncated, so the JSON parsing fails, which is why I get a response starting with an error in the console logs. It seems to be somewhat random as where it truncates things, but from what I can tell the maximum response size is about 49148 characters.

Calling the URL manually results in the same thing through the browser, I end up with something like this at the end :


And it just ends there. Next time I refreshed it, I had this as the last text response :

{"link":"","state":"100","stateDescription":{"pattern":"%d %%","readOnly":false,"opt

Which is obviously not complete.

And lastly, it turns out it’s an OH issue after all, nothing to do with NodeRed.

Calling returns truncated results. So that’s not good.

@Kai Any idea if this is maybe a setting or something that could affect this?

maybe start a new thread with this issue. People may not look at this thread thinking it is something with node red.

Done. Thanks!

Nope, sorry…