How to connect Unipi 1.1 to DS18B20 Sensor
I am trying to connect a 1-wire DS18B20 sensor to a Unipi 1.1. I am running the latest version of Node-Red, but it seems no matter what I do, I cannot successfully connect. I have a bundle of standard sensors (these ones exactly:)
None of them are able to connect.
I can confirm I have installed the sensor as required here:
npm install node-red-contrib-ds18b20-sensor
When I Deploy/run my program, I get the following information in the debug window:
Error: ENOENT: no such file or directory, open '/sys/bus/w1/devices/null/w1_slave'
I can confirm that the w1 (and sub-directories) directory does not exist. I have looked everywhere on Unipi's website and elsewhere, and although I can find plenty marketing telling me that I can run a 1-wire sensor on a Unipi, there is no page telling me how to do so (with or without Node-Red).
What am I doing wrong?
I suppose you are running our official Node-RED Image. In this case, there is the underlying software Evok that makes the PLC I/Os (including 1-Wire) available to the Node-RED IDE via Unipi nodes. To avoid 1-Wire bus access conflicts, the appropriate kernel module (named ds2482), managing also sysfs access through /sys/bus/w1/devices, is disabled by default.
Basically, you have two options (that cannot be combined mutually):
- Use Evok and Unipi node(s) to read data from sensors in Node-RED - then follow this tutorial. This is the default state.
- Disable 1-Wire support in Evok (comment the OWBUS section in /etc/evok.conf), enable the module loading( add/uncomment "dtoverlay=ds2482" in /boot/config.txt), and use some other nodes (e.g. the one meant in your post) to access the 1-Wire bus.