Open pcarranzav opened 7 years ago
(This is opened following from #25)
Any updates on this request? What is the current limitation on exposing the Device ID under RESIN_ env var ? Is it not stored as state on the image?
Hey @psilos - the problem is device ID is only generated after the device is provisioned on the resin API, and yet the application can run before that (in the case of preloaded apps), in which case we'd either have to cause an unwanted restart of the app once we provision and device ID is set, or ignore any changes to this variable. In both cases there's potential for things breaking. For what particular reason do you need the device ID? So that maybe we can find a workaround for you while we find a solution - most things can be accomplished using RESIN_DEVICE_UUID.
Current plan is to expose the ID as part of the response of a GET /v2/device supervisor API endpoint, as this solves the problem of preloaded apps not having a device ID and allows the user containers to access it.
Need to take into account that we can't block loading preloaded apps on this (when device ID will still be not defined).