{"id":213,"date":"2018-08-01T13:24:23","date_gmt":"2018-08-01T20:24:23","guid":{"rendered":"http:\/\/dragonwarz.net\/?p=213"},"modified":"2018-08-12T19:20:54","modified_gmt":"2018-08-13T02:20:54","slug":"updates-changes","status":"publish","type":"post","link":"https:\/\/dragonwarz.net\/?p=213","title":{"rendered":"Updates &#038; Changes"},"content":{"rendered":"<p>So, I was going to use Django&#8230; until I realized I can actually just use a HTML template and have python itself edit the variables, and spit out a new copy.&nbsp; So that&#39;s what I did.&nbsp; I will probably still go to some kind of auto HTML generator, so I can add sensors on the fly more seamlessly, but this is a good start to get the rest of the back end up to date.&nbsp; I&#39;m also changing a few things to be more efficent, like using &#39;for&#39; and &#39;while&#39; loops where I used to have mutliple code for each sensor.&nbsp;&nbsp;<\/p>\n<p>Here are a pic&nbsp;of the progress.&nbsp;&nbsp;<\/p>\n<p>GUI App beside the HTML output file.&nbsp; Its opening the html doc locally, but it will be on the Sensor &quot;Controller&quot;, accessed through a http server.&nbsp;&nbsp;<\/p>\n<p><a href=\"http:\/\/dragonwarz.net\/wp-content\/uploads\/2018\/08\/Web_and_App.png\" rel=\"\" style=\"\" target=\"_blank\" title=\"\"><img loading=\"lazy\" decoding=\"async\" alt=\"App &amp; HTML output\" class=\"aligncenter size-large wp-image-215\" height=\"378\" src=\"http:\/\/dragonwarz.net\/wp-content\/uploads\/2018\/08\/Web_and_App-1024x624.png\" style=\"\" title=\"\" width=\"620\" srcset=\"https:\/\/dragonwarz.net\/wp-content\/uploads\/2018\/08\/Web_and_App-1024x624.png 1024w, https:\/\/dragonwarz.net\/wp-content\/uploads\/2018\/08\/Web_and_App-300x183.png 300w, https:\/\/dragonwarz.net\/wp-content\/uploads\/2018\/08\/Web_and_App-768x468.png 768w, https:\/\/dragonwarz.net\/wp-content\/uploads\/2018\/08\/Web_and_App.png 1309w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>I&#39;m pretty happy with the progress.&nbsp; I&#39;m now waiting on some hardware to arrive, so I can get started on making the Sensors self sustaining for power.&nbsp;&nbsp;<\/p>\n<p>I have also done a lot of other updates since my last post.&nbsp; Here&#39;s a quick point view.<\/p>\n<ul>\n<li>Updated storage method from text file to sqlite3 database<\/li>\n<li>Updated *Most code to reflect new storage method<\/li>\n<li>Created install script for new sensors -&gt; One command you run in terminal and in the end, you just change a IP and your done!&nbsp; New sensor ready to go.&nbsp;\n<ul>\n<li>Still need to enable or set ic2 \/ hostname \/ wifi country<\/li>\n<li>Optional: Enable SSH \/ Set boot to CLI autologin&nbsp;<\/li>\n<\/ul>\n<\/li>\n<li>Updated Sensor &quot;Controller&quot; to enable dual button modes\n<ul>\n<li>If the same button is pressed again within 5 seconds of the command finishing after the original pressing of the button, it will do something different<\/li>\n<li>Button Options&nbsp;\n<ul>\n<li>1a)&nbsp;Display Local Host Info + Age of Update Files on Controller<\/li>\n<li>1b) Update Local programs and Sensor upgrades off Local NAS&nbsp;<\/li>\n<li>2a) Display Sensor Online &amp; UpTime OR Offline<\/li>\n<li>2b) Download Sensor&#39;s Database to local Controller<\/li>\n<li>3a) Upgrade Sensors with progs from Local Controller<\/li>\n<li>3b) Reboot Sensors<\/li>\n<li>4) Shutdown Local Controller<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Updated script for Controller to install OR&nbsp;update the unit (Can auto detect)<\/li>\n<\/ul>\n<p>That&#39;s it for the most part.&nbsp; I have also been hanging out on the Raspberry Pi&nbsp;IRC channel, and getting some decent ideas from there.&nbsp;&nbsp;<\/p>\n<p>Until next time!&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, I was going to use Django&#8230; until I realized I can actually just use a HTML template and have python itself edit the variables, and spit out a new copy.&nbsp; So that&#39;s what I did.&nbsp; I will probably still &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/dragonwarz.net\/?p=213\">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":[26,3],"tags":[],"class_list":["post-213","post","type-post","status-publish","format-standard","hentry","category-python","category-random"],"_links":{"self":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/213","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=213"}],"version-history":[{"count":6,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}