[Edge] device:set_field/get_field values viewable externally?

Most Groovy devices would use the “data” section (viewable on the IDE) to persist and track details about the device such as firmware version, last update, etc. A DTH could set a “data” element with updateDataValue() pretty easily and utilize it both for future run state, plus making that externally viewable via the IDE.

It looks like the replacement for this concept in Edge is the set_field() and get_field() methods, but I don’t see a mechanism to view the current field values either in the UI or the CLI. Is this by design? Any planned availability to expose these fields externally?

“data” was indispensable for debugging and on going maintenance of devices. I used it constantly.

1 Like

There are security implications to exposing them and they are private by design. I can’t find the thread for it, but this has come up before. If you want to make something public, you can create a custom capability and give it some attributes.

1 Like

Thanks for the info!

Creating a custom capability just to store some quick attributes for debugging sucks. Access to fields could be wrapped by the same security logcat and the rest of the CLI uses, no?

The concern is other drivers reading your info. For example, you may save something secret in a field like a password or token. If those are readable, other drivers could potentially get at that. Also, if you switch that device to another driver, those fields will also not be available for the same reason.