Latest version of Node Red breaks with openhab

I upgraded node red now the OpenHab2 module fails. I know this isn’t a node red forum but was hoping one of you crossed this bridge.

It looks like NR doesn’t like the format coming from OpenHab2

Code is a node.log ("getStateOfItems : config = " + JSON.stringify(config));

TypeError: Converting circular structure to JSON
at JSON.stringify ()
at getStateOfItems (/home/pi/.node-red/node_modules/node-red-contrib-openhab2/77-openhab2.js:100:50)
at EventSource.node.es.onopen (/home/pi/.node-red/node_modules/node-red-contrib-openhab2/77-openhab2.js:148:14)
at EventSource.emit (events.js:189:13)
at _emit (/home/pi/.node-red/node_modules/@joeybaker/eventsource/lib/eventsource.js:209:17)
at ClientRequest. (/home/pi/.node-red/node_modules/@joeybaker/eventsource/lib/eventsource.js:136:7)
at Object.onceWrapper (events.js:277:13)
at ClientRequest.emit (events.js:189:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at Socket.socketOnData (_http_client.js:442:20)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)

So I searched the code for the “JSON.stringify(config)” and they were all node.log and all but one other were commented out.

I commented out the two node.log lines and everything seems to be working now.

Possibly a bug.

There is already an open issue


Best regards Johannes

1 Like