use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.
the class BinRpcClient method getAllValues.
/**
* {@inheritDoc}
*/
@Override
public Object[] getAllValues(HmInterface hmInterface) throws HomematicClientException {
BinRpcRequest request = new BinRpcRequest("getAllValues");
request.addArg(Boolean.TRUE);
return (Object[]) sendMessage(hmInterface, request)[0];
}
use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.
the class BinRpcClient method getDeviceDescription.
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public Map<String, String> getDeviceDescription(HmInterface hmInterface, String address) throws HomematicClientException {
BinRpcRequest request = new BinRpcRequest("getDeviceDescription");
request.addArg(address);
Object[] result = sendMessage(hmInterface, request);
if (result != null && result.length > 0 && result[0] instanceof Map) {
return (Map<String, String>) result[0];
}
return null;
}
use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.
the class BinRpcClient method setSystemVariable.
/**
* {@inheritDoc}
*/
@Override
public void setSystemVariable(HmInterface hmInterface, String name, Object value) throws HomematicClientException {
BinRpcRequest request = new BinRpcRequest("setSystemVariable");
request.addArg(name);
request.addArg(value);
sendMessage(hmInterface, request);
}
use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.
the class BinRpcClient method init.
/**
* {@inheritDoc}
*/
@Override
public void init(HmInterface hmInterface) throws HomematicClientException {
BinRpcRequest request = new BinRpcRequest("init");
request.addArg(context.getConfig().getBinRpcCallbackUrl());
request.addArg(hmInterface.toString());
sendMessage(hmInterface, request);
}
use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.
the class BinRpcClient method setDatapointValue.
/**
* {@inheritDoc}
*/
@Override
public void setDatapointValue(HmInterface hmInterface, String address, String datapointName, Object value) throws HomematicClientException {
BinRpcRequest request = new BinRpcRequest("setValue");
request.addArg(address);
request.addArg(datapointName);
request.addArg(value);
sendMessage(hmInterface, request);
}
Aggregations