mDash logging

#1

Hi,

I’m looking to log some data from my devices and have come across the references to mDash data storage via device shadow.

Also saw this article from 2018

Q1. Can anyone suggest if more than 100 data points was ever implemented?

Q2. Can anyone point me to the docs on how to do the visualisation? I’ve not been able to find any.

Thanks

#2

It looks like the references you are linking here are obsolete, there are no direct links to them from the Mongoose OS docs.

You can use mgos_dash_notifyf to send the data you want to analyse to mDash. Later on, you can download the database and process it with your own application.

  unsigned long heap_free = mgos_get_free_heap_size();
  unsigned long heap_min_free = mgos_get_min_free_heap_size();
  /* later in the code */
    mgos_dash_notifyf("DB.Save",
                      "{timestamp:%lu,heap_free:%lu,heap_min_free:%lu}",
                      time(NULL), heap_free, heap_min_free);

Results:

timestamp	device_id	topic	message
2021-06-29 12:40:05	device33	data	{"timestamp":1624970405,"heap_free":42168,"heap_min_free":26456}
2021-06-29 12:39:05	device33	data	{"timestamp":1624970345,"heap_free":42168,"heap_min_free":26456}
2021-06-29 12:38:05	device33	data	{"timestamp":1624970285,"heap_free":42168,"heap_min_free":26456}
2021-06-29 12:37:05	device33	data	{"timestamp":1624970225,"heap_free":42168,"heap_min_free":26456}
2021-06-29 12:36:05	device33	data	{"timestamp":1624970165,"heap_free":42168,"heap_min_free":26456}
2021-06-29 12:35:05	device33	data	{"timestamp":1624970105,"heap_free":42168,"heap_min_free":26456}
2021-06-29 12:34:05	device33	data	{"timestamp":1624970045,"heap_free":42168,"heap_min_free":26456}

Ref

#3

Oh wow I didn’t even realise this was a thing! I’ve been using google for a while to search for mOS docs, now I realise that’s probably been the cause of some of my confusion in the past. Thanks @nliviu