{"id":2804,"date":"2010-03-24T21:14:55","date_gmt":"2010-03-25T01:14:55","guid":{"rendered":"http:\/\/www.schollnick.net\/wordpress\/?p=2804"},"modified":"2010-03-24T21:26:58","modified_gmt":"2010-03-25T01:26:58","slug":"indigo-automatic-polling","status":"publish","type":"post","link":"http:\/\/www.schollnick.net\/wordpress\/2010\/03\/indigo-automatic-polling\/","title":{"rendered":"Indigo Automatic Polling??"},"content":{"rendered":"<blockquote><p><span style=\"font-family: arial, sans-serif; line-height: normal; border-collapse: collapse;\">Overall, I love Indigo. But one thing that is very annoying and doesn&#8217;t seem to be built in, is the ability to poll all devices on a regular scheduled basis (ie: every 5 mins, 10 mins, etc.) of the status of my devices. This mainly causes a problem when accessing my system via my iPhone. When I connect, the status of my devices is more often then not, incorrect and showing things that are on when I know they&#8217;re off, or showing something at 20% dim when I know it&#8217;s 80% etc. and there is no way to request a refresh.<br \/>\nSo what I want (need) to do is be able to regularly poll my devices so that their status is accurate and kept updated.<br \/>\nDoes anyone know of an AppleScript or other way to easily do this?<\/span><\/p><\/blockquote>\n<p><span style=\"font-family: arial, sans-serif; line-height: normal; border-collapse: collapse;\">Well, yes&#8230; \u00c2\u00a0There are quite a few different ways&#8230; \u00c2\u00a0But the simplest way to do this is this applescript&#8230;<\/span><\/p>\n<p><span style=\"font-family: Verdana, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;\"><span style=\"line-height: normal;\"><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;\"><span style=\"line-height: 19px;\"> <\/span><\/span><\/span><\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.7px; font: 12.0px Verdana;\"><strong>tell<\/strong> <span style=\"color: #2a03ff;\"><em>application<\/em><\/span> &#8220;IndigoServer&#8221;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><strong>with<\/strong> <strong>timeout<\/strong> <strong>of<\/strong> 60 <span style=\"color: #2a03ff;\"><em>seconds<\/em><\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><strong>try<\/strong><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 166.5px; text-indent: -166.5px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><strong>repeat<\/strong> <strong>with<\/strong> <span style=\"color: #559100;\">curDevice<\/span> <strong>in<\/strong> <span style=\"color: #2a03ff;\"><em>devices<\/em><\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 208.1px; text-indent: -208.1px; font: 12.0px Verdana; color: #2a03ff;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><strong>status request<\/strong><span style=\"color: #000000;\"> (<\/span><span style=\"color: #559100;\">curDevice<\/span><span style=\"color: #000000;\">)<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 208.1px; text-indent: -208.1px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #1d1dbe;\"><strong>delay<\/strong><\/span> 0.75<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 166.5px; text-indent: -166.5px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><strong>end<\/strong> <strong>repeat<\/strong><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><strong>end<\/strong> <strong>try<\/strong><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana;\"><span style=\"white-space: pre;\"> <\/span><strong>end<\/strong> <strong>timeout<\/strong><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.7px; font: 12.0px Verdana;\"><strong>end<\/strong> <strong>tell<\/strong><\/p>\n<pre><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;\">The delay statement may not completely be necessary, but I found during testing that if there wasn't a delay, that the requests would backlog and it would take a few moments for everything to clear out...<\/span><\/pre>\n<p>But this was originally written with a 2414U, and I haven&#8217;t retested this with a 2412U\/2413U. \u00c2\u00a0The 2412U &amp; 2413U both should allow a reduction in the delay&#8230;<\/p>\n<p>Update &#8212; I just tested with my 2413U&#8230; \u00c2\u00a0I was able to reduce the delay to 0.15 without seeing a significant backlog in requests developing. \u00c2\u00a0Changing to 0.10 showed a significant backlog if any device had any delay in responding (ie was more than a 2 hops away).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overall, I love Indigo. But one thing that is very annoying and doesn&#8217;t seem to be built in, is the ability to poll all devices on a regular scheduled basis (ie: every 5 mins, 10 mins, etc.) of the status of my devices. This mainly causes a problem when accessing my system via my iPhone. <a class=\"read-more\" href=\"http:\/\/www.schollnick.net\/wordpress\/2010\/03\/indigo-automatic-polling\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[12,68,4,5],"tags":[163,162,111,141,89,71,1839,91,154],"_links":{"self":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/2804"}],"collection":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/comments?post=2804"}],"version-history":[{"count":0,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/2804\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/media?parent=2804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/categories?post=2804"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/tags?post=2804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->