{"id":325,"date":"2014-09-01T21:24:32","date_gmt":"2014-09-01T18:24:32","guid":{"rendered":"http:\/\/www.bashpi.org\/?page_id=325"},"modified":"2020-12-03T17:33:04","modified_gmt":"2020-12-03T15:33:04","slug":"how-to-get-ds9490r-adapter-and-ds18b20-sensors-working-automated","status":"publish","type":"page","link":"https:\/\/www.bashpi.org\/?page_id=325","title":{"rendered":"How to get DS9490R adapter and DS18B20 sensors working (automated)"},"content":{"rendered":"<p><strong>This how-to has multiple pages.&nbsp;This page is about automated configuration. Previous, manual configuration page with explanations is available <a title=\"How to get DS9490R adapter and DS18B20 sensors working\" href=\"http:\/\/www.bashpi.org\/?page_id=281\">here<\/a><\/strong><\/p>\n<p>This page is about configuring DS9490R adapter automatically e.g. doing all actions what were discussed on <a title=\"How to get DS9490R adapter and DS18B20 sensors working\" href=\"http:\/\/www.bashpi.org\/?page_id=281\">configuration page<\/a> with script. Additionally, automated configuration will create some sudo rules, cron jobs etc.<\/p>\n<p>First thing you need is to download few kilobytes of code:&nbsp; <a href=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/09\/wire_1.0.tar.gz\">wire_1.0.tar.gz<\/a><\/p>\n<p>After that put the file to your Raspberry Pi (should work on PC also), unpack and run configuration as shown below. Don&#8217;t forget to connect DS9490R adapter.<\/p>\n<pre><code class=\"language-bash\">tar -xzvf wire*.tar.gz\ncd wire\/\nsudo .\/configure.sh configure\nreboot\n<\/code><\/pre>\n<p>Reboot is required to make sure all UDEV rules are loaded and working. You can reload udev rules also without reboot if you have skills. Currently this setup has no UDEV rule to unmount OWFS when adapter is disconnected. It&#8217;s tricky to do and not essential.<br \/>\nTest adapter and OWFS with command below, it should list temperatures of all DS18B20 sensors:<\/p>\n<pre>for f in `ls \/wire\/|grep 28.`; do echo -n \"Sensor ${f} temperature is \"; cat \/wire\/${f}\/temperature; echo ; done<code class=\"language-bash\"><\/code><\/pre>\n<p>Scripts in this page were tested on:<\/p>\n<ul>\n<li>Raspberry Pi Model B 512MB RAM. OS: Raspbian Wheezy, released in 2014-01-07. All updates installed on 1. september 2014.<\/li>\n<\/ul>\n<p>Thats it about&nbsp;DS9490R and configuration. You should now be able to read information from all connected 1WIRE devices, not just DS18B20 sensors.<\/p>\n<p>If you found this useful, say thanks, click on some banners or <a href=\"http:\/\/www.bashpi.org\/?page_id=105\">donate<\/a>, I can always use some beer money.<\/p>\n<p>Next topic will be about how to read sensor values, put them to database and aggregate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This how-to has multiple pages.&nbsp;This page is about automated configuration. Previous, manual configuration page with explanations is available here This page is about configuring DS9490R adapter automatically e.g. doing all actions what were discussed on configuration page with script. Additionally, automated configuration will create some sudo rules, cron jobs etc. First thing you need is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":281,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-325","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=325"}],"version-history":[{"count":9,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/325\/revisions"}],"predecessor-version":[{"id":765,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/325\/revisions\/765"}],"up":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/281"}],"wp:attachment":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}