hub.modes.get
- Version: 1.0
- Classes: UI
- Title: House modes
- Description: Getting whole list of supported modes with configuration
				
				Edit
			
			No parameters required.
		
				
				Edit
			
			| Field | Type | Required | Description | 
|---|---|---|---|
| current | string | + | Id of the current mode | 
| switchTo | string | + | Id of the next mode (after switch to) or empty | 
| switchToDelay | integer | + | Delay (sec) before switch to the mod | 
| modes | JsonArray | + | Array of the houseModes entries | 
| modes._id | string | + | Id of the mode | 
| modes.name | string | + | Name of the mode | 
| modes.description | string | + | Brief description of the mode | 
| modes.switchToDelay | integer | + | Delay (sec) before switch to the mod | 
| modes.alarmDelay | integer | + | Delay (sec) before sending alert | 
| modes.notifications | JsonArray | + | Array of user IDs or null if need notify all user IDs | 
| modes.disarmedDefault | bool | + | Use default (not editable) disarmed list or custom | 
| modes.disarmedDevices | JsonArray | + | Array of disarmed device identifiers (current) | 
| modes.alarmsOffDevices | JsonArray | + | Array of alarmsOff device identifiers (current) | 
| modes.camerasOffDevices | JsonArray | + | Array of camera device identifiers that should be off in a current house mode | 
| modes.bypassDevices | JsonArray | + | Array of device identifiers, which do not trigger alarms and do not emit Ezlo Protect events | 
| modes.protect | bool | – | Enables or disables Ezlo Protect for a particular house mode. Default values: : , : , : , : . | 
| modes.armed | bool | – | Marks house modes with flag. Default values: : , : , : , : . Added since firmware 2.0.33. | 
| devices | JsonArray | + | Array of device id with security sensors | 
| alarms | JsonArray | + | Array of device id which make alarms after trips | 
| protectButtons | JsonArray | – | Array of protect button entries | 
| protectButtons.[].id | string | + | A panic button Device ID | 
| protectButtons.[].service | string | + | Name of a service the panic button is assigned with | 
| cameras | JsonArray | + | Array of camera device identifiers with items named make_recording | 
- Version: 2.0
- Classes: UI
- Title: House modes
- Description: Getting whole list of supported modes with configuration
				
				Edit
			
			No parameters required.
		
				
				Edit
			
			| Field | Type | Required | Description | 
|---|---|---|---|
| timeIsLeftToSwitch | integer | + | Time left (sec) after start to switch to the mode | 
| switchToDelay | integer | + | Delay (sec) before switch to the all modes | 
| alarmDelay | integer | + | Delay (sec) before sending alert to the all modes | 
| modes.switchToDelay | integer | – | Removed | 
| modes.alarmDelay | integer | – | Removed | 
				
				Edit
			
			
				
				Edit
			
			
				
					{
    "method": "hub.modes.get",
    "id": "_ID_",
    "params": {}
}				
			
            
				
				Edit
			
			
				
					{
    "error": null,
    "id": "_ID_",
    "result": {
        "current": "<modeId>",
        "switchTo": "",
        "timeIsLeftToSwitch": 0,
        "switchToDelay": 0,
        "alarmDelay": 0,        
        "modes": [
            {
                "_id": "<modeId>",
                "name": "Home",
                "description": "",
                "notifications": [
                ],
                "disarmedDefault": true,
                "disarmedDevices": [
                ],
                "alarmsOffDevices": [
                ],
                "camerasOffDevices": [
                ],
                "protect": false,
                "armed": false
            },
            {
                "_id": "<modeId>",
                "name": "Away",
                "description": "",
                "notifications": [
                ],
                "disarmedDefault": true,
                "disarmedDevices": [
                ],
                "alarmsOffDevices": [
                ],
                "camerasOffDevices": [
                ],
                "protect": true,
                "armed": true
            },
            {
                "_id": "<modeId>",
                "name": "Night",
                "description": "",
                "notifications": [
                ],
                "disarmedDefault": true,
                "disarmedDevices": [
                ],
                "alarmsOffDevices": [
                ],
                "camerasOffDevices": [
                ],
                "protect": true,
                "armed": true
            },
            {
                "_id": "<modeId>",
                "name": "Vacation",
                "description": "",
                "notifications": [
                ],
                "disarmedDefault": true,
                "disarmedDevices": [
                ],
                "alarmsOffDevices": [
                ],
                "camerasOffDevices": [
                ],
                "protect": true,
                "armed": true
            }
        ],
        "devices": [
        ],
        "alarms": [
        ],
        "cameras": [
        ],
        "protectButtons": [
            { "id": "<deviceId>", "service": "medical" }
        ]
    }
}				
			
             
                                    