Can I send some device attributes to console?

Hi There,

I have a few attributes on the IoT edge device, like device category, device service-tag ID etc. These attributes are embedded into the device hardware (or sometimes software). I want to send this device-specific attribute(or a tag) to AiKaan controller, so that I can use it for identifying or dynamic grouping. Can I do that ? If yes, how ?

Hi,
Yes you can . These attributes would show up as tags of a device . To add such attributes you need to add a file to …/opt/aikaan/bin/support/inventory/ . The file needs to have a prefix “mender-inventory-”. So for example the file can be “mender-inventory-myattr” . The file should be a shell script which returns value in the format

key1=value1
key2=value2

You can add as many as you want . So an example output could be

location=bangalore
serial=abcd1234

You could add complex shell script or any other programming language logic to compute this information ( like get it from i2c,dbus,http API etc) and ensure that the file returns the output in the format above .

1 Like