/Things/Concentrator/StartReadoutConcentratorNode (extension)
Starts a sensor data readout of a node on a concentrator in a network.
Use the following asynchronous method in the Javascript Library, to call this resource.
var Response = await AgentAPI.Things.Sensor.StartReadoutConcentratorNode(JID,Language,Momentary,Peak,Status,Computed,Identity,History,Fields,From,To,When,NodeId,SourceId[,Partition[,DeviceToken[,ServiceToken[,UserToken[,Id]]]]]);
Note: Two options exist on how to receive the readout. You either call the AgentAPI.Xmpp.PopMessages method to poll incoming messages, or you call the AgentAPI.Xmpp.RegisterEventHandler method to receive events in the client as soon as the response is returned. The latter requires the inclusion of the /Events.js javascript file on the page. See the RegisterEventHandler resource for more information.
Input Arguments
| Parameter | Description |
|---|---|
JID |
JID of the concentrator. If a Bare JID, the function will attempt to get the Full JID before performing the query. |
Language |
The ISO Language code to use when returning localized strings. |
Momentary |
If momentary values are to be read. |
Peak |
If peak values are to be read. |
Status |
If status values are to be read. |
Computed |
If computed values are to be read. |
Identity |
If identity values are to be read. |
History |
If historical values are to be read. |
Fields |
Optional array of field names to read. |
From |
Optional start timestamp from which to read. |
To |
Optional end timestamp to which to read. |
When |
Optional timestamp to start a scheduled readout. |
NodeId |
Node ID of the node on the concentrator. |
SourceId |
Source ID of the data source on the concentrator. |
Partition |
Optional partition of the data source in which the node identity is unique on the concentrator. |
DeviceToken |
Optional device token(s) (delimited by space characters), identifying the device(s) where a distributed transaction originated. |
ServiceToken |
Optional service token(s) (delimited by space characters), identifying the service(s) where a distributed transaction originated. |
UserToken |
Optional user token(s) (delimited by space characters), identifying the user(s) where a distributed transaction originated. |
Id |
Optional readout identity. Event notifications include this identifier to allow the client to match events with original requests. |
Note: To send an information query to a connected device, you need its Full JID. If you provide a Bare JID, the library call will attempt to get the Full JID for you. To avoid such call each time you need to make such a call, you can get the Full JID yourself, by calling await AgentAPI.Things.XmppHelper.GetFullJid(JID). To be able to get the Full JID, you need to have an approved presence subscription to the device’s Bare JID. To send a presence subscription call AgentAPI.Xmpp.SendPresenceSubscription.
Response
The response will contain the information the client has access to, about the node.