{"id":2167,"date":"2017-01-09T12:38:56","date_gmt":"2017-01-09T12:38:56","guid":{"rendered":"http:\/\/grodansparadis.com\/wordpress\/?p=2167"},"modified":"2017-01-09T12:44:29","modified_gmt":"2017-01-09T12:44:29","slug":"monitor-gpu-temp-of-a-raspberry-pi-rpi-vscp-iot","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=2167","title":{"rendered":"Monitor GPU temp of a Raspberry Pi #rpi #vscp #iot"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2164\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2164\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?fit=1054%2C1300&amp;ssl=1\" data-orig-size=\"1054,1300\" 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=\"13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?fit=580%2C716&amp;ssl=1\" class=\"alignnone wp-image-2164\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?resize=175%2C216\" alt=\"\" width=\"175\" height=\"216\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?w=1054&amp;ssl=1 1054w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?resize=243%2C300&amp;ssl=1 243w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?resize=768%2C947&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/13293173-Thermometer-isolated-on-white-Celsius-and-Fahrenheit-Stock-Vector.jpg?resize=830%2C1024&amp;ssl=1 830w\" sizes=\"auto, (max-width: 175px) 100vw, 175px\" \/><\/a><\/p>\n<p>If you want to know the GPU temperature of your Raspberry Pi you issue<\/p>\n<blockquote><p><code>\u00a0 \/opt\/vc\/bin\/vcgencmd measure_temp<\/code><\/p><\/blockquote>\n<p>and will get a response like<\/p>\n<blockquote><p>\u00a0 temp=45.5&#8217;C<\/p><\/blockquote>\n<p>form this command.<\/p>\n<p>We will show a script here that send this temperature to a VSCP daemon so that you can handle, display, diagram, react on the measured value etc<\/p>\n<p><a href=\"https:\/\/github.com\/grodansparadis\/vscp\/blob\/master\/src\/vscp\/samples\/python\/send_pi_gpu_temp.py\">The script to do this is here<\/a>.<\/p>\n<p>You use it like this<\/p>\n<blockquote><p>.\/send_pi_gpu_temp.py 192.168.1.6 admin secret &#8211;<\/p><\/blockquote>\n<p>First remember to make it executable (chmod a+x send_pi_gpu_temp.py ).<\/p>\n<p>The parameters are.<\/p>\n<ul>\n<li>IP address to server (192.168.1.9) where VSCP daemon resides.<\/li>\n<li>User name for TCP\/IP connection, obviously you should use anther user than the admin user in most cases.<\/li>\n<li>Passsword for TCP\/IP connection.<\/li>\n<li>GUID to use for the temperature event. This is an optional parameter and if not given &#8220;-&#8221; wil be used which is the same as a GUID with all zeros and mans that the event will have the GUID of the interface. It is better to give an explicit GUID but this works for now.<\/li>\n<\/ul>\n<p>So issuing this and watching it in VSCP Works<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-133734.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2168\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2168\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-133734.png?fit=1153%2C960&amp;ssl=1\" data-orig-size=\"1153,960\" 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 13:37:34\" 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-133734.png?fit=580%2C483&amp;ssl=1\" class=\"alignnone size-full wp-image-2168\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-133734.png?resize=580%2C483\" alt=\"\" width=\"580\" height=\"483\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-133734.png?w=1153&amp;ssl=1 1153w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/01\/Screenshot-from-2017-01-09-133734.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-133734.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-133734.png?resize=1024%2C853&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>now we can add this to a cron script to get the temperature sent to the VSCP daemon every minute.<\/p>\n<p>We add a script <strong>send_gpu_temp<\/strong> to <strong>\/etc\/cron.d<\/strong> looking like this<\/p>\n<blockquote><p>* * * * * root cd \/root;.\/send_pi_gpu_temp.py 192.168.1.6 admin secret 00:00:00:00:00:00:00:00:00:00:00:00:00:01:00:03<\/p><\/blockquote>\n<p>Note that a GUID has been assigned here for the sensor. The<\/p>\n<blockquote><p>00:00:00:00:00:00:00:00:00:00:00:00:xx:xx:xx:xx<\/p><\/blockquote>\n<p>can be used for lab usage and I put a id for some hardware in byte 2\/3 in this case 00:01 and index in byte 0\/1 ( 00:03). We could have used the MAC address or the IP address\u00a0 of the Raspberry Pi as a base for this or a privately assigned GUID series. <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=globally_unique_identifiers\">You can read more about the GUID&#8217;s here.<\/a><\/p>\n<p>Thats it. You can now alarm yourself when the temperature reach critical levels or just diagram the data or collect it in a database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to know the GPU temperature of your Raspberry Pi you issue \u00a0 \/opt\/vc\/bin\/vcgencmd measure_temp and will get a response like \u00a0 temp=45.5&#8217;C form this command. We will show a script here that send this temperature to a VSCP daemon so that you can handle, display, diagram, react on the measured value etc [&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_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,13],"tags":[],"class_list":["post-2167","post","type-post","status-publish","format-standard","hentry","category-howtos","category-vscp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-yX","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\/2167","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=2167"}],"version-history":[{"count":1,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2167\/revisions"}],"predecessor-version":[{"id":2169,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2167\/revisions\/2169"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}