Tweaking & RP Sensor Installer

I have spent the past few days just going over the code and tweaking it.  Fixed a few bugs, refactored a bunch o code and even started on the “Help” section for building a sensor!  Of course at that point, I realized I needed to work on my installers for the RP Sensor code itself.  So that’s what I did. 

Any additional runs AFTER install, simply opens the config files, so you don’t get duplicated network code from the installer.  This also makes it easy to re-configure your sensor, simply by re-running the install code.  I have also copied both the Upgrade and config_edit scripts into the pi user’s home folder, so when you login with SSH or open a terminal, you can go right to upgrading or editing config.  

The Help section for building your own sensor is… Basic at best right now, but I wanted at least SOMETHING there to get started.  As I was making it, I went over the shell scripts for installing the Sensor code.  I managed to make it, so you only have to run a single command in terminal, and then it starts.  This command includes the download itself, and how it works, is this.  The command tells wget to get the install script off my http server, then tells bash to execute that script, after adding the execute permission to it.  This install script downloads all the other needed files off my http server and puts them where they should be, after which, it updates the Raspbian system itself, and installs all necessary dependencies through pip3.  During the process, it auto fills and opens up necessary config files to edit (Installed Sensors, IP, Wireless), with instructions built in as comments.  After its done, it automatically reboots the Raspberry Pi.  When the Pi boots back up, it should auto connect to whatever wifi was entered and start recording sensor data every 5 minutes to a SQL database.  By putting your computer on the correct IP subnet, you can also connect to the sensor with the KootNet Sensors – PC Control Center program.

I will be merging these updates and changes with the master branch and creating new installers and demo stuff soon.  I’m taking a bit more time to test things out, find and fix a few bugs and improve log output. 

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>