Updates & Changes

So, I was going to use Django… until I realized I can actually just use a HTML template and have python itself edit the variables, and spit out a new copy.  So that's what I did.  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.  I'm also changing a few things to be more efficent, like using 'for' and 'while' loops where I used to have mutliple code for each sensor.  

Here are a pic of the progress.  

GUI App beside the HTML output file.  Its opening the html doc locally, but it will be on the Sensor "Controller", accessed through a http server.  

App & HTML output

I'm pretty happy with the progress.  I'm now waiting on some hardware to arrive, so I can get started on making the Sensors self sustaining for power.  

I have also done a lot of other updates since my last post.  Here's a quick point view.

  • Updated storage method from text file to sqlite3 database
  • Updated *Most code to reflect new storage method
  • Created install script for new sensors -> One command you run in terminal and in the end, you just change a IP and your done!  New sensor ready to go. 
    • Still need to enable or set ic2 / hostname / wifi country
    • Optional: Enable SSH / Set boot to CLI autologin 
  • Updated Sensor "Controller" to enable dual button modes
    • 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
    • Button Options 
      • 1a) Display Local Host Info + Age of Update Files on Controller
      • 1b) Update Local programs and Sensor upgrades off Local NAS 
      • 2a) Display Sensor Online & UpTime OR Offline
      • 2b) Download Sensor's Database to local Controller
      • 3a) Upgrade Sensors with progs from Local Controller
      • 3b) Reboot Sensors
      • 4) Shutdown Local Controller
  • Updated script for Controller to install OR update the unit (Can auto detect)

That's it for the most part.  I have also been hanging out on the Raspberry Pi IRC channel, and getting some decent ideas from there.  

Until next time!  

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>