Running the Touch Keypad Application

You can start the Touch Keypad example application as a service and optionally enable it to automatically run on boot, or you can run it from the command line. Running from the command line is useful for doing interactive testing and debugging. Running as a service is useful for setting up working networks and demonstrations.

 

To start the Touch Keypad example application as a service and enable it to run on boot, enter the following command:

izot_enable keypad

To stop the Touch Keypad example application and disable it from running on boot, enter the following command:

izot_disable keypad

To start the Touch Keypad example application without changing its boot status, enter the following command:

izot_start keypad

To stop the Touch Keypad example application without changing its boot status, enter the following command:

izot_stop keypad

To display the status of all IzoT services, enter the following command.

izot_stat

To run the Touch Keypad example application from the command line, change to the Touch Keypad example directory at $IZOT/izot/examples/keypad and enter the following command at the Linux shell prompt:

The keypad.py script can be run with the command line:

supy keypad.py [-C] [-D] [-d DEVICE] [-h] [-I] [-i] [-l LOG] [-m] [-n NVD] [-p PROGRAM_ID] [-v] [-r RESET_TYPE]

The following table summarizes the command-line flags and options:

  
Flag / Option Description
-C Enables debugging with the PyCharm IDE.
-D Runs the Touch Keypad example applicaiton in debug mode. The log level is increased for both the console log and the application log.
-d DEVICE Sets the device URI, e.g. uc://10.0.1.12:1628. If not specified the default URI is used.
-h Displays the available flags and options.
-I Disables ISI. Without ISI, the application requires installation by a network management tool such as the IzoT Commissioning Tool.
-i Runs the Touch Keypad without any attached I/O hardware. This is useful for running the Touch Keypad on platforms that do not have the Touch Keypad I/O hardware.
-l LOG Sets the path and filename for log files. If not specified, the default path is the Touch Keypad example directory, and the filename is keypad.
-m Runs the Touch Keypad in demo mode. In demo mode, periodic ISI messaging is increased to speed up device and connection discovery. The result is that more bandwidth is consumed for ISI messaging provide faster discovery at the expense of less bandwidth for application data.
-n NVD Specifies the path for the non-volatile data directory. If not specified the default directory is keypad-nvd in the Environment Sensor example directory.
-p PROGRAM_ID Specifies a program ID for this running instance of the application. PROGRAM_ID is a 16-digit hex value described in the Standard Program ID. If not specified the default program ID for the Environment Sensor example application is 9F:FF:FF:05:00:70:00:01. Specify a different program ID if you have modified the IzoT interface for the example application and you need to load a different device class file for the modified application.
-r RESET_TYPE Clears persistant data. Set RESET_TYPE to 0 to clear all persistant data; set RESET_TYPE to 1 to clear all persistant data except for the device unique ID. RESET_TYPE 1 is useful to prevent a change in unique ID which will result in a new discovery of the device by the IzoT Server.
-v Runs the Touch Keypad example applicaiton in verbose mode. The log level is increased to the maximum level for both the console log and the application log.