This section is NOT AN ACTION, and shows how to reference different kinds of data inside Tasks and Loggers created in Tasker. These values are used to represent I/O values and data from the JNIOR and it's expansion modules.

Note: when a conditional below uses a # in it, it represents whatever channel number you wish to grab that value from.

Internal I/O

din[#].state == 1

rout[#].state == 1

Temperature and Environmental I/O

temp[#].f >= 75 or temp[#].fahrenheit >= 75

temp[#].c >= 20 or temp[#].celsius >= 20

env[#].f >= 75 or env[#].fahrenheit >= 75

env[#].c >= 20 or env[#].celsius >= 20

env[#].humidity >= 80

Validate Days of the Week

date.isDay(montuewedthufri)

date.isDay(satsun)

Validate Time of Day

time.isBefore("HH:MM")

time.isAfter("HH:MM")

4-20ma I/O

iin[#].scaled == 1

iout[#].scaled == 1

10volt I/O

vin[#].scaled == 1

vout[#].scaled == 1


Examples

Setting a File Name

When setting the file name of a Logger, two things are being set simultaniously. Firstly, you are declaring where in the directory of the JNIOR you are saving the log file you wish to create. Which is why most of the directory in the example above being /flash/tasker/logging/. Secondly, you are then naming the file that will be created at the end of the directory address. In the example above, the last part of the directory is ExampleLog{{date("MMDDYY")}}.csv, because thats what we want the name and filetype of the log file to be.

Adding Dynamic Values To The File Name

Looking at the file name of the Logger above, you'll notice that it has {{date("MMDDYY")}} in it. This part of the file name adds the current date to the filename when it was logged. This can be extrememly useful since when a new day starts it will create a log with that days date. So instead of overwritting itself, You'll get a new log at the start of each day. Here is how the {{date("MMDDYY")}} value works. Starting with the {{}}, those curly braces are for defining values that will be logged, if they aren't being logged they don't need them. Next is the date() which is used to call a function that will grab the current date. It then uses the "MMDDYY" inside the date() function as parameters to define how the date should be formatted, which in this case is month, day, year. The "" around MMDDYY are to define those letters as a string, which is the required parameters for the date() function.

Adding Dynamic Values to the Schema

Now Looking at the schema of the Logger above, you'll see the values {{iout[1].scaled}},{{TEMP_SENSOR_FAR}},{{$$Variable1}}. Each value is a different way to log values and to explain what these values do, lets start with {{iout[1].scaled}}. As you can see at the top of this section shows a way to set a value for 4-20ma I/O, which is iout[#].scaled. Adding this value with {{}} around it to the schema of the logger will log the values of the 4-20ma output, replacing the # with either 1 for 4-20ma output 1 or 2 for 4-20ma output 2. The other value {{TEMP_SENSOR_FAR}} isn't listed at the top like {{iout[1].scaled}}. This is because it is a signal created in the Signal tab that can be used as a value for logging. Similarly, {{$$Variable1}} isn't listed either because it is set elsewhere like {{TEMP_SENSOR_FAR}}. {{$$Variable1}} is prefixed with two $$ because it is a global variable. Global variables are defined in the Task Tab by adding a Set Variable action to a Task and naming the variable with $$ in front of it. Whatever is defined in the Set Variable action for the global variable will be its value. It can be set to a value like iout[1].scaled or to a Signal like TEMP_SENSOR_FAR was. So since {{iout[1].scaled}},{{TEMP_SENSOR_FAR}}, and {{$$Variable1}} are in the schema, the value of the output # on a 4-20ma module, the Signal that TEMP_SENSOR_FAR is, and the value of the global variable $$Variable1 will be logged for this logger. Additionally, if you are logging through the Log Entry action in the Task Tab you can use these values as shown in the schema of a Logger to log the values as well.