{"id":19,"date":"2015-02-14T23:46:05","date_gmt":"2015-02-14T23:46:05","guid":{"rendered":"http:\/\/www.beer.org\/beerblog\/?p=19"},"modified":"2016-01-04T12:52:36","modified_gmt":"2016-01-04T12:52:36","slug":"the-snap-environment","status":"publish","type":"post","link":"https:\/\/www.beer.org\/blog\/index.php\/2015\/02\/14\/the-snap-environment\/","title":{"rendered":"The Snap! environment"},"content":{"rendered":"<p>I thought it might be useful to explain how Snap! works in my device control scenario. I&#8217;ve ever so slightly modified Snap! to be able to query my server and get an inventory of inputs and outputs available. These are known as &#8220;Phrob Ins&#8221; and &#8220;Phrob Outs&#8221; for lack of a better name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-99\" src=\"https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/snapshot1-300x296.png\" alt=\"snapshot1\" width=\"300\" height=\"296\" srcset=\"https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/snapshot1-300x296.png 300w, https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/snapshot1.png 650w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>On the left is a list of all inputs that were discovered during the inventory process.<\/p>\n<p>In the center are the logic blocks I&#8217;m currently working with. There are 4 logic blocks there. Two of them are outlined in Green. These two are presently executing. The other two are not. The smallest logic block on the bottom has a speech bubble next to it. I simply clicked on the &#8220;Office:temperature&#8221; input and the speech bubble popped up and said &#8220;2214&#8221; which is DegreesC multiplied by 100. I&#8217;m currently experimenting on whether to transmit data as integers or floating point decimals. The jury is out. There is a logic block on the middle right that is not executing. I can simply click on a logic block to start or stop the block.<\/p>\n<p>On the right top is a white canvas which presently displays some temporary variables that my logic blocks use. It&#8217;s handy to see those variables displayed because it makes debugging easier.<\/p>\n<p>The top running logic block is responsible for collecting some statistics and transmitting a single text message out to the APRS IS network. On this network, I can remotely see what&#8217;s happening at the cottage:<\/p>\n<pre>2015-02-14 13:40:28 UTC: VF9ABC-9&gt;VF9ABC: T=70.0,OA=32.0,SP=70.0,H1A=0,C1A=0,LRT=21.86,LRH=33.83\r\n2015-02-14 13:45:28 UTC: VF9ABC-9&gt;VF9ABC: T=70.0,OA=32.0,SP=70.0,H1A=0,C1A=0,LRT=22.01,LRH=33.4\r\n2015-02-14 13:56:02 UTC: VF9ABC-9&gt;VF9ABC: T=70.0,OA=32.0,SP=70.0,H1A=0,C1A=0,LRT=22.14,LRH=32.88\r\n2015-02-14 14:06:42 UTC: VF9ABC-9&gt;VF9ABC: T=69.0,OA=32.4,SP=70.0,H1A=1,C1A=0,LRT=22.49,LRH=32.76\r\n2015-02-14 14:12:00 UTC: VF9ABC-9&gt;VF9ABC: T=70.0,OA=32.0,SP=70.0,H1A=0,C1A=0,LRT=22.57,LRH=32.45\r\n<\/pre>\n<p>While it is somewhat soothing to see the raw data, sometimes it&#8217;s nice to see a graph:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-77\" src=\"https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/graph-300x211.png\" alt=\"graph\" width=\"300\" height=\"211\" srcset=\"https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/graph-300x211.png 300w, https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/graph-200x140.png 200w, https:\/\/www.beer.org\/blog\/wp-content\/uploads\/2015\/09\/graph.png 647w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I thought it might be useful to explain how Snap! works in my device control scenario. I&#8217;ve ever so slightly modified Snap! to be able to query my server and get an inventory of inputs and outputs available. These are known as &#8220;Phrob Ins&#8221; and &#8220;Phrob Outs&#8221; for lack of a better name. On the&#8230; <a class=\"moretag\" href=\"https:\/\/www.beer.org\/blog\/index.php\/2015\/02\/14\/the-snap-environment\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-phrobs"],"_links":{"self":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":2,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":107,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions\/107"}],"wp:attachment":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}