Multiple LAN Devices with One Edge Device Handler

Is it possible to “instantiate” more than one LAN device using the same device driver? I have followed the hello-world example, but once I search and find the device, it does not find another? Do I have to create another device driver?

Your driver can create additional devices using driver:try_create_device. You’ll need to figure out how/when to trigger the creation of additional devices and how to manage them.

@philh30 Thank you for your answer. I’m not sure I want for the device driver itself to create new devices. I would like for the user to be able to create multiple devices and utilize the same device driver. In the old IDE I could create a new device and just point it to whatever device driver I wanted. How is that done now? Maybe I have to create the device using the CLI?

Thanks,
Jose

Take a look at one of the community virtual device drivers like this one. They approach the issue by having a main control device that you can use to trigger the driver to create additional devices.

I don’t think there’s a method to create the device through the CLI. LAN device creation right now is really tailored towards discovering devices on your network. Manually creating them requires a bit of creativity.

1 Like