io[group] assignment
io.groupName = object / io["Group Name"] = object
Assigning an object to an io group records all of its values in the datalogger.
Assignment into io is how measurements enter the datalogger. The value
should be an object of named numeric measurements. Updates are pushed on the
next run() call, or immediately after syncIO().
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| group | string | yes | — | Name of a predefined io group (physical channels or a group dedicated to script variables). |
| object | object | yes | — | Named numeric values to record, e.g. { watts: 3000, voltage: 480 }. |
Example
To log local variables you need to add them to one of the predefined io groups.
This could be an existing group with physical channel values or a group dedicated to your own logging variables.
To add custom measurements / variables to a predefined group named 'io' use the following Syntax
io.totalPower = {watts: 3000, voltage: 480, current: 48};