mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
147 stars 90 forks source link

Export Sensor Data (again) #361

Closed dansmith65 closed 4 years ago

dansmith65 commented 7 years ago

Apparently this feature was implemented in version 0.0.2-alpha5 via #6, then dropped from 0.0.3 versions.

This is an important feature for me. Here's my use-case: I'm replacing the control system in my espresso machine with my own arduino-based system. To fine-tune the system I'd like to collect data while brewing an espresso, then export/save that data so I can compare it to future brew's with different control system configuration. This comparison would require the original data (not aggregated) and may occur months apart. I would likely want to view two or more sensor's data on one chart to easily compare them.

This saving of original data, then comparing with other data set's is not a feature I would ever expect from mycontroller.org, which is why I think the data should be able to be exported.

In the above mentioned use-case there could easily be 10 or more reading's taken every second so it would be nice if the process could be somewhat automated. Ideally I could, for example, configure a script to export data from a list of pre-defined sensors for the last 2 hours. So when I want to collect data from a recent test I just have to run the script.

njbuch commented 7 years ago

I love that use-case!

jkandasa commented 7 years ago

@dansmith65 Sure, I will implement this feature.

If you do not want aggregated data, then you need to change data retention settings. By default, MyController holds raw data only one minute. After that, it will be aggregated. image

I will give a REST API to export requested sensor variable history data in zipped CSV format.

dansmith65 commented 7 years ago

Thanks for taking this on @jkandasa; I really appreciate it!

I did find/adjust the data retention settings.

danielefrigo commented 5 years ago

@jkandasa did you have a chance to think about this export data API? different idea for more or less the same use case: is it possible to define a simple csv as an external server, i.e. simply append new data to a file?

jkandasa commented 5 years ago

@danielefrigo good idea. I will check the possibilities

jkandasa commented 4 years ago

I have added an export feature on 1.5.0 version