Skip to content
john- edited this page Nov 12, 2012 · 2 revisions

Note: Information on this page is reverse engineered from insteon branch (Insteon Redux version). It is incomplete and may be inaccurate. Refer to the source code current state.

Design Diagram (Partial)

                          BaseInsteon.pm          BaseInsteon.pm
                         +------------------+   +-----------------+
                         |  BaseController  |   | DeviceController|
                         +------------------+   +-----------------+
                         |                  |   |                 |
                         |                  |   |                 |
                     +-->|                  |<--|                 |<--+   Controller.pm
                     |   |                  |   |                 |   |  +-----------------+
                     |   |                  |   |                 |   |  |  RemoteLinc     |
 BaseInsteon.pm      |   +------------------+   +-----------------+   |  +-----------------+
+-----------------+  |                                                |  |                 |
|InterfaceController |                                                +--|                 |
+-----------------+  |                                                |  |                 |
|                 |--+    BaseInsteon.pm         BaseInsteon.pm       |  +-----------------+
|                 |      +------------------+   +-----------------+   |                   
|                 |--+   |  BaseObject      |   | BaseDevice      |   |   Security.pm
|                 |  |   +------------------+   +-----------------+   |  +-----------------+
|                 |  |   |                  |   |                 |   |  | MotionSensor    |
+-----------------+  |   |                  |   |                 |   |  +-----------------+
                     +-->|                  |<--|                 |   +--|                 |
                         |                  |   |                 |   |  |                 |
                         |                  |   |                 |<--+  |                 |
                         +------------------+   |                 |      |                 |
                                                |                 |      +-----------------+
                                                +-----------------+
                                                             ^ 
                                                             |
                                                 Lighting.pm |
                                                +-----------------+
                                                |    BaseLight    |
                                                +-----------------+
                                                |                 |
                                                |                 |
                                                |                 |
                                                |                 |
                                                |                 |
                                                +-----------------+
                                                             ^
                                                             |
                                                 Lighting.pm |
                                                +-----------------+
                                                |  DimmableLight  |
                                                +-----------------+
                                                |                 |
                                                |                 |
                                                |                 |
                                                |                 |
                                                |                 |
                                                +-----------------+


 BaseInterface.pm                                   
+------------------+            +-----------------+
|  BaseInterface   |            | Singleton       |
+------------------+            +-----------------+
|                  |            |                 |
|                  |            |                 |
|                  |            |                 |
|                  |----------->|                 |
|                  |            |                 |
|                  |            |                 |
|                  |            |                 |
+------------------+            +-----------------+                    




                                 AllLinkDatabase.pm
                                +-----------------+
                                |    ALDB_i1      |
                                +-----------------+
                                |                 |
                                |                 |
                                |                 |
                          +-----|                 |
                          |     |                 |
                          |     |                 |
                          |     +-----------------+
                          |                         
 AllLinkDatabase.pm       |      AllLinkDatabase.pm
+------------------+      |     +-----------------+
|  AllLinkDatabase |      |     |    ALDB_i2      |
+------------------+      |     +-----------------+
|                  |      |     |                 |
|                  |      |     |                 |
|                  |      |     |                 |
|                  |<-----+-----|                 |
|                  |      |     |                 |
|                  |      |     |                 |
|                  |      |     +-----------------+
+------------------+      |                         
                          |      AllLinkDatabase.pm
                          |     +-----------------+
                          |     |    ALDB_PLM     |
                          |     +-----------------+
                          |     |                 |
                          |     |                 |
                          |     |                 |
                          +-----|                 |
                                |                 |
                                |                 |
                                +-----------------+

Mapping to User Interface

Note: This is rough guide only. See code for conditional logic which updates the UI based on device specific values.

Insteon_PLM:

UI                                  Action                                          Notes
complete linking as responder       $obj->complete_linking_as_responder             
initiate unlinking                  $obj->initiate_unlinking_as_controller
cancel linking                      $obj->cancel_linking
show link table to log              $obj->log_alllink_table
scan link table                     $obj->scan_link_table($self->log_alllink_table)
delete orphan links                 $obj->delete_orphan_links
AUDIT - delete orphan links         $obj->delete_orphan_links(1)
scan all device link tables         &Insteon::scan_all_linktables
sync all links                      &Insteon::sync_all_links(0)
AUDIT - sync all links              &Insteon::sync_all_links(1)


BaseController

UI                                  Action                                          Notes
initiate linking as controller      $obj->initiate_linking_as_controller("$group")
cancel linking                      $obj->interface()->cancel_linking
status                              $obj->request_status
get engine version                  $obje->get_engine_version
scan link table                     $obje->scan_link_table($self->log_alllink_table)
log links                           $obj->log_alllink_table()
sync links                          $obj->sync_links(0)
on                                  ($obj, 'on')
off                                 ($obj, 'off')


BaseDevice

UI                                  Action                                          Notes
<list of states>                    <take action with the state>                    
log links                           $obj->log_alllink_table()
status                              $obj->request_status
get engine version                  $obj->get_engine_version
update onlevel/ramprate             $obj->update_local_properties
scan link table                     $obj->scan_link_table($self->log_alllink_table)
link to interface                   $obj->link_to_interface
unlink with interface               $obj->unlink_to_interface
Clone this wiki locally