CommandFusion IViewer Crestron Module User Guide v1.0.1
CommandFusion IViewer Crestron Module User Guide v1.0.1
iViewer Crestron Module
User Guide
Version: 1.0.1
Updated: 13th August 2008.
CommandFusion iViewer Crestron Module User Guide
Table of Contents
Introduction...........................................................................................................................................3
What is iViewer Crestron Module? ..............................................................................................3
Requirements........................................................................................................................................3
Sample Code...........................................................................................................................................4
iViewer Module Symbol....................................................................................................................4
Support.....................................................................................................................................................6
Glossary ...................................................................................................................................................6
v1.0.1 Page 2 of 6
CommandFusion iViewer Crestron Module User Guide
Introduction
This document has been created for system integrators to install and setup the
iViewer Crestron Module for using iViewer for iPhone/iPod Touch within a
Crestron system.
More information on the CommandFusion software products can be found at
www.commandfusion.com
What is iViewer Crestron Module?
CommandFusion iViewer Crestron Module is a software module for use within
Crestron automation systems programming environment. It is used to integrate
the CommandFusion iViewer iPhone/iPod Touch application into a Crestron
system, using Crestron’s SIMPL Windows programming software.
To develop a backend module for a system or software other than Crestron that
is not yet supported, please visit our website and download the Developers
Manual PDF.
Requirements
• iPhone or iPod Touch with CF iViewer installed (see iViewer User Guide).
• PC (or Mac) running Windows XP.
• Crestron SIMPL Windows software.
• Crestron 2‐series processor running firmware version 4.0 or later.
• WiFi network.
v1.0.1 Page 3 of 6
CommandFusion iViewer Crestron Module User Guide
Sample Code
We have created a sample Crestron program which is available from our
website’s downloads section – http://www.commandfusion.com/downloads
The sample program includes the iViewer Crestron module, with full source
code. Within the sample program there are 3 instances of the iViewer module,
which allows 3 devices to connect at once, on separate ports. Each device must
have its own iViewer Crestron Module instance and unique port number.
It is required Crestron programming practice that each TCP Server is started one
at a time otherwise the processor may perform erratically and become unstable.
To comply with this practice, the sample program uses a Stepper to enable each
iViewer module instance due to the fact that each iViewer module instance
contains it’s own TCP Server.
iViewer Module Symbol
The iViewer module symbol has the following properties:
Parameters:
• Password$ ‐ used to define a connection password that all devices must
use to connect to this module instance. To allow blank passwords, enter
‘na’ (without quotes).
• Port – The port number to allow connections on. The GUI file loaded into
the device must use this port number (and IP Address of the Crestron
processor) to connect. Only one connection is allowed per module
instance.
• ActivityTimeoutAmount – Number of seconds to wait before
disconnecting the device after no activity (digital/analog/serial) is
received. If the device is still open and running the iViewer software, it
will attempt to reconnect automatically. This prevents ports being locked
if for some reason a device disconnection is not noticed by the Crestron
system.
Digital Inputs:
• RequestVersion – Used to force the connected device running iViewer to
report its iViewer version number.
• SystemBar Toggle / Show / Hide – Used to toggle/show/hide the top
system bar of the iPhone/iPod Touch. Similar to how a TPMC‐8X system
bar operates. The system bar however is not customizable and will always
take on the generic look.
• DebugMode – Enabled this signal will cause the module to report various
debugging information to the Crestron Debugger and Text Console by way
of Print() commands.
v1.0.1 Page 4 of 6
CommandFusion iViewer Crestron Module User Guide
• EnableConnections – Used to allow connections to be made from devices
running the iViewer software.
• fb[1 – 9999] – Used to provide digital feedback to the connected device.
Expandable.
Digital Outputs:
• PortraitMode – Held high whilst the connected device is rotated to
portrait mode.
• LandscapeMode ‐ Held high whilst the connected device is rotated to
landscape mode.
• ReceivedData – Pulsed high for half a second each time data is received
from the connected device (such as button press, slider drag, etc).
• ActivityTimeOut – Pulsed high for half a second when the connected
device has not had any activity for the ‘ActivityTimeoutAmount’ period.
• EnableConnections_fb – Held high whilst device connections are enabled.
• press[1 ‐ 9999] – Driven high when a device action takes place, such as a
button press. Expandable.
Analog Inputs:
• an_fb[1 – 999] – Used to provide analog feedback to the connected device.
Non‐expandable due to SIMPL+ limitations.
Analog Outputs:
• CommandSocketStatus – Provides the status of the iViewer’s TCP Server
connection.
o 0d = Not Connected,
o 1d = Awaiting connection
o 2d = Connected
o 3d = Connection failed
o 4d = Connection broken remotely
o 5d = Connection broken locally
o 6d = Performing DNS lookup
o 7d = DNS lookup failed
o 8d = DNS name resolved
• ac_act[1 – 999] – Analog activity from a connected device, such as slider
value changed.
Serial Inputs:
• text_o[1 – 999] – Used to send text feedback to the connected device.
Expandable.
Serial Outputs:
• iViewerVersion – The version number of the iViewer software running on
the connected device. This is reported once upon each connection, and
any time the ‘RequestVersion’ input is driven high.
• text_i[1 – 999] – Text input from the connected device – such as an input
field submitted. Expandable.
v1.0.1 Page 5 of 6
CommandFusion iViewer Crestron Module User Guide
Support
For further support using CommandFusion iViewer Crestron Module, please
view the support documents available on our website or contact us using one of
the following options:
• Google Group ‐ http://groups.google.com/group/commandfusion
• Email ‐ http://www.commandfusion.com/support/contact
• Skype – username: jarrod_bell
• Phone ‐ +61 422 639 728
• Crestron True Blue Support.
Please note: Phone support is only available during Australian Eastern Standard
Time (AEST) business hours, 10am until 6pm, Monday to Friday. To see the
current AEST, please visit the Time & Date website:
http://www.timeanddate.com/worldclock/city.html?n=152
Please also note: We do not provide general SIMPL Windows or SIMPL+
support. Please contact Crestron directly for help with their software.
Glossary
SIMPL Windows – Crestron’s proprietary software for programming their
systems.
SIMPL+ ‐ Programming language used to create the iViewer Crestron Module.
guiDesigner – Windows software for creating custom Graphic User Interfaces.
Viewer – Software that renders the GUI generated by guiDesigner
iViewer – a Viewer for iPhone and iPod Touch
webViewer – a Viewer for web browsers, cross browser support.
Server – Hardware or software that Viewers connect to and communicate with.
An example of a Server is Crestron hardware, or the free MediaController
software available from our website.
Server Module – Software that runs on the specified Server hardware platform
allowing Viewers to connect and communicate with the Server. An example of a
Server Module is a SIMPL+ module for Crestron systems.
v1.0.1 Page 6 of 6