{"id":825,"date":"2019-12-15T10:51:46","date_gmt":"2019-12-15T18:51:46","guid":{"rendered":"http:\/\/dragonwarz.net\/?p=825"},"modified":"2019-12-15T10:51:46","modified_gmt":"2019-12-15T18:51:46","slug":"sensor-latency-tests-added","status":"publish","type":"post","link":"https:\/\/dragonwarz.net\/?p=825","title":{"rendered":"Sensor Latency Tests Added"},"content":{"rendered":"\n<p>I finally got around to adding Sensor Latency testing.  A button has been added under the &#8220;System Management&#8221; page to run it.  The latency tests tell you just how long it really takes for a sensor to return a reading.  This is required knowledge to set trigger variances in the seconds or less, so it doesn&#8217;t end up building a queue of reading requests waiting to get data.   I have already set each sensor&#8217;s &#8220;multiple access wait times&#8221; to match more closely with how long it takes to get a sensor reading.  This should improve performance when sensors are accessed at the same time.  <\/p>\n\n\n\n<p>Most sensors return data within 100ms (0.1 seconds).  Some like the EnviroPhat can get a reading from each sensor within 10ms.  But there&#8217;s one sensor, the light spectrum AS7262 that can take anywhere from 700ms to 8 seconds!  I&#8217;m not sure exactly why, because my other spectrum sensors, like the BH1745 and the EnviroPhat, can grab readings in less than 20ms every time.  I also checked the source code for the driver and how I set-up the API, and it&#8217;s set for under 30ms to get a reading for each of the six colours, so added up, it shouldn&#8217;t be much more than 200ms, and that&#8217;s assuming it can&#8217;t do them in parallel. <\/p>\n\n\n\n<p>  I have been putting off doing the configuration section under Sensor Control because I know I can actually get it to re-use my existing individual configuration pages without copying them &#8230; but it would take some creative re-working, and I have been lacking in creative motivations.  Soooo&#8230; I think I&#8217;ll just copy-paste to get it working and refactor it later.  <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finally got around to adding Sensor Latency testing. A button has been added under the &#8220;System Management&#8221; page to run it. The latency tests tell you just how long it really takes for a sensor to return a reading. &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/dragonwarz.net\/?p=825\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,27,26],"tags":[33],"class_list":["post-825","post","type-post","status-publish","format-standard","hentry","category-programming","category-project","category-python","tag-kootnet-sensors"],"_links":{"self":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=825"}],"version-history":[{"count":1,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/825\/revisions"}],"predecessor-version":[{"id":826,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/825\/revisions\/826"}],"wp:attachment":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}