Semtech, in its commitment to enhance user experience and streamline content, has successfully integrated the LoRa Developer Portal content into Semtech.com. As a result of this consolidation effort, the LoRa® Developer Portal will be discontinued on May 1st. After this date, you will be automatically redirected to Semtech.com.
For any technical support related to LoRa, please feel free to reach out to our experts here. If you have sales inquiries, please contact us here.
documentation

Advanced Features

In this section you learn about the features of the network server that you can use after joining your device.

Configure Measurements and View Device Metrics in the Dashboard

This section shows you how to build your own dashboard for each device directly in the Semtech Network Server.

You must have a device profile with a payload codec defined, and at least one device using that profile, to proceed.

Note

If you did not add your device’s device profile using the device profile template feature, and it is an off-the-shelf device, open Device Profiles in the menu on the left, choose the device profile, click the Select device-profile template button, and search for your device’s make, model, and firmware version. If found, the device profile will be updated and may include a codec.

If there is no codec for your device, or you built your own device, learn how to construct the encode downlink function on the ChirpStack documentation Device profiles page.

Register Device Measurements

  1. Log in to the Semtech Network Server website if you haven’t already done so.

  2. A dashboard is generated per device; the settings for the dashboard are defined per device profile. Click Device profiles in the menu on the left, and then click on the name of the device profile you want to create a dashboard for.

  3. If you haven’t already, join at least one device that uses this device profile to the network. Wait for each type of uplink supported by the device to be received by the network server as explained in Join the Network and View Events and LoRaWAN® Frames. If you aren’t sure how long to wait, perform the action that causes the device to trigger, and then wait for 24 hours.

    Note

    After the network server has received an uplink using the device profile codec, it sets the field keys in the device profile Measurements tab with every field decoded in the codec. If you do not wait for the network server to decode the uplinks and populate the field keys, you must enter the Measurements keys yourself after inspecting the codec.

  4. Click Device profiles in the menu on the left.

  5. Click on the Device profile for the device model and firmware version for which you want to view data.

  6. Click on the Measurements tab.

  7. You see a row for each field identified by the auto-detect feature displays, with three columns, as shown in Figure 3.

    /uploads/documents/images/NS0901-1001-measurements.png

    Figure 3: Key Name (A), Measurement Kind (B), and Measurement name (C), in the Measurements Tab of the Device Profile Page

    The left hand column, marked A in Figure 3, contains the measurement key name. This key name matches one of the fields returned by the decodeUplink(input) function in the device profile codec, which you can view by clicking on the Codec tab and scrolling down inside the Codec functions field to the decodeUplink(input) function. In this function, a data object has keys attached. The names of these keys are the same as the names of the keys in the list in the Measurements tab.

    At the next column, marked B in Figure 3, you set the measurement type. For each measurement key, you must inspect both the codec and the user guide for your device model and firmware version and set the dropdown to the measurement type in the following list that most closely matches the measurement.

    • Unknown / unset:

      This is the default for all keys. If you leave the measurement type set to this, you will not see any data for this measurement. Even if you aren’t sure which type to choose, you should try one of the other options if you want to view the data on the dashboard.

    • Counter:

      Choose the Counter option if this measurement is a number which increments, and never decreases. For example, Counter could be used for a device measurement that counts the number of times motion has been detected, returning 1 the first time it is triggered, 2 the next and so on.

    • Absolute:

      Choose the Absolute option if this measurement is a counter which is reset to zero when each uplink is broadcast.

    • Gauge:

      Choose the Gauge option if this measurement is a reading with a minimum and maximum level. For example, use Gauge for battery voltage, temperature, and humidity.

      /uploads/documents/images/NS0901-1002-gauge.png

      Figure 4: Example of Dashboard Widget Using Counter, Absolute, and Gauge Measurement Kind

    • String:

      Choose the String option if this measurement is returned from the codec as a string value or is an on/off boolean value. For example, a low battery warning that returns text such as ‘low battery’; a leak detector that returns a 1 or a 0 depending on whether a leak is detected or not.

      Figure 5 shows the dashboard widget that appears when the String option is selected.

      /uploads/documents/images/NS0901-1003-string.png

      Figure 5: Example of Two Dashboard Widgets Using the String Measurement Kind

    At the last column, Measurement Name, marked C in Figure 3, enter a label for the dashboard widget that displays the data for this measurement. You must enter a Measurement Name value for every measurement you wish to have visible on the dashboard.

  8. If there are any measurements you do not wish to appear on the dashboard, set the measurement kind to Unknown / unset.

  9. Click the Submit button to save the measurements.

View the Device Dashboard

  1. Click Applications in the menu on the left.

  2. Click on the link to the application containing the device you want to inspect.

  3. The devices registered to the application appear. Click on the link in the DevEUI field of the device you wish to inspect.

  4. Click on the Device metrics tab inside the open Dashboard tab, as shown in Figure 6.

    /uploads/documents/images/NS0901-device-dashboard-button.png

    Figure 6: Device metrics Button in the Device Page

  5. A widget appears for each measurement you configured.

Viewing LoRaWAN® Messages

This section explains the different ways you can view messages received from and sent to the network server, either per device or per gateway. These messages can be used for debugging purposes.

View Device Frames

The device LoRaWAN frames tab lets you view messages received by the network server from the selected device as well as all messages sent to the device by the network server.

  1. Log in to the Semtech Network Server website if you haven’t already done so.

  2. Click Applications in the menu on the left.

  3. Click the link to the application containing the device you want to inspect.

  4. The devices registered to the application appear. Click the link in the DevEUI field of the device you wish to inspect.

  5. Select the LoRaWAN frames tab.

  6. View the details of any frame by clicking the magnifying glass icon ( Plus icon inside blue lozenge ) in the frame to open the Details pane for that specific frame.

    Warning

    If the network server is unable to authenticate the device, the messages sent from the device will not be displayed in the device LoRaWAN frames tab. All messages, even those failing authentication, can be seen in the gateway frames described below in the section View Gateway Frames.

    If you do not find messages in the device LoRaWAN frames tab, check the gateway LoRaWAN frames tab to see if the messages are being received by the gateway. You can then determine whether the network server receives and then rejects messages from this device, or if the network server does not receive messages from this device.

/uploads/documents/images/NS0901-lorawan-frames.png

Figure 7: Timestamp (A), Label (B), DevAddr (C), DevEUI (D), and Gateway ID (E) Fields Indicated in the Frame in the LoRaWAN frames Tab

Each frame includes the following fields, indicated in Figure 7:

  • Timestamp (indicated at A in Figure 7) - this indicates when the frame was received or sent by the network server.

  • Label (at B) - the label indicates the type of frame. Labels include:

    • JoinRequest - Frame sent from the device to the network server to initiate the join process. Learn more about the Join Request frame.

    • JoinAccept - Frame sent from the network server to the device to confirm the join process is completed. Learn more about the Join Accept frame.

    • UnconfirmedDataUp - Frame sent from the device to the network server that do not require a response. Learn more about uplink frames.

    • ConfirmedDataUp - Frame sent from the device to the network server that requires a response from the network server. Learn more about uplink frames.

    • UnconfirmedDataDown - Frame sent to the device from the network server that do not require a response. Learn more about downlink frames.

    • ConfirmedDataDown - Frame sent to the device from the network server that requires a response from the device. Learn more about downlink frames.

    Note

    Data frames (ConfirmedDataUp, UnconfirmedDataUp, ConfirmedDataDown, UnconfirmedDataDown) may contain application data, MAC commands, or both. A message may also carry no application data nor MAC commands. Learn more about different types of data carried in data frames.

  • DevAddr (at C) - the device address allocated by the network server.

  • DevEUI (at D) - the device EUI, provisioned on the device.

  • Gateway ID (at E) - the ID of the gateway used to send this frame.

    Note

    Only frames sent from the network to a device (JoinAccept, ConfirmedDataDown, and UnconfirmedDataDown) have a Gateway ID. This is because frames sent from a device to the network server are sent using all gateways in the vicinity connected to this network server. Frames sent from the network server to the device are sent using the gateway the network server has identified as the most suitable gateway to broadcast from. The Gateway ID identifies this gateway.

View Gateway Frames

The gateway's LoRaWAN frames tab lets you view messages received by the gateway from any devices in the vicinity of the gateway as well as all messages sent to the gateway from the network server.

  1. Log in to the Semtech Network Server website if you haven’t already done so.

  2. Click Gateways in the menu on the left.

  3. Click the link in the Gateway ID field of the gateway you want to inspect.

  4. Select the LoRaWAN frames tab.

  5. View the details of any frame by clicking the magnifying glass icon ( Plus icon inside blue lozenge ) in the frame to open the Details pane for that specific frame.

Note

The gateway LoRaWAN frames tab may include messages from devices you do not own that reached this gateway.

Each frame includes the following fields:

  • Timestamp - this indicates when the frame was received or sent by the network server.

  • Label - the label indicates the type of frame. Labels include:

    • JoinRequest - Frame sent from the device to the network server to initiate the join process. Learn more about the Join Request frame.

    • JoinAccept - Frame sent from the network server to the device to confirm the join process is completed. Learn more about the Join Accept frame.

    • UnconfirmedDataUp - Frame sent from the device to the network server that do not require a response. Learn more about uplink frames.

    • ConfirmedDataUp - Frame sent from the device to the network server that requires a response from the network server. Learn more about uplink frames.

    • UnconfirmedDataDown - Frame sent to the device from the network server that do not require a response. Learn more about downlink frames.

    • ConfirmedDataDown - Frame sent to the device from the network server that requires a response from the device. Learn more about downlink frames.

  • DevEUI - after a device joins the network, the device EUI, provisioned on the device displays.

  • DevAddr - before a device joins the network, the device address allocated by the network server displays.

  • Gateway ID - the ID of this gateway. The Gateway ID is only shown with frames sent from the network server to the device (JoinAccept, ConfirmedDataDown and UnconfirmedDataDown).

Warning

Only frames sent via this gateway are listed in the gateway LoRaWAN frames tab. If you are searching for a device message, and you have multiple gateways, check each gateway in turn to find the message.

Create an Application Integration

This section shows you how to configure an HTTP application integration so you can view your device data outside the Semtech Network Server. You can also use the integrations feature to connect your devices to major cloud platforms including AWS, Azure, and Google Cloud, as well as IoT platforms such as ThingsBoard and IFTTT.

The free service Hookbin allows you to quickly create a POST endpoint for use with the HTTP integration. Other services are available such as RequestBin, or you can create your own service. We supply instructions for Hookbin, but you can choose to use an alternative service if you prefer.

Warning

Integrations are added at an application level, meaning all devices attached to that application will have their data forwarded to the integration. The payload received by the integration can be inspected to find the device that sent the message.

Create a REST Service

  1. Open Hookbin.

  2. Click the CREATE NEW ENDPOINT button.

  3. Copy the URL displayed under the title Your Hookbin Endpoint. We refer to this as the POST_ENDPOINT.

  4. Do not close the page. Rather, once the integration is set up, refresh the page to see the data here.

Activate the HTTP Integration

  1. Log in to the Semtech Network Server website if you haven’t already done so.

  2. Click Applications in the menu on the left.

  3. Click the link to the application you want to add the integration to.

  4. Click the Integrations tab shown in Figure 8.

    /uploads/documents/images/NS0901-integrations-tab.png

    Figure 8: Integrations Tab in the Application Page

  5. Click the "plus" button (+) inside the HTTP tile. You may need to scroll down to find this option.

    /uploads/documents/images/NS0901-integrations-http.png

    Figure 9: + Button Inside the HTTP Tile

  6. Fill out the Add HTTP integration form as follows:

    • Payload encoding:

      Select JSON from the list of options to have the details for all events forward to the integration.

      Note

      The ProtoBuf (binary) option can be selected if you have created an endpoint that can process Google Protocol Buffers. If you are using Hookbin as in our example, Protocol Buffers are not supported. The ChirpStack HTTP Integration documentation has examples of implementing Protocol Buffer support.

    • Event endpoint URL(s):

      Paste in the POST_ENDPOINT saved in the previous step.

  7. Click the Submit button to add the integration.

Test the HTTP Integration

  1. Click Applications in the menu on the left.

  2. Click the link to the application you are adding the integration to.

  3. Click the link in the DevEUI field to a device you want to use for testing. A good choice is one with a button that sends a status, or a device that you can easily trigger such as a door or motion sensor. If you don’t have a device you can easily trigger an uplink on, you can wait for a regular uplink to be sent.

  4. Select the Events tab.

  5. Make sure your gateway and device are both turned on, and then perform an action to trigger an uplink or wait for the next scheduled uplink.

  6. Wait until you see an event appear in the Events tab. The device has now sent at least one message since you configured the integration, and your REST endpoint should also have received data.

  7. Reload the Hookbin page in your browser to view the data in Hookbin. If you accidentally closed the Hookbin page, you can open the POST_ENDPOINT in your browser to view the data.

    Note

    The format of the data attached to each event matches the format of the data that appears in the Details pane of events in the Events tab of the device page. Read the ChirpStack documentation Event types page to view all event types that can be sent to the integration and view examples of the JSON data structure the integration will receive.

  8. Now that you have tested the HTTP integration, turn it off by visiting Applications, choosing your application, opening the Integrations tab, and clicking on the "delete" icon ( Delete icon ) in the HTTP tile.

Read the ChirpStack documentation Integrations section to learn about other integration types.

Add Additional Users

Semtech Network Server allows you to add multiple team members with different user rights.

  1. Log in to the Semtech Network Server website if you haven’t already done so.

  2. Click Users in the menu on the left.

  3. Click the Add tenant user button to add another user.

  4. Complete the Add tenant user form as follows:

    • Email (of existing user):

      Enter the email address of an existing Semech Network Server user to add to this tenant.

    • User is tenant admin:

      Switch this on to allow the user to perform all tasks, including managing applications, device profiles, devices, gateways, and users. Tenant admin is a super user, so all additional options disappear if selected.

    • User is gateway admin:

      Switch this on to allow the user to create, edit, and delete gateways in this tenant.

    • User is device admin:

      Switch this on to allow the user to create, edit, and delete devices, device profiles, and applications.

    Note

    If you do not turn any switches on, the user can see all data, but will not be permitted to make modifications.

  5. Click the Submit button to add the new user.

When this user signs in, their own tenant is selected. They must select your tenant from the dropdown at the side of the left menu after signing into the network server, as shown in Figure 10.

/uploads/documents/images/NS0901-change-tenant.png

Figure 10: Change Tenant in Left Menu