Simple Node.js wrapper for the balena supervisor API.
Currently only implementing as much as we need :)
Feel free to contribute.
By default balena ...
- ... creates fantasy names for the devices
- ... uses the first 7 digits of the Balena-UUID as hostname
In our setup we want to have:
- Our OWN Unique Device-IDs
- Use our Device-IDs as hostnames, and as balena device names.
-
Create your own
hostnames.json
Example:{ '00112233445566778899aabbccddeeff': 'adas-device', 'ffeeddccbbaa99887766554433221100': 'bobs-device', '32-digit-uuid-pasted-from-balena': 'your-hostname', ... }
-
Login to balena
balena login
-
Run the script
node balena-update-names.js hostnames.json
Apache License 2.0