Tag Archive: signals

When you have a JNIOR with a Temperature sensor connected to it, you can have Tasker trigger a Task when the temperature reaches a certain degree. This post shows an example doing this.

You’ll start by going to the Tasker web page, and once there we can start by creating a new workspace and then going to the Task tab. Here we’ll create the task we want to execute when the temperature reaches a certain temperature. In this example, we’ll pulse relay 1 for 7 seconds. You can do this by clicking the ‘new task’ button to create and name a new task, and then clicking the ‘add action’ button. This will open the action dialog box. You’ll want to go to the Output Relay section and select Pulse Relay. You’ll then set the first field of the action you added to 1 for output 1 and the second field to 7 for 7 seconds. We did this in the example below, naming the Task ‘Pulse_Relay_1’

After creating a task, we’ll then go to the Signal Tab. Here we’ll click ‘add signal’ and name the new signal we are creating. Once its created we’ll want to select the Signal type as Temperature probe, or Environmental sensor depending on which one you are using. The JNIOR can handle up to two Temperature sensors connected at one time, so unless you have two Temperature sensors connected the channel for the Signal will be 1. If you have two connected, set the channel according to which temperature sensor is first in the Registry order. One way to check this is by going to the External section of the Input/Output tab of the JNIOR web page, and seeing which expansion module is at the top as that one should be channel 1 and the one below it should be channel 2. Lastly you’ll want to determine what measurement of temperature you wish to use, (or humidity if you are using the environmental sensor). Once these values are set, you’ll then want to move to the Trigger Tab. Here is an example of the signal we created below, naming it Temperature_Sensor.

In the Trigger Tab you’ll want to click ‘add trigger’, giving it a name and selecting it as a continuous signal for its trigger type. Once the trigger is created you’ll want to set the trigger to the temperature sensor signal we created previously, along with what temperature will activate the trigger. Lastly, you’ll set the Task Name to the Task that you want executed when the trigger activates. We created this trigger below, naming it Temp_Trigger. The Task we set for this trigger is the one we created earlier, “Pulse_Relay_1”.

After that, you’ll save the the workspace and then should have a task that executes when your temperature sensor reaches a certain degree or humidity!

The Control Panel is a very useful add-on to the JNIOR.  It gives you manual switches, visual indicators and an audio alarm.  Each of these features can be configured and used in Tasker.  Let’s check out how!

Before addressing how Tasker works with the Control Panel, you’ll want to make sure its connected properly. You can do so by using the extern command. When you are sure the Control Panel is correctly connected you’ll be able to integrate it with Tasker.

Here are the actions associated with the Control Panel.  Each one will be talked about in depth further down this post.

Control Panel actions for Tasks in Tasker

Using the Control Panel Switches as a Trigger

To enable the Control Panel Switches to be a Trigger that will be used to activate a Task is a very simple process. You only need to go to the trigger tab and add a trigger type set to the control panel switches.

Triggers have an automatic reset of 10 seconds after activating, but the reset can be made to activate based off other actions or different time intervals. Resets prevent the trigger from activating again until the reset condition has been met.

Using the Visual Indicators in a Task

The Visual Indicators on the Control Panel are the the 12 LEDs labeled L1 through L12.  The LEDs can be controlled by setting them to be OFF, ON, or to flash at different rates.  The LED will be on or flashing until it is turned off.

Set Control Panel LED Tasker example

Using the Audio Alarm in a Task

The Control Panel has a PC speaker on the back on the unit that can produce an audible alarm.  This is great for alerting people without the person needing to be looking at the Control Panel already.  Here is the setup when configuring the Alarm to be played.

The alarm plays with an oscillating sound.  You can select between slow, medium, fast, or custom.  Then a duration is needed in seconds followed by the volume on a scale of 0 – 100%.

Control Panel alarm Tasker example

If the custom option is selected then then additional options of the audio frequency to use and the duration of each beep are presented.

Control Panel alarm custom example

You can also elect to Silence and Alarm.  Maybe you have an alarm that plays for 60 seconds but can be silenced when someone responds to a given situation.  To do that we will use the Silence Alarm action.


Note: This functionality will require at least Tasker version 3.9

There are times when we want to log a temperature.  To do this we need to select a time interval between samples.  This interval can either be too short or too long.  Very rarely can we get the perfect interval.  A short interval leads to redundant data where the temperature doesn’t change often and several samples log the same temperature in a row.  A long interval can hide valid temperature changes.

So we ask ourselves, what do we really want?  The answer is usually that we want to know when the temperature changes.  Using the setup below, we can achieve the desired functionality. 


The following image shows how we can set up a Task with Variables and Logic to only Log when the temperature changes.  The global variables make sure the current temperature values that are used in the logic are used when making the log entry.

Tasker Logging workspace

This screenshot shows how to configure the Logger to use the global variables.

Loggers in Tasker

This screenshot shows configuring the schedule to call the Task with a short interval.  The logic within the Task is responsible for making sure the log entries only occur when there is a valid temperature change.

Scheduled Log Tasks in Tasker


Here is the result of a the functioning configuration over the past 15 minutes.  You’ll notice that the temperature changes, but it tends to bounce back and forth between two or three values.  We can handle that in another article!

Logged Temperature values

Signals and Triggers are very useful tools in the Tasker application. Signals are I/O values on either the JNIOR or a compatible expansion module with the JNIOR. Triggers are reactions to when a signal occurs. This post will explain all the parts of the Signal and Trigger tabs in detail.

The Signal Tab

To start, since signals in the Signal tab can be used in triggers we’ll start with Signals. Signals are I/O values on either the JNIOR or a compatible expansion module with the JNIOR. Each Signal values has what device the Signal is coming from, the channel number of the value, and then the type of value its getting. These can be used either in a Trigger or to set/evaluate the value of a variable defined in a task.

Tasker Signal Example

The Trigger Tab

The Trigger is a reaction to a Signal value. Triggers are made up of first, a Trigger value that watches a Signal to react to, along with what the Signal value needs to be to activate the Trigger. Second, is the Reset value that monitors a Signal like the Trigger value does. This is optional and a reset value is not required. If you don’t set a reset value for a Trigger, the Trigger value will always activate the Trigger. If you do add a Reset value, a Trigger that has activated won’t activate again until the reset value condition is met. Lastly, a task name is selected as the task to run when the Trigger value is met and the Trigger activates.

There are currently 5 types of events that can be added as a value for a trigger or reset. The first is a discrete signal, which consists of Input or Output changes going High or Low. The second is a continuous signal, which pertains to the temperature and 4-20ma/10volt values that are constantly being reported and updated. Discrete and continuous values use the signals created in the Signal Tab as the values available in a trigger. Third is the control panel switch signal, which as is name suggests is for when a switch on the control panel is pressed. Forth is the multi-switch control panel signal, which is that same as the normal control panel signal but is activated from two switches being pressed at the same time. Lastly, is the delayed Reset which activates a reset after a certain duration. As the name suggests, this is only available for the reset and can’t be used as a trigger signal. The control panel and delay reset values do not need to be made as signals in the Signal Tab to be used in a trigger, while the discrete and continuous signals do.

Tasker Trigger Example

These steps show show you how to properly create a Signal and Trigger.


The example below will show you how to make a Trigger activate when Relay output 1 on the JNIOR goes High.

We’ll create two Signals with the first ones values being: Device is the Relay Output states of a JNIOR, the channel 1, and the type being the state. The second ones values would be: Device is the Relay Output states of a JNIOR, the channel 2, and the type being the state.

Tasker Signal Reset

Afterwards you would begin configuring a Trigger. The Trigger values would be the Example Signal we created, and its trigger value will be high. For the Reset values, we’ll select the Example Signal Reset we created as the Reset value, and its reset value will be high as well. Lastly, we’ll pick whichever task we want to run during the Trigger activation as the Task value. In this example my task I created is Example Task. The final product of this example is a trigger that will activate when Relay Output 1 goes high. It won’t activate again though until Relay Output 2 goes high.

Tasker is able to perform many different things, one of which is the ability to log information. Tasker contains a Logger tab that can create Logger profiles to record data. These Loggers tell what needs logged and which file it should be stored in when used in a task. This post will show how to record temperature values from an environmental sensor using Tasker.

In order to setup Tasker to record temperatures from a environmental sensor, there are a few step we need to take:

  1. First we need to create Signals in the Signal Tab. These will be used in the Logger tab to record their values.
  2. Next we create a Logger in the Logger tab. Here we use the Signals to document their values in log files.
  3. After creating the Logger, we now go to the Task tab and create a task that includes the Logger that was just created.
  4. Finally, once the task is created, in the Schedule tab we create a Schedule that runs the task for however often we wish to record the environmental sensor values.

NOTE: In step 4 you can also use a Trigger, but this example will focus on using a Schedule.

Creating Signals

Signals are Input/Output values from the JNIOR or from expansion modules compatible with the JNIOR. In this example we are using a environmental sensor expansion module to record these values. First we’ll create a new workspace using the File Drop-Down. Then in the Signals tab, After clicking the “Add Signal” button, we’ll create a new signal called Temp_1. After the Signal is created, it has three value fields to fill out. The first one is the Signal drop down value, where you will pick where we are getting the Input/Output values from. As stated previously, we are grabbing these values from a environmental sensor, so we’ll select it from the drop down options. Next is the channel for the environmental sensor. Each channel represents a different environmental sensor. Since we are only using one sensor, we’ll select channel 1. Lastly is the variable type, and while the values you can get are either Celsius, Fahrenheit, or humidity, we are going to be logging the info in Fahrenheit, so that’s what we’ll chose.

Signal tab in Tasker

Creating a Logger

Now that the Signal is created, we can create a Logger to record those values to a file. We’ll go to the Logger tab and select “Add Logger”. The first value is the File Name, which is where you define what the name of the log will be when its created, and the file path on the JNIOR where it will be saved. In our example, we used the file path /flash/tasker/logging/temps-{{date(YYMMDD)}}.log. If you run this logger and go to the directory on the JNIOR where you saved this log, you’ll see the date(YYMMDD) will be replaced with the date the log was created. After this is the Headers field which create headers in the log right above where values will be added. We define a header in the example that will add Temperature to the top of the log. The next field is the Timestamp Format, which defines how the time is recorded next to the value being logged, leaving this blank will used the grayed out default (MM/dd/yy HH:mm:ss zzz).  After that is the Schema field, which lets you define what values should be logged when the logger activates, here we simply log the temperature from a Temp sensor connected to the JNIOR by entering {{temp[1].f}}. Lastly, is the file retention count. All this does is decide how many files of information Logger will create before overwriting previous files, so if the number is set to 10, once Logger has created 10 files of information, next file it create will overwrite the previous 1st Logger file. This example uses 30.

Here is the resulting log on the JNIOR created from the Logger.

Creating a Task

With the Logger being created, we now need a task that uses our Logger so it will activate and record the data we want. In the Task tab, we’ll select the button “Add Task”. Once the Task is named, click on its name and select “Add Action”. The Action Dialog box will appear which has all the actions a task can perform. Here we’ll select the Log Profile action, which we can use to call the Logger we created in the Task. Once the action is added, the only value to enter is the name of the Logger we just created. This will now make the Task activate the Logger each time its run.

Task tab in Tasker

Creating a Schedule

Lastly, having a task activate a Logger is good, but it will only record when you activate it. Adding the task to a schedule will allow us to record these values on a time interval. Going to the Schedule tab, you’ll click on the “Add Schedule” button. After naming the Schedule, there will be two options to fill out. The first one appears by selecting the “Add Rule” button, which will bring up the Rule Dialog box where you can configure when the schedule is timed. For this example we will set the Schedule type to schedule so we have more options rules to pick from. The start on date is  the date for whenever you want the schedule to begin activating the task you set with it. Next is the Start Time, Repeat Every, and End Time options (End Time appears after you edit Repeat Every). We set both the Start and End Time to Midnight so that the interval is always running. Repeat Every is set to 2.5 minutes so that with the Start and End time set, the task will run every 2.5 minutes for an entire day. For the Date Selection type, we used daily in this example so we can set the Recur Every option to 1. This will make the task run every day. Lastly, after completing the Rules for the schedule, we add a task that we want the schedule to activate based off the rules we set for it, which will be the task we created in the Tasks tab.

Scheduling Tasks in Tasker

Once the Schedule is completed, the Logger will now record the Signal values of the environmental sensor as values in a .csv file from a task that is scheduled to run every 2.5 minutes, every day.