Micro-app Release via API

#1

I’d like to use the Micro-app API to get the name and release of the running Micro-app. Are there any plans to add that feature?

#2

Every release of the micro-app is essentially a standalone build/app, so you can always do:

var APP_NAME = "Alert Button"
var APP_VERSION = 1

… and increment the APP_VERSION before each “Release to Production”.

That said, I guess a built-in API method for that would be more convenient. Luckily, our LTE Beacon engineers do read this forum too (;

#3

I just wonder why such feature is needed. Why this information is needed internally in the Micro-App?

#4

Thanks for the response. As the number of devices increase in a large deployment and devices potentially have different apps and versions this feature will become more useful. The name and versions can be out of sync so following the DRY principle would be useful.

#5

As the number of devices increase in a large deployment and devices potentially have different apps and versions this feature will become more useful.

We very much have this in mind when designing the whole LTE/IoT Cloud (: This is why we have the numbered releases, and are tracking which beacons are running which apps, etc. You can monitor all that on cloud.estimote.com.

We’re just wondering what’s the use case for having the micro-app also be able to know its version number, since like I mentioned above, you don’t really share code between versions, each release is a standalone build/app, so it wouldn’t make much sense to do, for example:

if (app.version === 1) {
    cloud.enqueue("event1");
} else {
    cloud.enqueue("event2");
}

… because the way things work right now, your micro-app version 1 can simply be:

cloud.enqueue("event1");

… and the following versions be:

cloud.enqueue("event2");

Just trying to understand your feature request better, its context/motivation, etc. (:

#6

The built in version numbering and naming is great. Your cloud app reports the version number and name that have been deployed to devices and there’s no reason for me to create app version number/name in my code because you guys have done that for me.

My beacon code enqueues events with details about the beacon - it’s publicId, battery level, version info and name. From my perspective, the app name and number are the same as the publicId. All three attributes are immutable values assigned by estimote that help me uniquely identify each of my beacons.

#7

Gotcha! When accessing your events via the https://cloud.estimote.com/v3/lte/device_events endpoint, you should see the ID and release number of the app that was running on the beacon which generated the event:

image

Does that maybe solve your problem? (;

#8

You don’t need to report publicID in events, it is already there along with enqueue time. Adding it again is just wasting memory.
App name is not immutable, it can changed at any time from Web IDE. That is why we have app identifier (called app_id) it is unique for each app and cannot be changed and it should be used to identify IoT application.
Other thing is that Micro-app is always paired with corresponding Cloud app and events are routed to proper app automatically. Basically in upper part you can see code that generates events, in lower part is code that consumes it.

#9

Thanks for both of the responses above. Not sure how I missed the publicId in the event.