think the environment variables should be loaded before the device is registered, so when the device is registered, it can be initialized according to the environment variable.