Problems with node-red-contrib-owfs on Node-red 3.1.3 and bullseye and node-js 18

Node-red 3.1.3 has problems starting with node-red-contrib-owfs. Are there any problems known. Is this contrib still supported?
Any advice and support very welcome

Hi @juntiedt

What is the Node RED start up log showing - it will usually give a pretty good clue.

the node is 7 years old - there is every potential, it has fallen foul to maintenance with recent versions of Node JS

I use a slightly hacked version of that node version 1.0.0 with nodejs 16 without problems.

I have just checked the latest version of the node on Ubuntu 22.04 with nodejs 20.5.1, so I will be surprised if there is a problem on bullseye with nodejs 18.

1 Like

I can start node-red without the usb stick.
With 10.0.0.52:2121 I can reach the 1 wire sensors. Before my last upgrade of Raspian and node-red it worked ok.

What is the error you see?

Errors occuring on start of node-red:

pi@raspberrypi:~ $ node-red-start

Start Node-RED
 
Once Node-RED has started, point a browser at http://10.0.0.52:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
3 Jan 09:06:04 - [info] Paletten-Nodes werden geladen
3 Jan 09:06:07 - [info] Dashboard version 3.6.2 started at /ui
3 Jan 09:06:09 - [info] Einstellungsdatei: /home/pi/.node-red/settings.js
3 Jan 09:06:09 - [info] HTTP-Statisch: /home/pi/.node-red/node-red-static > /
3 Jan 09:06:09 - [info] Kontextspeicher: default [module=memory]
3 Jan 09:06:09 - [info] Benutzerverzeichnis: /home/pi/.node-red
3 Jan 09:06:09 - [warn] Projekte deaktiviert: editorTheme.projects.enabled=false
3 Jan 09:06:09 - [info] Flow-Datei: /home/pi/.node-red/flows.json
3 Jan 09:06:09 - [warn]
---------------------------------------------------------------------
Die Datei mit den Flow-Credentials wird mit einem vom System
generierten Schlüssel verschlüsselt.
Wenn der vom System generierte Schlüssel aus irgendeinem Grund
verloren geht, kann die Datei mit den Credentials nicht
wiederhergestellt werden. Sie muss dann gel├â┬Âscht und die
Credentials müssen erneut eingestellt werden.
Es sollte ein eigener Schlüssel mit Hilfe der Option
'credentialSecret' in der Einstellungsdatei vorgegeben werden.
Node-RED wird dann die Datei mit den Flow-Credentials
bei der n├â┬Ąchsten ├âbernahme (deploy) einer ├â
                                            nderung erneut
verschlüsseln.
---------------------------------------------------------------------
3 Jan 09:06:09 - [warn] Verschlüsselte Credentials nicht gefunden
3 Jan 09:06:10 - [info] Server wird jetzt auf http://127.0.0.1:1880/ ausgeführt
3 Jan 09:06:10 - [info] Flows werden gestartet
3 Jan 09:06:11 - [info] Flows sind gestartet
3 Jan 09:06:11 - [info] [mqtt-broker:99603ece.52e2a] Verbindung zum Broker mqtt://10.0.0.43:1883 aufgebaut
3 Jan 09:06:11 - [red] Uncaught Exception:
3 Jan 09:06:11 - [error] TypeError: Cannot read properties of null (reading 'replace')
    at /home/pi/.node-red/node_modules/owfs/lib/base/convert.js:30:54
    at callbackOnce (/home/pi/.node-red/node_modules/owfs/lib/base/communication.js:30:13)
    at Socket.<anonymous> (/home/pi/.node-red/node_modules/owfs/lib/base/communication.js:75:9)
    at Socket.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1400:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Consumed 15.719s CPU time.
nodered.service: Scheduled restart job, restart counter is at 3.
Stopped Node-RED graphical event wiring tool.
nodered.service: Consumed 15.719s CPU time.
Started Node-RED graphical event wiring tool.
3 Jan 09:06:34 - [info]
Willkommen bei Node-RED

What version of nodejs are you using? Run node -v to find out.
In a command shell go into your .node-red folder and run
npm list owfs
and show us what it shows.

Also please select the owfs node and Export it and paste it here.

pi@raspberrypi:~ $ node -v
v18.19.0

pi@raspberrypi:~/.node-red $ npm list owfs
node-red-project@0.0.1 /home/pi/.node-red
-- node-red-contrib-owfs@1.2.0 -- owfs@0.3.2

[{"id":"a8a17bd65bbbe837","type":"owfs","z":"9132136d.22d86","name":"","uncached":true,"mode":"read","host":"localhost","port":4304,"paths":["28.B5E984000003/temperature"],"x":580,"y":640,"wires":[["b8162c1bdbca520b","6f909247c391bd92"]]}]

Everthing looks ok to me. I think you will have to submit an issue on the node's github page and see whether the author responds.

I found the problem. One sensor died. As soon as I removed it from the 1W bus all worked ok. Unfortunately it took a long time to find the problem, as the sensor did work on a unipi controller.

Please report the issue against the node. A faulty sensor should not crash node-red, the owfs contrib node should catch the error and handle it, not crash node-red.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.