How to store telemetry data into a file


#1

Hello, everyone

I am new to beacons and Android programming. I try to get the telemetry data of my beacons. I followed the tutorial of estimote telemetry, there is one line:
Log.d(“TELEMETRY”, “beaconID: " + tlm.deviceId +
”, temperature: " + tlm.temperature + " °C");

I used it and can see my temperature data in the Logcat of Android Studio.

My question is how to generate a file for these data, and store it either in the device using app, or real-time transmit back to my estimote cloud in order to help the further analysis.

Thank you very much,

Jiannan


#2

Here is an article how to send telemetry data to Estimote Cloud and then query that data:
http://developer.estimote.com/sensors/estimote-telemetry/
Note: Telemetry data transmission in Estimote SDK is not real-time.
However you can use for example Firebase Real-time database and make an app that will send results there.
Saving files on Android:
https://developer.android.com/training/data-storage/files.html
https://developer.android.com/guide/topics/data/data-storage.html


#3

Thank you for your reply, @pober.

I think the first link can provide what I need. However, I think I can sent the data to Estimote Could, but still don’t understand how to query that data. I see the link has some code saying we can access to that data programmatically via Estimote Cloud RESTful API, but I am new to it and don’t know where I should type in these codes.

APP_ID=my-sensors-app APP_TOKEN=845b2f14a9fa54321ff8cf9b95a86054
BEACON_ID=046618f76a44404af14a546e7a37ac3b curl -u $APP_ID:$APP_TOKEN
https://cloud.estimote.com/v2/devices/$BEACON_ID/telemetry
| python -m json.tool

{
“data”: [
{
“ambient_light_level”: 3,
“date”: “2016-08-11T12:00:00.000Z”,
“temperature”: 13.1593427658081
},
{
“ambient_light_level”: 2000,
“date”: “2016-08-11T13:00:00.000Z”,
“temperature”: 23.6983528137207
},
(…)

Could you tell a little more about where and how to use the above code?

Thank you very much,

Jiannan


#4

That code is just an example that will give you general idea how telemetry data collection works, how returned data looks like and you can quickly use it to verify if your data is being collected. I would not use it for production, but rather write proper REST client in language of your choice.
To use that code you need to run it from Linux/MacOS command line (after setting your own AppID/AppToken). Make sure you have python and curl installed.


#5

hey I am working on something related to telemetry data I am using wireless sensor and wanted to make this sensor talk with beacons in such a way that readings of sensor will be display by remote through wireless communication
I am new comer to this process so need some suggestions which help me to implement this process


#6

How do you think that beacons will help you to display data? Maybe you want to use Estimote Mirror? It has WiFi built-in and is able to download data from internet. Your wireless sensor needs to upload data to Cloud and custom Mirror template can display it on TV screen. However you must somehow push data from this sensor to Cloud. Since this sensor is using some undisclosed long range radio technology and beacons are using Bluetooth Low Energy (which by design is short range) it is not possible to directly send data between them. You will need to build a gateway that will connect to that wireless sensor and then send data either to cloud or to display.


#7

Hi @Pober,

I am using Xamarin Estimote SDK version -1.1.0 for Android for C# development.

Installed from Nuget package manager : Install-Package Estimotes-Xamarin -Version 1.1.0

In this SDK I unable to read the telemetry information (beacon battery percentage), as i unable to connect to beacon.

Is their any binding library available in C# through which I can read telemetry information of beacon.

Any help.

Thanks,