Changes and Improvements

​Probably no big surprise to anyone, I have changed the Sensor programs some more!  Enough to deserve a couple of new screen shots. 

 

 

There are a fair amount of both Major and Minor changes, both front facing to the user and on the back end.  

Major Changes

  • Put Graphing into its own Window + made the time selection more accurate
  • Separated Sensor checks for data retrieval vs checking online
    • Faster Online Checks
    • Allows Different functions on same socket connection
  • Added SQL database Sizes to Sensor Information HTML page
  • Updated SQL queries to handle more data points for graphing
  • Added Motion detection recording to Sensors (Separate database, checking 4 times every second (0.25 seconds), recording if its change more then 0.05 since the last recording (If any axis changes that much, it records all data))
  • Added Graphing option for the Motion Database
    • Motion graphing bypasses the "Data Points To Skip"

Minor Changes

  • Updated code to auto check selected sensors before trying to get data (database, current readings)
  • Updated and cleaned up Log code (tracking progress through program)
    • Before writing new log data, remove all white space before and after text in the log window
    • Add "Relay" functions in order to return better log details from custom imports
  • Updated some Variable and Function names to better match their actual function
  • Broke up code into new def statements and used for statements to simplify code and make more readable. 
  • About 5 or so other changes I can't quite remember…  

I spent a great deal of time working with the SQL queries, especially because I had to convert the time text from the program date selection, into something I could compare to from the database.  I could of saved a lot of time by making sure it printed out the 2 comparisons from the start all the time, but since I didn't… that was a good 10+ hours spent!  Its all sorted out now and it should be much easier to spot future errors in input calculations. 

While dealing with the SQL queries them selves, I quickly found out, that too many data points in a SQL database, will make getting, holding and manipulating the data in a single grab, a no go (Goes slow, if too many points, just doesn't do the graph).  Thanks to a misaligned threshold setting on my motion detection by 0.02, It was recording every few seconds…. sometimes more often.  It quickly added up to a 6MB database.  This gave me the chance to test my Graphing with large data sets, and it successfully graphed just shy of 160,000 data sets PER Time/X/Y/Z.  That's about 640,000 data entries!   Even on my Ryzen system, it took about 10 seconds to process that.  However, this is an unusual amount of data and most of my readings will never reach this level.  Its still comforting to know I can process that much, as it will be useful for reviewing long term data.  It may also become necessary to compare multiple sensors in a single graph, which would multiply the data entries by however many sensors you needed to compare.  

Here is how smokey it looks out side my window… I wish I could say that's clouds or mist, but its smoke at about 11AM in the morning on a Sunday…. Terrible terrible smoke…

Super Smoke

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>