LoRa Viewer
The LoRa Viewer tab is used to add, delete and view LoRa sensor data subscriptions.
Understanding Subscribed Sensors in the LoRa Viewer tab
The LoRa Viewer tab displays a list of the sensors added by a user or a LoRa Sensor Add action. The LoRa Viewer will also display the sensor subscription state as it transitions from one state to the next. In addition, the LoRa Viewer will display the sensor's published data as well as the expiration Date for the subscription. In this tab, you can also select to delete Sensor subscriptions or retry previously failed subscription attempts.
Subscribing to a LoRa sensors' data publishes
A LoRa sensor is a physical hardware sensor with a unique hardware ID represented by a MAC Address. A LoRa sensor can collect data of several different measurement types or units, where each measurement is represented by a different encoding known as container ID. The data collection can then be transmitted over different types of protocols (LoRa, Zigbee, other) represented by the sensor type.
To collect the data from a sensor, you must subscribe to the LoRa Service Provider using the unique identifiers indicated above. The LoRa Service Provider will receive the subscription request for the sensor and respond with a subscription ID. Any further publishes from that sensor will be forwarded by the LoRa Service Provider to deviceWISE by referencing the specific subscription ID in the HTTP POSTs. Furthermore, these subscriptions are managed with an expiration date by the LoRa Service Provider. Upon reaching the sensor subscription's expiration date, the subscription will no longer exists, hence, the LoRa Service Provider will no longer publish data for that sensor using this subscription ID.
To subscribe to a sensor's data publishes, you can click the "Add Sensor" button.
Enter the information for your sensor as described in the table below:
Parameter | Description |
---|---|
Sensor Name | Sensor Name is a unique identifier used when adding a sensor to the list of subscribed sensors. |
MAC Address | MAC Address is a unique hardware ID of the sensor publishing the data. |
Container ID | Container ID is a string encoding
indicating the type of sensor data
being published.
Possible Container ID accepted by the LoRa Service Provide are: 0x0402.0x0000.0.m2m - This
represents a temperature sensor. |
Sensor Type | Sensor Type used to subscribe to publishes. If Value not set to "Zigbee", it will be treated as "Other". This list may expand in the future. |
Upon adding the desired sensors, the sensor will be listed in the LoRa Viewer in the Subscribe State as demonstrated below. deviceWISE will send a request to the LoRa Service Provider to subscribe for data publishes from this sensor. Upon a successful response, the sensor subscription ID and Expiration Date are returned from the LoRa Service Provider and deviceWISE will transition the sensor subscription state from a Subscribe to a Subscribed state. In the event that the response from the LoRa Service Provider is unsuccessful, the sensor subscription state is transitioned to ERROR, while maintaining a "N/A" status for the other fields.
Removing LoRa sensors' data subscriptions
A LoRa sensor's subscription can be deleted if the user no longer desires to receive data publishes for that sensor.
To Delete a LoRa Sensor Subscription, you can select the row for the desired sensor and click on the "Remove Sensor".
This will transition the sensor subscription state from a Subscribed state to a Deleting state. A request is sent to the LoRa Service Provider requesting the deletion of the sensor subscription and upon a successful response, the sensor subscription is deleted and the sensor is removed from the list.
Retry Failed LoRa sensors' data subscriptions
In the event where there are LoRa sensor subscriptions in an erroneous state (ERROR), the user has the option to attempt another subscribe request to the LoRa Service Provider by clicking the Retry Failed Sensors button. This will transition the sensor subscription state to a SUBSCRIBE state and deviceWISE will process it the subscription as though it was a newly added sensor.
Also, the erroneous sensors will be retried upon a deviceWISE restart in the same manner as clicking the Retry Failed Sensors button.
Refresh LoRa sensors' Viewer
The data for a sensor can be stale at times and needs to be refreshed. The Refresh button can be used to refresh the LoRa Viewer panel with the new data that was received from sensor data publishes.
Sensor Subscription State
The state of a sensor's subscription to the LoRa Service Provider is described in the following state diagram and can be one of the following states [Subscribe, Subscribed, Expiring, Deleting, Error, or removed from the list]