Metadata

You can store multiple values for each device and read them from obniz.js and other sources.
Things like sensor read intervals and group numbers can be put into the metadata to switch control of each device in the same program.

Metadata can be configured in the device management from the per-device settings screen, and multiple strings can be stored depending on the key values.

The description is a special key that is also available in the device list as a device description.

In obniz.js, it can be read from the metadata property.

// Javascript Full Example

var obniz = new Obniz("OBNIZ_ID_HERE");
obniz.onconnect = async function () {
  console.log(obniz.metadata.description);

  if (obniz.metadata.mode === 'debug') {
    obniz.io0.output(true);
    console.log(`debug mode`);
  }
}