smagicld / xiaoxiangBMS

iOS app for Xiaoxang BMS
85 stars 9 forks source link

data logging #22

Open BreitiDE opened 5 years ago

BreitiDE commented 5 years ago

log data per second, ability to select what’s to be logged, ability to save and send logs, simple log structure with fixed length or csv

BreitiDE commented 5 years ago

save logs in icloud drive would be perfect

thanarious commented 5 years ago

I just spent a couple of hours searching for the logs; is this feature implemented, or not yet? Indeed, using iCloud Drive would be great, it would automatically work as a cloud BMS service!

victornorberg commented 5 years ago

+1 for logging

smagicld commented 5 years ago

Hi All

I need your feedback to the Logging feature:

  1. In BMS Settings you'll have the option to enable file logging. It will also be possible to define the filename. Default: logging_BMSalias.log

  2. New Records / measurements will be written every 0.5 sec.

  3. The file format will be like this:

    • per line one record (enden with new line character)
    • each line contains an JSON object with all known Field. This is better as CSV because the structure can be easy extended in future very easy and we have no formatting problems. JSON Object is also very simple to parse.

OR you say JSON is no go - you want to have CSV?????

  1. The written LOGs can downloaded over iTunes File Share.

  2. There will be no additional UI for analysing recorded data. Reason: Charts / analysis can be done much easier / faster on desktop.

What do you think?

thanarious commented 5 years ago

I believe you should ditch local storage and opt for iCloud (come on, you've added support for AppleWatch which is good, but using local storage?), since that way it will be online and we'll be able to parse it in real-time from another device. I personally don't care about the data format yet, since I believe getting to the data is much more important. Also, being able to adjust write interval would also be a good idea, maybe 0.5s is a bit too often for any real-time monitoring.

Thanx for all the work you do. Been seeing your app much more frequently lately around on the community!