{"id":2171,"date":"2017-01-09T16:39:37","date_gmt":"2017-01-09T16:39:37","guid":{"rendered":"http:\/\/grodansparadis.com\/wordpress\/?p=2171"},"modified":"2017-01-09T16:44:13","modified_gmt":"2017-01-09T16:44:13","slug":"raspberry-pi-and-1-wire-temperature-sensors-to-vscp-rpi-iot-1wire","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=2171","title":{"rendered":"Raspberry Pi and 1-wire temperature sensors to VSCP #rpi #iot #1wire"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2172\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2172\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?fit=1159%2C964&amp;ssl=1\" data-orig-size=\"1159,964\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot from 2017-01-09 17:26:45\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?fit=580%2C483&amp;ssl=1\" class=\"alignnone size-full wp-image-2172\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?resize=580%2C482\" alt=\"\" width=\"580\" height=\"482\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?w=1159&amp;ssl=1 1159w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?resize=300%2C250&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?resize=768%2C639&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-172645.png?resize=1024%2C852&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>This article is based on <a href=\"https:\/\/www.google.se\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=6&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwi_1p-4j7XRAhWFCCwKHTrWBSoQFghLMAU&amp;url=https%3A%2F%2Fcdn-learn.adafruit.com%2Fdownloads%2Fpdf%2Fadafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf&amp;usg=AFQjCNHN6OKWxWzxTd0Zx1WYJltAbLE0oA&amp;sig2=od2SPgy7q8buGc08icNhzg&amp;bvm=bv.142059868,d.bGg\">this tutorial from AdaFruit<\/a>. Read it before you continue. <a href=\"https:\/\/matthewmoisen.com\/blog\/how-to-use-the-ds18b20-temperature-sensor-with-raspberry-pi\/\">Here<\/a> is an extended version. It explains how to connect 1-wire sensors to a Raspberry Pi system (Works on other Linux systems also of course).<\/p>\n<p>As explained in the above article there is support for 1-wire in the Linux Kernel.\u00a0 You will get a folder for every\u00a0 each temperature sensor you attach to the system under <strong>\/sys\/bus\/w1\/devices<\/strong><\/p>\n<p>The script <a href=\"https:\/\/github.com\/grodansparadis\/vscp\/blob\/master\/src\/vscp\/samples\/python\/send_pi_onewire.py\">send_pi_onewire.py<\/a>\u00a0 will read information from each on the attached sensors and send to a VSCP daemon for further processing.\u00a0 This script originally comes from <a href=\"http:\/\/www.adafruit.com\">Adafruit<\/a> but has been extended and changed, see the original article.<\/p>\n<p>The usage is<\/p>\n<blockquote><p>.\/send_pi_onewire.py\u00a0 host user password<\/p><\/blockquote>\n<p>The script will use the 1-wire sensor GUID to construct a valid unique VSCP GUID.<\/p>\n<p>Only sensors that has been read correctly will be sent to the VSCP daemon.<\/p>\n<p>The script can of course be added to cron if one for example want to have temperature reported every minute. There are other howto&#8217;s on this blog that explains how this is done.<\/p>\n<p><strong>note<\/strong><\/p>\n<p>A good reading of a sensor gives this data on the filesystem<\/p>\n<blockquote><p>2a 00 4b 46 ff ff 0f 10 40 : crc=40 YES<br \/>\n2a 00 4b 46 ff ff 0f 10 40 t=20812<\/p><\/blockquote>\n<p>May be worth checking that you have this content in the file(s) there before using the script.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is based on this tutorial from AdaFruit. Read it before you continue. Here is an extended version. It explains how to connect 1-wire sensors to a Raspberry Pi system (Works on other Linux systems also of course). As explained in the above article there is support for 1-wire in the Linux Kernel.\u00a0 You [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[53],"tags":[],"class_list":["post-2171","post","type-post","status-publish","format-standard","hentry","category-howtos"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-z1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2171"}],"version-history":[{"count":3,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2171\/revisions"}],"predecessor-version":[{"id":2175,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2171\/revisions\/2175"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}