Get Edge internal temperature from data field

I'd like to access the Edge temperature measurement from a data field. However the temperature is only available from the Sensor API and then only in the background as I read it.

Once in the background is there any way to get it other than through a temporal event every five minutes?

Does anyone have any sample code that would help?

I found an app for the Edge 130 in the store which can show the temperature but only updated every five minutes so I'm guessing this might not be possible.

  • In the 3.2.1 changelog (it's in the README file in the SDK), there is this:

    • Allow data fields access to read-only Sensor module APIs.

    So you might be able to access the info without using a background service, but it may only be on devices with 3.2 CIQ (none of the edge devices have 3.2 at this point).

    On edge devices, what you see in Sensors is the internal temperature for the device, not the ambient, so can be impacted by being in the sun, etc.  On watches, what's in Sensor is data from a Tempe if one is connected, otherwise, null.

    Edge devices don't support the Tempe sensor, so another option is do do your own ANT code for the tempe, but that means that for this to work, the user must have a tempe.

  • Aha thanks for pointing that out. Is there any documentation how to actually use that? Will I just be able to call Sensor.getInfo() from onUpdate? (The simulator knows the Edge 830 doesn't do SDK 3.2.1 so I couldn't try it, maybe on another device).

    I know the accuracy isn't great but at least the API should give the same information that is already available in an Edge standard data field.