-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Inputs and outputs to handle non-numerical values #1400
Comments
@bchwtz Just pinging my project manager... |
There are two databases that Mycodo uses, influxdb for time-series data and an SQL db for all other data (settings, etc.). I would suggest using the SQL db if you need to store text. |
To save/retrieve data from the SQL db you can use self.set_custom_option() and self.get_custom_option(). |
Thanks for the quick reply, Kyle. As a follow-up, I found this post on your other forum: Reading and writing data to database tables. So would you suggest the approach mentioned therein to me as well? @kizniche |
Widgets can communicate directly with Functions. There is an example widget and function showing how data of a Function is received and displayed by a widget. |
In my first weeks of actively working with Mycodo (v8.16.0), I focus on using inputs and outputs that specifically allow the execution of bash commands. Those commands include addressing a Python file which eventually performs I2C transmissions. The response data (being chopped by regex) is what I intend to display in a widget on my dashboard, for instance.
Unfortunately, I run into problems when I have my commands return or receive data that is alphanumerical, e.g. a simple text value for a device name. With this in mind, both tasks of displaying some text in an input widget or using an output widget for updating that text value cannot be accomplished so easily. As far as I can tell, this is due to Mycodo (and its underlying time series DB) only accepting numerical data that fits any compatible measurement and unit.
Frankly, for this kind of tasks dealing with plain data that originates from outside of the Mycodo system, I'm not even interested in contacting the Influx DB and thus, I could also do without picking any measurement which forces my values to meet certain conditions...
@kizniche Is there any way to safely configure my inputs/outputs to cope with non-numerical data without being at risk of breaking Mycodo's underlying mechanics?
The text was updated successfully, but these errors were encountered: