Fork me on GitHub

iCasa GOGO commands

iCasa provides a set of functional gogo commands helping the manipulation of iCasa elements, such as devices, zones and persons.

Manipulating Devices

Create device

Creates a new simulated device.

Scope -> icasa

Name-> create-device

Parameters:

  • ${deviceId} The device Id of the new device.
  • ${deviceType} The device type of the new device.

Example:

> g! icasa:create-device iCASA.Thermometer therm-1

List of devices

Gets the list of devices in the iCasa execution platform, this command shows the devices identifiers, and their position.

Scope -> icasa

Name -> show-devices

Parameters -> NONE

Example:

> g! icasa:show-devices
Devices:
Device Id: Pres-B1255D-D - Position: (413:185)
Device Id: BiLi-C7496W-S - Position: (58:427)
Device Id: Pres-A1255D-D - Position: (504:374)
Device Id: Toogle-B1286X-Y - Position: (599:38)
Device Id: Toogle-D1286X-Y - Position: (219:349)
Device Id: Pres-D1255D-D - Position: (166:24)
Device Id: Pres-C1255D-D - Position: (240:399)
Device Id: BiLi-D7496W-S - Position: (202:59)
Device Id: Toogle-C1286X-Y - Position: (97:384)
Device Id: Toogle-A1286X-Y - Position: (509:451)
Device Id: BiLi-A7496W-S - Position: (492:440)
Device Id: BiLi-B7496W-S - Position: (505:270)

Activate device

Active a device.

Scope -> icasa

Name-> activate-device

Parameters->

  • ${deviceId} The device ID.

Example:

> g! icasa:activate-device Pres-B1255D-D

Deactive device

Deactive a device.

Scope -> icasa

Name-> deactivate-device

Parameters->

  • ${deviceId} The device ID.

Example:

> g! icasa:deactivate-device Pres-B1255D-D

List device properties

Shows the list of properties of a device.

Scope -> icasa

Name-> show-device

Parameters->

  • ${deviceId} The device ID.

Example:

> g! icasa:show-device Pres-B1255D-D
Properties: 
Property: presenceSensor.sensedPresence - Value: false
Property: state - Value: activated
Property: Location - Value: livingroom
Property: fault - Value: no

Simulate a fail in device

Simulate a fail in a device.

Scope -> icasa

Name-> fault-device

Parameters->

  • ${deviceId} the device ID.

Example:

> g! icasa:fault-device Pres-B1255D-D

Simulate a reparation in device

Repair a device.

Scope -> icasa

Name-> repair-device

Parameters->

  • ${deviceId} the device ID to repair.

Example:

> g! icasa:repair-device Pres-B1255D-D

Move device

Move a device into new X,Y coordinates

Scope -> icasa

Name-> move-device

Parameters-

  • ${deviceId} the device ID to move.
  • ${X} The new X-coordinate.
  • ${Y} The new Y-coordinate

Example:

> g! icasa:move-device Pres-B1255D-D 60 80

Move device into zone

Move a device into new X,Y coordinates

Scope -> icasa

Name-> move-device-zone

Parameters-

  • ${deviceId} the device ID to move.
  • ${zoneId} The new zone.

Example:

> g! icasa:move-device-zone Pres-B1255D-D kitchen

Set device property

Set a new device property

Scope -> icasa

Name-> set-device-property

Parameters-

  • ${deviceId} the device ID to modify.
  • ${property} The property name.
  • ${value} The property value.

Example:

> g! icasa:set-device-property Pres-B1255D-D newProp newValue

Remove a device

Remove a simulated device

Scope -> icasa

Name-> remove-device

Parameters-

  • ${deviceId} the device ID to remove.

Example:

> g! icasa:remove-device Pres-A1255D-D

Manipulating Zones

Create zone

Creates a new zone.

Scope -> icasa

Name-> create-zone

Parameters-

  • ${zoneId} the new zone ID.
  • ${leftX} The topX value.
  • ${topY} The topY value.
  • ${width} The width of the new zone.
  • ${height} The height of the new zone.

Example:

> g! icasa:create-zone kitchen  50 50 100 100

List zones

Show the existant zones.

Scope -> icasa

Name-> show-zones

Parameters-

  • NONE

Example:

> g! icasa:show-zones
Zones: 
Zone livingroom des Zone: livingroom X: 410 Y: 28 -- Width: 245 Height: 350 - Parent: Unset - Use parent: false
Zone kitchen des Zone: kitchen X: 410 Y: 370 -- Width: 245 Height: 210 - Parent: Unset - Use parent: false
Zone bathroom des Zone: bathroom X: 55 Y: 20 -- Width: 260 Height: 350 - Parent: Unset - Use parent: false
Zone bedroom des Zone: bedroom X: 55 Y: 370 -- Width: 259 Height: 210 - Parent: Unset - Use parent: false

Move zone

Move a zone to a new position

Scope -> icasa

Name-> move-zone

Parameters-

  • ${zoneId} the new zone ID.
  • ${leftX} The topX value.
  • ${topY} The topY value.

Example:

> g! icasa:move-zone livingroom 410 25

Resize zone

Resize a zone

Scope -> icasa

Name-> resize-zone

Parameters-

  • ${zoneId} the new zone ID.
  • ${width} The new width value.
  • ${height} The new height value.

Example:

> g! icasa:resize-zone livingroom 245 300

Add parent

Add a parent to a zone.

Scope -> icasa

Name-> set-zone-parent

Parameters-

  • ${zoneId} the child zone ID.
  • ${parentId} The parent zone ID.
  • ${useParentVariables} true if zone will use the parent variables, false if not.

Throws-> Exception when zone does not fit in the parent.

Example:

> g! icasa:set-zone-parent livingroom chair true

Add variable

Add a variable to a zone.

Scope -> icasa

Name-> add-zone-variable

Parameters-

  • ${zoneId} the zone ID.
  • ${variableName} The variable name.

Example:

> g! icasa:add-zone-variable livingroom comfortable

Modify variable

Modifies a variable in a given zone.

Scope -> icasa

Name-> modify-zone-variable

Parameters-

  • ${zoneId} the zone ID.
  • ${variableName} The variable name.
  • ${variableValue} The numeric value.

Example:

> g! icasa:modify-zone-variable livingroom comfortable 100

Attach a zone to a device

Attach a zone to a device .

Scope -> icasa

Name-> attach-zone-device

Parameters-

  • ${deviceId} the zone ID.
  • ${zoneId} The variable name.
  • ${attach} True to attach, false to deatach.

Example:

> g! icasa:attach-zone-device Pres-A1255D-D chair true
> g! icasa:attach-zone-device Pres-A1255D-D chair false

Show zone

Shows the information of a zone.

Scope -> icasa

Name-> show-zone

Parameters->

  • ${zoneId} The zone ID.

Example:

> g! icasa:show-zone livingroom
Variables: 
Variable: Volume - Value: 10.0
Variable: Illuminance - Value: 5.0
Variable: Temperature - Value: 295.15