CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


case-studies:barry-gordon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

case-studies:barry-gordon [2013/09/26 05:48]
aaron
case-studies:barry-gordon [2013/10/01 04:45] (current)
aaron
Line 5: Line 5:
  
 This material may not be reproduced or reused elsewhere without the express written permission of Barry Gordon. This material may not be reproduced or reused elsewhere without the express written permission of Barry Gordon.
 +
 +All information and GUI's in this case study are by Barry Gordon himself. These are put together to suit his unique requirements and are designed to reflect his personal tastes. All visual and back end system design are Barry'​s own and should be looked as an example, CommandFusion recommends you design a system that suits your own requirements and tastes.
 +
 +This case study is divided up into 3 pages:
 +  - System Overview - a detailed overview of the house, and what makes up the system.
 +  - [[.:​barry-gordon:​residential-ipad-system-page-2|Interface Display Pages]] - a detailed look at the iViewer 4 GUI
 +  - [[.:​barry-gordon:​residential-ipad-system-page-3|JavaScript Modules]] - info on the JavaScript modules that Barry uses to provide additional functionality to his system
  
 ===== The Operating Environment ===== ===== The Operating Environment =====
Line 27: Line 34:
 The view of the house from the street it resides on (a little old, landscaping has changed): The view of the house from the street it resides on (a little old, landscaping has changed):
  
-{{:wiki:draft:​barry_gordon_house_photo.png?​nolink|}}+{{:case-studies:barry-gordon:​barry_gordon_house_photo.png?​nolink|}}
  
 The floor plan (not to scale) for the house roughly aligned with the above picture: The floor plan (not to scale) for the house roughly aligned with the above picture:
  
-{{:wiki:draft:​barry_gordon_floor_plan.png?​nolink|}}+{{:case-studies:barry-gordon:​barry_gordon_floor_plan.png?​nolink|}}
  
 Each zone of the house, except the Lanai and the Utility zone, has a wall mounted iPad. The guest wing has two, one in the guest bedroom and one in the office. There are announcement speakers mounted in the ceilings of all the major rooms. Each zone of the house, except the Lanai and the Utility zone, has a wall mounted iPad. The guest wing has two, one in the guest bedroom and one in the office. There are announcement speakers mounted in the ceilings of all the major rooms.
Line 175: Line 182:
 This is the Javascript editor I use. It is not free but not very expensive either. It has color coding of Javascript types, Pretty printing, Syntax checking and much more. On the advice of others here I am going to look at WebStorm, but old habits die hard.  This is the Javascript editor I use. It is not free but not very expensive either. It has color coding of Javascript types, Pretty printing, Syntax checking and much more. On the advice of others here I am going to look at WebStorm, but old habits die hard. 
  
-===== Systems Operation Overview - Display Pages ===== +===== Next Page ===== 
-The system starts in CF.userMain of the Javascript module Main.js. CF.userMain sets some joins to their startup state, and sets up a watch on Preload Completion. While iViewer is loading the gui file, caching any images and  while the system is processing any configuration assets, the system puts up a "​Splash page with a spinning hourglass:​ +[[.:​barry-gordon:​residential-ipad-system-page-2|Go to Page 2 - Interface Display Pages]]
- +
-{{:​wiki:​draft:​barry_gordon_splash_screen.png?​nolink|}} +
- +
-Configuration assets include: +
-Interface definitions to external systems. +
-  * Mapping of IR driven components such as TV sets or STB's to iTach or GC-100 ​ connectors. +
-  * Loading and mapping of IR files to reference names and devices they apply to. +
-  * Display Information about all lighting and appliances controlled by Homeseer or the ISY994i.  +
- +
-iViewer will not cache and guiDesigner will not export into zip files any resource that is not explicitly referenced in the guiDesigner XML output, the "gui file". For that reason all configuration data is encoded into an object named "​CFG"​ in the module "​Configuration.js"​ which is referenced in the project script manager and therefore loaded. The CFG object contains sub objects with the configuration data for a logical entity e.g. a Rooms, Scenes, Interface connectivity,​ IR files, station (FM, Sirius) lists, and TV channel lists. +
- +
-At startup after the completion of preloading as signaled by the firing of the preloadCompletionEvent,​ the system contacts Homeseer and the ISY 994  requesting the current status of every device that they directly control (X10 based devices, the Security system, Insteon device, etc..). +
- +
-The configuration tables for all devices and systems (e.g. the pool system) are updated with the current state by recording: on/off state, brightness (0-255) ​ if applicable, and a text string if applicable (e.g. standby battery voltage). +
- +
-Homeseer will dynamically transmit status of devices under its control using a UDP broadcast message. ​[Note: the Homeseer status messages are sequence numbered and each message is sent N times (N=2)  with the same sequence number. This reasonably handles the fact that UDP is not a guaranteed delivery protocol but rather a best effort protocol]. +
- +
-For the ISY994i, a message is sent to turn on subscriptions which cause the ISY994i to send to the iPads any and all status changes for every device it is cognizant of. +
- +
-When a status message comes in the internal configuration tables are obviously updated. Most entries for a device configuration tables have a "​display"​ sub object.  +
- +
-The display object has several sub objects which are used to drive the information on pages to be updated. The updates to the page displays take place whether they are visible or not. The graphics or text being updated may be in lists and may appear on different pages with the same or different join numbers. The display sub objects are as follows: +
- +
-^Title:​|Sets the text for a title string. Sets the text for the display graphic which might be in a list.| +
-^Icon:|Sets an image to one of two images based upon on/off state| +
-^Opacity:​|Sets an images opacity between 1 and 0 based upon brightness| +
-^Slider:​|Sets the position of a designated slider based upon brightness| +
-^Text:|Sets a text string based upon the current brightness with optional prefix/​suffix| +
-^String:​|Similar to Text, but uses the string returned by feedback or an asynchronous input| +
- +
-//[Note: for Opacity there are normally two icons at the same position ​ on the page or in a listThe bottom icon is the "​Off"​ icon to be visible when brightness is 0.  The top icon is the "​On"​ icon whose opacity is changed based upon the current brightness. ​ At full brightness its opacity is set so it is opaque, at 0 brightness its opacity is set to be transparent. With the proper choice of Icons, this can be a very impressive display].//​ +
- +
-The remainder of the document will discuss the various pages that make up the iPad graphics. Some pages have multiple subpages and I will provide examples showing the page in various states. +
- +
-==== The Home Page ==== +
-{{:​wiki:​draft:​barry-gordon-home-page.png?​nolink|}} +
- +
-The Home page or Idle page is the first page transferred to when the system ​has finished its initial setup, or when a page has "timed out". Each page is timed when it is displayed. The timer is reset on any action to that page so it effectively determines the page's idle state. The Home page looks as follows: +
- +
-The weather display is updated every hour by an external system which is queried when this page is loaded to be displayed. Each of the black buttons will transfer to a page that displays the state of that function and has the necessary buttons for control. +
- +
-There are two buttons that do not operate that way; the button for the SqueezePad music system and the button for Movie Showtimes. These two buttons use a URL Schema to load either the SqueezePad app. or the IMDB app.   ​iViewer then will be in the background still running since it is run in multitask mode. Exiting those apps just require a single click to bring iViewer and the system back into view; or if the version of IOS is recent a 4 finger swipe will go back to the prior app in the active multitasking list. These buttons use a Brass coloration to differentiate them.  +
- +
-==== Local Weather Page ==== +
-{{:​wiki:​draft:​barry-gordon-weather-page.png?​nolink|}} +
-This is the weather detail page. The top portion of the page is the current weather as recorded at the stated time. The graphics all change based upon the weather conditions and the background changes from blue to gray at night (after sunset) and back to blue at sunrise. ​  +
- +
-The bottom portion of the page is a scrolling list that holds a week's forecast showing both day and night conditions. There are no controls on this page other than those on the right and left for changing the page being displayed. Obviously the ability to scroll the forecast list exists. +
- +
-==== Pool/​SPA ​Page ==== +
-{{:​wiki:​draft:​barry-gordon-pool-spa-page.png?​nolink|}} +
- +
-This page displays all of the status received from the Autelis control system that monitors and controls the pool and SPA.  The status is dynamically updated as things change. ​ The various on/off buttons will control the functions they are titled to. The SPA may be scheduled for turn on by adjusting the values in The "Set SPA Turn On" region. Homeseer is used to handle the scheduling of a SPA turn on event.  +
- +
-The Autelis control will maintain only a single IP connection at a time. The logic for sending it commands involves (1) connecting, (2) sending the command, (3) waiting for the feedback response and then (4) disconnecting. If a connection cannot be made (another iPad is connected) it is re-tried at 500 millisecond intervals until successful or a maximum retry count has been exceeded. If the maximum retry count is exceeded a dialog is place onto the screen to inform the user of the issue. **Note by CommandFusion:​** You could get around the issue of a single connection by using a [[software:​system-commander:​tcp-socket-multiplexing|CommandFusion LAN Bridge as a multiplexer]].  +
- +
-The Autelis Control will send UDP messages for each change of state for any of the pool devices. It sends each message twice as a sequence numbered UDP broadcast to all hosts on the network. +
- +
-==== HVAC Page ==== +
-{{:​wiki:​draft:​barry-gordon-hvac-page.png?​nolink|}} +
- +
-This page is similar in concept to the Pool/SPA page but handles the two zones of Air Conditioning in my home. The system uses Insteon thermostats and the associated control logic. ​ Each Thermostat talks to the ISY994. The use of the controls on the page should be obvious. The system updates dynamically whether the page is visible or not. +
- +
-Displaying the page merely displays the current values since the joins were updated as the components they represent changed and asynchronous (unsolicited) feedback was received.  +
- +
-==== Lighting Control ==== +
-{{:​wiki:​draft:​barry-gordon-lighting-control.png?​nolink|}} +
- +
-The lighting control page handles all lighting for the house. When flipped to, it will initially show the list for the room the iPad is in.  Lighting status is continuously updated whether this page is visible or not. The lower part of the list is normally not visible. It is made visible by touching the title of a light in the list. The list then rolls up to expose the slider. If the entry in the list has a percentage to the right of the bulb icon, then there is a slider associated with that light and the list may be rolled up to expose the slider. +
- +
-All lighting is controlled by the ISY 994, as are all Insteon devices. The ISY994 can handle 10 simultaneous clients (in my case a client is an iPad), and a relatively unlimited number of devices. Each iPad "​Subscribes"​ to the Insteon during startup, after requesting the ISY configuration and the status of all the devices under ISY994 control.  +
- +
-==== Non-Lighting Device Control ==== +
-{{:​wiki:​draft:​barry-gordon-non-lighting-device-control.png?​nolink|}} +
- +
-This page is very similar to the Lighting control page.  When this snapshot was taken the Cable box wall receptacle was powered and the Hot water circulator was operating. All other devices were off/closed.  +
-The cable STB in the kitchen is out of reach so to "​reboot it" was a pain in the butt.  It no longer is. +
- +
-The hot water circulator is a small pump to circulate hot water to every fixture in the house. The house is large so waiting for hot water to arrive at a shower can be a little annoying. The circulator only runs when the house is disarmed and between 7AM and 11PM. If  however you walk into a bathroom and turn on the lights, then the circulator immediately starts and runs for one hour.  +
-The devices under the control of the ISY994 include Thermostats,​ Lighting switches, Relays to control outlets etc. +
- +
-==== Caller ID and Call Status ==== +
-{{:​wiki:​draft:​barry-gordon-caller-id.png?​nolink|}} +
- +
-The above is the call status page showing calls received. The actual callerID page is  bright with a telephone as the background, using large type so it can be read from across the room. The Caller ID page shows who called, and the callers number. The CallerID page is displayed for 15 seconds and then the system reverts to the prior page, generally the black screen.  +
- +
-Homeseer handles the incoming call using a caller ID device which sends it the Caller ID information over a serial link. Homeseer looks up the phone number in a special list to see if it is a known number and if so changes the name displayed to a more readable piece of text. Homeseer announces the call over the house'​s announcement system (a ceiling speaker ​ in each major room) stating the phone number and the name. +
- +
-The caller ID message is also broadcast to the Theater control PC. That PC has a list of callers by number for which it will pause the theater ​ (Movie, TV show, whatever is playing) so that the call can be answered, and displays the incoming call on its control screen. When I am finished with the call in the Theater, I just touch the "​Play"​ button on the theater'​s remote system (Philips Pronto PRO 9800). +
- +
case-studies/barry-gordon.1380174522.txt.gz · Last modified: 2013/09/26 05:48 by aaron