Skip to main content
All CollectionsDeveloper Guides
Events: Downlink messages with Helium and Ubidots
Events: Downlink messages with Helium and Ubidots

Learn how to send messages from the Ubidots platform to a Helium-connected device.

Santiago Pachon Robayo avatar
Written by Santiago Pachon Robayo
Updated over 3 months ago

Downlink messages enable remote management and configuration of devices. Examples of this are end devices that make use of Helium as a network server and the LoRaWAN communication protocol.

In order to forward messages from the cloud to end devices, Helium provides an API endpoint that can be activated by an HTTP POST request. By following this guide, you will be able to send messages from the Ubidots platform to a Helium-connected device using the events module and a Heliums downlink.

Requirements

  • An Ubidots account

  • A Helium account

  • Helium Gateway & Devices already transmitting data to Helium and Ubidots (see Plugins: Connect Helium to Ubidots)

  • A Control variable within your device in Ubidots to trigger the downlink event.

Setup a downlink event in Ubidots to Helium

The instructions below show how to use Ubidots to generate an event that sends a downlink message to the Helium backend, allowing you to control devices from the Ubidots UI.

Step 1: Open the events module located under the Data dropdown.
Step 2: Create a new event and set up the condition to be triggered based on the control variable values.
Step 3: Next, in the Actions section, create a "WebHook" action.

webhook.png

Step 4: Set the webhook as follows:

image
  1. Method = POST

  2. The URL you need to take it from the Helium integration itself. For example:

webhook3.png

Note that you will need to replace the "{:optional_device_id}" with the specific device ID that you want to target. Ideally, if the event is triggered by the same device you want to target at Helium, then instead of "{:optional_device_id}" you should put the Device label bookmark from the event as follows.

webhook4.png

3. In the body section, you need to enter a payload as follows:

{ "payload_raw": "SGVsbG8sIHdvcmxkIQ==", "port": 1, "confirmed": false }

Notice that you have to enter the port and payload_raw, based on your devices.
IMPORTANT NOTE: payload_raw value is in base64 format. For additional reference on the downlink JSON schema, refer here.

Did this answer your question?