The Device Tiles widget allows you to statically associate different templates with different “devices”. The term “device” in this context refers to an instance of a “device type” (e.g., ESP8266 / Wifi, …). How does this work with “Dynamic Auth Token Provisioning”? How does the Device Tiles widget know which template to apply to which device without the static association? Is the template applied based on the device type?
No, when you add a tile you have a template code that will therefore be assigned on your code here https://github.com/blynkkk/blynk-library/blob/57ce1ecfd3527286dde4e5aebc74b0f5a3514c7f/examples/Blynk.Inject/Template_ESP8266/Settings.h#L10
Thank you, Idb.
FWIW … I was able to dynamically re-provision the board template ID (via a Text Input widget / virtual pin) associated with a device. After re-provisioning the ID, I had to delete and re-add the device. However, the re-added device was associated with the new template.
In theory, this will allow the same firmware to support multiple “device profiles”. For example, consider a board that can monitor temperature or pressure. By default, in first being added, the device is associated with a “temperature” template. You can re-provision the board template ID and the device is associated with a “pressure” template. This may not be the best example. And it’s unfortunate the device must be deleted and re-added (rather than simply reset). However, it eliminates the need to maintain different firmware versions corresponding to each of possibly many flavors of the same device.
Again, FWIW. No rocket science here.
I see where you’re coming from, however Blynk Provisioning is marketed as a commercial/business feature and IMHO I don’t see developers considering your example above on the “real world”
First, I don’t want to imply this has anything to do with “Blynk Provisioning” per se. At the moment, this is strictly a “wickedbeernut Provisioning” hack. I’m configuring the template ID through a virtual pin. This is completely transparent to and independent of Blynk Provisioning.
I think there’s a least one better solution and that’s the notion of “Virtual Devices” being discussed in the Creating multiple “Virtual Devices” on a single physical device topic. This feature has the potential to allow a single “physical device” to present itself as multiple “virtual devices” (e.g., one Device Tiles widget tile per virtual device). In theory, you could specify the template associated with each virtual device. And, equally important, you could control the number of virtual devices through provisioning. Again, not through “Blynk Provisioning”, but rather “set-up” specific to the application (maybe provisioning is the wrong word).
I’m not proposing a new Blynk feature at this time. I’m simply trying to develop a concept. I do appreciate your input.