owntracks / android

OwnTracks Android App
http://owntracks.org
Eclipse Public License 1.0
1.33k stars 473 forks source link

Extend metrics with smartphone others sensors #1605

Open brunseba opened 6 months ago

brunseba commented 6 months ago

Hello,

I'm currently testing our android client to cover circuit motorcycle metrology. It works well with a ThingsBoard server instance.

Regulation banned to collect metrics directly on motorcycle ECU, so i plan to use smartphone embedded sensors instead.

Do you think it's possible to add option on your android version to select more data from sensor like : temperature, gyroscope, ...

jpmens commented 6 months ago

Temperature etc sounds like a good idea as long as such sensors are generally available on devices. (On our iOS app we submit barometric pressure in p for instance.)

These could be added to extended data.

growse commented 6 months ago

@jpmens how do you want to do this? Shall I come up with a proposal for values of keys that data can go into (based on what it might be possible to get)?

jpmens commented 6 months ago

Gladly, though if you kick me in the direction of where the possible values are documented, I'll gladly take the task.

I'm going to assume the data will be quite different from what iOS has to offer, but when we have a list of items we can coordinate with @ckrey

growse commented 6 months ago

I'll have a read through https://developer.android.com/develop/sensors-and-location/sensors/sensors_overview

ckrey commented 6 months ago

I had a look at sensors a while ago. Reading Gyroscope/Accerelometer does not make sense when you take the measurements only once every few seconds or minutes. I used it in another project where we used Gyro/Accerlometer with a frequency of 50 times per second. I don't think something like that makes sense in OwnTracks. There is no thermometer in an iPhone/iPad

jpmens commented 6 months ago

The only data I'd be interested in from above list would be ambient air pressure, relative humidity, and temperature, but as it's the device's temperature it doesn't make much sense at all to me to collect the latter. (How hot is your pocket?!)

@brunseba since it was you who began this thread: which of the sensors from the documentation linked to above were you thinking of? And please consider we won't be publishing N x per second just to get a gyro or whatnot.

jpmens commented 6 months ago

@brunseba thoughts?