Edge Keys in Zoho IOT Applications ensure uniqueness to resources and their corresponding data. They help to distinguish between resources that might have similar or duplicate names in the application. This feature is important in environments where multiple devices are managed through a single gateway.
Edge keys can be assigned to devices, assets, and locations. They act as an identifier for each instance in the payload sent by the gateway device.
To illustrate, consider a scenario involving a plastic object manufacturing unit which has the following setup:
5 machines for manufacturing
A single gateway for all 5 machines
Data required is Parts Produced
Command required is Machine ON/OFF
For this set up an asset model called Machine, with a datapoint template: Part Produced and a command templated: Machine ON/OFF is created in the application. The datapoint template has a parsing key called "parts_produced" and the command templated has a command key called "machine_status".
Now, five instances based on the Machine asset model with names Machine 1 to Machine 5 are created. All these assets will have the datapoint instance and command instance with the same parsing key and command key.
The command and datapoint JSON payload created by/for all the assets will be the as follows:
Now, if an edge key for each asset is assigned, the JSON payload will incorporate the edge key. This facilitates clear differentiation and accurate identification of data corresponding to each resource.
For this scenario by assigning the edge key name machine_1 to machine_5 for all assets respectively the following JSON messages are created.
The edge key assigned to each asset can be used while configuring the asset instances.
Assigning Edge Keys
Edge keys can be assigned while creating a new asset instance, or after an asset instance is created.
While creating an Asset or Location instance, the edge key can be provided in the Edge Name filed in the New device, asset, or location form. Once the Asset/Location instance is created, the edge key will be assigned to the particular instance. Note: For the location instance, you must toggle to Complete form to view the Edge Key field.
Learn more about assigning an edge key for already existing device, asset, or location instances.
See Also