Skip to main content
This guide reads momentary values from one standalone device. It assumes the device already exists; creating and provisioning device firmware is a separate task.

Before you start

Obtain:
The account must be able to communicate with the device, and the device’s provisioning rules must allow sensor readouts. An address alone does not grant access.

1. Load the client libraries

Create a development page served over HTTPS:
For a page on another origin, the Neuron must allow that origin. Set the API host before making requests:

2. Sign in

In the browser developer console:
The library keeps the JWT in browser session storage. Do not put the password or token in the page’s source.

3. Read momentary fields

Success means result.Fields contains one or more values, or the device returns a valid empty readout. Preserve each field’s timestamp, unit, type, and quality information.

If the read fails

  • Authentication error: confirm the Agent API login first.
  • Device unavailable: verify the JID, roster relationship, and device connection.
  • Forbidden or empty result: review provisioning for this account and field set.
  • Browser CORS error: host the page on the Neuron or allow its exact origin.
Next, learn the device model before addressing concentrator nodes, or see sensor data before requesting historical or subscribed values.