Creating random data on devices

How can I make the devices generate random data on its own?

Hello, @thadam.pm

You can generate random data using Google Sheets. To do this, follow the steps below.

Create a new analysis with the “Simulating devices with GoogleSheet” example

Now select the device you want to receive the random data and copy that device’s token

image

Go back to your analysis, and create a new environment variable using your device token

After that, go to your Google Drive and create a new spreadsheet.

Now, to populate your spreadsheet, place the variables in the first row and the data for that variable in the lower rows. For data to be random use the command “= RANDBETWEEN (low; high)”. In the image below, I used in all cells the command “= RANDBETWEEN (10; 30)”.

image

Click on the Share button and then click on “Advanced”

Now click on the “Change” option

image

Select the option highlighted in the image and save the setting

image

Now copy the spreadsheet link

image

Go back to the analysis on TagoIO and add a new environment variable with a “url” key and the value being the link you copied in the step above.

Your analysis is ready, you can set a time interval to run your analysis or click the “Run” / “Save and Run” button.

I hope this helps you and anyone else who wants to simulate random data for some device. To simulate for more devices, just create another analysis and follow the steps explained here.

Thanks!

1 Like

Thank You Kelvin. :+1:

And if you want to create more than 1? With independent values? Hundreds? Thousands?

You can use MIMIC MQTT Simulator, eg. in this 2-minute video of a vehicle fleet.

The temperature is random, whereas the GPS coordinates are deterministic, and the speed is
controllable. Eg. if you wanted to do reactive analytics, you could monitor speed, and if 0
for a while, call the repair truck. You could do predictive analytics to reduce breakdowns
by monitoring engine temperature and other telemetry and correlate to schedule maintenance.

1 Like