Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Unit/Conversion System #506

Closed
kizniche opened this issue Jul 19, 2018 · 10 comments
Closed

Global Unit/Conversion System #506

kizniche opened this issue Jul 19, 2018 · 10 comments

Comments

@kizniche
Copy link
Owner

Changes with version 7.0 that will break current functionality (upgrade will fail, need to recreate database).

  1. Full unit conversion system (select what unit to use for each sensor measurement)
@kizniche
Copy link
Owner Author

I'm working on a way to preserve the 6.x database and still accomplish 1. I'll be adding to this list as I think of feature additions and updating my progress with the unit/conversion system.

@kizniche kizniche changed the title Version 7.0 Changes Global Unit/Conversion System Jul 20, 2018
@kizniche kizniche reopened this Jul 20, 2018
@kizniche
Copy link
Owner Author

I figured out how to modify database entries to rename to the new naming convention used in the new measurement/unit system. I'm now going through the system making changes and testing stability.

@kizniche
Copy link
Owner Author

kizniche commented Jul 21, 2018

Additionally, what I meant to mention in the last comment was that as a result, a database deletion will not be necessary when upgrading to the next release, and it will not be a major version jump (7.x), but rather only to 6.2,

@kizniche
Copy link
Owner Author

kizniche commented Jul 21, 2018

Great progress. Here's how the graph I've been testing looks after fixing all the bugs (so far).
screenshot_2018-07-21_00-30-29

@kizniche
Copy link
Owner Author

Finally ironed out most of the bugs for the dashboard, live, and async graph pages.
screenshot_2018-07-22_12-37-34

@kizniche
Copy link
Owner Author

kizniche commented Jul 22, 2018

With 6.2.0, I'll also introduce the ability to add new measurements, units, and unit conversions. For an example of how this would be used, let's say, as a user, I had weight sensors. Since no weight sensors are currently supported in Mycodo, I would need to create a script to read the weight measurement and configure a Command Input in Mycodo to execute that script and store the measurement. To make a new measurement and unit available to be selected in the Command Input, I would then need to add the "weight" measurement, "gram" and "kilogram" units, and the conversions "g_to_kg" = "x/1000", "kg_to_g" = "x*1000". Once this is done, the measurement and units are available via dropdown in the Command Input. This will be able to be done for any new type of measurement and/or unit that's not currently built-in to Mycodo.

@kizniche
Copy link
Owner Author

I think I have the custom measurement system in its final stages. I've ironed out most of the bugs in the system and refined the Measurement Settings page. Now I need to test a bunch of (pre-6.2.0) database configurations through the database upgrade script and hope everything gets modified correctly. This is the most complex database data upgrade I've performed in Mycodo yet. I hope everyone appreciates not having to delete your database and start from scratch 😉

screenshot-192 168 0 14-2018-07-24-16-39-59

@kizniche
Copy link
Owner Author

Selecting a measurement/unit is now foolproof because of the new measurement system. two text inputs for measurement and unit are replaced by a dropdown to select the measurement and unit, for Linux Command and ADC Inputs, as well as Math controllers.

screenshot_2018-07-26_11-40-44

@Theoi-Meteoroi
Copy link
Contributor

This is awesome

Thank you Kyle for making this change... and also all the database work you have done recently for upgrades. I've been distracted by other projects lately but these changes are compelling enough to squeeze in some Mycodo time to kick the tires a bit and stand up a controller or two with the new code.

Nice work!

@kizniche
Copy link
Owner Author

Thanks! I'm also experimenting with PID autotuning, so I may be releasing that soon, depending how the testing goes.

@kizniche kizniche mentioned this issue Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants