<?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[How to replace a 1-Wire sensor&#x2F;actuator without restarting REXYGEN runtime core (RexCore)?]]></title><description><![CDATA[<p dir="auto">All the 1-Wire devices are referenced by a "path" of the OWFS package (namely the owserver), which the 1-Wire driver of REXYGEN relies on. This "path" is hardcoded in the compiled application and it typically includes the 64-bit ID of the 1-Wire device, e.g. /28.551DDF030000/temperature12</p>
<p dir="auto">Replacing a sensor therefore normally means you have to reconfigure the 1-Wire driver in your project, recompile it and download it to the target device, resulting in restarting the whole application, which is undesirable in some cases.</p>
<p dir="auto">Luckily, the OWFS package supports the so-called aliases for individual 1-Wire devices. If you define the aliases, you can reference them in 1-Wire driver configuration in REXYGEN Studio. This adds one layer of hardware abstraction, which will allow you to replace a 1-Wire sensor/actuator on the fly if needed. In case of replacing the 1-Wire device, you'll just update the alias definition. But for REXYGEN runtime core, everything will look the same.</p>
<p dir="auto"><strong>Configuring OWFS aliases</strong></p>
<p dir="auto">Please add the following line to your /etc/owfs.conf:</p>
<pre><code>alias = /etc/ow-alias
</code></pre>
<p dir="auto">Now create the file with aliases definition:</p>
<pre><code>sudo nano /etc/ow-alias
</code></pre>
<p dir="auto">And put the following content in <strong>(replace the 1-Wire IDs with the IDs of your own devices!)</strong>:</p>
<pre><code>/28.063BC8040000 = sensor1
/28.1FBFBC020000 = sensor2
</code></pre>
<p dir="auto">Save the file and restart owserver:</p>
<pre><code>sudo systemctl restart owserver
</code></pre>
<p dir="auto">Now run owdir and you should see your aliases. Also you can use</p>
<pre><code>owread /sensor1/temperature12
</code></pre>
<p dir="auto">to read the temperature.</p>
<p dir="auto">And you can use /sensor1/temperature12 in the OwsDrv driver configuration in REXYGEN Studio.<br />
<img src="/assets/uploads/files/1551109386095-owsdrv_conf.png" alt="0_1551109384447_OwsDrv_conf.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As a result, you'll be able to replace a 1-Wire sensor/actuator without restarting REXYGEN runtime core (RexCore). In such a case, the only thing which you will need to do is editing the ID in /etc/ow-alias file and restarting the owserver.</p>
]]></description><link>https://forum.rexygen.com/topic/8/how-to-replace-a-1-wire-sensor-actuator-without-restarting-rexygen-runtime-core-rexcore</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 10:08:23 GMT</lastBuildDate><atom:link href="https://forum.rexygen.com/topic/8.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Feb 2019 14:22:40 GMT</pubDate><ttl>60</ttl></channel></rss>