Kootnet Sensors Graphing

I’m decently satisfied with Kootnet Sensor’s Live Graphs now. I added a few new features, for one, you can set how many data points are plotted before it starts to remove old readings. This gives it a “scrolling effect” once you hit the max data points. It also helps with performance and viewing clarity. I also added a “Performance Mode” to disable animations, and later on, other performance-enhancing tweaks.

Database Graphing (Plotly) is now being used for Graph emails and a configuration for Database Graphing has been created. Email Graphs uses its own copy of the configuration so you can have different settings for general graphing and email graphs. It even works if you select an MQTT sensor for graphing instead of the local sensor.

I’m kinda thinking of making the next release version 1.0.0. Additional planned changes are more enhancements to existing sections, so I think the base is pretty stable now. I’ll see how it goes and do some more testing and decide later on.

That’s it for now, check out the new Live graphing, it’s pretty sweet!

Kootnet Sensors Live Graphing!

Some exciting news, Kootnet Sensors now has Live Graphing! This has been something I wanted to add since I first moved to a web-based app, however, I had trouble with the JavaScript syntax using Charts.js. Now that I have done more work with JavaScript, HTML and CSS, I finally figured it out and got it working!

By default, live graphs are set to graph the local sensor but I have added options to allow it to graph remote sensors too! Options include

  • Select which sensors to graph
  • How many sensor graphs are displayed per row
  • Update Interval in seconds
  • Sensor address (leaving this blank will graph the local sensor)
  • Disable SSL Verification, which is needed when graphing remote sensors that have a self-signed SSL certificate or if you are using an IP address.

Another neat ability with Live Graphing is you can open up multiple windows to view different sensors (So long as Disable SSL Verification is not enabled).

I am still finishing up work on Live Graphing but expect a new developmental release by the end of the week.

More updates!

More changes to Kootnet Sensors as of Beta.35.20. Here’s a quick list.

  • BugFixes
    • Sense HAT joystick service runs properly now (was continually “crashing”)
    • Datetime conversions work properly now (based on UTC offset)
    • Updates to version numbers that add up to only 9 characters works correctly
  • Ban IP from logging in temporarily when 10 or more logins are unsuccessful within an hour
  • MQTT Subscriber & Checkins Server pages that contain a list of their sensors, is now generated by button and in the background
  • When Demo mode is enabled, logins are no longer required (but most system commands are disabled)
  • Updated install package to work with Debian Bullseye & Python 3.9
  • Replacing sensor databases now verifies the uploaded database is of the correct type
  • Other minor changes and updates

Kootnet Sensors

The update system is now good to go! All HTTP updates are downloaded through HTTPS and do MD5 checks to make sure the download is okay.

I have created a URLs configuration where you can adjust the server address for program updates & the sensor check-in server if you ever want to configure your own servers.

I have added a system-wide alias to start up Kootnet Sensors Terminal Configuration Tool from the command prompt, which is ‘ks-tct’ without the quotes. by default, it runs using the python virtual environment meant for upgrades, because of this, you should be able to use the TCT even when there’s something wrong with the main virtual environment or program (such as missing python modules, which you can re-install with ks-tct).

The Login system has been completely overhauled. I’m using sessions with flask now, and when someone logs in successfully, a login ID is given (randomly generated SHA256). Due to this change, Remote Management is no longer compatible with previous versions (at least not for parts that require authentication). So I have bumped the version to Beta.35.x. This is also good since the username/password has to be reset due to a change in how user/passwords are saved (changed previously).

Other things that have been changed include

  • Seperated sensor offsets to it’s own configuration (only environmental temperature, more to come later)
  • Threaded initial cached variables update (HTTPS server loads much quicker)
  • Instructions and file checks added for changing update server URL
  • Refactoring to remove the need of some 3rd party Python modules (Flask-HTTPAuth, dateutil)
  • Code Clean-up

That’s it for now. You can try it out by updating to the latest beta version.

General Updates

I have not decided on what parts to use for the Raspberry Pi tricorder but with the release of the Raspberry Pi W 2, it looks like it could be a fine choice!

In Kootnet Sensors news, I have been enhancing and refining sections. For instance, I’m using Python’s scrypt to create password hashes. It’s much more secure, especially due to adding a randomly generated “salt” to the user’s password that’s generated every time a password is changed. Unfortunately, I can’t convert old passwords to the new format, so it just re-sets the username/password to default. Normally I would never dream of doing that to a userbase, but I don’t really have a large user base per se… so reset!

I am now working on re-doing my whole update system. It’s actually pretty much done now, I just need to tweak it a bit and test some more. With the updates being done in Python instead of bash scripting, I was able to add some nice features, such as MD5 checksum verification of downloaded update files, which, should prevent bad downloads from breaking the install. This also allowed me to down 3 bash scripts to just 1 Python script and 6 Linux service files to just one. I also have the Python update script run from a separate Python virtual environment, which allows a “clean install” to be done (remove all program files and main Python virtual environment before re-installing).

There are a few other things I wanted to do as well, such as changing the Web Portal login from HTTP basic to something a bit more modern.

I am trying to make it so the next release will be version 1.0.0, as a lot of the program is pretty decent as far as the backend goes. Guess we’ll see if that happens 🙂

Until next time!

Kootnet Sensors Beta.34.150

I have released an updated version of Kootnet Sensors that fixes a few bugs, improves performance and adds a few other features and refinements.

Here are a few of the changes.

  • Enviro+ display works again
  • On program boot, logs and configurations are zipped and saved in the database along with Running version, hostname, ip and the date
  • Added table for database information (Will be used in future updates)
    • Added type of database (Main, MQTT, Sensor Checkin)
  • Updated database uploading to be more consistent with expetections
    • Uploading a zip will use the database name in the zip
    • Uploading multiple databases in a single zip will add all valid databases using their file names
  • Added instructions on how to run Kootnet Sensors manually by downloading the source code
    • Updated code to allow easier running of Kootnet Sensors outside of expected linux service folder
    • Creates and uses data, configurations and python virtual environment in the users home directory
  • Visual adjustments to the Web Portal.

In other news, I have made contact with someone who’s willing to try and make a 3D printable tricorder case to put around some Raspberry Pi hardware and sensors. So I’ll be working on that in order to attempt the creation of a working StarTrek-themed tricorder!
To start, I’ll have to figure out what screen and buttons I should use, along with which model of Pi.

Until next time!

Kootnet Sensors Beta.34.145

Kootnet Sensors version Beta.34.145 is out! I have updated all the channels and links to reflect the new version. I have also created Raspberry Pi images so you can flash it directly to an SD card and boot up with it pre-installed (like you would flash a normal Raspbian OS image). I’m just in the process of uploading the images to my web server, after that I’ll create links on my main pages to them. This should resolve any installation issues that might arise due to unresponsive servers or stale apt-get cache.

In other Kootnet Sensors news, I have created deb installers for older versions of Kootnet Sensors and posted them in the “Releases” section on GitHub. This was done mostly for nostalgia since you wouldn’t want to start with an older version … especially the much older ones. Still, it’s neat to see how the program has progressed over the months/years. The older versions I have created installers for include Alpha.24.x up to Alpha.28.x. I also added a missing one for Beta.31.x.

That’s it for now. I’ll post again when I get the Raspberry Pi images online.

Still working on Beta.34.x

So a bit more delay, I had family over and didn’t get as much work as I wanted to be done on the project. That being said, it’s coming along nicely. I’m just tweaking a little bit more and going through different sections double checking code.

Thanks to checking code all over, I re-worked the web portal notification system and added notifications for things like updates being run. I also enhanced the TCT (Terminal Configuration Tool) by adding the running version to the top of the menu, changing the operations a bit to have nicer output (easier to read and or more informational output during operations) and adding small changes like auto restarting the service after changes are done that require it (except for a few where you might want to check things before re-initializing).

So long story short, I want this release to be checked through a bit more before release. So it will be a bit longer. I’m still hoping to have it out by the end of this week, but I seem to keep finding sections I want to refine … so … we’ll see ^_^

Kootnet Sensors delayed-release

I found a few bugs while going through Kootnet Sensors code, so I’m taking a bit more time before a release. Things are coming along nicely, if all goes well, the new version should land in stable by the end of the week.

Kootnet Sensors – 3 new HW Sensors added!

I’m getting very close to releasing a new version of Kootnet Sensors. Besides tweaking more around the web portal, I have added new hardware sensor support! Here are the sensors.

  • Pimoroni RV3028 (Real Time Clock)
  • Pimoroni PA1010D (GPS)
  • Pimoroni MICS6814 (gas)

The RV3028 allows your Pi to keep current time when there’s no power, very handy for time-sensitive data recording.

The PA1010D GPS sensor required me to add the new sensor types into the different program sections. I’m still not done adding it to all aspects of Kootnet Sensors, but it works under “Live Sensor Readings”, Interval Recording and MQTT.

The MICS6814 sensor is a GAS sensor, but unfortunately, I don’t actually have one, so I can’t test it. On the subject of testing, I was able to move the Pimoroni SGP30 & MSA301 out of the “Un-Tested” section as I have ordered a few in to try out. I’m happy to say they are working well (now).

Yesterday I finished up a few updates to the documentation, and although not done, it at least reflects the new Web Portal changes.

There have also been updates and changes to the installers. I have updated the required Python modules (most of them) and added a few new ones that are required for the updated modules. I also fixed a bug that prevented the installer from using the local Python modules, so install time should be much faster than the previous release.

There are still a few things I kinda wanted to do… but I also want to get the new version out … So we’ll see. I’m hoping to have the new version out sometime next week. The developmental release is in good shape, so you can upgrade to it without issues if you don’t want to wait.

Until next time!