when to generate the deviceId and uuid of the device

Hello, sorry to bother you, I have two questions:

  1. when to generate the deviceId and uuid of the device?
  2. If there are many devices in different networks, how to make sure they are isolated?

Hi there,

The UUID is created automatically, and you don’t need to generate it by yourself. If you’d like to preregister the device, you can add a unique identifier for the device, as [described here] (Balena CLI Advanced Masterclass - Balena Documentation).
The device ID is autogenerated, and you can find it by listing your device.

Regarding your second question, what do you mean you need to keep your devices isolated? Could you please provide some extra context?

Thank you for answering this for me
Isolation between devices means that if I have many devices on different networks, not a local area network, if I ensure that they are isolated, that is, how the security of each device is guaranteed, because I don’t know how the devices are Discovery, and the principle of Balena communication

Balena doesn’t offer you a private network or cross-device discovery. So your application can communicate with the local network and the network directly. If two devices are in the same network, you know their IP and are running a container that exposes some port, then these two devices can talk to each other.
As long as you don’t expose any ports the device can’t be accessed (neither from other devices nor from people in this network)