Sensor Resources

This topic provides information about Sensor Resources and how to work with them.

Sensors gather data about some physical phenomenon (e.g., light, temperature, etc.) and convert that data into analog or digital signals. For example, the mangOH Red has a built-in light sensor that reports the current level of brightness.

Octave automatically creates Resources for the built-in sensors on Octave edge devices. You will configure these Resources in Octave any time you want to poll these sensors' data in Octave.

πŸ“˜

Note

If an asset pushes data to an Octave-enabled device, then it is not a sensor, but rather an input.

Configuring a Sensor

Follow the steps below to configure the Resource for a mangOH Red's on-board light sensor. Using these steps, you will enable the sensor and set its polling period which specifies the frequency at which the sensor reports data to the Data Hub:

  1. Navigate to Build > Device > Resources.
  2. Locate and expand redSensor/light.
  3. Ensure that the enable property is set to true.
  4. Click the edit button to the right of the period property.
  5. Set the value to 5 and click Set. This sets the resource polling period to 5 seconds.
  6. Click Apply when prompted.
  7. Wait for 5 seconds to elapse and check that the Value column for the Resource has updated.
  8. Place your finger over the light sensor which is located as shown here:
300
  1. Observe the Value for the sensor on the Build > Device > Resources screen. After the polling period has elapsed, the value should drop significantly due to the lack of light.

πŸ“˜

Note

You see this update on the Resources screen in the Octave Dashboard because the device is in Developer Mode.

In Developer Mode, the device periodically updates all of its last-known values for every Resource, regardless of whether they are set to be observed or not. Note that in Developer Mode, the Resources screen is updated approximately every 20 seconds and not in real time.