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.