Create Switch

evasmolders edited this page Dec 13, 2016 · 4 revisions
Clone this wiki locally
  1. Switch to the "Building Modeler" view in the designer.

  2. New switches can be created either during New Device creation wizard (see Figure 1) or by selecting an existing device from the left-hand side device menu and using 'Add Switch' button (see Figure 2).

New Slider in New Device Wizard Final

Figure 1: Add Switch in New Device Dialog

New Command Context Menu Final

Figure 2: First select existing device and then choose New Switch from context menu

Create Switch

Switches aggregate at most two commands - set switch to 'on' or 'off' stage - and a sensor to update the switch model to the device's current switch state. This model contains all the protocol level details of a functioning switch unit.

This switch model is exposed to the User Interface designer as a single, unchangeable unit. The visual aspects of the switch - colors, labels, images, etc. - can be modified in the User Interface Designer view.

New Switch Dialog - Building Modele

Figure 3: New Switch Dialog

Give your switch a descriptive name - user interface designer is going to use this name to associate the switch model to UI components.

Then select one of the existing sensors to associate with the switch. This sensor should be 'switch' type and return the device's boolean switch status (see Create Sensor) for additional details).

Finally associate your switch with two distinct commands, one for setting the 'on' state and another for setting the 'off' state of the switch.

See Also