Automate and Control Smart Devices with Telemetry2U’s IoT Platform

This example demonstrates how Telemetry2U’s IoT platform can automate smart device actions—like turning a power outlet on or off—based on sensor data. In this case, a Milesight WS52x Smart Wall Outlet is controlled based on soil moisture readings from a Dragino LSE01 sensor. This level of automation is possible using a wide range of LoRaWAN, NB-IoT, and LTE devices supported by the platform.

Automation: Controlling Smart Devices via Downlink Commands

Beyond sending alerts via Email, SMS, and voice calls, Telemetry2U enables you to automate smart device behaviour using downlink commands. In this example, we demonstrate how to control a Milesight WS52x Smart Wall Outlet using soil moisture data from a Dragino LSE01 sensor.

For instance, you could activate a 240V AC irrigation pump when soil moisture falls below a certain threshold, then deactivate it once sufficient moisture is restored. This illustrates just one automation use case enabled by the Telemetry2U IoT platform, which supports a wide range of LoRaWAN-compatible devices.

What You Need to Set Up Smart Device Automation

  1. A Telemetry2U account (14-day free trial or paid subscription). See the T2U Quick Guide to get started.
  2. A Milesight WS52x and a Dragino LSE01, already set up in your Telemetry2U account.
  3. Device connectivity via a private LoRaWAN gateway registered with Telemetry2U or a supported public LoRaWAN network like Helium or The Things Network (TTN).

Creating Automated Actions Triggered by Alerts

Telemetry2U enables you to trigger downlink commands in response to alert conditions by creating Actions. In this example, you’ll create two actions—one to turn the Milesight WS52x Smart Wall Outlet on, and one to turn it off.

First, log in to your Telemetry2U account and go to Admin >> Actions Maintenance. Click the Create New button in the top left corner. Give your action a suitable Description, then click Create.

On the next screen, use the dropdown menu to Add Node to Action and select the Milesight WS52x. Under the Command dropdown, choose Turn On Power. Leave the Parameter field blank. When complete, click Save.

Repeat the same steps to create a second action with the Turn Off Power command.

Creating Alerts to Trigger Automated Actions in Telemetry2U

In Telemetry2U, alerts can be configured to trigger notifications or automated actions. In this example, the Dragino LSE01 soil moisture sensor is used to turn a Milesight WS52x Smart Wall Outlet on when soil moisture drops below 15%, and off again when it rises above 25%.

From the top menu, go to Admin >> Alert Maintenance and click Create New. Enter a Description for your alert and click Save to open the configuration screen.

Add a Low Condition

Under Alert Conditions, select the Dragino LSE01 from the dropdown menu. Configure the condition to turn the outlet on when moisture drops too low:

  1. Input = Moisture
  2. Comparison = Less Than
  3. Threshold = 15
  4. Consecutive Readings = 1
  5. Minutes Between Alerts = 60
  6. Alert Action = Turn WS52x On
  7. Send on Recovery = Checked
  8. Recovery Action = (Leave blank)
  9. Active = Checked

Add a High Condition

Next, configure a second alert condition to turn the outlet off when moisture is sufficient. Add another condition with the following settings:

  1. Input = Moisture
  2. Comparison = Greater Than
  3. Threshold = 25
  4. Consecutive Readings = 1
  5. Minutes Between Alerts = 60
  6. Alert Action = Turn WS52x Off
  7. Send on Recovery = Checked
  8. Recovery Action = (Leave blank)
  9. Active = Checked

If you'd like to receive Email, SMS, or voice notifications, tick the desired notification groups at the top of the alert settings page. When complete, click Save at the bottom of the page.

Verifying Automation and Downlink Actions on Your Dashboard

Well done! You've successfully configured downlink actions triggered by alert conditions in Telemetry2U. To verify that everything is working correctly, create a dashboard that displays the WS52x Smart Socket power status alongside the Dragino LSE01 Soil Moisture readings.

When working as intended, the WS52x output will be OFF (Red) when soil moisture is above 25% and ON (Green) when the moisture drops below 15%.