last_app Field Never Populated?

I’ve been using the spark cloud REST api in a project and I’ve noticed that in the responses that include last_app, its either set to null or the empty string.

Is this not a supported feature yet? Or am I doing something wrong on the firmware side?

The feature isn’t supported yet. In the future it will contain the name of the last firmware you flashed to the core.

Additionally, as per @Dave

there will also probably be a date, and maybe a version stamp, most likely enough info to identify the version, etc

Hey All,

The last_app field isn’t really used yet. We need a few changes to the build process / firmware so the firmware can self-report a version and app name. The hope is that will make it really easy to know which cores are running what version of what firmware. :slight_smile: At the moment this is lower on our radar, but hopefully be something we can get to in the next few months.

Thanks,
David

Thanks for the quick replies.

A versioned firmware name would be really awesome, as that’s something I’m building into my service layer. Oh well, I’ll just use a variable for now.

Any progress in getting this feature done. I have multiple photons in the field, and knowing the app and version would be hugely helpful.

Hi @sbclint,

Good question! We’ve since included the app_hash event and property, which tags your firmware with a unique hash. This was the missing piece preventing us from finishing this feature. You can watch for those events in your event stream, but I think this feature is still on our roadmap, but might not happen until later this year. Sorry about the delay!

Thanks,
David

1 Like

Hi @Dave, any progress on this? I’m working on an integration with SmartThings that allows me to discover the devices but I would like to be able to assign a different Device Type Handler depending on the name of the app installed on the device.
Thanks in advance!

Hi @juano2310,

Thanks for asking! Sadly we haven’t had a chance to prioritize work on this recently, but I’ll share your feedback with the team! You could certainly include the APP name as a published command or variable and control things that way if that helps!

Thanks,
David

Thanks a lot! Yes, that’s a good idea. I was trying to avoid hitting the API again for each device if I could avoid it :slight_smile:

1 Like

I noticed one problem when using a function to return the value. If the device is offline there is no response and it fails when trying to add something like an Electron that might not be online at the moment :frowning:

Hi @juano2310,

I’m not sure I understand, can you tell me more about what you’re seeing?

Thanks,
David

Hi David, my comment was in response to your recommendation of including the App name as a published command or variable. I created a variable called initialData but when I request it, during onboarding of the device, if the device is offline the request timeout since the value is stored on the device. But last_app value can be requested to the API even if the device is offline.
Thanks a lot for your time again!

1 Like

Hi @juano2310,

Thanks for the extra context, totally makes sense! I’ll pass that feedback along as well. :slight_smile:

Thanks,
David