Development Updates

I have been spending some time working on the web interface for my sensors. I’m pretty happy with the configuration section now, which no longer has any text editors for updating the configuration, it is all web checkboxes, textboxes, radios, and buttons, which all have validation checks in place to make sure user entries are valid (for the most part).

I have also updated the underlying networking configuration to use dhcpcd.conf instead of interfaces. This has the advantage of being able to set static entries per network interface while allowing the use of any other installed adapters. AKA you can still plug in the Ethernet cord into the Pi3b+ for example and get a DHCP address, even if the wireless is configured with static entries. I had to remove the dual wireless network connections in wpa_supplicant.conf, as certain configurations would kill networking altogether, so… better safe than sorry. I might go back and figure it out later, but it’s not really necessary, so it’s on the back burner.

I fixed a few bugs, like the graphing showing incorrect datestamp correlations if a sensor was added later or disabled temporarily. This was caused by my attempt to re-use the datetime recording column for all sensors because they all use the same column, but if a sensor was added later, there would be a big NULL gap, so the first datetime columns would line up with the first actual data of a sensor column. To fix it, I grab the datetime column based on the presence of each sensor reading. Luckily it didn’t seem to add TOO much extra time to render the graphs.

I also added gzip page compression to Flask, which downs the page transfer sizes decently. This will help if I set up some 900Mhz long-distance transmitters since their data rates are not great.

Other changes in no particular order include

  • Refactoring aspects of the web interface, such as using HTML tabs to go through configurations and log entries (This makes it a lot easier to look over things quickly, instead of having to bounce back to the management page to choose another configuration or log.
  • Adjusted plotly graphs to use a dark theme
  • Created file for cached variables to lessen disk reads
  • Updated Ohms Gas resistance to K Ohms for easier human readability
  • Standardized HTML element colors
  • Added links to many sections to help explain what it is (Sensor readings, for example, take you to the Wiki page for what it is)
  • Other misc. refactoring and bug fixes

I’m getting closer to releasing a beta version, as a lot of the core parts are pretty stable. The networking was also problematic since it used to disable all other networks and was not easily adjustable. Now it works well and allows it to be configured in such a way that the device can still be used online in other ways besides being a sensor.

The web app is coming along nicely, which will eventually overtake the PC Control Center App (I pretty much just have to add the ability to manage multiple sensors from the web app).

That’s it for today’s update.

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>