I need a way to set an identifier on the device before his first connection. Specifically, I generate a configuration with my Application server and I want to exploit device environment variable to set configuration. Issue is to identify the good device to set the correct configuration. My idea is to set a identifier (custom_id) during flashing process. Use API to identify the UUID according to my custom identifier and set correct environment variable via API.
I want to use device_name but if I understand device_name/
BALENA_DEVICE_NAME_AT_INIT is set by balena supervisor during the first communication with BalenaCloud API. Are there some solutions to force this value ?
In config.json, are there key that corresponding with my need ?
Other solution to configure my device is to generate my custom configuration file and add it on the host OS. Use docker volume to access the config file inside containers. This solution is less flexible and add an other flashing step.