controlAllDevices
Control all devices (set heat, cool, fan levels)
/devices/control
Usage and SDK Samples
curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"http://192.168.1.1/devices/control" \
-d '{
"Heat" : 56.373768,
"Fan" : 70.61401,
"Cool" : 23.021358
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
ClimateSetpointPercentage climateSetpointPercentage = ; // ClimateSetpointPercentage |
try {
apiInstance.controlAllDevices(climateSetpointPercentage);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#controlAllDevices");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final ClimateSetpointPercentage climateSetpointPercentage = new ClimateSetpointPercentage(); // ClimateSetpointPercentage |
try {
final result = await api_instance.controlAllDevices(climateSetpointPercentage);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->controlAllDevices: $e\n');
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
ClimateSetpointPercentage climateSetpointPercentage = ; // ClimateSetpointPercentage |
try {
apiInstance.controlAllDevices(climateSetpointPercentage);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#controlAllDevices");
e.printStackTrace();
}
}
}
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
ClimateSetpointPercentage *climateSetpointPercentage = ; //
// Control all devices (set heat, cool, fan levels)
[apiInstance controlAllDevicesWith:climateSetpointPercentage
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ClimateGatewayApi = require('climate_gateway_api');
// Create an instance of the API class
var api = new ClimateGatewayApi.DefaultApi()
var climateSetpointPercentage = ; // {ClimateSetpointPercentage}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.controlAllDevices(climateSetpointPercentage, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class controlAllDevicesExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new DefaultApi();
var climateSetpointPercentage = new ClimateSetpointPercentage(); // ClimateSetpointPercentage |
try {
// Control all devices (set heat, cool, fan levels)
apiInstance.controlAllDevices(climateSetpointPercentage);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.controlAllDevices: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$climateSetpointPercentage = ; // ClimateSetpointPercentage |
try {
$api_instance->controlAllDevices($climateSetpointPercentage);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->controlAllDevices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $climateSetpointPercentage = WWW::OPenAPIClient::Object::ClimateSetpointPercentage->new(); # ClimateSetpointPercentage |
eval {
$api_instance->controlAllDevices(climateSetpointPercentage => $climateSetpointPercentage);
};
if ($@) {
warn "Exception when calling DefaultApi->controlAllDevices: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
climateSetpointPercentage = # ClimateSetpointPercentage |
try:
# Control all devices (set heat, cool, fan levels)
api_instance.control_all_devices(climateSetpointPercentage)
except ApiException as e:
print("Exception when calling DefaultApi->controlAllDevices: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let climateSetpointPercentage = ; // ClimateSetpointPercentage
let mut context = DefaultApi::Context::default();
let result = client.controlAllDevices(climateSetpointPercentage, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| climateSetpointPercentage * |