Question about proper setup of mDash with Arduino

Good day.

I have a question about the proper setup of mDash within our product.

We are using Arduino on a M5Stack Core 2 microprocessor to control our recycling unit. We have installed the library correctly.

Our desired result is: whenever a recycled item’s barcode is scanned, return the barcode, device id and two custom labels (customer and location) timestamped. We would connect and pass this data into PowerBI to visualize for each customer.

In our code we are currently using:

mDashNotify (“query1”, “{%Q:,%g}”, “barcode”, scandata);

This is our current setup. No data is passing through. I believe we are missing some additional configurations.

Is mDashNotify the right command or should we use mDashStore? Are there elements needed in ACL?

Your help is greatly appreciated as we will be rolling this out to 1500+ units this year.

I don’t use the arduino version of the library, but looks like the C library functions are very much the same.

It sounds like you’re trying to mDash SQLite DB - I’m doing this successfully using this command:

          "{device_id: %Q, timestamp: %Q, %0.2f, min_free: %d, uptime: %.2lf }",
          mgos_sys_config_get_device(), the_time, mgos_get_min_free_heap_size(), mgos_uptime());

Have you touched device ACL?

I’d suggest trying the API and using that to understand the expected way to write to the mDash DB, it’s an easier way to test locally rather than flash/test on the device.

Agreed, you need to set up the ACL permissions to allow a device to read/write from the mDash database. ACL permissions can be set up interactively using the mDash console on a per-device basis.

Once you have things dialed in, you can update your default ACL settings so that they are applied to all new devices that are created.