Simulator Web Guide
The simulator module of iCasa platform provides a web interface for interaction with the server side (gateway). In the home page the user can select a simulation platform of the list. To access (locally) the home page in your browser go to this url : http://localhost:9000/simulator as from 1.2.6+ version (http://localhost:8080/simulator for earlier versions).
Once one platform selected, the simulator main interface is displayed. The main interface is divided in two sections: the map section presents the house plan, and the actions section shows information about the execution state of the iCasa platform and allows user to modify it.
1. Platform Operations
In this page the user can add a simulation platform, edit it or remove it. Platforms will persist in the GUI server and can be reused among different server executions. Each simulation platform has to define an unique ID, a name, the platform URL and a house map (png file). The platform list is presented as in the next image.
The user picks a platform to start the main interface of the simulator, shown in the next image. Users can also go directly to simulator main interface using the url pattern http://localhost:9000/simulator/map/$platformID, for example to access the default platform that have the id default the user have to go to http://localhost:9000/simulator/map/default
2. Map Section
Map section displays a house plan defined by the user, in this plan are localized the different objects of iCasa context as devices, persons and zones. In the map all of these objects can be moved using drag-and-drop operations. In addition, zones surfaces can be also modified graphically.
3. Actions Section
This section includes 4 Tabs: Devices, Zones, Persons, Script Player.
- Devices Tab
- Zones Tab
- Persons Tab
- Script Player Tab
3.1. Devices Tab
The device tab presents the list of devices existing in the iCasa platform. Each device is listed with its type and its name as show in the next image. Device details (as properties) are displayed when user clicks on device name. The device tab also presents the list of device types (superior ComboBox) deployed in the platform. When a new device type is added, the list is updated automatically.
3.1.1. Create Device
To create a device instance the user must select the device type in the type list and then click on Create button. If the device is correctly created, the device is added to the device list and also in the map section at the left of house plan. The user can modify the device position in the map section using drag-and-drop.
3.1.2. Remove Device
To remove a device instance, the user must select the device to be removed in the device list and the click in then Removed Selected Devices button.
3.2. Zones Tab
The zones tab presents the list of zones existing in the platform. Zone details (as variables) are displayed when user clicks on zone name. When the user selects a zone (using the letf checkbox) the zone is displayed with a color in the Map section.
3.2.1. Create Zone
To create a zone the user must provide a name and then click on Create button. If the zone is correctly created the device is added to the device list and in the map section. The user can modify the zone surface or position in the map section.
3.2.2. Remove Zone
To remove a zone the user must select the zone to be removed in the zone list and the click in then Removed Selected Zones button.
3.3. Persons Tab
The persons tab presents the list of persons "existing" in the platform.
3.3.1. Create Person
To create a person the user must provide a name, select a person type and then click on Create button. If the person is correctly created the person is added to the persons list and in the map section. The user can modify the person position in the map section.
3.3.2. Remove Person
To remove a person the user select the person to be removed in the persons list and the click in then Removed Selected Persons button.
3.4. Script Player Tab
This tab allows control of simulated clock, execution of scripts and state persistence.
3.4.1. Clock Manipulation
The clock section displays the (virtual) time in the simulator, and the time factor (time speed) is showed. The user can modified the time in the platform and accelerate time speed using a bigger factor.
3.4.2. Script Execution
To execute a script select it from the script list and click on Start button. To pause it, the user must click on the Pause button, and to resume it in the Resume button, finally to stop the script execution the user must click on Stop button. The script language is documented here
3.4.3. Saving State
This operation allows saving the current state of simulator, it creates a new script including instructions to create the current objects and to place them in the right zones. The user must provide a name to the script and the click on the button Save as.