Variable Manipulator Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Similar documents
Experience Button Suite. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

RF11 R Smart Guard Remote 11 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Generic Lighting Dimmer Driver (IR) Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

SMTP Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Sainsmart imatic v2 Driver Installation and Usage Guide

Sainsmart NCS1 Driver Installation and Usage Guide

ControlByWeb X-320 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Big Ass Solutions Haiku Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Relay to Light Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Pushsafer Notification Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Pakedge Intelligent PDU Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

TP-Link LBXXX Driver. Installation and Usage Guide. Revision: 1.0 Date: Thursday, May 17, 2018 Authors: Alan Chow

Holiday Driver. Installation and Usage Guide. Revision: 1.0 Date: Wednesday, October 25, 2017 Authors: Alan Chow

Vivotek IP Camera Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, November 06, 2017 Authors: Alan Chow

Plex Media Server Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Generic Security System Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Microsoft Surface Hub Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, October 23, 2017 Authors: Alan Chow

Sky New Zealand Channels Driver. Installation and Usage Guide. Revision: 3.0 Date: Thursday, November 15, 2018 Authors: Alan Chow

Daikin SkyFi Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

TP-Link HS1XX Driver. Installation and Usage Guide. Revision: 1.0 Date: Tuesday, February 06, 2018 Authors: Alan Chow

Video Storm IRUSB Driver. Installation and Usage Guide. Revision: 1.1 Date: Tuesday, February 27, 2018 Authors: Alan Chow

Belkin WeMo Switch Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Plex Home Theater Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Orvibo WiWo S20 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Saturn Mini CT (SS9000/SS9007) Product and Driver Installation Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Gareth Sanders, Alan Chow

IFTTT Maker Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

12. Numbers. Java. Summer 2008 Instructor: Dr. Masoud Yaghini

Generic IR Thermostat driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow & Sam Edwards

CS110: PROGRAMMING LANGUAGE I

JAVASCRIPT BASICS. JavaScript Math Functions. The Math functions helps you to perform mathematical tasks

This is an example configuration for this hack with comments explaining how it works.

Logitech G-series Lua API V3.02. Overview and Reference Logitech

Downloaded from Chapter 2. Functions

Calculations, Formatting and Conversions

Chapter 5 Methods. Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved.

! Widely available. ! Widely used. ! Variety of automatic checks for mistakes in programs. ! Embraces full set of modern abstractions. Caveat.

Chapter 3 : Computer Science. Class XI ( As per CBSE Board) Data Handling. Visit : python.mykvs.in for regular updates

9 Using Equation Networks

Various useful classes

Kodi Lite Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

IFTTT Maker Driver. White Good Appliance Examples. Revision: 1.0 Date: Monday, November 07, 2016 Authors: Alan Chow

Operators. Java operators are classified into three categories:

To define methods, invoke methods, and pass arguments to a method ( ). To develop reusable code that is modular, easy-toread, easy-to-debug,

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Lecture 2: Intro to Java

Document Maker 1.0 User Guide

Chapter 4 Mathematical Functions, Characters, and Strings

CSI31 Lecture 5. Topics: 3.1 Numeric Data Types 3.2 Using the Math Library 3.3 Accumulating Results: Factorial

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University

Chapter 5 Methods / Functions

AP Computer Science. Return values, Math, and double. Copyright 2010 by Pearson Education

Week 2: Console I/O and Operators Arithmetic Operators. Integer Division. Arithmetic Operators. Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5.

Introduction to Computer Science Unit 2. Notes

AP Computer Science A. Return values

1.1 Your First Program! Naive ideal. Natural language instructions.

CS 1110, LAB 2: FUNCTIONS AND ASSIGNMENTS

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University

Goals for This Lecture:

IFTTT Maker Driver. Microsoft Cortana Examples. Revision: 1.0 Date: Thursday, February 22, 2018 Authors: Alan Chow

A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN

A Balanced Introduction to Computer Science, 3/E

Chapter 5 Methods. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

Chapter 5 Methods. Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved.

1.1 Your First Program

Lecture 6: While Loops and the Math Class

CHAPTER 3: CORE PROGRAMMING ELEMENTS

Programming Training. Main Points: - Python Statements - Problems with selections.

COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand

1.1 Your First Program

Chapter 5 Methods. Lecture notes for computer programming 1 Faculty of Engineering and Information Technology Prepared by: Iyad Albayouk

Outline. Data and Operations. Data Types. Integral Types

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University

FAQ No. 53. ihost: Logic Points. Roles and Privileges. Adding and removing logic points. Accessing and using the Logic Editor

VBScript: Math Functions

Lecture 2: Intro to Java

Introduction to Computer Science Unit 2. Notes

Grade 8 FSA Mathematics Practice Test Guide

Introduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1

1.1 Your First Program

Chapter 6 Methods. Dr. Hikmat Jaber

1.1 Your First Program

An Introduction to Python for KS4!

1.1 Your First Program

Dr Richard Greenaway

1.1 Your First Program

CS 102 Lab 3 Fall 2012

StreamOne Cloud Marketplace. Order and Management Guide

Computational Physics

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Building Java Programs

CSC 120 Computer Science for the Sciences. Week 1 Lecture 2. UofT St. George January 11, 2016

Expressions in JavaScript. Jerry Cain CS 106AJ October 2, 2017

Building Java Programs

CW High School. Advanced Math A. 1.1 I can make connections between the algebraic equation or description for a function, its name, and its graph.

Building Java Programs

FSA Geometry EOC Practice Test Guide

Advanced Object Concepts

Module 1: Types and Expressions

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent

Transcription:

Variable Manipulator Driver Installation and Usage Guide Revision: 1.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Contents Overview... 3 Usage Scenarios... 3 Features... 3 Change Log... 4 Driver Installation... 4 Adding the driver to your project... 5 Adding multiple variables to a string... 6 Performing mathematical equations... 7 Math Function and Operators... 8 math.abs... 8 math.acos, math.asin... 8 math.atan... 9 math.ceil, math.floor... 9 math.cos, math.sin, math.tan... 9 math.deg, math.rad... 10 math.exp, math.log... 10 math.min, math.max... 10 math.modf... 11 math.sqrt... 11 math.random,... 12 math.pi... 12 How to use variables... 13 Licencing... 14 Summary... 14 STEP 1 - Creating your project on drivercentral... 14 STEP 2 Purchase driver licence... 16 STEP 3 Install and activate the drivercentral cloud driver... 17 STEP 4 Install Chowmain driver... 18 Page 2

Overview The Chowmain Variable Manipulator driver for Control4 provides variable manipulation capabilities for use in Control4 programming. This can be used to add multiple variables to a string or to perform mathematical equations using variables. This makes Control4 programming more flexible. Usage Scenarios This driver can be used for several different scenarios. Some examples are as below but the limit is really your imagination. Showing text and 1 or more variables on the announcement agent (rather than just text or just the variable value). Adding multiple variables together or performing math on the variable. Formatting numbers into values that are more human friendly (eg percentages or fractions) for use in notifications, emails or announcements Features Add 1 or more variables into a string (can be any variable including string, numbers, Boolean or device). Perform pretty much any form of math you want including complicated formulas. o Page 3

Change Log Version #20140707-07-JUL-2014 Initial Release Driver Installation 1. The driver you have downloaded will be in a zip file. Double click on this file to open it in your preferred zip program (WinZip, WinRar, etc.). 2. Extract the c4i file to the My Documents\Control4\Drivers directory. If you are using Windows 7 or 8 this will be extracted to the Libraries\Documents\Control4\Drivers directory. 3. You are now ready to add and configure the driver via the Composer Pro software. Page 4

Adding the driver to your project IMPORTANT Before undertaking the installation of the driver please follow the licencing steps outlined at the end of this document. 1. Launch the Composer Pro application and connect to your project 2. In the System Design page select the Search tab on the right hand side. 3. Type in Variable Manipulator in the search field 4. Double click on the Variable Manipulator driver to add it to your project 5. Highlight the Variable Manipulator driver on the left hand side. 6. Congratulations you have setup the Variable Manipulator driver. Now you re ready to perform some programming. Page 5

Adding multiple variables to a string 1. Click on the Programming Tab 2. Select the event you want to get an email from. 3. Under Device Actions select the Variable Manipulator driver 4. Under the Variable Manipulator select radio button next to Device Specific Command 5. In the dropdown box select the Create String. 6. It will prompt you to type out the string you want. Note to add variables to the string you need to do so in the PARAM{XXX,YYY} format. For more information on this please see the section in this document labelled How to use Variables. 7. Drag and drop the green arrow onto the script section. 8. Congratulations you have combined variables into a string. To verify it has been done please see the driver properties or use the SNMP agent. Page 6

Performing mathematical equations 1. Click on the Programming Tab 2. Select the event you want to get an email from. 3. Under Device Actions select the Variable Manipulator driver 4. Under the Variable Manipulator select radio button next to Device Specific Command 5. In the dropdown box select the Calculate Equation. 6. It will prompt you to type out the equation you want. Note to add variables to the string you need to do so in the PARAM{XXX,YYY} format. For more information on this please see the section in this document labelled How to use Variables. For more information about math functions and operators please see the section labelled Math Function and Operators 7. Drag and drop the green arrow onto the script section. 8. Congratulations you have performed an equation. To verify it has been done please see the driver properties or use the SNMP agent. Page 7

Math Function and Operators Control4 offers basic Mathematic operations on variables in the programming tab. This is limited to setting a value, randomizing a value, incrementing or decrementing values and setting to the value of another variable. The Calculate Equation action in the driver allows you to type out your mathematical formula to manipulate the value of one or more variables that allow for more complex and useful math. This is useful for conversion of numbers, formatting of numbers and for various mathematical formulas you may require. The driver supports the usual arithmetic operators: the binary `+ (addition), `- (subtraction), `* (multiplication), `/ (division), and the unary `- (negation). All of them operate on real numbers. It also supports a more advanced math library which is detailed below. math.abs Return the absolute, or non-negative value, of a given value. > = math.abs(-100) 100 > = math.abs(25.67) 25.67 > = math.abs(0) 0 math.acos, math.asin Return the inverse cosine and sine in radians of the given value. > = math.acos(1) 0 > = math.acos(0) 1.5707963267949 > = math.asin(0) 0 > = math.asin(1) 1.5707963267949 Page 8

math.atan Return the inverse tangent in radians. We can do this by supplying y/x ourselves or we can pass y and x to math.atan to do this for us. > c, s = math.cos(0.8), math.sin(0.8) > = math.atan(s/c) 0.8 > = math.atan(s,c) 0.8 Using two arguments should usually be preferred, particularly when converting rectangular co-ordinates to polar coordinates. It will use the sign of both arguments to place the result into the correct quadrant, and also produces correct values when one of its arguments is 0 or very close to 0. > = math.atan(1, 0), math.atan(-1, 0), math.atan(0, 1), math.atan(0, -1) 1.5707963267949-1.5707963267949 0 3.1415926535898 math.ceil, math.floor Return the integer no greater than or no less than the given value (even for negatives). > = math.floor(0.5) 0 > = math.ceil(0.5) 1 > = math.floor(-0.5) -1 > = math.ceil(-0.5) -0 math.cos, math.sin, math.tan Return the cosine, sine and tangent value for a given value in radians. > = math.cos(math.pi / 4) 0.70710678118655 > = math.sin(0.123) 0.12269009002432 > = math.tan(5/4) 3.0095696738628 > = math.tan(.77) 0.96966832796149 Page 9

math.deg, math.rad Convert from radians to degrees and vice versa. > = math.deg(math.pi) 180 > = math.deg(math.pi / 2) 90 > = math.rad(180) 3.1415926535898 > = math.rad(1) 0.017453292519943 math.exp, math.log math.exp(myval) returns e (the base of natural logarithms) raised to the power myval. math.log() returns the inverse of this. math.exp(1) returns e. > = math.exp(0) 1 > = math.exp(1) 2.718281828459 > = math.exp(27) 532048240601.8 > = math.log(532048240601) 26.999999999998 > = math.log(3) 1.0986122886681 math.min, math.max Return the minimum or maximum value from a variable length list of arguments. > = math.min(1,2) 1 > = math.min(1.2, 7, 3) 1.2 > = math.min(1.2, -7, 3) -7 > = math.max(1.2, -7, 3) 3 > = math.max(1.2, 7, 3) 7 Page 10

math.modf Return the integral and fractional parts of the given number. > = math.modf(5) 5 0 > = math.modf(5.3) 5 0.3 > = math.modf(-5.3) -5-0.3 If you want the modulus (remainder), look for the modulo % operator instead.[2] math.sqrt Return the square root of a given number. Only non-negative arguments are allowed. > = math.sqrt(100) 10 > = math.sqrt(1234) 35.128336140501 > = math.sqrt(-7) -1.#IND Page 11

math.random, math.random() generates pseudo-random numbers uniformly distributed. Supplying argument alters its behaviour: math.random() with no arguments generates a real number between 0 and 1. math.random(upper) generates integer numbers between 1 and upper. math.random(lower, upper) generates integer numbers between lower and upper. > = math.random() 0.0012512588885159 > = math.random() 0.56358531449324 > = math.random(100) 20 > = math.random(100) 81 > = math.random(70,80) 76 > = math.random(70,80) 75 upper and lower must be integer. In other case Lua casts upper into an integer, sometimes giving math.floor(upper) and others math.ceil(upper), with unexpected results (the same for lower). math.pi This is a part of the constant Pi. > = math.pi 3.1415926535898 Page 12

How to use variables 1. In the programming tab create an action with the variable you want to get. 2. Right click and click on Copy 3. Open a text editor (notepad is available on all versions of windows) and paste the copied content. 4. Take note of the DeviceID and the owneriditem numbers (the above example is 100001 and 71) 5. Follow the steps in the section of the document labelled Sending an email. To use the parameter type in PARAM{x,y} where x is the DeviceID and Y is the owneriditem (variable id). EG. The current lighting level is PARAM{100001,71} percent. Page 13

Licencing Chowmain drivers require a valid licence to use the driver. Drivers can be purchased from our distributor drivercentral however all Chowmain drivers come with a 7 day trial. We recommend that prior to purchasing a driver that you test the driver out to ensure that it will work with your hardware and will meet your requirements. The licencing procedure is broken down into 4 steps. A summary of the steps are below along however we have also provided detailed steps if the summary is not sufficient. Summary 1. Create your project on the drivercentral.io website (This will generate a specific token which you will use in the next step) 2. Download, install and activate the drivercentral cloud driver in your project (Only once per project. Use the token generated in step 1) 3. (Optional) To try a driver, simply download it and install it in your project 4. To purchase a driver: a. On drivercentral, purchase a license and register it to your project b. If the driver is not already installed in your project, download it and install it c. If necessary, use the cloud driver s Action: Check Drivers to force licence download to the project. STEP 1 - Creating your project on drivercentral 1. Visit http://www.drivercentral.io 2. Log into your driver Central dealer account. 3. Visit the Project Portal 4. Click on Create Project Page 14

5. It will prompt you for a project name. Type in a meaningful name for your customer s project 6. Click on Create Project 7. Click on the project we just created to expand the project 8. Take note of the Project Token as this will be used in STEP 3 when we install the drivercentral cloud driver. Page 15

STEP 2 Purchase driver licence 1. Visit https://www.drivercentral.io/chowmain-ltd/ and find the product/driver you want to purchase a licence for. 2. Click on the Add to Cart button 3. Click on the Shopping Cart icon in the top right corner and click on View cart 4. Confirm that your order is correct and click on Proceed to checkout 5. Follow the prompts and click on Sib,ot,u Prder 6. This will take you to PayPal for payment. 7. Pay via PayPal. It will automatically return to the marketplace when confirmed. 8. You will now be at a page where you can see your purchased licence. Page 16

9. From here assign the licence to the project we created or if you did not follow that step create a new project STEP 3 Install and activate the drivercentral cloud driver NOTE: Only one instance of the drivercentral cloud driver installed per project. Do not install additional cloud drivers. 1. Visit http://www.drivercentral.io 2. Log into your driver Central dealer account. 3. Visit the Project Portal 4. Click on Download Cloud Driver 5. Copy the C4Z driver to My Documents\Control4\Drivers directory. 6. Add the driver to your project. Page 17

7. Click on the driver to view it s properties 8. Type in the project token we took note of in STEP 1. 9. Click on the Actions tab 10. Click on Check Drivers STEP 4 Install Chowmain driver 1. Install the Chowmain driver 2. You will notice that the Activation Status reflects a Licence Activated state. 3. Any driver that does not have a purchased licence will have a trial licence activated via the marketplace. Note that there is no way to reactivate the trial so please use wisely. 4. If you do not then press the Check Drivers action in the drivercentral Cloud driver again. Page 18