Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Switch to the "Building Modeler" view in the designer.
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).
Figure 1: Add Switch in New Device Dialog
Figure 2: First select existing device and then choose New Switch from context menu
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.
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.