Automation Example Over LoRaWAN Network

This bulletin demonstrates how users can trigger downlink commands to automate the power output status of a Milesight WS52x Smart Wall Outlet based on the soil moisture measured with a Dragino LSE01, offering a level of automation that is possible with Telemetry2U's IoT platform and a variety of compatible LoRaWAN devices available in the market.

Summary

As well as triggering email, SMS, and voice notifications from alert conditions, users can also trigger downlink commands that can be sent to any LoRaWAN device effectively offering a level of automation. This bulletin will focus on automating the power output status of a Milesight WS52x Smart Wall Outlet based on the soil moisture measured with a Dragino LSE01. The purpose could be to turn on an 240V AC irrigation pump when the soil moisture level drop too low and then turn it off when the soil moisture reaches the desired level. This is just an example of an automation application made possible utilising Telemetry2U’s IoT platform, but there are countless others thanks to the vast array of LoRaWAN devices available on the market that are compatible with T2U.

Prerequisites

  1. A Telemetry2U account on a 14-day free trial or a paid subscription. Refer to the T2U Quick Guide to help get up and running.
  2. A Milesight WS52x and a Dragino LSE01 already configured and working on your T2U account.
  3. Within range of a private LoRaWAN gateway pointing to Telemetry2U or successfully integrated to a public LoRaWAN network such as Helium or TTN.

Creating Actions to be triggered by alerts

Telemetry2U can automatically trigger downlink commands from alert conditions to any sensor with what we call actions. In this example, you’ll need to create two actions, on to turn the Milesight WS523x on, and another to turn it off.

Firstly, log into your Telemetry2U account and use the top menu to navigate to Admin >> Actions Maintenance. Hit the Create New link in the top left corner. Give it a Description of your choice and hit the Create button. You’ll be taken to a new screen where you need to configure the action. Now you must use the drop-down box to Add Node to Action: Select the Milesight WS52x to add it to the list. From the Command dropdown box, select Turn On Power. You must leave the Parameter field blank. Click the Save button when compete.

Create actions on T2U

Create a second action using the same process described above to Turn Off Power.

Creating an Alert to Trigger the Action(s)

Alerts can be set to trigger either notification or actions on Telemetry2U. In the example the Dragino LSE01 Soil moisture/EC/temperature sensors will be used to turn the power on when the soil moisture level drops below 15% and back off when it gets above 25%.

Use the top menu to navigate to Admin >> Alert Maintenance. Hit the Create New link in the top left corner. Give the alert a Description of your choice and hit the Save button. You will be taken to a new screen where you can edit the details of the alert.

Under the Alert Conditions, select the Dragino LSE01 from the drop-down box to add it to the list. Firstly, we will set up the action for when the soil moisture drops to low (below 15%). Configure all the fields with the following settings.

  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 = BLANK
  9. Active = Checked

Now you’ll need to set up a condition to turn the WS52x off when the soil moisture gets above 25%. To do so, Under the Alert Conditions, again select the Dragino LSE01 from the drop-down box to add another one to the list. Configure it with the following.

  1. Input = Moisture
  2. Comparison = Less 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 = BLANK
  9. Active = Checked

If you would like to receive a notification when either action has been triggered, check which ever notification groups should be used in the Notification Group settings at the top of the page. When you have completed the changes, click the Save button at the bottom of the page.

Trigger an action from an alert on T2U

Confirmation the Automation/Action is working OK

Congratulations. You have now successfully completed configuring action to send downlink commands from alert conditions on Telemetry2U. To confirm it’s working, you can configure a dashboard on Telemetry2U so that you can see the WS52X power output status as well as the Dragino LSE01 Soil Moisture Sensor. You should be able to clearly see that when the soil moisture is above 25%, the power status will be off (Red) and if it’s below 15%, it should be on (Green).

Confirm automation is working on a T2U dashboard

Get Started with T2U Today!

Begin with a 14-day free trial before choosing from one of three 'all-inclusive' plans.

Purchase hardware from our online store and you'll enjoy a 60-day free-trial

T2U IoT Platform Free Trial