<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[DS18X20 Sensor on RPI config problem]]></title><description><![CDATA[<p dir="auto">Hi<br />
I run into config problems with OneWire Sensor.<br />
The subAgent is loading but always got the message:</p>
<pre><code>2019.11.12 07:47:00.477 *W* Unable to add sensor from configuration file. Original configuration record:
2019.11.12 07:47:00.478 *I* Subagent "DS18X20" (ds18x20.nsm) loaded successfully (version 2.2.8)
</code></pre>
<p dir="auto">The sensor is working and I got some temperatures from it:</p>
<pre><code>:/sys/bus/w1/devices/28-0000022801e4# cat w1_slave
35 01 4b 46 7f ff 0b 10 31 : crc=31 YES
35 01 4b 46 7f ff 0b 10 31 t=19312
</code></pre>
<p dir="auto">The config looks like this, but tried some other things more by try-and-error:</p>
<pre><code>SubAgent = ds18x20.nsm

# 1Wire Seonsors
[DS18X20]
Sensor = Test:28-0000022801e4
</code></pre>
<p dir="auto">Are there anybody who can provide a working "config" or has hints of that issue?<br />
A higher debug level don´t tell me more informations about the config problem.</p>
<p dir="auto">Thank you guys for your help!</p>
]]></description><link>https://forum.netxms.org/topic/6267/ds18x20-sensor-on-rpi-config-problem</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:11:05 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6267.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Nov 2019 06:55:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DS18X20 Sensor on RPI config problem on Mon, 23 Dec 2019 23:41:39 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Let me describe the whole configuration process for DS18x20 sensors on RPi in case if someone needs this later.</p>
<ol>
<li>A pull-up resistor of 2..10KOhm should be connected between DQ pin of the sensor and +3.3v. GPIO2 and GPIO3 have built-in 1.8KOhm pull-up resistors (at least on RPi 3), so if you don't need I2C, you can connect the sensor to one of these pins.</li>
<li>A kernel module is used to communicate with the sensor. It is activated ty adding <strong>dtoverlay=w1-gpio</strong> to the end of <strong>/boot/config.txt</strong> file.<br />
By default the DQ pin of the sensor should be connected to GPIO4, to use another GPIO the following format could be used: <strong>dtoverlay=w1-gpio,gpiopin=3</strong>. Reboot RPi when finished editing the file.<br />
Since kernel version 4.9.28 it's also possible to use dynamic overlay loading: <strong>sudo dtoverlay w1-gpio gpiopin=5</strong>, in this way it's possible to have sensors on several GPIO pins.</li>
<li>After restart (of after dynamic overlay loading) the sensors should get detected:</li>
</ol>
<pre><code>root@raspberrypi:~# ls  /sys/bus/w1/devices/
28-6cb0611f64ff  w1_bus_master1
</code></pre>
<p dir="auto">here we have one sensor connected, it has name 28-6cb0611f64ff<br />
4) And we should be able to read the temperature:</p>
<pre><code>root@raspberrypi:~# cat /sys/bus/w1/devices/28-6cb0611f64ff/w1_slave
78 01 55 00 7f ff 0c 10 57 : crc=57 YES
78 01 55 00 7f ff 0c 10 57 t=23500
</code></pre>
<p dir="auto">which in this case is 23,5 degrees C.<br />
5) To configure NetXMS agent we add the following lines to <strong>/etc/nxagentd.conf</strong></p>
<pre><code>SubAgent=ds18x20.nsm

[DS18X20]
Sensor = Test:28-6cb0611f64ff
</code></pre>
<ol start="6">
<li>After agent restart <strong>systemctl restart nxagentd</strong> our parameter "Test" should return the temperature.</li>
</ol>
<pre><code>user@netxms-server:~$ nxget raspberrypi.lan 'Sensor.Temperature(Test)'
23.312
</code></pre>
<p dir="auto">Your configuration looks exactly the same. The thing is that the error message in agent log "Unable to add sensor from configuration file. Original configuration record:" looks to be a bug, i am also getting it (as of v. 3.1.274). But the parameter works. Most probably on your system Sensor.Temperature(Test) will also give the result.</p>
]]></description><link>https://forum.netxms.org/post/27197</link><guid isPermaLink="true">https://forum.netxms.org/post/27197</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 23 Dec 2019 23:41:39 GMT</pubDate></item></channel></rss>